Skip to content
Open app

Video generation (Veo)

All three Veo models use asynchronous jobs. Select the exact model ID:

ModelAPI ID
Veo 3.1veo-3.1-generate-001
Veo 3.1 Fastveo-3.1-fast-generate-001
Veo 3.1 Liteveo-3.1-lite-generate-001

They share the platform’s request shape, but their prices and provider availability are model-specific. They are not generateContent models and are not included in Gemini models.list. Gemini Omni is a separate model; see the model catalog.

POST /api/gemini/v1beta/interactions

This Moonez.ai endpoint accepts the fields below. Authenticate with x-goog-api-key: <MOONEZ_API_KEY> and send Content-Type: application/json. The key must have permission for the selected model.

FieldRequiredDescription
modelYesOne of the three Veo IDs above.
instancesYesSend one object with a non-empty prompt.
parameters.durationSecondsNoInteger from 1 to 8; defaults to 4. Provider constraints may be stricter.
parameters.resolutionNo720p, 1080p, or 4k; defaults to 720p.

1080p and 4k require an 8-second duration; shorter requests return 400. The Interactions job has a 900-second execution budget. A submission response is not a completed video: use polling or your configured webhook.

Terminal window
curl -sS https://api.moonez.ai/api/gemini/v1beta/interactions \
-H "x-goog-api-key: $MOONEZ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "veo-3.1-fast-generate-001",
"instances": [{"prompt": "A ceramic cup rotating in soft studio lighting."}],
"parameters": {"durationSeconds": 4, "resolution": "720p"}
}'
import os
import requests
response = requests.post(
"https://api.moonez.ai/api/gemini/v1beta/interactions",
headers={"x-goog-api-key": os.environ["MOONEZ_API_KEY"]},
json={
"model": "veo-3.1-lite-generate-001",
"instances": [{"prompt": "A ceramic cup rotating in soft studio lighting."}],
"parameters": {"durationSeconds": 4, "resolution": "720p"},
},
timeout=30,
)
response.raise_for_status()
print(response.json())

Alternatively, use POST /api/v1/generations with a Bearer key. Unlike the Interactions body, the native body uses prompt, duration_seconds, aspect_ratio, and resolution at the top level. All four fields are required for a native Veo request.

Terminal window
curl -sS https://api.moonez.ai/api/v1/generations \
-H "Authorization: Bearer $MOONEZ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "veo-3.1-generate-001",
"prompt": "A ceramic cup rotating in soft studio lighting.",
"aspect_ratio": "16:9",
"resolution": "720p",
"duration_seconds": 4
}'

Native video requests use the same resolution rules. 1K is a legacy alias for 720p; prefer the explicit video resolution. The native schema accepts 1–8 seconds, subject to provider validation and the 8-second requirement for 1080p and 4K.

Both endpoints return 202 Accepted with a job descriptor, for example:

{
"job_id": "0193a7f2-1c4a-7e0b-9b3a-2f1d8c6e4a55",
"status": "queued",
"status_url": "/api/v1/jobs/0193a7f2-1c4a-7e0b-9b3a-2f1d8c6e4a55"
}

Poll status_url using Authorization: Bearer <MOONEZ_API_KEY> until done or failed. On success, the MP4 download URL is in result.image_url despite that field’s image-oriented name. Download the result before the URL expires. See Get a job and Webhooks.

The cost is the selected model’s rate per second for the requested resolution, multiplied by the requested duration. Moonez.ai reserves the amount on job creation, charges it on success, and releases it on failure.

Use the current rates in your account’s Pricing page. Do not assume that Veo, Fast, and Lite have equal rates or infer prices from their names.