EccoAPIeccoapi
POST/api/v1/wan-2.7/generate

Generate Video (Wan 2.7)

Generate a video using Wan 2.7. Always returns 202 with a job ID — poll for results.

Request Parameters

ParameterTypeRequiredDescription
promptstringYesText description of the video to generate.
durationnumberNoVideo duration in seconds: 5, 8, or 10. Default: 5.
resolutionstringNo"720p", "1080p", or "auto". Default: "auto".
modestringNo"text-to-video" (default) or "image-to-video".
aspectRatiostringNoVideo aspect ratio. Default: "16:9".
imageUrlstringNoReference image URL for image-to-video mode.
imageBase64objectNoBase64-encoded reference image for image-to-video mode. Format: {data: string, mimeType?: string}.
callbackUrlstringNoWebhook URL to receive results when generation completes.

Image Sizes & Pricing

Image SizeCost per Image
Per-second billing (default)rate × duration
Resolution720p (lower rate) / 1080p (higher rate)
Audio (Kling 2.6 / 3.0)higher per-second rate when enabled

Supported Aspect Ratios

1:1, 16:9, 9:16, 4:3, 3:4

Async Mode (Recommended)

Recommended for production

Video generation always runs asynchronously. The API returns a 202 response with a job ID. Poll the status endpoint or provide a callbackUrl to receive results via webhook.

bash
curl -X POST https://eccoapi.com/api/v1/wan-2.7/generate \
  -H "Authorization: Bearer nk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A cinematic aerial shot of ocean waves crashing against a rocky coastline at sunset",
    "duration": 5,
    "resolution": "1080p",
    "aspectRatio": "16:9"
  }'

Returns 202 Accepted with a jobId. Poll /api/v1/jobs/:jobId for status, or receive the result at your callbackUrl.

Response

json
{
  "code": 202,
  "msg": "Job accepted",
  "jobId": "a1b2c3d4-...",
  "statusUrl": "/api/v1/jobs/a1b2c3d4-...",
  "meta": {
    "model": "wan-2.7",
    "cost": 0.30,
    "estimated_time": "1-5 minutes",
    "settings": {
      "duration": 5,
      "resolution": "1080p",
      "mode": "text-to-video",
      "aspectRatio": "16:9"
    }
  }
}

Status Codes

CodeDescription
202Job accepted — poll statusUrl for results
400Invalid parameters or content policy violation
401Missing or invalid API key
402Insufficient credits
429Rate limit exceeded
503Model is currently disabled