Developer Docs/Wan Spicy Video API

Wan Spicy Video API

Build Wan Spicy Video integrations with A2E. Review authentication, request parameters, task creation, status, and result endpoints.

Overview

Animate a still image into a video using the Wan 2.5 / 2.6 open-source video diffusion model family. Part of the Wan series known for fluid motion and temporal consistency.

Primary Endpoint

POST/api/v1/userWanSpicy/start

Start a Wan Spicy image-to-video task via mulerouter.ai/carrothub. - wan2.7-i2v-spicy: with audio support, resolution 720p/1080p, duration 2-15 seconds. - wan2.2-i2v-spicy: no audio, resolution 480p/720p, duration 5 or 8 seconds. ### Request - Send a valid bearer token. The server evaluates the operation in the authenticated caller's access context. - Send an `application/json` body. Required fields: `prompt`, `image_url`, `resolution`, `duration`. - API-token callers may include `webhook_url` and `webhook_token` for best-effort terminal-state notifications; ordinary JWT/cookie calls ignore these fields. ### Behavior - This is an asynchronous operation: a successful submission creates a task and returns before processing finishes. - Persist the returned task identifier and use the corresponding detail or list operation to observe progress. - Treat the detail endpoint as the source of truth even when webhook delivery is enabled. ### Response - A `200` response confirms task acceptance; it does not by itself mean media generation has completed. - Retain the returned identifier and wait for a documented terminal status before using output URLs. - JSON object responses, including error responses, normally carry a top-level `trace_id` string for this request; include it when contacting support. It is not a task identifier. - Do not infer undocumented fields or statuses; clients should tolerate additional response properties. ### Errors - `401` — Unauthorized - Invalid or missing JWT token. ### Related Operations - `GET /api/v1/userWanSpicy/allRecords` — Get all Wan Spicy tasks. - `GET /api/v1/userWanSpicy/{_id}` — Get Wan Spicy task details. - `DELETE /api/v1/userWanSpicy/{_id}` — Delete a Wan Spicy task. Authentication: set header Authorization: Bearer <token> (supports user JWT or sk_ API token).

Request Parameters

NameTypeRequiredDescription
modelenum: wan2.7-i2v-spicy | wan2.2-i2v-spicyNoModel variant (2.7 supports audio, 2.2 no audio); default: "wan2.7-i2v-spicy"
namestringNoOptional display name for the task
promptstringYesGeneration prompt
negative_promptstringNoNegative prompt (only valid when model = wan2.7-i2v-spicy)
image_urlstringYesReference image URL (https only)
audio_urlstringNoAudio URL (https, .wav/.mp3, only valid when model = wan2.7-i2v-spicy)
resolutionenum: 480p | 720p | 1080pYesResolution tier (wan2.7 720p/1080p, wan2.2 480p/720p)
durationnumberYesOutput duration in seconds (wan2.7 2-15, wan2.2 5 or 8)
prompt_extendbooleanNodefault: true
seedintegerNoRandom seed
minor_suspected_skipbooleanNoSkip pre-charge minor-suspect prompt for the input image; default: false
webhook_urlstringNoHTTPS URL to receive task.completed / task.failed notifications. Best-effort delivery, single attempt, no retries; clients should treat the detail API as the source of truth.; maxLength: 2048
webhook_tokenstringNoOptional plaintext token returned in the X-A2e-Webhook-Token header so receivers can verify the request originated from a2e.; maxLength: 256
Request schema and conditional rules
{
  "allOf": [
    {
      "type": "object",
      "properties": {
        "model": {
          "type": "string",
          "enum": [
            "wan2.7-i2v-spicy",
            "wan2.2-i2v-spicy"
          ],
          "default": "wan2.7-i2v-spicy",
          "description": "Model variant (2.7 supports audio, 2.2 no audio)"
        },
        "name": {
          "type": "string",
          "description": "Optional display name for the task"
        },
        "prompt": {
          "type": "string",
          "description": "Generation prompt"
        },
        "negative_prompt": {
          "type": "string",
          "description": "Negative prompt (only valid when model = wan2.7-i2v-spicy)"
        },
        "image_url": {
          "type": "string",
          "description": "Reference image URL (https only)"
        },
        "audio_url": {
          "type": "string",
          "description": "Audio URL (https, .wav/.mp3, only valid when model = wan2.7-i2v-spicy)"
        },
        "resolution": {
          "type": "string",
          "enum": [
            "480p",
            "720p",
            "1080p"
          ],
          "description": "Resolution tier (wan2.7 720p/1080p, wan2.2 480p/720p)"
        },
        "duration": {
          "type": "number",
          "description": "Output duration in seconds (wan2.7 2-15, wan2.2 5 or 8)"
        },
        "prompt_extend": {
          "type": "boolean",
          "default": true
        },
        "seed": {
          "type": "integer",
          "description": "Random seed"
        },
        "minor_suspected_skip": {
          "type": "boolean",
          "default": false,
          "description": "Skip pre-charge minor-suspect prompt for the input image"
        }
      },
      "required": [
        "prompt",
        "image_url",
        "resolution",
        "duration"
      ]
    },
    {
      "$ref": "#/components/schemas/WebhookInput"
    }
  ]
}

Response Fields

code: enum: 0
data: object
data._id: string
Task ID for detail and batch polling.
data.name: string
data.prompt: string
data.is_downloaded: boolean
data.is_previewed: boolean
data.current_status: string
Persisted task state; use the concrete task family schema for its allowed values and terminal states.
data.createdAt: string
data.updatedAt: string
data.expirationDate: string
data.remainingDays: number
data.isExpired: boolean
data.coins: number
data.hasRefundCoin: boolean
Whether charged credits were refunded.
data.failed_code: string
data.failed_message: string
data.failed_reason: string
Public failure category when available.
data.image_url: string
data.image_urls: array<string>
data.result_url: string
data.video_url: string
data.result_video_url: string
data.cover_url: string
data.result_cover: string
data.hd_video_url: string
data.video_time: number
data.duration_seconds: number
trace_id: string
Trace ID of this HTTP request. Include it when contacting support about this request. It is generated per request and is not a task identifier; use the returned task `_id` to query results.

Request Example

curl -X POST "https://www.a2e.com.cn/api/v1/userWanSpicy/start" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "high quality, clear, cinematic",
  "image_url": "https://example.com/image.jpg",
  "resolution": "480p",
  "duration": 5
}'

Related Endpoints

Responses

200

Task started successfully

401

Unauthorized - Invalid or missing bearer token

Wan Spicy Video API Documentation