Skip to content
API Reference · API Overview

API Overview

AllToken REST API basics — authentication, base URL, and response format.


Base URL

Base URL
$https://api.alltoken.ai/v1

This is the base URL for all endpoints. The API is OpenAI-compatible.

Coverage:

  • /chat/completions — Chat completions (streaming, tool calls, thinking, web search)
  • /models - OpenAI-compatible model list for API clients
  • /api-account/models, /api-account/models/{model_path} - catalog list and model-page details
  • /videos/models, /videos/generationsVideo generation (async tasks)
  • Account endpoints (API keys, usage, billing) — see left sidebar

Authentication

All requests require a Bearer token in the Authorization header:

Header
$Authorization: Bearer YOUR_API_KEY

Create and manage API keys in Settings → API Keys.

Response format

All responses are JSON. Errors follow this format:

Error response
1{
2 "error": {
3 "message": "Invalid API key provided",
4 "type": "authentication_error",
5 "code": 401
6 }
7}

Status codes

  • 200 — Success
  • 400 — Bad request (invalid parameters)
  • 401 — Unauthorized (invalid or missing API key)
  • 403 — Forbidden (insufficient permissions)
  • 404 — Resource not found
  • 429 — Rate limit exceeded
  • 500 — Internal server error
  • 502/503 — Upstream provider error (may trigger automatic fallback)