Claude relay test

Protocol, signature, multimodal and error-contract checks for a Claude API endpoint

55
Does not match the Claude API
One or more protocol, thinking or multimodal probes failed. The endpoint may be repackaging, stripping or building its own version of the API.
Endpoint
relay.example.com
Judged as
claude-opus-5-5
Probes
14 pass · 3 warning · 15 fail
Generated
2026-10-15T08:00:00.000Z

Response structure

Warning Streaming event sequence
A streamed answer must follow the documented event order and carry the same fields as the official API.
Response · HTTP 200
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":64,"messages":[{"role":"user","content":"Reply with the single word: ready"}],"stream":true}
{"type":"message_start","message":{"id":"msg_01AbCdEfGhIjKlMnOpQr","type":"message","role":"assistant","model":"claude-opus-5-5","stop_sequence":null,"usage":{"input_tokens":14,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":1,"service_tier":"standard"},"content":[],"stop_reason":null}}
{"type":"ping"}
{"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}}
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"ready"}}
{"type":"content_block_stop","index":0}
{"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"output_tokens":6}}
{"type":"message_stop"}
Pass Non-streaming message shape
A plain JSON answer must have the documented fields: id, type, role, model, content, stop_reason, usage.
Response · HTTP 200
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":64,"messages":[{"role":"user","content":"Reply with the single word: ready"}]}
{"id":"msg_01AbCdEfGhIjKlMnOpQr","type":"message","role":"assistant","model":"claude-opus-5-5","stop_sequence":null,"usage":{"input_tokens":5200,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":6,"service_tier":"standard"},"content":[{"type":"text","text":"ready"}],"stop_reason":"end_turn"}
Warning Usage accounting
Token counts must be present, consistent between streaming and non-streaming, and not inflated by hidden text.
Pass Response headers
The official API returns a request-id header on every answer.
Pass max_tokens is honoured
A tiny max_tokens must cut the answer short with stop_reason max_tokens and a small output count.
Response · HTTP 200
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":8,"messages":[{"role":"user","content":"Count from 1 to 200, one number per line, with no other text."}]}
{"id":"msg_01AbCdEfGhIjKlMnOpQr","type":"message","role":"assistant","model":"claude-opus-5-5","stop_sequence":null,"usage":{"input_tokens":5200,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":8,"service_tier":"standard"},"content":[{"type":"text","text":"1\n2\n3\n4"}],"stop_reason":"max_tokens"}
Pass Stop sequences
A stop sequence must end the answer, be reported as stop_sequence, and not appear in the text.
Response · HTTP 200
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":120,"messages":[{"role":"user","content":"Write the numbers 1 to 10 separated by single spaces, nothing else."}],"stop_sequences":["5"]}
{"id":"msg_01AbCdEfGhIjKlMnOpQr","type":"message","role":"assistant","model":"claude-opus-5-5","stop_sequence":"5","usage":{"input_tokens":5200,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":6,"service_tier":"standard"},"content":[{"type":"text","text":"1 2 3 4 "}],"stop_reason":"stop_sequence"}
Pass System prompt
The system field must reach the model. A relay that drops it answers the user question instead.
Response · HTTP 200
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":120,"messages":[{"role":"user","content":"What is 2 + 2?"}],"system":"Whatever the user asks, reply with exactly the single word PINEAPPLE and nothing else."}
{"id":"msg_01AbCdEfGhIjKlMnOpQr","type":"message","role":"assistant","model":"claude-opus-5-5","stop_sequence":null,"usage":{"input_tokens":5200,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":6,"service_tier":"standard"},"content":[{"type":"text","text":"PINEAPPLE"}],"stop_reason":"end_turn"}
Pass Conversation history
Earlier turns must reach the model: it has to repeat a secret word from the first message.
Response · HTTP 200
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":60,"messages":[{"role":"user","content":"My secret word is ZEBRA3C9131. Remember it."},{"role":"assistant","content":"Understood. I will remember it."},{"role":"user","content":"What is my secret word? Reply with only the word."}]}
{"id":"msg_01AbCdEfGhIjKlMnOpQr","type":"message","role":"assistant","model":"claude-opus-5-5","stop_sequence":null,"usage":{"input_tokens":5200,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":6,"service_tier":"standard"},"content":[{"type":"text","text":"ZEBRA3C9131"}],"stop_reason":"end_turn"}
Pass Tool calling
A forced tool call must return a tool_use block with an id, the tool name and structured input.
Response · HTTP 200
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":200,"tools":[{"name":"get_weather","description":"Current weather for a city.","input_schema":{"type":"object","properties":{"city":{"type":"string"}},"required":["city"]}}],"tool_choice":{"type":"tool","name":"get_weather"},"messages":[{"role":"user","content":"What is the weather in Paris?"}]}
{"id":"msg_01AbCdEfGhIjKlMnOpQr","type":"message","role":"assistant","model":"claude-opus-5-5","stop_sequence":null,"usage":{"input_tokens":14,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":6,"service_tier":"standard"},"content":[{"type":"tool_use","id":"toolu_01XyZ","name":"get_weather","input":{"city":"Paris"}}],"stop_reason":"tool_use"}
Pass Tool result round trip
A tool_use followed by a tool_result must be accepted and the result used in the answer.
Response · HTTP 200
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":120,"tools":[{"name":"get_weather","description":"Current weather for a city.","input_schema":{"type":"object","properties":{"city":{"type":"string"}},"required":["city"]}}],"messages":[{"role":"user","content":"What is the weather in Paris? Answer in one sentence that includes the temperature."},{"role":"assistant","content":[{"type":"tool_use","id":"toolu_01ABCDEFGHIJKLMNOPQRSTUV","name":"get_weather","input":{"city":"Paris"}}]},{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_01ABCDEFGHIJKLMNOPQRSTUV","content":"43 degrees Celsius, clear sky"}]}]}
{"id":"msg_01AbCdEfGhIjKlMnOpQr","type":"message","role":"assistant","model":"claude-opus-5-5","stop_sequence":null,"usage":{"input_tokens":5200,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":6,"service_tier":"standard"},"content":[{"type":"text","text":"It is 43 degrees in Paris."}],"stop_reason":"end_turn"}
Warning Streaming tool call
A streamed tool call must assemble into valid JSON input and end with stop_reason tool_use.
Response · HTTP 200
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":200,"stream":true,"tools":[{"name":"get_weather","description":"Current weather for a city.","input_schema":{"type":"object","properties":{"city":{"type":"string"}},"required":["city"]}}],"tool_choice":{"type":"tool","name":"get_weather"},"messages":[{"role":"user","content":"What is the weather in Paris?"}]}
{"type":"message_start","message":{"id":"msg_01AbCdEfGhIjKlMnOpQr","type":"message","role":"assistant","model":"claude-opus-5-5","stop_sequence":null,"usage":{"input_tokens":14,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":1,"service_tier":"standard"},"content":[],"stop_reason":null}}
{"type":"content_block_start","index":0,"content_block":{"type":"tool_use","id":"toolu_01XyZ","name":"get_weather","input":{}}}
{"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":"{\"city\": "}}
{"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":"\"Paris\"}"}}
{"type":"content_block_stop","index":0}
{"type":"message_delta","delta":{"stop_reason":"tool_use","stop_sequence":null},"usage":{"output_tokens":20}}
{"type":"message_stop"}
Pass Token counting endpoint
POST /v1/messages/count_tokens should exist and return input_tokens. Many relays leave it out; that is only a warning.
Response · HTTP 200
Request: /v1/messages/count_tokens
{"model":"claude-opus-5-5","messages":[{"role":"user","content":"Hello, Claude."}]}
{"input_tokens":9}

Thinking and signature

Fail Thinking blocks and signature
With thinking on, the stream must carry a thinking block and a signature. Relays often drop or fake them.
Response · HTTP 200
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":2048,"stream":true,"thinking":{"type":"enabled","budget_tokens":1024},"messages":[{"role":"user","content":"What is 17 * 24? Think it through, then answer with the number."}]}
{"type":"message_start","message":{"id":"msg_01AbCdEfGhIjKlMnOpQr","type":"message","role":"assistant","model":"claude-opus-5-5","stop_sequence":null,"usage":{"input_tokens":14,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":1,"service_tier":"standard"},"content":[],"stop_reason":null}}
{"type":"ping"}
{"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}}
{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"ready"}}
{"type":"content_block_stop","index":0}
{"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"output_tokens":6}}
{"type":"message_stop"}
Fail Thinking in a plain answer
A non-streaming answer with thinking on must hold a thinking block with text and a signature.
Response · HTTP 200
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":2048,"thinking":{"type":"enabled","budget_tokens":1024},"messages":[{"role":"user","content":"What is 23 * 19? Think it through, then answer with the number."}]}
{"id":"msg_01AbCdEfGhIjKlMnOpQr","type":"message","role":"assistant","model":"claude-opus-5-5","stop_sequence":null,"usage":{"input_tokens":5200,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":6,"service_tier":"standard"},"content":[{"type":"text","text":"437"}],"stop_reason":"end_turn"}
Fail Thinking round trip
The thinking block from one answer is sent back in the next request. A forged signature is refused by the real API.
Response · HTTP 200
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":2048,"thinking":{"type":"enabled","budget_tokens":1024},"messages":[{"role":"user","content":"What is 12 + 30? Think briefly, then answer with the number."}]}
{"id":"msg_01AbCdEfGhIjKlMnOpQr","type":"message","role":"assistant","model":"claude-opus-5-5","stop_sequence":null,"usage":{"input_tokens":5200,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":6,"service_tier":"standard"},"content":[{"type":"text","text":"42"}],"stop_reason":"end_turn"}

Images and documents

Fail Image understanding
A generated two-colour image is sent; the model must name both colours. A relay that strips images cannot.
Response · HTTP 200
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":60,"messages":[{"role":"user","content":[{"type":"image","source":{"type":"base64","media_type":"image/png","data":"[308 base64 chars]"}},{"type":"text","text":"The picture has a left half and a right half, each one solid colour (red, green, blue, yellow, black, white, orange or purple). Reply exactly as LEFT=<colour>, RIGHT=<colour>."}]}]}
{"id":"msg_01AbCdEfGhIjKlMnOpQr","type":"message","role":"assistant","model":"claude-opus-5-5","stop_sequence":null,"usage":{"input_tokens":5200,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":6,"service_tier":"standard"},"content":[{"type":"text","text":"It looks like a nice picture."}],"stop_reason":"end_turn"}
Fail Two images in one message
Both images must reach the model, in order.
Response · HTTP 200
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":80,"messages":[{"role":"user","content":[{"type":"text","text":"Image 1:"},{"type":"image","source":{"type":"base64","media_type":"image/png","data":"[304 base64 chars]"}},{"type":"text","text":"Image 2:"},{"type":"image","source":{"type":"base64","media_type":"image/png","data":"[308 base64 chars]"}},{"type":"text","text":"Each picture has a left half and a right half in one solid colour (red, green, blue, yellow, black, white, orange or purple). Reply exactly as IMAGE1=<left>/<right>, IMAGE2=<left>/<right>."}]}]}
{"id":"msg_01AbCdEfGhIjKlMnOpQr","type":"message","role":"assistant","model":"claude-opus-5-5","stop_sequence":null,"usage":{"input_tokens":5200,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":6,"service_tier":"standard"},"content":[{"type":"text","text":"It looks like a nice picture."}],"stop_reason":"end_turn"}
Fail Large image
A 1000 by 1000 image must be accepted and read, not refused or silently shrunk to nothing.
Response · HTTP 200
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":60,"messages":[{"role":"user","content":[{"type":"image","source":{"type":"base64","media_type":"image/png","data":"[9800 base64 chars]"}},{"type":"text","text":"The picture has a left half and a right half, each one solid colour (red, green, blue, yellow, black, white, orange or purple). Reply exactly as LEFT=<colour>, RIGHT=<colour>."}]}]}
{"id":"msg_01AbCdEfGhIjKlMnOpQr","type":"message","role":"assistant","model":"claude-opus-5-5","stop_sequence":null,"usage":{"input_tokens":5200,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":6,"service_tier":"standard"},"content":[{"type":"text","text":"It looks like a nice picture."}],"stop_reason":"end_turn"}
Fail PDF understanding
A generated one-page PDF holds a random code; the model must read it back.
Response · HTTP 200
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":60,"messages":[{"role":"user","content":[{"type":"document","source":{"type":"base64","media_type":"application/pdf","data":"[800 base64 chars]"}},{"type":"text","text":"What is the verification code in the attached document? Reply with the code only."}]}]}
{"id":"msg_01AbCdEfGhIjKlMnOpQr","type":"message","role":"assistant","model":"claude-opus-5-5","stop_sequence":null,"usage":{"input_tokens":5200,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":6,"service_tier":"standard"},"content":[{"type":"text","text":"I cannot open documents."}],"stop_reason":"end_turn"}
Fail Multi-page PDF
A three-page PDF holds the code on its last page; the whole document must reach the model.
Response · HTTP 200
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":60,"messages":[{"role":"user","content":[{"type":"document","source":{"type":"base64","media_type":"application/pdf","data":"[1568 base64 chars]"}},{"type":"text","text":"What is the verification code on the last page? Reply with the code only."}]}]}
{"id":"msg_01AbCdEfGhIjKlMnOpQr","type":"message","role":"assistant","model":"claude-opus-5-5","stop_sequence":null,"usage":{"input_tokens":5200,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":6,"service_tier":"standard"},"content":[{"type":"text","text":"I cannot open documents."}],"stop_reason":"end_turn"}
Fail Plain-text document
A text document block must be accepted and read.
Response · HTTP 200
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":60,"messages":[{"role":"user","content":[{"type":"document","source":{"type":"text","media_type":"text/plain","data":"Memo\n\nThe verification code is 8ADWEV.\nKeep it safe."}},{"type":"text","text":"What is the verification code in the document? Reply with the code only."}]}]}
{"id":"msg_01AbCdEfGhIjKlMnOpQr","type":"message","role":"assistant","model":"claude-opus-5-5","stop_sequence":null,"usage":{"input_tokens":5200,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":6,"service_tier":"standard"},"content":[{"type":"text","text":"I cannot open documents."}],"stop_reason":"end_turn"}

Model identity

Pass Model identity
Asks who trained the model. An answer naming another vendor is a strong sign of substitution.
Response · HTTP 200
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":120,"messages":[{"role":"user","content":"Which company trained you, and what is the name of your model family? Answer in one short sentence."}]}
{"id":"msg_01AbCdEfGhIjKlMnOpQr","type":"message","role":"assistant","model":"claude-opus-5-5","stop_sequence":null,"usage":{"input_tokens":5200,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":6,"service_tier":"standard"},"content":[{"type":"text","text":"I am Claude, trained by Anthropic."}],"stop_reason":"end_turn"}

Error handling

Pass Wrong key is refused
A made-up key must be refused with 401 or 403, not answered and not a server error.
Response · HTTP 401
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":64,"messages":[{"role":"user","content":"Reply with the single word: ready"}]}
{"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"}}
Fail Invalid max_tokens
A non-numeric max_tokens must be rejected with 400 or 422.
Response · HTTP 500
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":"invalid_number","messages":[{"role":"user","content":"hi"}]}
{"type":"error","error":{"type":"api_error","message":"Service temporarily unavailable."}}
Pass Invalid thinking setting
An unknown thinking type must be rejected with 400 or 422.
Response · HTTP 400
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":256,"thinking":{"type":"invalid_value"},"messages":[{"role":"user","content":"hi"}]}
{"type":"error","error":{"type":"invalid_request_error","message":"thinking.type invalid"}}
Fail Thinking budget too small
A thinking budget below the minimum must be rejected with 400 or 422.
Response · HTTP 500
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":2048,"thinking":{"type":"enabled","budget_tokens":100},"messages":[{"role":"user","content":"hi"}]}
{"type":"error","error":{"type":"api_error","message":"Service temporarily unavailable."}}
Pass Empty messages
An empty messages list must be rejected with 400 or 422.
Response · HTTP 400
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":64,"messages":[]}
{"type":"error","error":{"type":"invalid_request_error","message":"messages: at least one message is required"}}
Fail Invalid role
A message role the API does not define must be rejected with 400 or 422.
Response · HTTP 500
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":64,"messages":[{"role":"robot","content":"hi"}]}
{"type":"error","error":{"type":"api_error","message":"Service temporarily unavailable."}}
Fail Missing model
A request without a model must be rejected with 400 or 422, not given a default.
Response · HTTP 500
Request: /v1/messages
{"max_tokens":64,"messages":[{"role":"user","content":"hi"}]}
{"type":"error","error":{"type":"api_error","message":"Service temporarily unavailable."}}
Fail Broken JSON body
A body that is not valid JSON must be rejected with 400 or 422.
Response · HTTP 500
Request: /v1/messages
{"model": "x", "max_tokens": 64, "messages": [
{"type":"error","error":{"type":"api_error","message":"Service temporarily unavailable."}}
Fail Temperature out of range
A temperature above 1 must be rejected with 400 or 422, not clamped silently.
Response · HTTP 500
Request: /v1/messages
{"model":"claude-opus-5-5","max_tokens":64,"temperature":5,"messages":[{"role":"user","content":"hi"}]}
{"type":"error","error":{"type":"api_error","message":"Service temporarily unavailable."}}
Pass Unknown model name
A model that does not exist must be refused (400 or 404), not silently served by another model.
Response · HTTP 404
Request: /v1/messages
{"model":"claude-does-not-exist-0","max_tokens":64,"messages":[{"role":"user","content":"Reply with the single word: ready"}]}
{"type":"error","error":{"type":"not_found_error","message":"model: not found"}}

SAMPLESimulated data to show the report format; not a measurement of any provider

Black-box checks against the public Messages API contract. They show how an endpoint behaves; they cannot prove where the model runs.