Wan 2.5 - 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)
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model name used for generation. This field is required. - This endpoint must use the wan/2-5-text-to-video model Default:"wan/2-5-text-to-video"。 Allowed values:wan/2-5-text-to-video。 Example:wan/2-5-text-to-video。 |
prompt | string | Yes | Prompt required by the ModelFold gateway; at most 2000 characters. The text prompt for video generation. Supports Chinese and English. Maximum length: 800 characters. maxLength: 800. Example:A dimly lit jazz bar at night, wooden tables glowing under warm pendant lights. Patrons sip drinks and chat quietly while a three-piece band performs on stage. The saxophone player stands under a spotlight, gleaming instrument reflecting the light. No dialogue. Ambient audio: smooth live jazz music with saxophone and piano, clinking glasses, low murmur of audience conversations, occasional burst of laughter from a nearby table. Camera: slow pan across the crowd, then gentle zoom toward the saxophone player's solo, focusing on expressive hand movements.。 |
duration | string | Yes | The duration of the generated video in seconds. - 5: 5 seconds- 10: 10 seconds Allowed values:5 / 10。 Example:5。 |
aspect_ratio | string | No | The aspect ratio of the generated video. - 16:9: Landscape- 9:16: Portrait- 1:1: Square Allowed values:16:9 / 9:16 / 1:1。 Example:16:9。 |
resolution | string | Yes | Required. 720p or 1080p. Allowed values:720p / 1080p。 Example:1080p。 |
negative_prompt | string | No | Negative prompt used to describe content to avoid. Maximum length: 500 characters. maxLength: 500. |
enable_prompt_expansion | boolean | No | Whether to enable prompt rewriting using LLM. Improves results for short prompts but increases processing time. - Boolean value: true / false Example:true。 |
seed | integer | No | Random seed for reproducibility. If omitted, a random seed is chosen. |
nsfw_checker | boolean | No | Defaults to false. When false, no additional content filtering is applied and results are returned directly by the model. |
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-5-text-to-video",
"prompt": "A dimly lit jazz bar at night, wooden tables glowing under warm pendant lights. Patrons sip drinks and chat quietly while a three-piece band performs on stage. The saxophone player stands under a spotlight, gleaming instrument reflecting the light. No dialogue. Ambient audio: smooth live jazz music with saxophone and piano, clinking glasses, low murmur of audience conversations, occasional burst of laughter from a nearby table. Camera: slow pan across the crowd, then gentle zoom toward the saxophone player'\''s solo, focusing on expressive hand movements.",
"duration": "5",
"resolution": "1080p"
}'json
{
"model": "wan/2-5-text-to-video",
"prompt": "A dimly lit jazz bar at night, wooden tables glowing under warm pendant lights. Patrons sip drinks and chat quietly while a three-piece band performs on stage. The saxophone player stands under a spotlight, gleaming instrument reflecting the light. No dialogue. Ambient audio: smooth live jazz music with saxophone and piano, clinking glasses, low murmur of audience conversations, occasional burst of laughter from a nearby table. Camera: slow pan across the crowd, then gentle zoom toward the saxophone player's solo, focusing on expressive hand movements.",
"duration": "5",
"resolution": "1080p"
}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": {}
}