Anthropic-compatible Messages
When to use this page
Use this page when your client expects the Anthropic Messages API shape.
Base URL
https://api.quotaflow.ai
Endpoint
POST https://api.quotaflow.ai/v1/messages
Supported models
Use the exact prefixed id returned by your authenticated /models response:
anthropic/claude-*selects the Anthropic identity projection, includingmsg_01...message ids andtoolu_01...client-tool ids.aws-bedrock/claude-*selects the AWS Bedrock identity projection, includingmsg_bdrk_...message ids andtoolu_bdrk_...client-tool ids.
Each Claude key is assigned one of these identity namespaces. Authenticated model discovery, including both /v1/models and /openai/v1/models, returns only the namespace assigned to that key. A request with the other explicit prefix fails as an unknown model (404); use the exact id returned by model discovery.
Both projections use the same key-scoped, capability-verified managed supply pool. The assigned prefix controls the customer-visible response contract, not the upstream vendor selected for a request. The response model is the bare canonical Claude id without the routing prefix. Tool definitions and tool_use_id result references are projected together so their relationship remains intact. Documented cache and thinking-token details are retained when supplied with valid public values; Anthropic-only service_tier and inference_geo fields are omitted from the AWS Bedrock projection. Provider headers, hosts, account metadata, route details, and upstream request ids are not exposed on either projection. The request and event schema at /v1/messages remains Anthropic-compatible for both projections.
Fast tier
Two optional customer prefixes route to a dedicated fast supply tier while keeping the base response identity:
anthropic-fast/claude-*uses the Anthropic identity projection (msg_01...).aws-bedrock-fast/claude-*uses the AWS Bedrock identity projection (msg_bdrk_...).
A -fast/ prefix selects the fast supply pool only. The response contract, message-id shape, and provider-metadata sanitization are identical to the matching base namespace, and the request must still match your key's assigned identity namespace: an anthropic-bound key may send anthropic-fast/claude-* but not aws-bedrock-fast/claude-*. The fast tier is a gated product—-fast/ ids appear in your authenticated /models response only while the fast tier is enabled for your key, and a -fast/ request fails closed as an unknown model when it is not. Keys with their own dedicated supply keep that supply and are unaffected by the prefix.
Currently reviewed base ids include claude-fable-5, claude-sonnet-5, claude-opus-4-8, claude-opus-4-7, claude-opus-4-6, claude-opus-4-5, claude-sonnet-4-6, claude-sonnet-4-5, and claude-haiku-4-5. Availability is evaluated per key and request shape, so /models is authoritative.
Claude namespace model list
The table shows both public response identities for each reviewed base model. A single key returns only one of the two prefixed columns.
| Base model | Anthropic identity | AWS Bedrock identity |
|---|---|---|
| Fable 5 | anthropic/claude-fable-5 | aws-bedrock/claude-fable-5 |
| Sonnet 5 | anthropic/claude-sonnet-5 | aws-bedrock/claude-sonnet-5 |
| Opus 4.8 | anthropic/claude-opus-4.8 | aws-bedrock/claude-opus-4.8 |
| Opus 4.7 | anthropic/claude-opus-4.7 | aws-bedrock/claude-opus-4.7 |
| Opus 4.6 | anthropic/claude-opus-4.6 | aws-bedrock/claude-opus-4.6 |
| Opus 4.5 | anthropic/claude-opus-4.5 | aws-bedrock/claude-opus-4.5 |
| Sonnet 4.6 | anthropic/claude-sonnet-4.6 | aws-bedrock/claude-sonnet-4.6 |
| Sonnet 4.5 | anthropic/claude-sonnet-4.5 | aws-bedrock/claude-sonnet-4.5 |
| Sonnet 4.5 dated | anthropic/claude-sonnet-4.5-20250929 | aws-bedrock/claude-sonnet-4.5-20250929 |
| Opus 4.5 dated | anthropic/claude-opus-4.5-20251101 | aws-bedrock/claude-opus-4.5-20251101 |
| Haiku 4.5 | anthropic/claude-haiku-4.5 | aws-bedrock/claude-haiku-4.5 |
Legacy unprefixed Claude ids remain accepted during migration and follow the key's assigned identity namespace, but new integrations should use the prefixed ids returned by /models.
Extended thinking
Use the same Anthropic-compatible request fields your client already sends.
| Model | Recommended thinking shape |
|---|---|
claude-sonnet-5 | thinking: { "type": "adaptive" }; omit manual budget_tokens |
claude-opus-4-8 | thinking: { "type": "adaptive" } |
claude-opus-4-7 | thinking: { "type": "adaptive" } |
claude-opus-4-6 | thinking: { "type": "adaptive" } or legacy manual thinking |
claude-sonnet-4-6 | thinking: { "type": "adaptive" } or legacy manual thinking |
claude-sonnet-4-5 | Standard Anthropic-compatible thinking fields when enabled for your key |
claude-opus-4-5-20251101 | Standard Anthropic-compatible thinking fields when enabled for your key |
For claude-sonnet-5, claude-opus-4-8, and claude-opus-4-7, adaptive thinking is the supported mode. Send thinking: { "type": "adaptive" } or omit the field to use the model default. Do not send legacy thinking: { "type": "enabled", "budget_tokens": ... } or thinking: { "type": "disabled" } for adaptive-only Claude models; Quotaflow rejects those request shapes with a customer-terminal 400. Streaming responses preserve the Anthropic-compatible SSE event shape.
Sampling controls on adaptive-only Claude models
For claude-sonnet-5, claude-opus-4-8, and claude-opus-4-7, do not send non-default temperature, top_p, or top_k. Those models use adaptive behavior instead of explicit sampling controls. Quotaflow strips those fields where possible before forwarding, but clients should omit them to match the model contract. Use prompting plus thinking: { "type": "adaptive" } and optional output_config.effort for depth control.
Errors and request IDs
Non-streaming errors use the Anthropic-compatible envelope. The request-id response header and body request_id contain the same neutral Quotaflow gateway identifier on both projections. Quotaflow does not synthesize an AWS infrastructure request id:
{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "Invalid request"
},
"request_id": "req_..."
}
Quotaflow returns the standard error types for their matching HTTP status: invalid_request_error (400 and other unmapped 4xx), authentication_error (401), billing_error (402), permission_error (403), not_found_error (404), conflict_error (409), request_too_large (413), rate_limit_error (429), api_error (500-class service failures), timeout_error (504), and overloaded_error (529). Internal route, account, provider, credential, and upstream transport classifications are never returned as error types.
After a streaming response has started, an error is emitted as an Anthropic-compatible SSE event. Its data contains only the documented type and error fields; use the neutral request-id header for gateway correlation.
event: error
data: {"type":"error","error":{"type":"api_error","message":"The service is temporarily unavailable. Please try again later."}}
Curl
curl https://api.quotaflow.ai/v1/messages \
-H "x-api-key: $QUOTAFLOW_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-5",
"max_tokens": 128,
"messages": [
{ "role": "user", "content": "Return only: connected" }
]
}'
Adaptive thinking curl
curl https://api.quotaflow.ai/v1/messages \
-H "x-api-key: $QUOTAFLOW_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-opus-4.8",
"max_tokens": 1024,
"thinking": { "type": "adaptive" },
"messages": [
{ "role": "user", "content": "Solve this carefully, then give the final answer." }
]
}'
SDK environment pattern
export ANTHROPIC_AUTH_TOKEN="$QUOTAFLOW_API_KEY"
export ANTHROPIC_BASE_URL="https://api.quotaflow.ai"
Quotaflow preserves the Anthropic-compatible request and response shape for downstream clients.