Skip to content

Video Generation (Veo)

Generate a short video (MP4, up to 8 seconds) with veo-3.1-generate-001. Returns 202 Accepted with a job_id — poll GET /jobs/{job_id} until the job is done or failed. On success, result.image_url is a direct link to the MP4 file.

POST /api/gemini/v1beta/interactions
x-goog-api-key string required

Your platform API key (same header as the Gemini-compatible API). See Authentication.

model string required

Always veo-3.1-generate-001.

instances array required

Exactly one object with a prompt field — the video description.

parameters.durationSeconds integer

Video length, 18 seconds. Default 4.

Returns 202 Accepted.

job_id string

UUID of the created job.

status string

Always queued on creation.

status_url string

Relative path to poll for status and result.

Terminal window
curl -s -X POST https://api.moonez.ai/api/gemini/v1beta/interactions \
-H "x-goog-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "veo-3.1-generate-001",
"instances": [{"prompt": "a cat walking through a neon city at night"}],
"parameters": {"durationSeconds": 4}
}'
import requests
resp = requests.post(
"https://api.moonez.ai/api/gemini/v1beta/interactions",
headers={"x-goog-api-key": API_KEY},
json={
"model": "veo-3.1-generate-001",
"instances": [{"prompt": "a cat walking through a neon city at night"}],
"parameters": {"durationSeconds": 4},
},
)
print(resp.json())

Veo is also available through the platform’s own jobs API — the same POST /api/v1/generations endpoint used for image and text models. Add duration_seconds (4–8) to the body:

Terminal window
curl -s -X POST https://api.moonez.ai/api/v1/generations \
-H "Authorization: Bearer *** \
-H "Content-Type: application/json" \
-d '{
"model": "veo-3.1-generate-001",
"prompt": "a cat walking through a neon city at night",
"aspect_ratio": "16:9",
"resolution": "720p",
"duration_seconds": 4
}'

Returns 202 Accepted with a job_id — poll GET /jobs/{job_id} until done; result.image_url is a direct link to the MP4 file. Billing is the same as all video generations: per second of video (price per second × duration).

Veo supports three resolutions, exactly like Google: 720p, 1080p and 4k (1K is accepted as a legacy alias for 720p). Each resolution has its own per-second price, configurable in the admin panel and shown to clients.

  • 720p — 4–8 second videos.
  • 1080p, 4k8-second videos only (Google’s limit); requesting them with a shorter duration returns 400.
  • Billed per second of video (like Google’s own Veo billing): the price shown in your panel is per second, and a generation is charged price_per_second(resolution) × duration_seconds. Each resolution has its own rate.
  • A reservation is placed when the job is created and charged on success; on failure it is released automatically.