Skip to content
Open CastalyConsole

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.

https://modelflare.dev/v1

China-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.

Authorization: Bearer YOUR_MODELFLARE_API_KEY

Send this header on every request, including video polling and downloads. Create the key in the console. Details: Authentication.

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 /v1beta/models/{model}:generateContent Gemini CLI and Gemini image models.
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.
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.

Use a media group API key for image and video. Result URLs can expire; transfer the file after a video task succeeds.

GEThttps://modelflare.dev/v1/models
Terminal windowbash
curl 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.