4Z API

Omni-Flash video generation

Endpoint: POST https://4zapi.com/v1/video/create

Omni-Flash · unified video creation (POST /v1/video/create, VEO relay physical route; see relay/veo as primary). model=omni-flash / omni-flash-edit routes to the Omni-Flash pipeline; type selects the capability:

  • 1 = text-to-video (only prompt required)
  • 2 = first/last frame (images requires 1-2 items)
  • 3 = reference image (images requires 1-3 items)
  • 4 = Omni-Flash video editing (requires input_reference)

Returns id (task ID); poll GET /v1/video/query?id= for the result.

Parameters

  • Content-Type (header, string): Request body data format
  • Accept (header, string): The response data format that the client expects to receive
  • Authorization (header, string): API authentication key, the format is Bearer + space + your API Key

Request body (application/json)

  • model (string, required): Model name (examples: omni-flash, omni-flash-edit)
  • prompt (string, required): Video content description
  • aspect_ratio (string): aspect ratio ["16:9", "9:16"]
  • enable_sample (boolean): Omni-Flash series switches to 1080p (ignored for 4K models)
  • enable_upsample (boolean): Upgraded to 1080p (available on select 4K models)
  • images (array<string>): Image URL array (type=2 requires 1-2 images, type=3 requires 1-3 images)
  • input_reference (string): Omni-Flash edit reference video (JSON scene passed to URL or dataURI)
  • seconds (string): Video duration (seconds), example: "8"
  • size (string): Custom size, the width ratio is 16:9, and the height ratio is 9:16. When aspect_ratio is in effect, this parameter is invalid.
  • type (integer): Generation type: 1=Vincent video, 2=First and last frames, 3=Matt picture reference, 4=Omni-Flash video editing [1, 2, 3, 4]

Request example

{
  "model": "omni-flash",
  "prompt": "hello world"
}