Skip to main content
POST
/
v1
/
video
POST /v1/video — Generate Videos via API
curl --request POST \
  --url https://api.example.com/v1/video \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>",
  "model": "<string>",
  "mode": "<string>",
  "image": "<string>",
  "aspect_ratio": "<string>",
  "duration": 123
}
'
{
  "request_id": "<string>",
  "status": "<string>",
  "video_url": "<string>",
  "credits_used": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.artnex.app/llms.txt

Use this file to discover all available pages before exploring further.

The /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

POST https://api.artnex.ai/v1/video

Request parameters

prompt
string
required
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"
model
string
required
The video model to use. See the Models table for all supported model IDs and their credit costs.
mode
string
default:"text-to-video"
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.
image
string
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.
aspect_ratio
string
default:"16:9"
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.
duration
integer
Clip duration in seconds. Accepted values depend on the model (typically 412). Refer to the model’s supported durations in the Models table.

Response fields

request_id
string
required
Unique identifier for your generation job. Use this to poll the status endpoint.
status
string
Initial job status. Typically "pending" for new requests.
video_url
string
Direct HTTPS URL to the generated video. This field is only present when status is "completed". Videos are available for 24 hours.
credits_used
integer
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 a request_id, poll the status endpoint at regular intervals:
GET https://api.artnex.ai/v1/video/status/{request_id}
Poll every 5 seconds until 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 IDCreditsSupported durationsAspect ratios
veo3.13,0004, 6, 8 s16:9, 9:16
veo3-fast2,0004, 6, 8 s16:9, 9:16
sora-23,5004, 8, 12 s16:9, 9:16
sora-2-pro6,0004, 8, 12 s16:9, 9:16
kling-v2.5-turbo-pro1,5005, 10 s16:9, 9:16, 1:1
kling-v2.6-pro5,5005, 10, 16 s16:9, 9:16, 1:1
wan-2.53,5005, 10 s16:9, 9:16, 1:1
seedance-v1.5-pro-t2v2,6004–12 s16:9, 9:16, 1:1

Image-to-video models

Model IDCreditsSupported durations
veo3.1-i2v3,5004, 6, 8 s
veo3-fast-i2v2,0004, 6, 8 s
kling-v2.5-turbo-pro-i2v1,5005, 10 s
wan-2.5-i2v1,5005–10 s
seedance-v1.5-pro-i2v1,5004–12 s

Example requests

# Text-to-video
curl --request POST \
  --url https://api.artnex.ai/v1/video \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "prompt": "A drone flying slowly over a misty mountain range at sunrise, cinematic, 4K",
    "model": "veo3-fast",
    "mode": "text-to-video",
    "aspect_ratio": "16:9",
    "duration": 6
  }'

Example responses

Initial response (job queued):
{
  "request_id": "req_vid_abc123xyz",
  "status": "pending",
  "credits_used": 0
}
Status response (completed):
{
  "request_id": "req_vid_abc123xyz",
  "status": "completed",
  "video_url": "https://cdn.artnex.ai/video/req_vid_abc123xyz/output.mp4",
  "credits_used": 2000
}

Error codes

HTTP statusError codeCause
400missing_promptThe prompt field is absent or empty
400invalid_modelThe model value is not a supported video model ID
400invalid_modemode must be "text-to-video" or "image-to-video"
400missing_imagemode is "image-to-video" but no image was provided
401invalid_api_keyThe API key is missing, malformed, or revoked
402insufficient_creditsYour account does not have enough credits
429rate_limit_exceededYou have exceeded your plan’s daily request quota
Use veo3-fast (2,000 credits) or kling-v2.5-turbo-pro (1,500 credits) for iteration. Switch to veo3.1 or sora-2 for final production clips.