Grok Imagine 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 video generation task
Request Parameters
Body (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model name to use for generation. Required field. - Must be grok-imagine/text-to-video for this endpoint Default:"grok-imagine/text-to-video"。 Allowed values:grok-imagine/text-to-video。 Example:grok-imagine/text-to-video。 |
prompt | string | Yes | Prompt required by the ModelFold gateway; at most 2000 characters. Text prompt describing the desired video motion. Required field. - Should be detailed and specific about the desired visual motion - Describe movement, action sequences, camera work, and timing - Include details about subjects, environments, and motion dynamics - Maximum length: 5000 characters - Supports English language prompts maxLength: 2000. Example:A couple of doors open to the right one by one randomly and stay open, to show the inside, each is either a living room, or a kitchen, or a bedroom or an office, with little people living inside.。 |
aspect_ratio | string | No | Specifies the width-to-height ratio of the generated video. Controls the aspect ratio of the output. - 2:3: Portrait orientation (vertical) - 3:2: Landscape orientation (horizontal) - 1:1: Square format - 16:9: Wide screen format - 9:16: Tall screen format Default: 2:3 Default: "2:3"。 Allowed values:2:3 / 3:2 / 1:1 / 16:9 / 9:16。 Example:2:3。 |
mode | string | No | Specifies the generation mode affecting the style and intensity of motion. - fun: More creative and playful interpretation - normal: Balanced approach with good motion quality - spicy: More dynamic and intense motion effects Default: normal Default: "normal"。 Allowed values:fun / normal / spicy。 Example:normal。 |
duration | number | No | The duration of the generated video (in seconds) (6-30). (Minimum: 6, Maximum: 30, Step: 1) ModelFold minimum: 6 seconds; -1 is not supported. |
resolution | string | No | The resolution of the generated video. Default:"480p"。 Allowed values:480p / 720p / 1080p。 Example:480p。 |
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": "grok-imagine/text-to-video",
"prompt": "A couple of doors open to the right one by one randomly and stay open, to show the inside, each is either a living room, or a kitchen, or a bedroom or an office, with little people living inside.",
"aspect_ratio": "2:3",
"mode": "normal",
"resolution": "480p"
}'json
{
"model": "grok-imagine/text-to-video",
"prompt": "A couple of doors open to the right one by one randomly and stay open, to show the inside, each is either a living room, or a kitchen, or a bedroom or an office, with little people living inside.",
"aspect_ratio": "2:3",
"mode": "normal",
"resolution": "480p"
}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": {}
}