跳到主要内容Skip to content
Docs

Messages (v1/messages)

Pass-through endpoint for Anthropic Messages API requests.

Endpoint

http
1POST /v1/messages2Content-Type: application/json

Request example

bash
1curl "https://api.0-0.pro/v1/messages?beta=true" \2  -H "x-api-key: $API_KEY" \3  -H "Content-Type: application/json" \4  -H "anthropic-version: 2023-06-01" \5  -d '{6    "model": "claude-sonnet-4-6",7    "max_tokens": 128,8    "messages": [{"role":"user","content":"Hello"}]9  }'

Pass-through behavior

0-0 forwards the request body, compatible headers, and query string upstream, then returns the upstream response body unchanged. The gateway still authenticates your 0-0 key and records usage.

Usage accounting

  • Claude input_tokens, cache_creation_input_tokens, and cache_read_input_tokens are counted as input tokens.
  • cache_read_input_tokens are recorded as cached tokens.