Create video from text
create_video_from_textGenerates a video from a text prompt, with optional supported reference inputs and model settings. If the user has not specified an aspect ratio, choose it for where the video will be used, such as 9:16 for TikTok or Reels. To animate an existing starting image, use create_video_from_image. Starts a background job that costs credits; returns a project id for wait_for_video_project. Before choosing settings, read get_account_info and the current parameter constraints. A listed model, resolution, duration or count is not necessarily available together or on this account. Preserve explicit requirements and all supplied inputs; explain a genuine block instead of submitting an incompatible request. Account balance alone does not prove a request is affordable. Use the named attachment fields first for ChatGPT files. Ask which file goes where if their roles are unclear. If a file fails, ask the user to attach it again and keep the requested settings.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"end_seconds": "<end_seconds>",
"style": "<style>"
},
"name": "create_video_from_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional project name for identifying this output. Omit to use the API's default project name. | Text To Video - dateTime |
| audio | No | Whether to include audio in the video. Defaults to `false` if not specified. Audio support varies by model: * **`gemini-omni-1.2`**: Toggle-able: no additional credits for audio * **`kling-2.6`**: Not supported * **`kling-3.0`**: Toggle-able: audio adds extra credits when enabled * **`kling-4.0`**: Toggle-able: no additional credits for audio * **`ltx-2.5`**: Toggle-able: no additional credits for audio * **`minimax-h3`**: Toggle-able: no additional credits for audio * **`seedance-1.5`**: Toggle-able: audio adds extra credits when enabled * **`seedance-2.0`**: Toggle-able: no additional credits for audio * **`seedance-2.0-fast`**: Toggle-able: no additional credits for audio * **`seedance-2.0-mini`**: Toggle-able: no additional credits for audio * **`seedance-2.5`**: Toggle-able: no additional credits for audio * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled * **`veo3.1-lite`**: Toggle-able: audio adds extra credits when enabled * **`wan-2.2`**: Not supported * **`wan-3.0`**: Toggle-able: no additional credits for audio | |
| model | No | The video generation model. With `default`, the API chooses a model using the account plan, resolution and duration. Use this option when no model was requested and it supports the intended inputs and settings. Omit an unrequested resolution so the API resolves it for the account. Preserve explicit settings and required input capabilities. Deprecated model values ending in `-audio` enable `audio`. | default |
| style | Yes | Instructions describing the video to generate. | |
| references | No | Name references without @ and refer to them as @name in style.prompt. Names must be unique, ignoring case. Maximum 50 references total. Omit for no references. Reference media for video generation. Supported models and reference media: * **`gemini-omni-1.2`**: Supports images, videos. Up to 10 references. * **`kling-3.0`**: Supports images, videos. Up to 10 references. * **`kling-4.0`**: Supports images, videos. Up to 10 references. * **`minimax-h3`**: Supports images, videos, audio. Up to 10 references. Video references must be 2–15 seconds each and 15 seconds combined, and are used in full. Audio references must be 2–15 seconds each and are used in full. * **`seedance-2.0`**: Supports images, videos, audio. Up to 10 references. * **`seedance-2.0-fast`**: Supports images, videos, audio. Up to 10 references. * **`seedance-2.0-mini`**: Supports images, videos, audio. Up to 10 references. * **`seedance-2.5`**: Supports images, videos, audio. Up to 50 references. Maximum 30 images, 10 videos and 10 audio references. The worker trims video references to 30 seconds combined and audio references to 30 seconds combined. Audio references require an image or video reference. * **`veo3.1`**: Supports images. Up to 3 references. Requires `end_seconds` of 8. * **`wan-3.0`**: Supports images, videos, audio. Up to 10 references. | |
| resolution | No | Controls the output video resolution. Defaults to `720p` on paid tiers and `480p` on free tiers. * **`gemini-omni-1.2`**: Supports 360p, 720p, 1080p, 4k. * **`kling-2.6`**: Supports 720p, 1080p. * **`kling-3.0`**: Supports 720p, 1080p, 4k. * **`kling-4.0`**: Supports 720p, 1080p. * **`ltx-2.5`**: Supports 480p, 720p, 1080p. * **`minimax-h3`**: Supports 480p, 720p, 1080p. * **`seedance-1.5`**: Supports 480p, 720p, 1080p. * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k. * **`seedance-2.0-fast`**: Supports 480p, 720p. * **`seedance-2.0-mini`**: Supports 480p, 720p. * **`seedance-2.5`**: Supports 480p, 720p, 1080p, 4k. * **`veo3.1`**: Supports 720p, 1080p. * **`veo3.1-lite`**: Supports 720p, 1080p. * **`wan-2.2`**: Supports 480p, 720p, 1080p. * **`wan-3.0`**: Supports 480p, 720p, 1080p. | |
| end_seconds | Yes | The total duration of the output video in seconds. Supported durations depend on the chosen model: * **`gemini-omni-1.2`**: any integer from 3 to 15 * **`kling-2.6`**: 5, 10 * **`kling-3.0`**: any integer from 3 to 15 * **`kling-4.0`**: any integer from 3 to 30 * **`ltx-2.5`**: any integer from 1 to 60 * **`minimax-h3`**: any integer from 1 to 30 * **`seedance-1.5`**: any integer from 4 to 12 * **`seedance-2.0`**: any integer from 4 to 15 * **`seedance-2.0-fast`**: any integer from 4 to 15 * **`seedance-2.0-mini`**: any integer from 4 to 15 * **`seedance-2.5`**: any integer from 4 to 30 * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15 * **`wan-3.0`**: any integer from 2 to 30 Free plans are currently limited to 10 seconds, enforced by the API and may change. When the user gave no duration, choose one within it. Keep an explicitly requested longer one, explain the Free limit and ask before changing it. | |
| aspect_ratio | No | Keep an aspect ratio the user explicitly requests. Otherwise, choose by where the output will be used: 9:16 for TikTok, Reels, Shorts, Stories or a phone screen; 16:9 for YouTube, a website, slides or TV; 1:1 for an Instagram or Facebook feed post or a profile picture. If you can't tell where the video will be used, ask before generating. If omitted, the video is 16:9. Determines the aspect ratio of the output video. * **`gemini-omni-1.2`**: Supports 16:9, 9:16. * **`kling-2.6`**: Supports 9:16, 16:9, 1:1. * **`kling-3.0`**: Supports 9:16, 16:9, 1:1. * **`kling-4.0`**: Supports 9:16, 16:9, 1:1. * **`ltx-2.5`**: Supports 9:16, 16:9, 1:1. * **`minimax-h3`**: Supports 16:9, 9:16, 1:1. * **`seedance-1.5`**: Supports 9:16, 16:9, 1:1. * **`seedance-2.0`**: Supports 9:16, 16:9, 1:1. * **`seedance-2.0-fast`**: Supports 9:16, 16:9, 1:1. * **`seedance-2.0-mini`**: Supports 9:16, 16:9, 1:1. * **`seedance-2.5`**: Supports 9:16, 16:9, 1:1. * **`veo3.1`**: Supports 9:16, 16:9. * **`veo3.1-lite`**: Supports 9:16, 16:9. * **`wan-2.2`**: Supports 9:16, 16:9, 1:1. * **`wan-3.0`**: Supports 16:9, 9:16, 1:1. | |
| reference_audio | No | Attached audio files. Set audio_index in each matching entry to its position in this list, starting at 1. | |
| reference_images | No | Attached image files. Set image_index in each matching entry to its position in this list, starting at 1. | |
| reference_videos | No | Attached video files. Set video_index in each matching entry to its position in this list, starting at 1. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique ID of the video. Use it with the [Get video Project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch status and downloads. | |
| credits_charged | Yes | The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video. If video generation fails, credits will be refunded, and this field will be updated to include the refund. |