API reference
Videos
Models on this endpoint (14)
/v1/videos/v1/videos/{task_id}/v1/videos/{task_id}/contentAsync video generation (Seedance, Kling, Veo, Wan, Grok Imagine …). /v1/videos accepts text-to-video and image-to-video inputs in one OpenAI-shaped request. It returns a task_id you poll — or register a webhook at submit time.
#Request parameters
modelstringrequiredA video model ID from the models page, e.g. doubao-seedance-2.5.
promptstringrequiredScene description; for image2video it steers the motion.
imagestringoptionalimage2video only: first-frame image as URL or base64.
imagesarrayoptionalReference frames for vendors that accept multiple images in one task.
durationnumberoptionalClip length in seconds — a pricing-tier dimension; supported values per model card.
secondsnumberoptionalAlias used by some model families for clip length; treat duration as the preferred field.
resolutionstringoptionalOutput resolution tier such as 720p or 1080p when the model exposes it.
sizestringoptionalAspect-ratio or size selector for model families that use width x height style sizing.
webhook_urlstringoptionalHTTPS URL called once the task reaches a terminal state — see the video guide for the callback contract.
webhook_secretstringoptionalIf set, deliveries carry X-Xiaoxiang-Signature: sha256=hex(HMAC-SHA256(body, secret)).
Vendor pass-through
Failed tasks refund automatically
#Cancel a running task
/v1/videos/:task_idStops a task that has not reached a terminal state. On success the reserved quota is refunded, the task is recorded as failed with the reason "cancelled by user", and any webhook you registered fires as task.failed.
Most providers cannot cancel
curl -X DELETE https://www.aisplice.store/v1/videos/task_xxx \
-H "Authorization: Bearer sk-YOUR_KEY"{
"id": "task_xxx",
"task_id": "task_xxx",
"status": "cancelled"
}Note that "cancelled" appears only in this response. A later poll reports the task as failed, because that is the state it was moved to.
- 404 task_not_existUnknown task id, or it belongs to another account.
- 409 task_not_cancellableThe task already finished — there is nothing to stop.
- 501 task_cancel_not_supportedThis provider exposes no cancellation API.
#Remix an existing video
/v1/videos/:video_id/remixRe-renders a finished video with a new prompt, on models that support it. Send prompt and nothing else: the model, duration, resolution and pricing factors are all inherited from the original task, and the request is pinned to the channel that produced it.
curl https://www.aisplice.store/v1/videos/task_xxx/remix \
-H "Authorization: Bearer sk-YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: remix-of-task_xxx" \
-d '{"prompt": "Same shot, at night"}'{
"task_id": "task_yyy",
"status": "queued",
"remixed_from_video_id": "task_xxx"
}A remix is a new billable task
- 400 invalid_requestprompt is required on a remix.
- 400 task_not_existThe source video id is unknown or belongs to another account.
- 400 task_channel_disableThe channel that produced the original video is no longer enabled.
#Related errors
- 404 not_foundUnknown path, unknown model name, or an expired / foreign task_id.
- 422 unprocessable_entityThe vendor rejected parameter values the gateway forwarded (e.g. unsupported size or duration).
- 401Invalid or missing bearer token. No error.code on this path — match the status.
- 402 insufficient_user_quotaWallet balance cannot cover the pre-reserved estimate.
- 429Per-key throttle. Empty body; wait for Retry-After. A 429 that does carry insufficient_user_quota is a daily spend cap instead.
- 503 model_not_foundUnknown model, or no healthy channel serves it right now.
#Request example
# submit
curl https://www.aisplice.store/v1/videos \
-H "Authorization: Bearer sk-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "doubao-seedance-2.5", "prompt": "A drone shot of a lighthouse at dawn"}'
# poll every 5s
curl https://www.aisplice.store/v1/videos/$TASK_ID -H "Authorization: Bearer sk-YOUR_KEY"
# download when completed
curl -L https://www.aisplice.store/v1/videos/$TASK_ID/content -o out.mp4 -H "Authorization: Bearer sk-YOUR_KEY"#Response
// POST — submit accepted
{"task_id": "task_xxx", "status": "queued"}
// GET /v1/videos/{task_id}
{
"task_id": "task_xxx",
"status": "in_progress", // queued | in_progress | completed | failed
"progress": "45%"
}
// terminal state
{
"task_id": "task_xxx",
"status": "completed",
"metadata": {"url": "https://…"}
}Still stuck?
Send us the request ID or the error message and we will look into it.