CoreCodeDocs

Choosing a relay

How to check whether a Claude relay is genuine

Last updated: October 28, 2026

Any relay can put "genuine Claude" on its home page. This page shows how to verify for yourself that a relay is backed by Anthropic: which methods prove nothing, which signals cannot be faked, and a script you can run. It works on any relay, CoreCode included.

Key points
  • Asking a model which model it is proves nothing: one line in the system prompt makes any model call itself Claude.
  • What can be verified is behaviour: the Anthropic Messages response shape, a prompt cache that is written and read back, and the rejection of a tampered thinking signature.
  • Anthropic's documentation states that a tampered or undecryptable thinking signature always returns a 400.
  • The checking script check-relay.py needs only Python's standard library and costs a few cents per run.
  • It proves the upstream is Anthropic, not that the tier you chose is the one answering.
  • CoreCode checks the model itself every 3 days with the open-source ModelTrace fingerprint, and publishes the results and raw data on this page.

How relays cut corners

All of these still chat and write code, so everyday use rarely reveals them.

Why asking "which model are you" proves nothing

A model's answer about its identity comes from training data and the system prompt, not from a reliable source. A relay can put "You are Claude Opus" in the system prompt and any model will repeat it; real Claude can also get its own version wrong. Asking for the identity or the knowledge cutoff, or judging the tone, is a hint at most, never evidence.

What works is behavior that only Anthropic's API has and that nobody else can imitate.

Three signals that cannot be faked

1. Response shape and usage fields

The Messages API returns type: "message", an id starting with msg_, and usage with input_tokens and output_tokens, plus cache_creation_input_tokens and cache_read_input_tokens when caching is used. Converting another model's output into this shape is easy, so this check only catches crude conversions; it is the precondition for the other two.

2. The prompt cache is written and read back

Send a system prompt of nearly 20,000 tokens with cache_control. The first call should report cache_creation_input_tokens; the same call right after should report about as many cache_read_input_tokens. Both fields are described in Anthropic's prompt caching documentation.

3. The thinking block's signature

With extended thinking on, Anthropic attaches an encrypted signature to each thinking block. When the block is sent back on the next turn, the API verifies the signature and rejects a modified one with 400. Another vendor's model cannot produce a signature that passes, and a conversion layer has no Anthropic key to verify one. In Anthropic's words, the API uses the signature to verify that thinking blocks were generated by Claude (Thinking), and a tampered or undecryptable signature always returns a 400 (Preserved thinking).

The test: take a signed thinking block with a tool call, change one character of the signature and send it back, which must be rejected; send it back unchanged, which must be accepted. If the tampered signature is accepted too, nothing is verifying it, and the upstream is not Anthropic.

The checking script

The three checks are one script: check-relay.py. It needs Python 3.8+ and the standard library only, and sends your key to the address you give it and nowhere else. Read it before you run it. The source, its tests and issues are on GitHub: CoreCodeAI/claude-relay-check.

curl -fsSLO https://corecode.live/docs/verify/check-relay.py
python3 check-relay.py --base-url https://relay.example --key sk-your-key --model claude-sonnet-5-5

Without --base-url and --key it reads ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN, the configuration Claude Code is using. Add --bearer when the relay wants Authorization: Bearer. A run costs a few cents: two cached requests of nearly 20,000 tokens and four short ones.

https://relay.example/v1/messages  model=claude-sonnet-5-5
[PASS] shape     Messages response, model claude-sonnet-5-5, 143 input tokens
[PASS] cache     wrote 17755 tokens, read 17755 on call 2
[PASS] signature tampered signature rejected (HTTP 400), genuine one accepted
Result: all checks look like Anthropic
ResultMeaning
PASSThis check matches the behavior of Anthropic's API.
WARNDoubtful but not conclusive, such as a cache that is written but never read.
FAILThis check says the upstream is not Anthropic, or the usage is not real. Exit status 1.
ERRORThe request itself failed (no connection, invalid key, no balance, client refused). The check did not finish and says nothing either way. Exit status 2.
SKIPThe model refused the thinking request, or chose not to think this time, so the signature check was skipped. Run it again, or try another model.
Keys limited to Claude Code report ERRORSome relays only admit requests from the Claude Code client and refuse the script with 403. That is a client restriction and says nothing about the upstream. To check CoreCode, use a key in the Claude 满血(可外接)group; keys in the 仅限CC group are refused.

What the script does not prove

Telling the model apart: CoreCode's recurring check

The three signals above prove the upstream is Anthropic; they cannot tell which model answers. For that we check ourselves with the open-source tool ModelTrace. It asks a model to write a few hundred integers between 1 and 355, and every model favours different numbers. ModelTrace compares the distribution with the fingerprints of the 18 GPT and Claude models it holds and works out which one is most likely.

Every 3 days the server runs it with a key in the 「Claude 满血(可外接)」 group: 3 rounds per Claude model, 3 answers per round. The table below updates after each run. Both groups use the same accounts. We do not test from the 「仅限CC」 group because it admits only requests carrying Claude Code's system prompt, and ModelTrace's author notes that this prompt skews the result badly.

Latest run: 2026-11-01 19:17 UTC, 3 rounds per model, 3 answers per round. Every prompt and answer is in 2026-11-01.json, so you can rescore it with ModelTrace.

ModelValid roundsClaude familyThis modelClosest model
claude-fable-5-13 / 395%not in the bankclaude-opus-5-5
claude-haiku-5-53 / 3100%100%claude-haiku-5-5
claude-opus-5-53 / 3100%100%claude-opus-5-5
claude-sonnet-5-53 / 379%78%claude-sonnet-5-5

Earlier runs

Dateclaude-fable-5-1claude-haiku-5-5claude-opus-5-5claude-sonnet-5-5
2026-11-0195% / —100% / 100%100% / 100%79% / 78%
2026-10-31100% / —100% / 100%100% / 100%96% / 79%
2026-10-28100% / —100% / 100%100% / 100%99% / 99%

Each cell is the mean probability of the Claude family / of the requested model.

Reading the table:

For everything else worth checking in a relay, see How to choose a Claude Code relay.

FAQ

Can I tell whether a relay is genuine by asking the model which model it is?

No. A model's answer about itself comes from training data and the system prompt; a relay can change it with one line, and real Claude can get its own version wrong. Look for behaviour nobody else can imitate; see three signals that cannot be faked.

How much does a check cost?

A few cents: two cached requests of nearly 20,000 tokens and four short ones.

Can I use it on CoreCode?

Yes, with a key in the Claude 满血(可外接)group. The 仅限CC group admits Claude Code only, so the script is refused with 403 and reports ERROR, which says nothing either way.

Where does the script send my key?

Only to the address you pass as --base-url; it contacts nothing else. The script is public, so read it before you run it.

If all three checks pass, is it definitely Opus?

Not necessarily. Thinking blocks from Sonnet carry valid signatures too. Judge the tier from the returned model field, the model and price on each billed request, and how it does on hard tasks; see what the script does not prove. CoreCode checks each model every 3 days with ModelTrace; see the recurring check.