Skip to navigation

Relay an Anthropic GET (models, or your own files/batches)

View as Markdown

GET /v1/models and GET /v1/models/{id} answer locally from the gateway’s own model catalog — the authoritative list of admitted Claude models. Every other admitted GET reads a file or message batch you created through this gateway (including its bare list form, answered locally from the gateway’s ownership records); an id you don’t own answers the same anonymous 404 as an id that never existed. A file’s raw bytes (/{id}/content) are additionally gated on that file’s own downloadable flag at creation time.

Authentication

AuthorizationBearer

Your per-client bearer token — the API key the gateway issued to you. Present it in Authorization: Bearer <token> form. A token that is missing, unknown, or revoked draws a 401. Before the call is sent upstream the token is removed (stripped, or swapped for the upstream’s own credential); it never makes it past the gateway.

Path parameters

pathstringRequired

The path to call on Anthropic’s Claude API, any further / segments included — all of it after /anthropic/ is passed to https://api.anthropic.com/ when the gateway’s model catalog and endpoint/field policy admit the request (see the Anthropic tag description above). Examples: v1/messages, v1/messages/count_tokens, v1/models, v1/models/{model}, v1/files, v1/files/{id}, v1/files/{id}/content, v1/messages/batches, v1/messages/batches/{id}/cancel.

Response

Whatever the upstream answered, relayed as-is (status, headers, body). Rendered here as JSON; the true shape is the upstream provider’s to define.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error