Google: Veo 3.1 (Video Extend) API Reference

About

Extend a video using Google's Veo 3.1 model.

This endpoint takes an existing video and extends it based on a text prompt. The prompt should describe how the video should continue or be extended.

Include in your prompt:

  • Action: What should happen next in the video
  • Style: Maintain or transition to a specific visual style
  • Camera motion (optional): How the camera should move
  • Ambiance (optional): Desired mood and atmosphere

The model supports:

  • Input videos up to 8 seconds in length
  • 720p or 1080p resolution
  • 16:9 or 9:16 aspect ratio
  • Natural motion continuation

1. Calling the API

Setup your API Key

To begin using Infron, you first need to create an account and generate your API Key.

Once you have your API key, set it as an environment variable in your runtime environment. This allows your applications to securely access Infron’s API.

export INFRON_KEY="YOUR_API_KEY"

Submit a request

For long-running requests, you can poll for results.

curl https://media.onerouter.pro/v1/videos/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "google/veo3.1/video-extend",
  "duration": "7s",
  "aspect_ratio": "9:16",
  "resolution": "720p",
  "generate_audio": true,
  "prompt": "Continue the scene naturally, maintaining the same style and motion.",
  "video_url": "https://storage.googleapis.com/infron_gcs/quick-upload/2026/05/19/20260519-130142-ff1d8423-pY8UGl4_C452wOm9XUBYO_9ae04df8771c4f3f979fa5cabeca6ada.mp4"
}'

Response with queue task id

The response will look like this:

{
  "code": 200,
  "message": "success",
  "data": {
    "task_id": "0d5019726126419a8f48cf9e43c15908",
    "object": "video",
    "model": "google/veo3.1/video-extend",
    "status": "created",
    "urls": {
      "query": "https://media.onerouter.pro/v1/videos/tasks/0d5019726126419a8f48cf9e43c15908"
    },
    "created_at": "2026-05-29 13:23:40.50"
  }
}

Fetch request status

You can fetch the status of a request to check if it is completed or still in progress.

curl https://media.onerouter.pro/v1/videos/tasks/{task_id} \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" 

# For example
curl https://media.onerouter.pro/v1/videos/tasks/0d5019726126419a8f48cf9e43c15908 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response with queue task status query

{
  "code": 200,
  "message": "success",
  "data": {
    "task_id": "0d5019726126419a8f48cf9e43c15908",
    "object": "video",
    "model": "google/veo3.1/video-extend",
    "status": "in_progress",
    "fail_reason": "",
    "submit_time": 1780061021,
    "start_time": 1780061020,
    "finish_time": 0,
    "outputs": [],
    "created_at": "2026-05-29 13:23:41"
  }
}

Possible statuses:

  • created
  • in_progress
  • processing
  • completed
  • failed

created -> in_progress → processing → completed | failed

Poll every 1-2 seconds until status is "completed" or "failed"

Get the result (when status is "completed")

Once the request is completed, you can fetch the result. See the Output Schema for the expected result format.

{
  "code": 200,
  "message": "success",
  "data": {
    "task_id": "0d5019726126419a8f48cf9e43c15908",
    "object": "video",
    "model": "google/veo3.1/video-extend",
    "status": "completed",
    "fail_reason": "",
    "submit_time": 1780061021,
    "start_time": 1780061020,
    "finish_time": 1780061126,
    "outputs": [
      "https://storage.googleapis.com/infron_gcs/video%2Fvideo_v2%2Foutput%2Foutput_d5c11300-2d18-41c7-8ee4-3b4015b006bd.mp4"
    ],
    "usage": {
      "completion_tokens": 0,
      "duration": 7,
      "generate_audio": true,
      "output_count": 1,
      "prompt_tokens": 1,
      "request_num": 1,
      "resolution": "720p",
      "tokens": 1,
      "total_tokens": 1
    },
    "cost": {
      "total_cost": 2.8,
      "cost_details": {
        "prompt_cost": 0,
        "completion_cost": 0,
        "image_cost": 0,
        "video_cost": 2.8,
        "audio_cost": 0,
        "native_web_search_cost": 0,
        "plugin_web_search_cost": 0,
        "tools_cost": 0,
        "prompt_cache_read_cost": 0,
        "prompt_cache_write_cost": 0,
        "prompt_cache_write_5_min": 0,
        "prompt_cache_write_1_h": 0,
        "reasoning_cost": 0,
        "discount_rate": 1,
        "is_byok": false,
        "byok_cost": 0
      }
    },
    "created_at": "2026-05-29 13:23:41"
  }
}

