Gemini Videos API
POSThttps://api.acedata.cloud/gemini/videos

Gemini video generation API — create a video from a text prompt and optional reference images.

Request Headers

acceptstring
Specify the format of the response returned by the server. If not specified, the default format is `application/json`. If specified as `application/x-ndjson`, the response will be returned in a chunked streaming format separated by newline characters in JSON format.
Please select
authorizationstring
Bearer token

Request Body

promptstringRequired parameter
Describe the text prompts for the video content to be generated.
modelstring
Models used for generating videos. Currently, only `omni-flash` is supported.
aspect_ratiostring
Generate the aspect ratio of the video. `16:9` is for landscape, `9:16` is for portrait.
resolutionstring
Output resolution for the generated video. Options are `720p` or `1080p`, default is `720p`.
image_urlsarray
An optional array of reference image URLs for guiding video generation; blank entries will be ignored. This parameter is required when using `video_urls` for video editing (at least one image).
video_urlsarray
Optional reference video URL array (up to 1), for video editing / video reference. At least one `image_urls` must be provided when available.
callback_urlstring
The URL for the callback after the video generation is complete. Once provided, the request will immediately return `task_id`, and the results will be pushed asynchronously.
asyncboolean
Whether to process in asynchronous mode. When set to `true`, the interface immediately returns `task_id`, without the need to provide `callback_url`, and then the result can be obtained by polling the corresponding task query interface; if `callback_url` is also provided, the result will be pushed to that callback address.
Please select

Response

Integration guide

Shell

Python

JavaScript

Java

Go

PHP

Kind reminder: For streaming requests, the above code may not be fully applicable. Please refer to the integration documentation for changes.

Gemini AI
Allow Use General Balance

When 'Allow General Balance' is enabled, the general balance is used automatically if an app's balance is insufficient.