Request example
Anthropic Messages API format. Select a route via the URL path.
POST /<route-alias>/v1/messages
x-api-key: rk_xxx
anthropic-version: 2023-06-01
Content-Type: application/json
{
"model": "claude-sonnet-4-6",
"max_tokens": 1024,
"messages": [
{ "role": "user", "content": "Hello" }
]
}{
"type": "message",
"role": "assistant",
"content": [
{ "type": "text", "text": "Hello! How can I help?" }
],
"usage": {
"input_tokens": 12,
"output_tokens": 8,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
}
}Select a route from the URL path (for example /claude-fast/v1/messages). The buyer ledger meters five token classes: uncached input, output, cache write (5m), cache write (1h), and cache read. Each class is billed independently and debited from your prepaid USDC balance in real time.