Skip to content

Wan 2.7 - Text to Video ​

Endpoint ​

POST /videos/generations

Full URL: https://modelfold.ai/v1/videos/generations

Authentication: every request must include the Authorization: Bearer <API_KEY> header.

Send model parameters directly in the JSON body. Do not wrap them in input. This request waits for generation to finish and returns data[].url; supported media models also offer async jobs, polling and callbacks. Replace example media URLs with your own publicly accessible files. See API gateway for billing and errors.

Input parameters for the text-to-video task.

Request Parameters ​

Body (application/json) ​

ParameterTypeRequiredDescription
modelstringYesThe model name used for generation. This field is required.
- This endpoint must use the wan/2-7-text-to-video model Default:"wan/2-7-text-to-video"。 Allowed values:wan/2-7-text-to-video。 Example:wan/2-7-text-to-video。
promptstringYesPrompt required by the ModelFold gateway; at most 2000 characters. Positive prompt. Minimum length: 1 character. Maximum length: 5000 characters. minLength: 1. maxLength: 2000.
negative_promptstringNoNegative prompt. Maximum length: 500 characters. maxLength: 500.
audio_urlstringNoOptional custom audio URL.
resolutionstringNoVideo resolution.
- 720p: 720p
- 1080p: 1080p Default:"1080p"。 Allowed values:720p / 1080p。 Example:1080p。
ratiostringNoVideo aspect ratio.
- 16:9: Landscape
- 9:16: Portrait
- 1:1: Square
- 4:3: Landscape 4:3
- 3:4: Portrait 3:4 Default:"16:9"。 Allowed values:16:9 / 9:16 / 1:1 / 4:3 / 3:4。 Example:16:9。
durationintegerNoVideo duration in seconds.
- Minimum: 2
- Maximum: 15
- Default: 5 Default:5。 minimum: 2. maximum: 15. Example:5。
prompt_extendbooleanNoWhether to enable intelligent prompt rewriting. Default value: true. Default:true。 Example:true。
watermarkbooleanNoWhether to add an AI-generated watermark. Default value: false. Default:false。 Example:false。
seedintegerNoRandom seed.
- Minimum: 0
- Maximum: 2147483647 minimum: 0. maximum: 2147483647.

Request Example ​

bash
curl -X POST "https://modelfold.ai/v1/videos/generations" \
  -H "Authorization: Bearer $MODELFOLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "wan/2-7-text-to-video",
  "prompt": "A paper boat drifting down a rainy street.",
  "resolution": "1080p",
  "ratio": "16:9",
  "duration": 5,
  "prompt_extend": true,
  "watermark": false
}'
json
{
  "model": "wan/2-7-text-to-video",
  "prompt": "A paper boat drifting down a rainy street.",
  "resolution": "1080p",
  "ratio": "16:9",
  "duration": 5,
  "prompt_extend": true,
  "watermark": false
}

Response ​

200 — Generation completed. usage contains actual billing details; result URLs are illustrative. ​

json
{
  "ok": true,
  "created": 1792134000,
  "data": [
    {
      "url": "https://modelfold.ai/uploads/outputs/result.mp4"
    }
  ],
  "usage": {}
}

ModelFold — one API for all the best AI models.