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.
AuthorizationBearer <token>
Bearer token authentication. Use your MPilot virtual-key JWT or admin JWT.
Virtual keys (prefixed with sk-bf-) can also be passed here.
In: header
Path Parameters
modelIdstring
Bedrock model identifier (e.g. anthropic.claude-3-5-sonnet-20240620-v1:0).
inputobject
Response Body
curl -X POST "https://loading/{AI_GATEWAY_URL}/bedrock/model/string/count-tokens" \ -H "Content-Type: application/json" \ -d '{ "input": { "converse": {} } }'{
"inputTokens": 0
}{
"message": "string",
"type": "string"
}{
"message": "string",
"type": "string"
}