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.

EndpointUse
POST /v1/videosCreate, OpenAI dialect (videos.create). Answers 202.
POST /v1/videos/generationsCreate, xAI dialect (@ai-sdk/xai). Answers 200.
GET /v1/videos/{id}Status, in the dialect the job was created with
GET /v1/videos/{id}/contentThe 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.

cURLcurl
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" }'
5
6curl 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.
  • 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 402 once 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 one first_frame in frame_images, as a data URL or an https URL. A text-to-video model refuses it with a 400.
  • Other references (last_frame, reference_images, reference_audios, keyframes, video, input_references, previous_job_id) are a 400 before anything is held, never silently dropped.
  • OpenRouter video models refuse a request for an audio track.
  • A provider refusal you can fix (400, 404, 413, 422 …) passes through. One about the lender's account is a 502 saying you were not charged. A 502 or 504 arrives as 503 with the real code in x-aile-status.
  • A key's pins and the routing headers choose the lender here too. x-aile-provider must match the model's prefix, and x-aile-max-price does not apply to a per-second price.
  • An API key is required. Keyless x402 does not cover video.