APIKO
Video Series

Wan 3.0 Reference-to-Video API

  • Generates video from reference images, videos and audio; the model works out the intent from the prompt and the material.
  • Refer to the material in the prompt as “Image 1”, “Video 1”, “Audio 1” (numbered from 1 in array order); images, videos and audio are numbered separately.
  • First and last frames are not accepted here. To fix the opening and closing frames use Wan 3.0 Image-to-Video.
  • Reference videos are billed; reference images and audio are not.
  • Videos of 2 to 30 seconds at 480p, 720p or 1080p.
  • Standard and Prime take identical parameters, defaults and limits; only the model id and the price differ (see Wan 3.0 Prime Reference-to-Video).
  • Asynchronous: POST /v1/videos returns a task id; poll GET /v1/videos/{id} or GET /v1/tasks/{id} until the task completes.
  • Result links are APIKO-signed and kept for 24 hours; download anything you need to keep.
  • Billing
    • Billed seconds = output duration + total length of the reference videos.
    • Charged per second at the price of the chosen resolution; prices are on the model page.
    • When the task is accepted, output duration + 15 seconds per distinct reference video is held; when it finishes, it is settled to the seconds the model reports (output + actual reference length) and the difference is refunded.
    • Reference images and reference audio are not billed.
    • A task that fails is refunded in full.
POST
/
v1
/
videos
TASK_ID=$(curl https://api.apiko.app/v1/videos \
  -H "Authorization: Bearer $APIKO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "wan3.0-reference-video",
  "duration": 5,
  "resolution": "720p",
  "aspect_ratio": "16:9",
  "prompt": "Image 1 comes to life: the paper boats glide across the lake at sunset.",
  "reference_image_urls": [
    "https://apiko.app/imgs/model-cards/models-video.webp"
  ]
}' | python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])')

while :; do
  TASK=$(curl -s https://api.apiko.app/v1/videos/$TASK_ID \
    -H "Authorization: Bearer $APIKO_API_KEY")
  printf '%s\n' "$TASK"
  printf '%s' "$TASK" | grep -qE '"status": *"(completed|failed)"|"error": *\{' && break
  sleep 5
done
{
  "id": "task_abc123",
  "object": "video",
  "model": "wan3.0-reference-video",
  "status": "completed",
  "progress": 100,
  "video_url": "https://api.apiko.app/v1/tasks/task_abc123/artifacts/video/content?access=…"
}

Authorizations

Authorization
stringrequired
All requests use Bearer authentication: Authorization: Bearer <API_KEY>.
Create a key in Console → API Keys.
Routes
string
  • POST /v1/videos — create a video task
  • GET /v1/videos/{id} — query the task and read video_url
  • GET /v1/tasks/{id} — query the same task in the shared task format

Body

application/json
model
stringdefault:wan3.0-reference-videorequired
Use this exact public model id.
Available options: wan3.0-reference-video
Example:"wan3.0-reference-video"
prompt
stringrequired
Video description.
  • Chinese and English are supported. Up to 20,000 characters; a longer prompt is rejected with HTTP 400 before any charge.
  • Refer to the material as “Image 1”, “Video 1”, “Audio 1” in the order of reference_image_urls, reference_videos and reference_audios; in Chinese prompts write 图1, 视频1, 音频1.
Minimum length: 1
Maximum length: 20000
Example:"A paper boat drifting across a calm lake at sunrise"
aspect_ratio
enum<string>
Width-to-height ratio of the output video.
adaptive lets the model choose a ratio from the input material and the prompt; 16:9 is landscape, 9:16 portrait, 1:1 square.
Available options: adaptive, 16:9, 9:16, 1:1
Example:"adaptive"
resolution
enum<string>default:720p
Output resolution of the video. Values are matched case-insensitively.
  • 480p is the lowest price, 720p the default, 1080p the sharpest.
  • Each resolution has its own per-second price; see the model page.
