curl --request POST \
--url https://api.geekidea.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "bytedance/seedance-2.0-mini",
"prompt": "aerial shot of a futuristic city at dusk",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"input": {
"first_frame": {
"image_url": "https://example.com/cat.png",
"file_id": "file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
},
"last_frame": {
"image_url": "https://example.com/cat.png",
"file_id": "file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
},
"reference_images": [
{
"image_url": "https://example.com/cat.png",
"file_id": "file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
}
],
"reference_video_urls": [
"<string>"
],
"reference_audio_urls": [
"<string>"
]
},
"generation_config": {
"generate_audio": true,
"seed": 123,
"negative_prompt": "<string>"
},
"metadata": {}
}
'import requests
url = "https://api.geekidea.ai/v1/videos/generations"
payload = {
"model": "bytedance/seedance-2.0-mini",
"prompt": "aerial shot of a futuristic city at dusk",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"input": {
"first_frame": {
"image_url": "https://example.com/cat.png",
"file_id": "file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
},
"last_frame": {
"image_url": "https://example.com/cat.png",
"file_id": "file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
},
"reference_images": [
{
"image_url": "https://example.com/cat.png",
"file_id": "file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
}
],
"reference_video_urls": ["<string>"],
"reference_audio_urls": ["<string>"]
},
"generation_config": {
"generate_audio": True,
"seed": 123,
"negative_prompt": "<string>"
},
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'bytedance/seedance-2.0-mini',
prompt: 'aerial shot of a futuristic city at dusk',
duration: 5,
resolution: '720p',
aspect_ratio: '16:9',
input: {
first_frame: {
image_url: 'https://example.com/cat.png',
file_id: 'file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01'
},
last_frame: {
image_url: 'https://example.com/cat.png',
file_id: 'file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01'
},
reference_images: [
{
image_url: 'https://example.com/cat.png',
file_id: 'file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01'
}
],
reference_video_urls: ['<string>'],
reference_audio_urls: ['<string>']
},
generation_config: {generate_audio: true, seed: 123, negative_prompt: '<string>'},
metadata: {}
})
};
fetch('https://api.geekidea.ai/v1/videos/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "chatcmpl-0192f1c3a7b87c3e9a4f5b6c7d8e9f01",
"object": "chat.completion",
"model": "deepseek/deepseek-v4.1-flash",
"status": "completed",
"created_at": 123,
"completed_at": 123,
"cancel_requested_at": 123,
"latency_ms": 123,
"api_key": {
"id": "<string>",
"name": "prod"
},
"project_id": "<string>",
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123,
"cache_write_tokens": 123
},
"completion_tokens_details": {
"reasoning_tokens": 123
},
"cost": 0.0000133,
"currency": "USD",
"cost_details": {
"input": 0.0000038,
"cached_input": 0,
"output": 0.0000095,
"discount": 0,
"image": 0.036,
"video": 0.25,
"audio": 0.012,
"models": 1.64,
"workflow_fee": 0.2
}
},
"billing_status": "settled",
"adjustments": [
{
"id": "<string>",
"type": "refund",
"amount": 123,
"reason": "<string>",
"created_at": 123
}
],
"net_cost": 0.0000081,
"estimated_cost": 0.08,
"currency": "USD",
"error_code": "<string>",
"metadata": {},
"output": {
"videos": [
{
"url": "<string>",
"thumbnail_url": "<string>",
"previews": {
"preview": "<string>",
"lite": "<string>",
"grid": "<string>",
"icon": "<string>"
},
"seconds": 5,
"width": 1280,
"height": 720
}
],
"audios": [
{
"url": "<string>",
"seconds": 8.4,
"mime": "audio/wav"
}
]
},
"data": [
{
"url": "<string>",
"b64_json": "<string>",
"revised_prompt": "<string>",
"previews": {
"preview": "<string>",
"lite": "<string>",
"grid": "<string>",
"icon": "<string>"
},
"width": 1024,
"height": 1024
}
],
"line_items": [
{
"type": "model",
"id": "img_0192f1c3a7b87c3e9a4f5b6c7d8e9f01",
"model": "openai/gpt-image-2",
"status": "completed",
"cost": 0.036,
"step": "assets",
"unit": "image",
"quantity": 12,
"unit_price": 0.015,
"amount": 0.18
}
]
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}Create a video
Submits a video generation (text-to-video, image-to-video, first and last frames, multi-reference). Videos are long-running: the response is always 202 with a queued Generation object (with estimated_cost, the amount on hold); poll GET /v1/generations/ for the result and cancel with POST /v1/generations//cancel. Billed as price per second × duration; the price depends on resolution and audio.
curl --request POST \
--url https://api.geekidea.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "bytedance/seedance-2.0-mini",
"prompt": "aerial shot of a futuristic city at dusk",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"input": {
"first_frame": {
"image_url": "https://example.com/cat.png",
"file_id": "file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
},
"last_frame": {
"image_url": "https://example.com/cat.png",
"file_id": "file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
},
"reference_images": [
{
"image_url": "https://example.com/cat.png",
"file_id": "file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
}
],
"reference_video_urls": [
"<string>"
],
"reference_audio_urls": [
"<string>"
]
},
"generation_config": {
"generate_audio": true,
"seed": 123,
"negative_prompt": "<string>"
},
"metadata": {}
}
'import requests
url = "https://api.geekidea.ai/v1/videos/generations"
payload = {
"model": "bytedance/seedance-2.0-mini",
"prompt": "aerial shot of a futuristic city at dusk",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"input": {
"first_frame": {
"image_url": "https://example.com/cat.png",
"file_id": "file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
},
"last_frame": {
"image_url": "https://example.com/cat.png",
"file_id": "file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
},
"reference_images": [
{
"image_url": "https://example.com/cat.png",
"file_id": "file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
}
],
"reference_video_urls": ["<string>"],
"reference_audio_urls": ["<string>"]
},
"generation_config": {
"generate_audio": True,
"seed": 123,
"negative_prompt": "<string>"
},
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'bytedance/seedance-2.0-mini',
prompt: 'aerial shot of a futuristic city at dusk',
duration: 5,
resolution: '720p',
aspect_ratio: '16:9',
input: {
first_frame: {
image_url: 'https://example.com/cat.png',
file_id: 'file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01'
},
last_frame: {
image_url: 'https://example.com/cat.png',
file_id: 'file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01'
},
reference_images: [
{
image_url: 'https://example.com/cat.png',
file_id: 'file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01'
}
],
reference_video_urls: ['<string>'],
reference_audio_urls: ['<string>']
},
generation_config: {generate_audio: true, seed: 123, negative_prompt: '<string>'},
metadata: {}
})
};
fetch('https://api.geekidea.ai/v1/videos/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "chatcmpl-0192f1c3a7b87c3e9a4f5b6c7d8e9f01",
"object": "chat.completion",
"model": "deepseek/deepseek-v4.1-flash",
"status": "completed",
"created_at": 123,
"completed_at": 123,
"cancel_requested_at": 123,
"latency_ms": 123,
"api_key": {
"id": "<string>",
"name": "prod"
},
"project_id": "<string>",
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123,
"cache_write_tokens": 123
},
"completion_tokens_details": {
"reasoning_tokens": 123
},
"cost": 0.0000133,
"currency": "USD",
"cost_details": {
"input": 0.0000038,
"cached_input": 0,
"output": 0.0000095,
"discount": 0,
"image": 0.036,
"video": 0.25,
"audio": 0.012,
"models": 1.64,
"workflow_fee": 0.2
}
},
"billing_status": "settled",
"adjustments": [
{
"id": "<string>",
"type": "refund",
"amount": 123,
"reason": "<string>",
"created_at": 123
}
],
"net_cost": 0.0000081,
"estimated_cost": 0.08,
"currency": "USD",
"error_code": "<string>",
"metadata": {},
"output": {
"videos": [
{
"url": "<string>",
"thumbnail_url": "<string>",
"previews": {
"preview": "<string>",
"lite": "<string>",
"grid": "<string>",
"icon": "<string>"
},
"seconds": 5,
"width": 1280,
"height": 720
}
],
"audios": [
{
"url": "<string>",
"seconds": 8.4,
"mime": "audio/wav"
}
]
},
"data": [
{
"url": "<string>",
"b64_json": "<string>",
"revised_prompt": "<string>",
"previews": {
"preview": "<string>",
"lite": "<string>",
"grid": "<string>",
"icon": "<string>"
},
"width": 1024,
"height": 1024
}
],
"line_items": [
{
"type": "model",
"id": "img_0192f1c3a7b87c3e9a4f5b6c7d8e9f01",
"model": "openai/gpt-image-2",
"status": "completed",
"cost": 0.036,
"step": "assets",
"unit": "image",
"quantity": 12,
"unit_price": 0.015,
"amount": 0.18
}
]
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}Authorizations
Provide your API key in the Authorization header using Bearer auth
Headers
Idempotency key (up to 255 characters): the same key is accepted once per project; repeated submissions return the existing generation
Body
Video generation request: common fields at the top level, media in input, platform parameters in generation_config
Model ID (author/model), see GET /v1/models?type=video
1"bytedance/seedance-2.0-mini"
Prompt
10000"aerial shot of a futuristic city at dusk"
Duration in seconds; allowed values are in the model's generation_config.duration; defaults to the model's default
x >= 15
Resolution tier: 480p / 720p / 1080p / 4k …, affects price; defaults to the model's default
"720p"
Aspect ratio: 16:9 / 9:16 / 1:1 …; defaults to the model's default
"16:9"
Input media. Images take either image_url (https URL or data URL) or file_id; videos and audio take https URLs only
Show child attributes
Show child attributes
Platform-wide video parameters; see generation_config in GET /v1/models/{model} for what each model supports
Show child attributes
Show child attributes
Custom key-value pairs returned as-is (up to 16)
Show child attributes
Show child attributes
Response
OK
Billing record of one call
Public ID, also the billing ID
"chatcmpl-0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
Object type, same as the original response
"chat.completion"
Canonical model ID
"deepseek/deepseek-v4.1-flash"
Status: queued / in_progress / completed / failed / cancelled
queued, in_progress, completed, failed, cancelled "completed"
Creation time (Unix seconds)
Completion time (Unix seconds); null while running
When cancellation was requested (Unix seconds); null if never requested. A generation already sent upstream follows the upstream outcome after cancellation is requested
Total latency (ms)
API key reference
Show child attributes
Show child attributes
Project ID (proj_ prefix)
Usage and cost (shape depends on the call type: text or image); null when failed or not charged
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Billing status: estimated / settled / refunded / adjusted
estimated, settled, refunded, adjusted "settled"
Refunds, extra charges and compensations
Show child attributes
Show child attributes
Net cost (USD) = cost + sum of adjustments
0.0000081
Estimated cost (USD): while the generation is still queued or running, the amount held for it (from the quote); omitted once finished
0.08
Currency
"USD"
Error code when failed
Metadata passed with the call
Show child attributes
Show child attributes
Outputs of an asynchronous task, grouped by kind
Show child attributes
Show child attributes
Generated images (image calls); links are re-signed on every query
Show child attributes
Show child attributes
Cost breakdown of a workflow: each sub-call and each workflow fee (only for run_ and wfc_ IDs)
Show child attributes
Show child attributes
