Skip to main content
POST
https://duoyuanx.com
/
v1
/
videos
curl -X POST https://duoyuanx.com/v1/videos \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-imagine-video-1.5-preview",
    "prompt": "A rainy neon-lit street at night, a vintage sports car driving over the wet road",
    "seconds": "8",
    "aspect_ratio": "16:9",
    "resolution": "720P"
  }'
{
  "id": "video_abc123",
  "object": "video",
  "model": "grok-imagine-video-1.5-preview",
  "status": "queued",
  "progress": 0,
  "created_at": 1735689600,
  "seconds": "6",
  "size": "720P",
  "video_url": ""
}

Grok Imagine 1.5 Preview

grok-imagine-video-1.5-preview is the JSON video generation model of the Grok 1.5 series. Unlike the grok-video-1.5 series, this model passes reference images through JSON fields.
  • The endpoint path is POST /v1/videos.
  • The request format is application/json.
  • Text-to-video only requires model, prompt, seconds, aspect_ratio, and resolution.
  • For image-to-video, use image for a single image and images for multiple images.
  • resolution supports 480P and 720P.

Method and Path

POST /v1/videos
curl -X POST https://duoyuanx.com/v1/videos \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-imagine-video-1.5-preview",
    "prompt": "A rainy neon-lit street at night, a vintage sports car driving over the wet road",
    "seconds": "8",
    "aspect_ratio": "16:9",
    "resolution": "720P"
  }'

Response Example

{
  "id": "video_abc123",
  "object": "video",
  "model": "grok-imagine-video-1.5-preview",
  "status": "queued",
  "progress": 0,
  "created_at": 1735689600,
  "seconds": "6",
  "size": "720P",
  "video_url": ""
}

Authentication

Authorization: Bearer YOUR_API_KEY

Body

model
string
required
Always pass grok-imagine-video-1.5-preview.
prompt
string
required
Video generation prompt. Up to 4096 characters.
seconds
string
Target duration in seconds. Minimum is 1 second; passing it as a string is recommended, e.g. "6".
aspect_ratio
string
Aspect ratio. Supports common presets 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 2:1, 1:2, 19.5:9, 9:19.5, 20:9, 9:20, as well as custom number:number ratios.
resolution
string
Output resolution. Supports 480P and 720P; numeric forms like 480 and 720 are also accepted.
image
string
Single reference image, as a data URI such as data:image/png;base64,....
images
array<string>
Multiple reference images. Each array member is a data URI such as data:image/png;base64,.... Do not pass image together with images.

Response

id
string
Task ID. Query the result later with GET /v1/videos/{id}.
object
string
Object type, usually video.
model
string
The model name actually submitted.
status
string
Task status. Common values are queued, processing, completed, failed, cancelled.
progress
integer
Task progress percentage.
video_url
string
Video URL after the task completes. You can also download the result with GET /v1/videos/{task_id}/content.

Differences from Grok 1.5

Itemgrok-imagine-video-1.5-previewgrok-video-1.5 / pro / max
Request formatJSONmultipart/form-data
Image fieldimage / imagesinput_reference
Resolution fieldresolutionsize
Resolution values480P, 720P480P, 540P, 720P, 1080P
Duration rulesCustom seconds, min 1s10s for Pro, 15s for Max