Skip to documentation
deepthroat
DocsAPI reference
DEEPTHROAT DEVELOPER GUIDE

Anthropic Messages

Use the Messages format for Claude models and Anthropic-compatible tools.

On this pageMessages endpointRequest formatToken counting

Messages endpoint

POST/v1/messages

Use a Claude model ID. Anthropic SDKs take the API origin as their base URL and append the versioned endpoint themselves.

BASE URLhttps://api.cheapai.gay

Request format

bash
curl "https://api.cheapai.gay/v1/messages" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-opus-5",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello."}]
  }'

The response contains content blocks and usage. Anthropic tools use tool_use and tool_result blocks. Set stream: true for Messages streaming events.

Set up Claude Code

Token counting

POST/v1/messages/count_tokens

Send the model and Messages-format input. The returned input_tokens value is an estimate for planning requests; billed usage comes from completed requests.