GET

/v1/schemas/grok/video/v1/videos/edits

kind inputactivity videohash 4e01b996…extracted Oct 23, 2026version currentsource upstream spec ↗
fieldrecorded source
schemaSource linked above.

upstream-spec

Source trace
592b360ae23c430da1461f6cadcab06ccc85a577134893ff1f73c4c7879d116b
{
  "fetchedAt": 1792732296,
  "extractorVersion": "1",
  "verifiedAt": null
}

Request body

6 properties · 2 required · 5 $defs
propertytypedescriptionconstraints
prompt*stringPrompt for video editing.
video*VideoUrlInput video to perform edit on.
modelanyModel to be used.
outputVideoOutputOptional output destination for generated video.nullable
storage_optionsStorageOptionsOptional 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
useranyA unique identifier representing your end-user.

Types

5 $defs

PublicUrlInputboolean | 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_afteranySeconds 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_afteranySeconds from now until the file auto-expires. Maximum 2592000 (30 days). If omitted, the file does not expire.format: int64
filename*stringFilename for the stored file.
public_urlboolean | 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*stringSigned 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_idanyFile ID from the xAI Files API. Mutually exclusive with `url`. The file must be a video (e.g., MP4) and fully uploaded.
urlstringURL 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 tokens
shell
$ curl -X POST https://modelschemas.com/v1/validate \
    -d '{"provider":"grok","endpointId":"v1/videos/edits","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}