displayName
AWS Bedrock InvokeModel
vendor
Amazon Web Services
specUrl
https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html
streamingFraming
aws-event-stream
toolUseSchema
Tool-use schema is delegated to the underlying model provider's
native body shape. For Anthropic models on Bedrock, the request /
response body is a wire-compatible Anthropic Messages payload (with
Bedrock-specific fields removed: `model` is set via URL path, and
`anthropic_version` is set in the body). Tool calls therefore
appear as `tool_use` content blocks; tool results as `tool_result`
blocks — identical to Anthropic Messages.
thinkingChannel
content-block
cacheControl
explicit
firstSpecVersion
2023-09-28
currentSpecVersion
2023-09-28
status
standard
requestBodyShape
POST /model/{modelId}/invoke
POST /model/{modelId}/invoke-with-response-stream
Headers:
- `Content-Type: application/json`
- `Accept: application/json` (for InvokeModel) or
`application/vnd.amazon.eventstream` (for InvokeModelWithResponseStream)
- AWS SigV4 `Authorization` header
Body: opaque JSON payload defined by the underlying model provider.
For Anthropic Claude on Bedrock the body is the Anthropic Messages
request shape with these adjustments:
- `anthropic_version` (required, e.g. "bedrock-2023-05-31") instead of
the `anthropic-version` header
- no top-level `model` field (it is supplied via the URL `modelId`)
- all other fields (`messages`, `system`, `max_tokens`, `tools`,
`tool_choice`, `temperature`, `top_p`, `top_k`, `stop_sequences`,
`thinking`, `metadata`) match Anthropic Messages
responseBodyShape
Non-streaming (InvokeModel):
HTTP 200, `application/json` — the full provider-native response
payload as the response body. For Anthropic Claude this is the
Anthropic Messages response (`{id, type, role, model, content,
stop_reason, stop_sequence, usage}`).
Streaming (InvokeModelWithResponseStream):
HTTP 200, `application/vnd.amazon.eventstream` — AWS EventStream
frames. Each frame carries a base64-encoded `bytes` field whose
decoded payload is a JSON event in the provider-native streaming
shape (e.g. Anthropic `message_start` / `content_block_delta` /
`message_stop` events). Bedrock additionally injects a
`amazon-bedrock-invocationMetrics` object on the terminal event
(input/output token counts, latency).
streamingEventTypes
- chunk
- message_start
- content_block_start
- content_block_delta
- content_block_stop
- message_delta
- message_stop
- ping
- internalServerException
- modelStreamErrorException
- modelTimeoutException
- validationException
- throttlingException
toolCallWireFormat
Provider-native. For Anthropic on Bedrock: a `tool_use` content
block on the response message:
{ "type": "tool_use", "id": "toolu_...", "name": "<tool>", "input": { ... } }
toolResultWireFormat
Provider-native. For Anthropic on Bedrock: a `tool_result` content
block in a subsequent user-role message in the request `messages`
array:
{ "type": "tool_result",
"tool_use_id": "toolu_...",
"content": string | ContentBlock[],
"is_error"?: bool }
errorEnvelope
Non-2xx response, `application/json` (Bedrock runtime error envelope):
{ "message": string,
"__type": "<ExceptionName>" }
Common `__type` values: `ValidationException`, `AccessDeniedException`,
`ThrottlingException`, `ServiceQuotaExceededException`,
`ModelTimeoutException`, `ModelStreamErrorException`,
`ModelNotReadyException`, `InternalServerException`.
AWS request-id is returned in the `x-amzn-RequestId` response header.
cacheControlWireFormat
Anthropic-on-Bedrock supports prompt caching using the same
`cache_control` annotation as Anthropic Messages:
{ "type": "text", "text": "...", "cache_control": { "type": "ephemeral" } }
Up to four cache breakpoints per request. Cache hit accounting is
reported as `usage.cache_creation_input_tokens` and
`usage.cache_read_input_tokens` on the response.
current Bedrock TTL options (default 5m; 1h availability varies
by region/model).
rateLimitSignaling
On HTTP 429 `ThrottlingException`: standard AWS retry semantics
apply. Bedrock does not document per-tenant remaining-budget
headers; clients should rely on exponential backoff and the
`retry-after` header when present. Quota state is observable via
CloudWatch service-quotas metrics rather than per-response headers.
reasoningWireFormat
Provider-native. For Anthropic on Bedrock, extended thinking is
requested via `thinking: { type: "enabled", budget_tokens }` in the
request body and returned as `thinking` / `redacted_thinking`
content blocks on the response — identical to Anthropic Messages.
authHeaderFormat
AWS Signature Version 4 over the request:
`Authorization: AWS4-HMAC-SHA256 Credential=..., SignedHeaders=..., Signature=...`
`x-amz-date: <ISO8601>`
`x-amz-security-token: <session-token>` (for STS / role creds)
No API key. Endpoint: `https://bedrock-runtime.<region>.amazonaws.com`.
versioningHeader
No protocol-version header. Provider-payload versioning is carried
in-body (e.g. `anthropic_version: "bedrock-2023-05-31"` for
Anthropic Claude). Bedrock control-plane API version is implicit
in the signed endpoint.