GET
/v1/schemas/grok/video/v1/videos/edits
Accept:
| field | recorded source |
|---|---|
| schema | Source linked above. upstream-spec Source trace592b360ae23c430da1461f6cadcab06ccc85a577134893ff1f73c4c7879d116b{
"fetchedAt": 1792732296,
"extractorVersion": "1",
"verifiedAt": null
} |
Request body
6 properties · 2 required · 5 $defs| property | type | description | constraints |
|---|---|---|---|
| prompt* | string | Prompt for video editing. | |
| video* | VideoUrl | Input video to perform edit on. | |
| model | any | Model to be used. | |
| output | VideoOutput | Optional output destination for generated video. | nullable |
| storage_options | StorageOptions | Optional output storage configuration. When present, the generated video is stored in the Files API and a `file_output` reference is returned in the response alongside the ephemeral URL. | nullable |
| user | any | A unique identifier representing your end-user. |
Types
5 $defsPublicUrlInputboolean | object
Accepts either `true` (create public URL with defaults) or a configuration object with explicit options.
PublicUrlOptionsobject
Configuration for creating a public URL alongside file storage.
| expires_after | any | Seconds from now until the public URL expires. Must be between 3600 (1 hour) and 2592000 (30 days). | format: int64 |
StorageOptionsobject
Configuration for storing generation output in the Files API. When provided in a generation request, the output is stored as a permanent file and a `file_output` reference is included in the response.
| expires_after | any | Seconds from now until the file auto-expires. Maximum 2592000 (30 days). If omitted, the file does not expire. | format: int64 |
| filename* | string | Filename for the stored file. | |
| public_url | boolean | object | `true` = create public URL with default options (no independent expiry). Object = create public URL with explicit configuration. Omit = no public URL (file stored privately). | nullable |
VideoOutputobject
Output destination for generated video.
| upload_url* | string | Signed URL to upload the generated video via HTTP PUT, e.g. an S3 / GCS presigned URL or an Azure Blob SAS URL. The PUT sends `Content-Type: video/mp4`, plus `x-ms-blob-type: BlockBlob` for Azure Blob Storage hosts. |
VideoUrlobject
Video input for editing and extension requests. Accepts a public URL, a base64-encoded data URL, or a file_id from the xAI Files API.
| file_id | any | File ID from the xAI Files API. Mutually exclusive with `url`. The file must be a video (e.g., MP4) and fully uploaded. | |
| url | string | URL of the video (public URL or base64-encoded data URL). The video must have the `.mp4` file extension and be encoded with `.mp4` supported codecs such as H.265, H.264, AV1, etc. Required when `file_id` is not set. |
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"grok","endpointId":"v1/videos/edits","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}