Generate AI videos and images from your own code, or let AI agents like Claude and Cursor do it through MCP. Every generation is billed to your VidFlux credits at the same price as the website, and failed generations are refunded automatically.
Sign in and open Settings → API & MCP to create a key. Send it on every request:
Authorization: Bearer vf_your_api_key
curl -X POST https://vidflux.ai/api/v1/videos \
-H "Authorization: Bearer vf_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2",
"prompt": "A corgi surfing a wave at sunset, cinematic",
"aspect_ratio": "16:9",
"duration": 5
}'Response:
{
"id": "3f1c9e0a-...",
"type": "video",
"model": "seedance-2",
"status": "processing",
"credits_used": 425
}For image-to-video, pass public image URLs in image_urls. Add "dry_run": true to any create request to get the exact credit price without generating.
Generation is asynchronous and usually takes 1 to 5 minutes. Poll every 10 to 20 seconds until status is completed or failed.
curl https://vidflux.ai/api/v1/tasks/3f1c9e0a-... \
-H "Authorization: Bearer vf_your_api_key"
{
"id": "3f1c9e0a-...",
"type": "video",
"status": "completed",
"video_url": "https://...mp4",
"error": null,
"credits_used": 425
}curl -X POST https://vidflux.ai/api/v1/images \
-H "Authorization: Bearer vf_your_api_key" \
-H "Content-Type: application/json" \
-d '{"model":"nano-banana-pro","prompt":"Product photo of a glass perfume bottle","resolution":"2K"}'Poll /api/v1/tasks/{id} the same way; the result is in image_url.
| POST /api/v1/videos | Create a video task |
| POST /api/v1/images | Create an image task |
| GET /api/v1/tasks/{id} | Task status and result URL |
| GET /api/v1/models | Models, parameters (JSON Schema) and default prices |
| GET /api/v1/credits | Your credit balance |
Errors return {"error":{"code","message"}} with status 400 (invalid parameters), 401 (bad key), 402 (insufficient credits), 404 or 502 (provider failure).
| Model id | Description | Credits (defaults) |
|---|---|---|
| seedance-2 | Seedance 2.0. Text-to-video or image-to-video (up to 2 frame images, or reference images with use_reference_images). 4-15s, 480p/720p, optional audio. | 680 |
| seedance-2-fast | Seedance 2.0 Fast. Text-to-video or image-to-video (up to 2 frame images, or reference images with use_reference_images). 4-15s, 480p/720p, optional audio. | 544 |
| seedance-2-mini | Seedance 2.0 Mini. Text-to-video or image-to-video (up to 2 frame images, or reference images with use_reference_images). 4-15s, 480p/720p, optional audio. | 360 |
| seedance-2.5 | Seedance 2.5. Text-to-video or image-to-video (up to 2 frame images, or reference images with use_reference_images). 4-30s, 480p/720p, optional audio. | 704 |
| seedance-1-pro | Seedance 1.0 Pro. 5 or 10s at 480p/720p/1080p, text-to-video or image-to-video with optional end frame. | 100 |
| kling-3 | Kling 3.0 Standard. Text-to-video or image-to-video, 3-15s, optional sound and multi-shot. | 200 |
| kling-3-pro | Kling 3.0 Pro. Text-to-video or image-to-video, 3-15s, optional sound and multi-shot. | 300 |
| kling-2.6 | Kling 2.6. 5 or 10s, text-to-video or image-to-video, optional sound. | 150 |
| kling-2.5 | Kling 2.5 Turbo. 5 or 10s, text-to-video or image-to-video, negative prompt supported. | 110 |
| kling-3-motion | Kling 3.0 Motion Control. Transfers the motion of a reference video (video_url) onto the character in image_url. Billed per second of video_duration (the reference video length). | 200 |
| kling-2.6-motion | Kling 2.6 Motion Control. Transfers the motion of a reference video (video_url) onto the character in image_url. Billed per second of video_duration (the reference video length). | 125 |
| veo-3.1 | Veo 3.1 Quality. 8s video with native audio, text-to-video or image-to-video (1 start frame, or 2 for start and end frames). | 280 |
| veo-3.1-fast | Veo 3.1 Fast. 8s video with native audio, text-to-video or image-to-video (1 start frame, or 2 for start and end frames). | 120 |
| minimax-h3 | MiniMax Hailuo H3. 4-15s at 720p or 2K. Up to 2 frame images, or up to 9 reference images with use_reference_images. | 175 |
| gemini-omni-video | Gemini Omni Video. 4/6/8/10s at 720p, 1080p or 4K, up to 7 reference images. | 200 |
| grok-imagine | Grok Imagine. 6s video, fun/normal/spicy modes, up to 7 images. Pro members only. | 96 |
| gpt-image-2.5 | GPT Image 2.5. Text-to-image, or editing with up to 16 reference images, 1K/2K/4K. Strong text rendering. | 20 |
| gpt-image-2 | GPT Image 2. Text-to-image, or editing with up to 16 reference images, 1K/2K/4K. Strong text rendering. | 20 |
| nano-banana-pro | Nano Banana Pro (Gemini 3 Pro Image). Text-to-image or editing with up to 10 reference images, 1K/2K/4K. | 100 |
| nano-banana-2.1 | Nano Banana 2.1. Text-to-image or editing with up to 10 reference images, 1K/2K/4K. | 15 |
| nano-banana-2 | Nano Banana 2. Text-to-image or editing with up to 14 reference images, 1K/2K/4K. | 30 |
Exact parameters per model are returned by GET /api/v1/models.
The MCP endpoint https://vidflux.ai/api/mcp (Streamable HTTP) exposes the tools generate_video, generate_image, get_task, list_models and get_credits, using the same API key. See the MCP server guide for setup in every client.
Claude Code
claude mcp add --transport http vidflux https://vidflux.ai/api/mcp \ --header "Authorization: Bearer vf_your_api_key"
Cursor, Windsurf, VS Code
{
"mcpServers": {
"vidflux": {
"url": "https://vidflux.ai/api/mcp",
"headers": { "Authorization": "Bearer vf_your_api_key" }
}
}
}Claude Desktop
{
"mcpServers": {
"vidflux": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://vidflux.ai/api/mcp",
"--header", "Authorization: Bearer vf_your_api_key"]
}
}
}