/v1/messagesauth requiredCreate a Claude message (Anthropic-compatible)
Byte-compatible with api.anthropic.com/v1/messages. Streaming, tool use, prompt caching (cache_control), and extended thinking all work without modification. Use this with Claude Code, the Anthropic SDK, or anything that targets Anthropic's API.
Example request
curl https://api.anvat.app/v1/messages \
-H 'content-type: application/json' \
-H 'x-api-key: $ANVAT_API_KEY' \
-H 'anthropic-version: 2023-06-01' \
-d '{
"model": "claude-opus-4-8",
"max_tokens": 4096,
"messages": [
{ "role": "user", "content": "Refactor my bubble-sort to merge-sort..." }
]
}'Example response
{
"id": "msg_01...",
"type": "message",
"role": "assistant",
"model": "claude-opus-4-8",
"content": [{ "type": "text", "text": "..." }],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 84,
"output_tokens": 412,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
}
}