POST /v1/video — Generate Videos via API
POST /v1/video — Generate Videos via API
Generate AI videos from text prompts or reference images. Supports Google Veo, OpenAI Sora, Kling, WAN, and Seedance models with async polling.
POST
POST /v1/video — Generate Videos via API
TheDocumentation Index
Fetch the complete documentation index at: https://docs.artnex.app/llms.txt
Use this file to discover all available pages before exploring further.
/v1/video endpoint generates video clips from text prompts or a reference start image. Because video generation is computationally intensive, this endpoint is asynchronous — your initial request returns a request_id, and you poll the status endpoint until the video is ready.
Endpoint
Request parameters
Text description of the video you want to generate. Describe the scene, motion, style, and any camera movements. Maximum 4,000 characters.Example:
"A drone flying slowly over a misty mountain range at sunrise, cinematic, 4K"The video model to use. See the Models table for all supported model IDs and their credit costs.
Generation mode. Use
"text-to-video" to generate from a prompt alone, or "image-to-video" to animate a reference image. When using "image-to-video", the image field is required.Start image for image-to-video generation. Required when
mode is "image-to-video". Provide a publicly accessible HTTPS URL or a base64-encoded image string.Output aspect ratio. Accepted values:
"16:9", "9:16", "1:1". Not all models support all ratios; unsupported values fall back to the model’s default.Clip duration in seconds. Accepted values depend on the model (typically
4–12). Refer to the model’s supported durations in the Models table.Response fields
Unique identifier for your generation job. Use this to poll the status endpoint.
Initial job status. Typically
"pending" for new requests.Direct HTTPS URL to the generated video. This field is only present when
status is "completed". Videos are available for 24 hours.Credits deducted from your account when the job completes.
Async polling
Video generation takes between 30 seconds and several minutes depending on the model and clip length. After you receive arequest_id, poll the status endpoint at regular intervals:
status is "completed" or "error". Do not poll more frequently than once per 5 seconds or your requests may be throttled.
Set a maximum polling timeout of 5 minutes (60 attempts at 5-second intervals). If a job does not complete within that window, treat it as failed and retry.
Models
Text-to-video models
| Model ID | Credits | Supported durations | Aspect ratios |
|---|---|---|---|
veo3.1 | 3,000 | 4, 6, 8 s | 16:9, 9:16 |
veo3-fast | 2,000 | 4, 6, 8 s | 16:9, 9:16 |
sora-2 | 3,500 | 4, 8, 12 s | 16:9, 9:16 |
sora-2-pro | 6,000 | 4, 8, 12 s | 16:9, 9:16 |
kling-v2.5-turbo-pro | 1,500 | 5, 10 s | 16:9, 9:16, 1:1 |
kling-v2.6-pro | 5,500 | 5, 10, 16 s | 16:9, 9:16, 1:1 |
wan-2.5 | 3,500 | 5, 10 s | 16:9, 9:16, 1:1 |
seedance-v1.5-pro-t2v | 2,600 | 4–12 s | 16:9, 9:16, 1:1 |
Image-to-video models
| Model ID | Credits | Supported durations |
|---|---|---|
veo3.1-i2v | 3,500 | 4, 6, 8 s |
veo3-fast-i2v | 2,000 | 4, 6, 8 s |
kling-v2.5-turbo-pro-i2v | 1,500 | 5, 10 s |
wan-2.5-i2v | 1,500 | 5–10 s |
seedance-v1.5-pro-i2v | 1,500 | 4–12 s |
Example requests
Example responses
Initial response (job queued):Error codes
| HTTP status | Error code | Cause |
|---|---|---|
400 | missing_prompt | The prompt field is absent or empty |
400 | invalid_model | The model value is not a supported video model ID |
400 | invalid_mode | mode must be "text-to-video" or "image-to-video" |
400 | missing_image | mode is "image-to-video" but no image was provided |
401 | invalid_api_key | The API key is missing, malformed, or revoked |
402 | insufficient_credits | Your account does not have enough credits |
429 | rate_limit_exceeded | You have exceeded your plan’s daily request quota |