Messages
The Anthropic-compatible Messages endpoint and its two lanes.
POST https://api.topbilling.in/v1/messages accepts the Anthropic Messages request body. Send anthropic-version: 2023-06-01.
{
"model": "<model-id>",
"max_tokens": 256,
"system": "You are terse.",
"messages": [{"role": "user", "content": "Three words about Chennai."}]
}
Supported
systemas a string or block array (withcache_control), text / image / tool_use / tool_result blocks,tools,tool_choice,stream,stop_sequences,temperature,top_p,top_k,metadata.user_id,thinking(on reasoning models).POST /v1/messages/count_tokenson models withtoken_counting.
Two lanes
When a model is served by an Anthropic-format upstream, your request bytes are relayed as-is (native lane): unknown fields and anthropic-beta values pass through. Otherwise the request is translated: unsupported semantic fields are rejected with 400 and a capability_rejected: token in the message; advisory fields such as cache_control are dropped and listed in the tb-dropped-hints response header. Each model’s page in Model Square shows which lane it uses.
Response
Standard shape: id (msg_…), content blocks, stop_reason (end_turn, max_tokens, tool_use, stop_sequence) and usage with input_tokens, output_tokens, cache_read_input_tokens, cache_creation_input_tokens.