Skip to main content
POST
Create Gemini video task
Call Seedance through the Gemini API long-running operation format. Poll with GET; successful results appear in response.generateVideoResponse.generatedSamples. For a client using Vertex AI paths, follow the Vertex AI endpoint.

Setup

Use https://api.aiohub.org and authenticate with an AIOHub API key. Replace <AIOHUB_API_KEY> with your full sk- key and confirm its group can access the selected Seedance model.

Example request

The response includes the fields below. Save the full name, including the model path and operations/, rather than only its final ID segment.
After saving the task identifier, poll the task.

Inputs and parameters

Omitted controls default to 5 seconds, 720p, adaptive aspect ratio and audio enabled. First/last frames and reference images are separate input modes; do not combine them in the same instances[0]. Example image object:
See Video models and pricing for model limits. Arbitrary gs:// inputs, video extension and the full Veo parameter set are not supported. Use Ark / Seedance for reference audio, reference video or video editing.
Install google-genai and set AIOHUB_API_KEY in your environment. This example uses Gemini API mode. The base URL excludes /v1beta; set the version with api_version.
Python
If creation times out without a task identifier, check the usage log before resubmitting to avoid duplicate generation and charges. Correct parameters after a 400 and check the API key after a 401. See Authentication for access and quota requirements.

Authorizations

Authorization
string
header
required

API key (sk-xxx)

Path Parameters

model
string
required

Full Seedance model name.

Example:

"doubao-seedance-2-5-260628"

Body

application/json

This schema covers Seedance. lastFrame requires image; reference images cannot be combined with first/last frames. Video extension, masks, seed, negativePrompt and other unlisted controls are unsupported.

instances
object[]
required

Send exactly one instance. Text generation requires prompt; use image for a first frame.

Required array length: 1 element
parameters
object

Response

Task accepted.

name
string
required

Full operation name. Save the returned value for polling.

done
boolean
required

False means pending. True means finished, possibly with a failure; check error.

response
object
error
object