Available options: 480p, 720p, 1080p
Example:"720p"
duration
integerdefault:5
  • Length of the output video in seconds: any integer from 2 to 30.
  • seconds (a string such as "10", as in the OpenAI video API) is accepted as an alias; send one of the two.
  • With reference videos, their total length plus duration must not exceed 30 seconds; with 10 seconds of reference video, duration can be at most 20.
Range: 2 ≤ x ≤ 30
Example:5
reference_image_urls
string<uri>[]
Reference image HTTPS URLs.
  • Up to 10 images of subjects (people, animals, objects) or scene backgrounds; keep one subject per image. The order is Image 1, Image 2, …
  • Image limits: JPEG, JPG, PNG (no transparency), BMP or WEBP; width and height 240–8,000 px; aspect ratio between 1:8 and 8:1; up to 20 MB.
  • Public HTTPS URLs only; files and base64 are not accepted.
Items: 1–10
Example:["https://example.com/reference.png"]
reference_videos
string<uri>[]
Reference video HTTPS URLs, 1-15 s each and 15 s in total; their length is billed with the output. Submission holds 15 s per distinct video and refunds the difference on completion.
  • Up to 5 clips, 1–15 seconds each and 15 seconds in total. The order is Video 1, Video 2, …
  • Billed: their length is added to the billed seconds.
  • Video limits: mp4 or mov; width and height 240–4,096 px; aspect ratio between 1:8 and 8:1; up to 100 MB each.
  • Public HTTPS URLs only; files and base64 are not accepted.
Items: 1–5
Example:["https://example.com/reference.mp4"]
reference_audios
string<uri>[]
Reference audio HTTPS URLs.
  • Up to 5 clips, 1–15 seconds each and 15 seconds in total; not billed. The order is Audio 1, Audio 2, …
  • Each clip is standalone material the prompt refers to, not a voice bound to one of the images.
  • Audio limits: wav or mp3; up to 15 MB each.
  • Public HTTPS URLs only; files and base64 are not accepted.
Items: 1–5
Example:["https://example.com/reference.mp3"]
callback_url
string<uri>
Optional public HTTPS URL notified when the task finishes.
  • When the task finishes, APIKO POSTs the same JSON as GET /v1/tasks/{id} with header X-Apiko-Task-Id, retrying up to 3 times.
  • Callbacks are not signed: re-fetch the task to confirm the result.
Example:"https://your-domain.com/webhooks/apiko-task"

Response

200 - application/json

Charged when the request is accepted; a task that ends in failed is refunded in full.

id
string
Video task id. Query it with GET /v1/videos/{id} or GET /v1/tasks/{id}.
Example:"task_abc123"
status
enum<string>
Task status. Poll every 5–10 seconds until it is completed or failed.
Available options: queued, in_progress, completed, failed
progress
integer
Progress from 0 to 100.
video_url
string<uri>
Present on GET /v1/videos/{id} when the task is completed: an APIKO-signed link kept for 24 hours. GET /v1/tasks/{id} returns the same link as data[0].url.

Errors

application/json

Errors use the shape { "error": { "message", "type", "param", "code" } }; most messages end with a request id to quote when you contact support.

400
error
Invalid request. Fix the request instead of retrying it; it is not charged.
  • A field this page does not list, e.g. seed is not supported.
  • A value outside the listed options or range, e.g. duration must be an integer from ….
  • A missing or empty prompt (prompt is required).
  • A reference URL that is not public HTTPS (… must be a public HTTPS URL).
401
error
Missing or invalid API key (Invalid token).
403
error
Insufficient balance (code: "insufficient_user_quota"). Add credit in Console → Billing.
404
error
GET /v1/videos/{id} or GET /v1/tasks/{id} for a task that does not exist or belongs to another account (Task not found).
503
error
The model exists but none of its routes can take the request right now: No available channel for model … (code: "model_not_found"). Retry later with backoff, or pick another model. A missing or misspelled model returns 404 with the same message; check the id instead of retrying.