ApiframeApiframe Docs
Video GenerationVeo

Veo 2

Google Veo 2 video generation — text-to-video and image-to-video.

Use in Apiframe Studio

POST /v2/videos/generatemodel: "veo-2"

Google Veo 2 generates high-quality videos from text prompts or input images.

See Video Generation overview for common request fields, response format, and error codes.

Model-specific parameters

ParameterTypeDefaultDescription
veoParams.durationinteger5Video duration in seconds (5–8)
veoParams.aspect_ratiostringAspect ratio in "W:H" format (e.g. "16:9")
veoParams.seedintegerRandom seed for reproducibility
veoParams.imagestringURL of an input image for image-to-video

Credit cost

VariantCredits
5s15
6s18
7s20
8s22

Code examples

curl -X POST https://api.apiframe.ai/v2/videos/generate \
  -H "X-API-Key: afk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "a golden retriever running through a sunlit meadow",
    "model": "veo-2",
    "veoParams": {
      "duration": 8,
      "aspect_ratio": "16:9"
    }
  }'
import requests

response = requests.post(
    "https://api.apiframe.ai/v2/videos/generate",
    headers={
        "X-API-Key": "afk_your_api_key_here",
        "Content-Type": "application/json",
    },
    json={
        "prompt": "a golden retriever running through a sunlit meadow",
        "model": "veo-2",
        "veoParams": {
            "duration": 8,
            "aspect_ratio": "16:9",
        },
    },
)
print(response.json())
const response = await fetch("https://api.apiframe.ai/v2/videos/generate", {
  method: "POST",
  headers: {
    "X-API-Key": "afk_your_api_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    prompt: "a golden retriever running through a sunlit meadow",
    model: "veo-2",
    veoParams: {
      duration: 8,
      aspect_ratio: "16:9",
    },
  }),
});
console.log(await response.json());

Try it

POST/v2/videos/generateTry it

On this page