v1

latestOpenAPI 3.1.0Apache 2.02026-07-264001921002.3 KB
Bedrock Integration

Count tokens (Bedrock format)

Counts tokens for a Converse-style request using AWS Bedrock format. The request body must include input.converse with a complete Converse payload; only Converse-shaped input is supported.

post/bedrock/model/{modelId}/count-tokens

Path parameters

modelIdstring required

Bedrock model identifier (e.g. anthropic.claude-3-5-sonnet-20240620-v1:0).

Request body

Response

Successful response

inputTokensinteger

Number of input tokens that would be billed for this request.