Generate videos with the OpenAI Videos API. Asynchronous: create a job, poll it, then download the result.
POST https://api.agilecloud.ai/v1/videos # Create a job (JSON or multipart) GET https://api.agilecloud.ai/v1/videos/:id # Poll status GET https://api.agilecloud.ai/v1/videos/:id/content # Download (?variant=video|thumbnail) DELETE https://api.agilecloud.ai/v1/videos/:id # Delete the job and its output
Jobs are private to the API key's account. Listing all videos and remix are not supported.
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes* | Model alias, e.g. wan2.2-t2v-a14b. *Always set it: the OpenAI default (sora-2) is not currently offered and returns 404. |
| prompt | string | Yes | Text description of the video (up to 32,000 characters). |
| seconds | string | No | Clip length in whole seconds, e.g. "5" (1–60; each model enforces its own limit). |
| size | string | No | WIDTHxHEIGHT, e.g. 1280x720. |
| input_reference | file | object | No | Starting image for image-to-video. Send a file in multipart form data, or JSON {"image_url": "data:image/png;base64,..."}. Creative models accept uploads and base64 data URLs only — no remote URLs or file IDs. |
| lora | string | No | Creative models only: the id of an ACAI-curated LoRA style adapter enabled for that model. Arbitrary adapters or URLs are not accepted. |
| lora_scale | number | No | Adapter strength, 0–2. Only valid with lora. |
Create a job:
curl -X POST https://api.agilecloud.ai/v1/videos \
-H "Authorization: Bearer $DIRECTAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.2-t2v-a14b",
"prompt": "A drone shot flying over a mountain lake at sunrise",
"seconds": "5",
"size": "1280x720"
}'Response
{
"id": "video_abc123",
"object": "video",
"status": "queued",
"model": "wan2.2-t2v-a14b"
}Poll, then download when completed:
curl https://api.agilecloud.ai/v1/videos/video_abc123 \ -H "Authorization: Bearer $DIRECTAI_API_KEY" curl -o lake.mp4 https://api.agilecloud.ai/v1/videos/video_abc123/content \ -H "Authorization: Bearer $DIRECTAI_API_KEY"
import time
import httpx
BASE = "https://api.agilecloud.ai"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}
job = httpx.post(f"{BASE}/v1/videos", headers=HEADERS, json={
"model": "wan2.2-t2v-a14b",
"prompt": "A drone shot flying over a mountain lake at sunrise",
"seconds": "5",
"size": "1280x720",
}).raise_for_status().json()
while job["status"] in ("queued", "in_progress"):
time.sleep(10)
job = httpx.get(f"{BASE}/v1/videos/{job['id']}", headers=HEADERS).raise_for_status().json()
if job["status"] == "completed":
video = httpx.get(f"{BASE}/v1/videos/{job['id']}/content", headers=HEADERS, timeout=120)
with open("lake.mp4", "wb") as f:
f.write(video.raise_for_status().content)
else:
print("Failed:", job.get("error"))| Status | Description |
|---|---|
| queued | Job accepted, waiting for a GPU |
| in_progress | Video is being generated |
| completed | Ready — download from /content |
| failed | Generation failed — check the error field |
Video is currently offered on open-weight (Apache-2.0) creative models, which require creative access on your account — see Models. Sora and Sora 2 are not currently offered.
| Model | Description |
|---|---|
| wan2.2-t2v-a14b | Wan 2.2 text-to-video, 14B active parameters |
| wan2.2-i2v-a14b | Wan 2.2 image-to-video (requires input_reference) |
| wan2.2-ti2v-5b | Wan 2.2 text- or image-to-video, 5B (faster) |
Retry-After. Sexual content involving minors or real, identifiable people is always blocked.spritesheet download variant is not available on creative models.POST /v1/video/generations endpoint remains for existing integrations but does not serve creative models.