API reference
Every route of the public API, generated from schemas/openapi.yaml at build time.
The gateway serves inference (/v1/chat/completions, /v1/messages); cp-api serves everything else. Both are reachable at https://api.ai.ml. Every response carries x-aiml-request-id.
Every operation has a Try it panel: paste an API key into its authorization field and press Send. The call goes through this site to the API — the browser cannot call the API across origins — and is billed and rate-limited like any other call with that key. The docs site passes on the call's body and API headers, drops cookies, stores nothing, and reaches no host but the API.
OpenAI-compatible
Chat Completions, streaming, tools, structured output
Anthropic-compatible
Messages, streaming, tool use, thinking
Native IR
generate, embed, rerank, count_tokens, dry_run (M2)
Catalog
models, endpoints, prices
Usage
look a request up, tail the activity feed
Credits
balance, ledger, top-ups, invoices
Keys
create, rotate, revoke
Account
orgs, projects, members
Webhooks
payment gateway callbacks
Policies
versioned routing policies (M3)