Get started
Which endpoint to call
Base URL, host choice, and which API family to send each request to.
Modelflare uses one API key across several protocols. The JSON envelope is not the same for every model. Pick the family first, then copy the request from the matching guide or model page.
Base URL
Section titled “Base URL”https://modelflare.dev/v1China-facing EdgeOne traffic can use https://origin.modelflare.dev/v1 for the same application. Choose the host before sending a request; do not redirect an in-flight POST between hosts.
Anthropic clients are the exception: ANTHROPIC_BASE_URL is https://modelflare.dev (the site origin, not /v1). The official Claude Code CLI appends the Messages path itself. See Claude Code.
Authentication
Section titled “Authentication”Authorization: Bearer YOUR_MODELFLARE_API_KEYSend this header on every request, including video polling and downloads. Create the key in the console. Details: Authentication.
Families
Section titled “Families”https://modelflare.devChat Completions
POST /v1/chat/completions OpenAI-compatible chat.
Responses
POST /v1/responses Codex and Grok Build.
Anthropic Messages
ANTHROPIC_BASE_URL=https://modelflare.dev The Claude Code CLI appends the Messages path itself.
Images
POST /v1/images/generations GPT Images, Wan Image, and Seedream.
Gemini native
POST /v1/models/{model}:generateContent Gemini image models. Gemini CLI uses the /v1beta spelling itself.
Video
POST /v1/videos Creates a task: poll it, then download the result.
Seedance assets
POST /volc/asset/* Manage Seedance asset groups and provider-side media IDs.
Models
GET /v1/models What the current key can call.
| Family | Typical entry | Use it for |
|---|---|---|
| Chat Completions | POST /v1/chat/completions |
OpenAI-compatible chat. First request: Quickstart. |
| Responses | POST /v1/responses |
Codex and Grok Build. |
| Anthropic Messages | Anthropic-compatible Messages | Claude Code. |
| Images | POST /v1/images/generations |
GPT Images, Wan Image, and Seedream. Exact fields: image models. |
| Gemini native | POST /v1/models/{model}:generateContent |
Gemini image models; also served on origin.modelflare.dev. Gemini CLI builds the same path under /v1beta, which only modelflare.dev serves. |
| Video | POST /v1/videos |
Seedance, Wan, Kling, and other async video models. Poll GET /v1/videos/{task_id} and download GET /v1/videos/{task_id}/content. Exact envelope: video models. |
| Seedance assets | POST /volc/asset/* |
Create, query, update, and delete provider-side asset groups and media. See Seedance asset management. |
| Models | GET /v1/models |
List models the current key can call. |
Wrong-endpoint image and video requests are rejected with unsupported_endpoint. Do not send Gemini image fields to /v1/images/* or GPT Images fields to generateContent. Do not mix Chat Completions fields into a Responses or Anthropic client.
Image and video work with a Smart API Key or a media group API key. Result URLs can expire; transfer the file after a video task succeeds.
Seedance asset-management calls accept the same keys: a Smart API Key or a media group API key. Asset creation is asynchronous; use GetAsset until Active, then pass the returned asset://<ID> unchanged in a supported Seedance request. The gateway keeps asset ownership per user and does not add a separate resource-management charge.
List models for this key
Section titled “List models for this key”https://modelflare.dev/v1/modelscurl https://modelflare.dev/v1/models \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY"The response lists models the current key can call. It is not a substitute for Models & Pricing, which includes prices, groups, and protocol labels. Use the exact id in the JSON model field. See Models and groups.