Video
Video is a job. You get an id at once and poll for the result. The model is
<provider>/<model>, for example xai/grok-imagine-video or
openrouter/google/veo-3.1-fast.
| Endpoint | Use |
|---|---|
POST /v1/videos | Create, OpenAI dialect (videos.create). Answers 202. |
POST /v1/videos/generations | Create, xAI dialect (@ai-sdk/xai). Answers 200. |
GET /v1/videos/{id} | Status, in the dialect the job was created with |
GET /v1/videos/{id}/content | The video, once completed |
Where Aile relays the download, the link in a completed job's status works without a key for an hour. Anyone holding it can download the video.
1curl https://api.aile.sh/v1/videos \2-H "Authorization: Bearer $AILE_KEY" \3-H "Content-Type: application/json" \4-d '{ "model": "xai/grok-imagine-video", "prompt": "a lighthouse at dusk", "seconds": "6" }'56curl https://api.aile.sh/v1/videos/$VIDEO_ID -H "Authorization: Bearer $AILE_KEY"
Billing
- You pay for the seconds you asked for, once the provider reports the video done. Lipsync and avatar models are the exception: you pay for the length produced (below). So is BytePlus Seedance: you pay the tokens it reports (below).
- xAI's Grok Imagine models and
openrouter/heygen/heygen-video-1are priced per resolution: you pay the per-second price of theresolutionyou send, or of 480p when you send none. A resolution the model does not list is a400. Listings show the dearest resolution. HeyGen Video 1 renders 2K text-to-video at 16:9 or 9:16 only; any otheraspect_ratioat 2K is a400. - A failed, empty or expired job is not charged. Jobs expire after 30 minutes by default.
- The hold stays on your balance while the job runs, and counts toward the key's spend limit (a
402once open jobs hold the rest of it). - A job id is readable only by keys of the account that created it.
size("1280x720") passes through where the model supports it.- One input image is accepted as
input_reference(JSON, or an uploaded file),image, or onefirst_frameinframe_images, as a data URL or an https URL. A text-to-video model refuses it with a400. - Other references (
last_frame,reference_images,reference_audios,keyframes,video,previous_job_id, andinput_references) are a400before anything is held, never silently dropped, except on the lipsync, avatar and Seedance models that take them. - OpenRouter video models refuse a request for an audio track.
- Gemini's Veo (
gemini/veo-3.1-generate-preview,veo-3.1-fast-generate-preview,veo-3.1-lite-generate-preview) is text-to-video only, 4, 6 or 8 seconds, with sound included in the price. Standard renders 720p or 1080p (1080p at 8 seconds only); Fast and Lite render 720p. The aspect ratio is 16:9 or 9:16. Anything else is a400before anything is held. - When a sharer's provider account turns out to have no quota for a model, the request is a
502saying you were not charged, and that sharer stops being offered that model; a retry reaches another sharer. - A provider refusal you can fix (
400,404,413,422…) passes through. One about the sharer's account is a502saying you were not charged. A502or504arrives as503with the real code inx-aile-status. - A key's pins and the routing headers choose the sharer here too.
x-aile-providermust match the model's prefix, andx-aile-max-pricedoes not apply to a per-second price. - Keyless x402 works here when the deployment enables it, except for lipsync, avatar and BytePlus Seedance models: you pay when the render starts, and a render that fails or expires is refunded to the wallet that paid. Poll the job by its id with no key.
Lipsync and avatar
Three sync.so models re-sync a video's lips to an audio track. openrouter/heygen/avatar-iv animates a photo to speak a script or an audio file, and lists at $0.05 per second. The length of the result comes from your media, so you name its length in seconds.
| Lipsync model | Good for | At most, per second | At 25 fps, about | Longest seconds |
|---|---|---|---|---|
sync/lipsync-2 | General use, fastest | $0.12 | $0.065 | 300 |
sync/lipsync-2-pro | Finer facial detail | $0.20 | $0.109 | 180 |
sync/sync-3 | Close-ups, hard angles, covered faces | $0.32 | $0.174 | 30 |
Lipsync is billed per frame produced. The prices above are at list.
1curl https://api.aile.sh/v1/videos \2-H "Authorization: Bearer $AILE_KEY" \3-H "Content-Type: application/json" \4-d '{5 "model": "sync/lipsync-2",6 "seconds": 30,7 "input_references": [8 { "type": "video_url", "video_url": { "url": "https://example.com/clip.mp4" } },9 { "type": "audio_url", "audio_url": { "url": "https://example.com/voice.wav" } }10 ]11}'
secondsis required: a whole number from 1 to the model's longest (180 on avatar-iv). Name it at or above your media's length.- On lipsync you pay for the frames in the finished video; if Aile cannot read the file, its length disagrees with the provider's, or it runs under 10 or over 240 frames a second, you pay the model's full per-second price for each second produced.
sync-3is slow: about 10 to 15 minutes for 30 seconds.- A sharer on sync.so's free, Hobbyist or Hobby plan returns a watermarked video, and Aile cannot tell in advance.
- On avatar you pay for the length produced, rounded up to a second.
- Neither is ever more than
seconds+ 2% + 1 s (rounded up). A render longer than that is withheld and not charged. If no length can be found at all, you pay for the fullseconds. - At most three of these renders can be open per account at once, and repeats are rate limited: after three in an hour that were withheld or ran past the job's 30 minutes, the next create is a
429. video_urlandaudio_urlmust be https URLs the provider can fetch. Aile never fetches them. Send at most one of each kind.- Lipsync takes a video and an audio track, and renders at the video's size, so
size,resolutionandaspect_ratioare a400.sync_modeisbounce,loop,cut_off,silenceorremap;cut_offwhen you send none.promptis ignored on lipsync. - Avatar takes one photo (an
image_urlreference, orinput_reference) and either a script inpromptor anaudio_url.voice_idpicks the voice for a script. - A
400saying the output is longer than the sharer's plan renders means: send shorter media. - These models need an API key. Keyless x402 answers
401.
BytePlus Seedance
ByteDance's Seedance models, served from a sharer's BytePlus ModelArk account.
| Model | Seconds | At most, per second |
|---|---|---|
byteplus/dreamina-seedance-2-5-260628 | 4 to 30 | 480p $0.107, 720p $0.233, 1080p $0.572 |
byteplus/dreamina-seedance-2-0-260128 | 4 to 15 | 480p $0.070, 720p $0.152, 1080p $0.377, 4k $0.778 |
byteplus/dreamina-seedance-2-0-fast-260128 | 4 to 15 | 480p $0.056, 720p $0.122 |
byteplus/dreamina-seedance-2-0-mini-260615 | 4 to 15 | 480p $0.035, 720p $0.076 |
byteplus/seedance-1-0-pro-250528 | 2 to 12 | 480p $0.024, 720p $0.056, 1080p $0.122 |
byteplus/seedance-1-0-pro-fast-251015 | 2 to 12 | 480p $0.010, 720p $0.023, 1080p $0.049 |
- You pay the tokens BytePlus reports. The hold is the price above times
seconds, priced at the widest frame for that resolution, so a 16:9 video costs a little less. Prices are at list. secondsdefaults to 5.resolutiondefaults to 720p, or 1080p on the 1.0 models.- Every model takes a first frame. The 2.5 and 2.0 models also take a
last_frame, up to 30 (2.5) or 9 (2.0) reference images and up to 10 or 3 reference audio clips. 1.0 pro takes alast_frameonly. - Send references as
input_references(image_urlandaudio_urlitems),reference_imagesorreference_audios. A frame and references cannot be mixed. A reference video is a400. aspect_ratiois16:9,4:3,1:1,3:4,9:16,21:9oradaptive.- The 2.5 and 2.0 models add sound unless you send
generate_audio: false, at the same price. The 1.0 models are silent. - BytePlus refuses reference images that show real faces.
- These models need an API key. Keyless x402 answers
401.