Shark AI/Models/

Wan 2.6

Video

Model Information

Model IDalibaba/wan-2.6
CategoryVideo
Endpoint/api/v1/videos

Create Task

POST https://shark.ai/api/v1/videos

Authentication: Authorization: Bearer <api-key>

Request Parameters

ParameterTypeRequiredDefaultDescription
modelstringModel ID: alibaba/wan-2.6
seednumber (-1..2147483647)-1Random seed (-1 for random)
promptstringVideo description
durationenum: 5 | 10 | 15"5"Duration in seconds
shot_typeenum: single | multi"single"Single shot or multi-shot
resolutionenum: 480p | 720p | 1080p"720p"Video resolution
aspect_ratioenum: 16:9 | 9:16"16:9"Aspect ratio (text-to-video only)
frame_imagesarray<object>Reference images for image-to-video (omit for text-to-video)
negative_promptstringThings to avoid in the video
enable_prompt_expansionbooleanfalseEnable AI prompt expansion

Code Examples

# Step 1: Create task
curl -X POST https://shark.ai/api/v1/videos \
  -H "Authorization: Bearer <api-key>" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "alibaba/wan-2.6",
  "seed": -1,
  "prompt": "Your prompt here",
  "duration": "5",
  "shot_type": "single",
  "resolution": "720p",
  "aspect_ratio": "16:9",
  "enable_prompt_expansion": false
}'

# Step 2: Poll for result
curl https://shark.ai/api/v1/videos/{task-id} \
  -H "Authorization: Bearer <api-key>"

Response

Create Response (202)

{
  "id": "task-uuid",
  "status": "pending",
  "polling_url": "/api/v1/videos/task-uuid"
}

Poll: GET https://shark.ai/api/v1/videos/:id — Completed

{
  "id": "task-uuid",
  "status": "completed",
  "output": {
    "urls": [
      "https://cdn.example.com/video.mp4"
    ]
  },
  "credit": 4000
}

Poll every 3-5 seconds. Status values: pending → in_progress → completed | failed

Error Codes

HTTPTypeDescription
400invalid_request_errorInvalid parameters
400content_moderationContent blocked by safety system
400input_too_largeInput exceeds model limit
401auth_errorInvalid API key
402insufficient_creditsNot enough credits
429rate_limit_errorToo many requests
502provider_errorUpstream error, retry later
504timeout_errorRequest timed out
Try in PlaygroundAPI ReferenceAll Models