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.
| Format | Models | Base URL | Docs |
|---|---|---|---|
| OpenAI format | GPT family and other OpenAI-compatible models | https://ai.flashapi.top/v1 | OpenAI format |
| Official Anthropic SDK, Claude Code | Claude family | https://ai.flashapi.top (without /v1) | Anthropic format |
OpenCode @ai-sdk/anthropic | Claude family | https://ai.flashapi.top/v1 | OpenCode 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 family | Interface | Reference price | Docs |
|---|---|---|---|
gpt-image-2-count, gpt-image-2.5-*-count, gpt-image-2.6-*-count | OpenAI Images API | $0.011–$0.014 / image | GPT Image generation |
gemini-*-image* | Gemini native format / OpenAI chat format | Per token | Gemini image generation |
GPT Image models bill per call and require the full model name with the
-countsuffix. Gemini image models bill per token in the Gemini group. The console andGET /v1/modelsare 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 family | Capability | Reference price | Docs |
|---|---|---|---|
| Veo 3.1 | Text-to-video / image-to-video | $0.014–$0.029 / second | Veo video generation |
| Seedance 2.5 | Text-to-video / reference-to-video | $0.057 / second | Seedance 2.5 video generation |
Async flow:
POST /v1/videosto create a task.- Save the
idfrom the response. - Call
GET /v1/videos/{id}every 10–15 seconds. - Once the status is
completed, download the video from the returnedvideo_url.
Get started
- Sign up and create an API key.
- Pick the key's group and model by capability.
- Send requests using the base URL and format from the tables above.
- 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.