---
title: "Create an xAI video generation job"
method: POST
path: "/grok/v1/videos/generations"
---

# Create an xAI video generation job

`POST /grok/v1/videos/generations`

Start a Grok image-to-video job from a prompt and one source image. Save the returned request_id and poll the query endpoint until the provider status becomes done.

## Request body

- object
  - `prompt` string, required — Prompt describing how the source image should animate. CometAPI requires this field for this route.
  - `aspect_ratio` '1:1' | '16:9' | '9:16' | '4:3' | '3:4' | '3:2' | '2:3' — Output aspect ratio. Combine with resolution to choose the target frame; for example 480p with 1:1 targets 480x480, 720p with 16:9 targets 1280x720, and 720p with 9:16 targets 720x1280. This endpoint does not expose an exact size field.
  - `duration` integer — Output duration in seconds. Use an integer from 1 through 15. If omitted, CometAPI treats the request as an 8-second generation for billing and default handling.
  - `image` object — Source image for image-to-video. Use a public JPEG, PNG, or WebP URL, or a data URI such as data:image/png;base64,<BASE64_IMAGE_DATA>.
    - `url` string, required — Public image URL or data URI such as data:image/png;base64,<BASE64_IMAGE_DATA>.
  - `model` string — xAI video model id. The default example uses Grok Imagine 1.5 for image-to-video.
  - `output` object
    - `upload_url` string — Optional signed URL for uploading the finished result to your own storage.
  - `resolution` '480p' | '720p' | '1080p' — Output resolution. Use 720p for a small image-to-video test, or 1080p when you need a higher resolution tier.
  - `size` string — Deprecated size field. Prefer aspect_ratio and resolution.
  - `user` string — Optional end-user identifier.

## Response `200`

Request accepted.

- object
  - `request_id` string, required — Deferred request id used for polling.

---

[API](https://skmtc.net/cometapi/apis/create-api-key.md) · [All operations](https://skmtc.net/cometapi/apis/create-api-key/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cometapi/create-api-key/versions/0863102dbf34/schema)
