API docs
Use the OpenAI-compatible base URL with Aiduct API keys.
OPENAI_BASE_URL=https://api.aiduct.ai/v1 OPENAI_API_KEY=ad_...
/v1/chat/completionsCreate a chat completion
OpenAI ChatCompletion-compatible endpoint. Set `stream: true` to receive a Server-Sent Events stream where each `data:` line is a `chat.completion.chunk` payload terminated by `data: [DONE]`. Model id is the API-platform id from `GET /v1...
/v1/messagesAnthropic Messages (Claude-native protocol)
Native Anthropic Messages protocol. Use this when your client speaks the Anthropic SDK shape (e.g. Claude Code with `ANTHROPIC_BASE_URL=https://api.aiduct.ai`). Set `stream: true` for SSE; events follow Anthropic's `event: <type>\ndata: ...
/v1/responsesOpenAI Responses API (Codex CLI protocol)
Native OpenAI Responses protocol (`responses.create` SDK method, used by the Codex CLI). Accepts only OpenAI-family platform model ids. Set `stream: true` for SSE event stream.
/v1/images/generationsGenerate or edit an image from a prompt
OpenAI Images-compatible endpoint. Some models, such as `gpt-image-2`, also accept `input_media` reference images. No streaming.
/v1/videos/generationsSubmit an async video-generation job
Always async. Returns a queue ticket; poll the `status_url` until the job completes, then read the final result from `response_url`. Use `cancel_url` to abort. Optional `webhook_url` lets us POST `response.completed` to a customer endpoi...
/v1/queue/requests/{id}Fetch the queued job's result (or terminal-state payload)
200 with the final result when status is `completed`. 200 with `{status:'failed'|'cancelled', error, ...}` when terminal but unsuccessful (no body retry, just inspect). 202 with the polling payload when still in progress.
/v1/queue/requests/{id}/statusCheap poll of a job's current state
Always returns 200 with the latest status. Safe to call at sub-second cadence — does not touch upstream providers.
/v1/queue/requests/{id}/cancelCancel a queued job
Marks the job as cancelled and best-effort asks the upstream provider to stop. Does NOT refund compute already consumed. Returns 409 if the job is already in a terminal state.
/v1/embeddingsCreate vector embeddings for text input
OpenAI-compatible embeddings endpoint. Pass a single string or an array; receive one float (or base64) vector per input. Use `text-embedding-3-small` for cheap baselines and `text-embedding-3-large` for higher retrieval quality.
/v1/audio/speechGenerate speech or queued music from text
Model-specific audio generation endpoint. Speech models return audio bytes synchronously. `minimax-music-v2` returns a 202 queue ticket and rejects speech-only fields such as `voice` and `speed`.
/v1/audio/transcriptionsTranscribe audio into text
OpenAI-compatible multipart speech-to-text endpoint. The gateway returns JSON transcription responses.
/v1/modelsOpenAI-compatible model list
Returns every model the gateway can route to in OpenAI's `{object:'list', data:[…]}` shape, augmented with `available`, `display_name`, `description`, and `pricing`.
/v1/models/catalogSEO-friendly merged model catalog
Slug-friendly catalog used by aiduct.ai marketing pages. Includes pre-formatted price labels and a single-line price summary. Cached 60s.
/v1/blog/postsList published developer blog posts
Paginated list of `dev_blog_posts` rows with `status='published'`. Generated daily by the cron — see `/v1/blog/posts/{slug}` for full Markdown body.
/v1/blog/posts/{slug}Get one blog post by slug
Returns the full Markdown body alongside metadata.
/v1/blog/categoriesList blog categories
Each entry includes the published-post count for that category.