API Endpoint URL
Base URL for all API requests to this endpoint.
https://modelslab.com/api/v7/video-fusion/text-to-video
API Authentication
Authentication requires a valid API key included in the request. Generate and manage your API keys from your developer dashboard. Include the key in the key parameter for all API requests.
Integration Examples
Production-ready code samples for API integration
{"prompt": " Shot from a low angle, in a medium close-up, with warm tones, mixed lighting (the practical light from the desk lamp blends with the overcast light from the window), side lighting, and a central composition. In a classic detective office, wooden bookshelves are filled with old case files and ashtrays. A green desk lamp illuminates a case file spread out in the center of the desk. A fox, wearing a dark brown trench coat and a light gray fedora, sits in a leather chair, its fur crimson, its tail resting lightly on the edge, its fingers slowly turning yellowed pages. Outside, a steady drizzle falls beneath a blue sky, streaking the glass with meandering streaks. It slowly raises its head, its ears twitching slightly, its amber eyes gazing directly at the camera, its mouth clearly moving as it speaks in a smooth, cynical voice: 'The case was cold, colder than a fish in winter. But every chicken has its secrets, and I, for one, intended to find them '.","init_audio": "https://assets.modelslab.com/generations/2f7dfdcb-2295-4c6f-966d-4e673baee8e3.mp3","enhance_prompt": true,"model_id": "wan2.5-t2v","generate_audio": true,"resolution": "720","duration": "5","key": "YOUR_API_KEY"}
SDKs
Official SDKs
Production-ready SDKs and client libraries for all major programming languages
API Parameters
Technical specifications for API request parameters.
| Field Name | Parameter | Technical Description |
|---|---|---|
| Prompt | prompt | Enter the text for the video you want to generate |
| Audio-URL | init_audio | The video content will attempt to align with the audio content, such as lip movements and rhythm. Format: WAV, MP3. If the audio duration exceeds the duration value (5 or 10 seconds), the first 5 or 10 seconds are automatically used, and the rest is discarded. If the audio is shorter than the video duration, the part of the video beyond the audio length will be silent. |
| Enhance Prompt | enhance_prompt | Specifies whether to enable prompt rewriting. This can significantly improve the generation quality for shorter prompts but increases the time required. |
| Model | model_id | Model for making an API call |
| Generate-audio | generate_audio | Keep this parameter true to have the audio in the generated video. This parameter is used only when audio_url is empty because the audio_url parameter has a higher priority than the audio parameter. |
| Resolution | resolution | The resolution of the generated video in pixel available values. 480p, 720p, 1080p |
| Duration | duration | Select the duration for how long you want to generate the video, available values 5, 10 |
