Skip to main content
POST
/
v3
/
async
/
veo-3.1-generate-firstlastframe
Veo 3.1 First and Last Frame Video Generation
curl --request POST \
  --url https://api.highwayapi.ai/v3/async/veo-3.1-generate-firstlastframe \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "seed": 123,
  "image": "<string>",
  "prompt": "<string>",
  "last_image": "<string>",
  "resolution": "<string>",
  "aspect_ratio": "<string>",
  "sample_count": 123,
  "enhance_prompt": true,
  "generate_audio": true,
  "negative_prompt": "<string>",
  "duration_seconds": 123,
  "person_generation": "<string>"
}
'
{
  "task_id": "<string>"
}
Use the Google Veo 3.1 model to generate a transition video based on the provided first-frame and last-frame images. Supports durations of 4/6/8 seconds, 720p and 1080p resolutions, and optional audio generation.
This is an asynchronous API and will only return the task_id of the async task. You should use this task_id to request the Get Task Result API to retrieve the generated result.

Request Headers

Content-Type
string
required
Enum value: application/json
Authorization
string
required
Bearer authentication format: Bearer {{API Key}}.

Request Body

seed
integer
Random seed used to reproduce the generated result.Value range: [0, 4294967295]
image
string
required
First-frame image. Supports image URLs or Base64-encoded data. Format requirements: JPEG or PNG, up to 20 MB.
prompt
string
required
Text prompt describing the video transition content between the first frame and the last frame.
last_image
string
required
Last-frame image. Supports image URLs or Base64-encoded data. Format requirements: JPEG or PNG, up to 20 MB.
resolution
string
default:"720p"
Output video resolution.Available values: 720p, 1080p
aspect_ratio
string
default:"16:9"
Output video aspect ratio.Available values: 16:9, 9:16
sample_count
integer
default:1
Number of generated video samples (1-4).Value range: [1, 4]
enhance_prompt
boolean
default:true
Whether to use Gemini to enhance the prompt. This feature cannot be disabled on Veo 3.x.
generate_audio
boolean
default:false
Whether to generate audio at the same time.
negative_prompt
string
Describes content to avoid in the generated video.
duration_seconds
integer
default:8
Generated video duration (seconds), supporting 4, 6, and 8 seconds.Available values: 4, 6, 8
person_generation
string
default:"allow_adult"
Whether to allow generating people. allow_adult: allow generating adults; dont_allow: do not allow generating people; allow_all: allow all people.Available values: allow_adult, dont_allow, allow_all

Response Information

task_id
string
Use the task_id to request the Get Task Result API to retrieve the generated output.