Skip to main content

Video Generation API

A unified REST API to generate videos from text prompts or images using 7+ AI models. Video generation is asynchronous — submitting a request returns a task ID, and you poll a separate status endpoint until the video is ready.

Endpoints​

MethodPathDescription
POST/generate/text-videoSubmit a text-to-video task. Returns a taskId immediately.
POST/generate/image-videoSubmit an image-to-video task. Returns a taskId immediately.
GET/generate/video-statusPoll task status. Query params: taskId, outputType (url|binary).

:::tip Asynchronous Submitting a task returns a taskId. Retrieve the finished video with the Check Video Status API. :::

Parameters​

Request body fields for /generate/text-video:

ParameterTypeRequiredDefaultDescription
modelstringYes—Model ID to use for generation, e.g. KLING-3.0-TURBO, SEEDANCE-2.0-MINI, WAN-2.7-VIDEO, HAILUO-2.3, GROK-IMAGINE-VIDEO-1.5, GEMINI-OMNI, HAPPYHORSE-1.1.
promptstringYes—Text description of the video (or, for image-video, how the image should be animated).
durationnumberYes—Length of the video in seconds. Valid values depend on the selected model (e.g. 4–15s, or fixed 6/10s for some models).
resolutionstringYes—Output resolution. One of "480p", "720p", or "1080p" depending on model support — pricing varies per resolution.
aspect_ratiostringNo"16:9"Output aspect ratio. One of "16:9", "9:16", or "1:1".
imagestring[]No—Array containing the source image URL. Required only for image-to-video generation (/generate/image-video).
note

Video rendering can take anywhere from several seconds to a few minutes depending on duration, resolution, and model. Poll on an interval (e.g. every 3-5s) rather than in a tight loop.

Response example​

create

{
"success": true,
"taskId": "imagegpt-vid-...",
"status": "waiting",
"creditsDeducted": 125
}

status · url

Returns JSON. status is "waiting" while rendering, then "success" with a hosted video url once done.

{
"success": true,
"status": "success",
"url": "https://...mp4"
}

status · binary

Returns the raw video file directly once it's ready (no JSON wrapper).

const blob = await response.blob();
const url = URL.createObjectURL(blob);

Examples​

Text-to-video (create)
fetch('https://api.imagegpt.online/generate/text-video', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
},
body: JSON.stringify({
model: 'KLING-3.0-TURBO',
prompt: 'A serene sunset over the ocean with gentle waves',
duration: 6,
resolution: '720p',
aspect_ratio: '16:9'
})
})
.then(res => res.json())
.then(data => console.log('Task ID:', data.taskId));
Image-to-video (body)
body: JSON.stringify({
model: 'WAN-2.7-VIDEO',
prompt: 'Animate the scene with gentle camera movement',
image: ['https://example.com/input.jpg'],
duration: 5,
resolution: '1080p',
aspect_ratio: '9:16'
})
Poll status
fetch('https://api.imagegpt.online/generate/video-status?taskId=imagegpt-vid-...&outputType=url', {
headers: { 'x-api-key': 'YOUR_API_KEY' }
})
.then(res => res.json())
.then(data => console.log('Status:', data.status, data.url));

Pricing​

Charged in credits per second of footage. The per-second rate depends on both the model and the chosen resolution. Total cost = credits/second × duration.

Models​

Each model has its own page with parameters, examples, and a live playground.

ModelModel IDDurations (s)ResolutionsCredits/s
Kling 3.0 TurboKLING-3.0-TURBO4–15720p, 1080p720p: 100 · 1080p: 125
Seedance 2.0 MiniSEEDANCE-2.0-MINI4–15480p, 720p480p: 50 · 720p: 120
Wan 2.7WAN-2.7-VIDEO4–15720p, 1080p720p: 100 · 1080p: 125
Hailuo 2.3HAILUO-2.36, 10720p, 1080p720p: 30 · 1080p: 40
Grok ImagineGROK-IMAGINE-VIDEO-1.54–15480p, 720p480p: 15 · 720p: 25
Gemini OmniGEMINI-OMNI6, 10720p, 1080p720p: 200 · 1080p: 250
Happy HorseHAPPYHORSE-1.14–15720p, 1080p720p: 125 · 1080p: 160
Seedance 2.5SEEDANCE-2-54–30480p, 720p480p: 150 · 720p: 350