Skip to content

API reference ​

Flash API splits into three capabilities: text, image, and video. Text endpoints bill per token. For images, the GPT Image family bills per call and the Gemini image models bill per token. Video models bill per second of generated footage.

Text generation ​

The existing GPT and Claude request formats work unchanged. Pick the endpoint that matches the SDK your project uses.

FormatModelsBase URLDocs
OpenAI formatGPT family and other OpenAI-compatible modelshttps://ai.flashapi.top/v1OpenAI format
Official Anthropic SDK, Claude CodeClaude familyhttps://ai.flashapi.top (without /v1)Anthropic format
OpenCode @ai-sdk/anthropicClaude familyhttps://ai.flashapi.top/v1OpenCode configuration

Image generation ​

Creating an image API key

Pick the group by model family: the GPT Image family uses the Image & Video group (图片视频专用分组), and the Gemini image models use the Gemini group (Gemini).

Model familyInterfaceReference priceDocs
gpt-image-2-count, gpt-image-2.5-*-count, gpt-image-2.6-*-countOpenAI Images API$0.011–$0.014 / imageGPT Image generation
gemini-*-image*Gemini native format / OpenAI chat formatPer tokenGemini image generation

GPT Image models bill per call and require the full model name with the -count suffix. Gemini image models bill per token in the Gemini group. The console and GET /v1/models are the source of truth for model names.

Video generation ​

Creating a video API key

Before calling a video model, create an API key in the console and pick the Image & Video group. Video bills by the actual generated duration, priced per second.

Video generation takes a while, so go async: create a task, grab its id, and poll the task by ID. Don't hold a single create request open until the render finishes.

Model familyCapabilityReference priceDocs
Veo 3.1Text-to-video / image-to-video$0.014–$0.029 / secondVeo video generation
Seedance 2.5Text-to-video / reference-to-video$0.057 / secondSeedance 2.5 video generation

Async flow:

  1. POST /v1/videos to create a task.
  2. Save the id from the response.
  3. Call GET /v1/videos/{id} every 10–15 seconds.
  4. Once the status is completed, download the video from the returned video_url.

Get started ​

  1. Sign up and create an API key.
  2. Pick the key's group and model by capability.
  3. Send requests using the base URL and format from the tables above.
  4. Check usage and billing details in the console.

Models and prices may change with upstream providers. Live pricing and the console are the source of truth.

One base URL for GPT, Claude and Gemini