API reference / Signature verification

API reference

Signature verification

Responses from the Claude Max and ChatGPT groups carry a signature from an AWS Nitro enclave, proving the content came from the official API unmodified. How to get the signature and check it.

Updated

Responses from some groups come with a signed proof. The signature is created inside an AWS Nitro enclave after it receives the raw response from the official API, and the private key never leaves the enclave. Once you have a response, you can check on the verification page (currently in Chinese) that it came from the official API and hasn't been modified.

Which requests are signed

Group Endpoint Upstream
Claude Max POST /v1/messages Official Anthropic API
ChatGPT POST /v1/responses Official OpenAI API

Other groups, and requests made through /v1/chat/completions, are not signed.

Streaming requests

Streaming requests need no extra setup. The last line of the response is an SSE comment:

text
: tee-proof {"v":2,"upstream_host":"api.anthropic.com","response_body_sha256":"...","signature":"...","attestation":"...",...}

SSE clients and SDKs ignore comment lines that start with :, so normal use is unaffected. To verify a response, save the complete response exactly as received:

bash
curl -sS https://api.goodapi.tech/v1/messages \
  -H "x-api-key: $GOODAPI_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{"model":"claude-sonnet-5-5","max_tokens":256,"stream":true,"messages":[{"role":"user","content":"Hello"}]}' \
  -o response.sse

Non-streaming requests

Non-streaming requests need the x-goodapi-proof-mode: multipart header. The response then becomes multipart/mixed with two parts: response is the original JSON response and proof is the signed proof.

bash
curl -sS https://api.goodapi.tech/v1/responses \
  -H "Authorization: Bearer $GOODAPI_API_KEY" \
  -H "content-type: application/json" \
  -H "x-goodapi-proof-mode: multipart" \
  -d '{"model":"gpt-5.6-luna","stream":false,"input":"Hello"}' \
  -o response.multipart

SDKs can't parse multipart responses, so only add this header when you want to verify. Don't include max_output_tokens in Responses requests.

Checking

Save the response as-is with curl -o. Don't use > redirection or copy the terminal output, as that can change the bytes. Then drag the file onto the verification page. The page checks the following locally in your browser and uploads nothing:

Check Meaning
Content not modified The body you received matches the signed original byte for byte
Signature valid The signature covers the upstream host, status code and body hash
Signed by an AWS Nitro enclave The signing key is vouched for by the enclave's attestation, whose certificate chains to the AWS root
Certificate validity Enclave certificates are only valid for a few hours, so "expired" is normal when checking an older response and doesn't affect the first three checks

If you'd rather not rely on a web page, the "想自己核对?" (check it yourself) section of the verification page gives commands that use only jq, openssl and sha256sum.