API documentation

Unified chat completions

Antotech exposes an OpenAI-compatible chat completions endpoint. Create an API key in your dashboard and send it as a Bearer token.

Endpoint

POST /api/v1/chat/completions

Authentication

Authorization: Bearer ant_live_your_key

Example request

curl https://your-domain.example/api/v1/chat/completions \
  -H "Authorization: Bearer ant_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "antotech-auto",
    "messages": [{"role":"user","content":"Explain vectors"}],
    "max_tokens": 600
  }'

Response shape

{
  "id": "chatcmpl_...",
  "object": "chat.completion",
  "model": "antotech-auto",
  "choices": [{
    "index": 0,
    "message": {"role": "assistant", "content": "..."},
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 20,
    "completion_tokens": 180,
    "total_tokens": 200,
    "cost_usd": 0.00185
  }
}

Errors

401 invalid or revoked API key. 402 insufficient balance. 400 malformed request or unknown model. 502 upstream model provider failure.

Limits and safety

Requests are limited to 200 messages and 200,000 characters per message. Streaming is not enabled in the initial API release. Use is subject to the Acceptable Use Policy and upstream provider policies.