Grok Imagine Video 1.5 Preview
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 generation task.
Request Parameters
Body (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model name used for generation. This endpoint must use grok-imagine-video-1-5-preview. Default:"grok-imagine-video-1-5-preview"。 Allowed values:grok-imagine-video-1-5-preview。 Example:grok-imagine-video-1-5-preview。 |
prompt | string | Yes | Prompt required by the ModelFold gateway; at most 2000 characters. Prompt for video generation. Maximum length: 4096 characters. Use @imageN in the prompt to reference an image from image_urls, where N is the 1-based index of the image. For example, @image1 refers to the first image in the array. maxLength: 2000. |
image_urls | array<string> | Yes | Upload image files to be used as API input. Supported file types: image/jpeg, image/png, image/webp, image/jpg. Maximum file size: 20MB. Supports multi-file upload, up to 1 file.Only one is supported when the resolution is 1080p. maxItems: 1. |
aspect_ratio | string | No | Aspect ratio for video generation. Default:"auto"。 Allowed values:1:1 / 16:9 / 9:16 / 4:3 / 3:4 / 3:2 / 2:3 / auto。 Example:auto。 |
resolution | string | No | Resolution for video generation. Default:"480p"。 Allowed values:480p / 720p / 1080p。 Example:480p。 |
duration | integer | No | Video duration in seconds. Range: [1, 15]. Default: 8. Minimum: 1. Maximum: 15. Step: 1. Default:8。 minimum: 1. maximum: 15. Example:8。 |
first_frame_url | string | No | First-frame image. Can be passed together with image_urls, or sent on its own. |
last_frame_url | string | No | Last-frame image. |
loop_url | string | No | Loop image used as both the start and end of the video. Cannot be sent together with a different first-frame or last-frame image. |
keyframes | array<object> | No | Mid-video keyframes, up to 4. Each item must include url and timestamp_s (in seconds). Each timestamp must be greater than 0 and less than duration, and any two keyframes must be at least 1/3 second apart. maxItems: 4. |
keyframes[].url | string | Yes | image url. |
keyframes[].timestamp_s | integer | Yes | time stamp. |
enable_audio | boolean | No | Whether to generate audio. Defaults to true. |
nsfw_checker | boolean | No | Defaults to false. You can set it to false based on your needs. If set to false, our content filtering will be disabled, and all results will be returned directly by the model itself. |
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-video-1-5-preview",
"image_urls": [
"https://example.com/reference.png"
],
"prompt": "A paper boat drifting down a rainy street.",
"aspect_ratio": "auto",
"resolution": "480p",
"duration": 8
}'json
{
"model": "grok-imagine-video-1-5-preview",
"image_urls": [
"https://example.com/reference.png"
],
"prompt": "A paper boat drifting down a rainy street.",
"aspect_ratio": "auto",
"resolution": "480p",
"duration": 8
}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": {}
}