2. Schema

Input

ParameterTypeRequiredDefaultRangeDescription
modelstringYes--Explore all modelsModel name.
promptstringYes----Text prompt for generation; Positive text prompt.
video_urlstringYes----URL of the video to extend.
aspect_ratiostringNo16:916:9, 9:16Aspect ratio of the generated video
durationstringNo7s7sDuration of the generated video
resolutionstringNo720p720p, 1080pResolution of the generated video
generate_audiobooleanNotruetrue, falseWhether to generate audio.
negative_promptstringNo----Negative prompt for the generation.
seedintegerNo-->=1The random seed to use for the generation.

Example request

curl https://media.onerouter.pro/v1/videos/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "google/veo3.1/video-extend",
  "duration": "7s",
  "aspect_ratio": "9:16",
  "resolution": "720p",
  "generate_audio": true,
  "prompt": "Continue the scene naturally, maintaining the same style and motion.",
  "video_url": "https://storage.googleapis.com/infron_gcs/quick-upload/2026/05/19/20260519-130142-ff1d8423-pY8UGl4_C452wOm9XUBYO_9ae04df8771c4f3f979fa5cabeca6ada.mp4"
}'

Output

ParameterTypeRangeDescription
codeinteger--Status code of the request.
messagestring--Status message of the request.
dataobject--Data of the video task.
data.task_idstring--ID of the video task.
data.objectstring--Object type of the video task.
data.modelstring--Model name of the video task.
data.statusstringcreated, in_progress, processing, completed, failedStatus of the video task.
data.fail_reasonstring--Fail reason of the video task.
data.submit_timeinteger--Timestamp of the video task submission.
data.start_timeinteger--Timestamp of the video task start.
data.finish_timeinteger--Timestamp of the video task finish.
data.outputsarray--Outputs of the video task.
data.created_atstring--Timestamp of the video task creation.

Example output

{
  "code": 200,
  "message": "success",
  "data": {
    "task_id": "0d5019726126419a8f48cf9e43c15908",
    "object": "video",
    "model": "google/veo3.1/video-extend",
    "status": "completed",
    "fail_reason": "",
    "submit_time": 1780061021,
    "start_time": 1780061020,
    "finish_time": 1780061126,
    "outputs": [
      "https://storage.googleapis.com/infron_gcs/video%2Fvideo_v2%2Foutput%2Foutput_d5c11300-2d18-41c7-8ee4-3b4015b006bd.mp4"
    ],
    "usage": {
      "completion_tokens": 0,
      "duration": 7,
      "generate_audio": true,
      "output_count": 1,
      "prompt_tokens": 1,
      "request_num": 1,
      "resolution": "720p",
      "tokens": 1,
      "total_tokens": 1
    },
    "cost": {
      "total_cost": 2.8,
      "cost_details": {
        "prompt_cost": 0,
        "completion_cost": 0,
        "image_cost": 0,
        "video_cost": 2.8,
        "audio_cost": 0,
        "native_web_search_cost": 0,
        "plugin_web_search_cost": 0,
        "tools_cost": 0,
        "prompt_cache_read_cost": 0,
        "prompt_cache_write_cost": 0,
        "prompt_cache_write_5_min": 0,
        "prompt_cache_write_1_h": 0,
        "reasoning_cost": 0,
        "discount_rate": 1,
        "is_byok": false,
        "byok_cost": 0
      }
    },
    "created_at": "2026-05-29 13:23:41"
  }
}

3. Detailed Pricing

ResolutionWithout AudioWith Audio
720p / 1080p$0.20/s$0.40/s