API reference
Every route below is for sending model requests, and requires
Authorization: Bearer llmr_sk_<env>_… —
see Authentication.
Chat & completions
| Endpoint | Description |
|---|---|
| POST /v1/chat/completions | OpenAI-compatible chat completions; model:"auto" routes, a slug pins — streaming, tools, automatic fallback |
| POST /v1/route | routing decision only — no upstream call, no charge |
| GET /v1/models | catalog + the auto pseudo-model, restricted to your key's allowlist |
| POST /v1/embeddings | OpenAI-compatible embeddings, billed the same as chat (provider cost + 1%) |
| POST /v1/completions | legacy text-completion endpoint, same billing treatment |
Full request/response detail: Models & routing, Streaming, Tool calling.
Images
| Endpoint | Description |
|---|---|
| POST /v1/images | unified text-to-image generation and image-to-image editing (pass input_references) — one endpoint for both, billed per image |
Audio
| Endpoint | Description |
|---|---|
| POST /v1/audio/speech | text-to-speech; returns raw audio, billed per input character |
| POST /v1/audio/transcriptions | speech-to-text, billed per minute of real audio duration |
Video
| Endpoint | Description |
|---|---|
| POST /v1/videos | submit a video generation job — text-to-video, or image-to-video/reference-to-video on supporting models (pass input_references/input_video_references/input_audio_references); async, returns a video id immediately; billed per requested second at creation time |
| GET /v1/videos/{"{"}id{"}"} | poll status; the finished video URL is included once status is completed |
Async Jobs
Submit a single request that's OK to wait 1 or 6 hours for a deeper discount — same body as
/v1/chat/completions, wrapped.
| Endpoint | Description |
|---|---|
| POST /v1/jobs | submit with completion_window: "1h" or "6h"; returns a job id, or push results to a webhook_url |
| GET /v1/jobs/{"{"}id{"}"} | poll status and read the result once completed |
Batch
For bulk work on the full 24-hour window — the OpenAI-compatible Files + Batches shape, so any OpenAI Batch
SDK client works with a one-line base_url change.
| Endpoint | Description |
|---|---|
| POST /v1/files | upload a JSONL file of requests, purpose "batch" |
| GET /v1/files | list files |
| GET /v1/files/{"{"}id{"}"} | file metadata |
| GET /v1/files/{"{"}id{"}"}/content | download raw file content — input request lines, or the output/error JSONL once a batch completes |
| POST /v1/batches | create a batch from input_file_id, or an inline requests array for small jobs |
| GET /v1/batches | list batches |
| GET /v1/batches/{"{"}id{"}"} | status, progress counts, and output/error file ids once complete |
| POST /v1/batches/{"{"}id{"}"}/cancel | cancel a batch any time before it completes |