Skip to main content
POST
Image-to-video: submit a generation task from a reference image
오른쪽의 대화형 플레이그라운드는 실시간 디버깅을 지원합니다. Authorization 아래에 API 키를 입력하고(형식 Bearer sk-xxx), 참조 이미지를 업로드한 다음 prompt를 입력하고, 모델 / 초 / 해상도를 선택한 뒤 전송합니다. Default 그룹은 작동합니다 — 별도의 그룹 전환이 필요하지 않습니다.
범위: 이 페이지는 “참조 이미지로 동영상 생성”을 다룹니다 — 정적 콘텐츠를 애니메이션화하기 위한 시각적 기준점 / 시작 프레임으로 이미지 한 장을 업로드합니다. 참조 이미지가 필요하지 않다면 텍스트-투-비디오 엔드포인트를 사용하십시오(동일한 엔드포인트, JSON 본문).
⚠️ Image-to-video 제약 사항
  • Content-Type은 multipart/form-data여야 합니다 (JSON 아님)
  • 참조 이미지는 1장만 지원됩니다; 필드명은 input_reference으로 고정됩니다. 여러 이미지를 제출하면 첫 번째만 유지됩니다
  • 원격 URL은 허용되지 않습니다 — 파일 업로드 또는 Base64여야 합니다
  • 허용 형식: image/jpeg / image/png / image/webp
  • 길이 필드는 seconds로 명명해야 하며(duration 아님), "4" / "6" / "8" 형식의 문자열이어야 합니다 duration로 지정하면 조용히 무시되고 기본 4초로 되돌아갑니다. 숫자를 전달하면 실패합니다
  • 1080p / 4k에서는 seconds"8"여야 합니다
Google 업스트림 Veo 3.1은 다중 참조 / 첫/마지막 프레임 / 동영상 확장을 지원합니다; 이 공식 채널은 아직 이를 노출하지 않습니다. 첫/마지막 프레임이 필요하면 VEO 3.1 (Reverse) -fl 시리즈를 사용하십시오.

코드 예제

Python (OpenAI SDK · 저수준 client.post)

Python (requests + 멀티파트)

cURL (멀티파트 업로드)

Node.js (네이티브 fetch + FormData)

브라우저 JavaScript (파일 입력 업로드)

이미 task_id가 있습니까? 복사해서 붙여넣는 cURL 명령 두 개

이미 task_id가 있습니까(작업을 제출할 때 반환되었거나 콘솔 로그에 표시됨)? 아래의 두 자리 표시자를 바꿔 넣고 실행하십시오:
  • sk-your-api-key → APIYI 키
  • task_xxxxxxxxxxxxxxxx → 작업 ID

1. 작업 상태 확인

JSON 응답에 status: "completed"가 표시되면 다운로드할 수 있습니다. in_progress가 표시되면 몇 초 기다렸다가 다시 확인하십시오.

2. 동영상을 다운로드합니다(output.mp4로 저장됨)

/content 엔드포인트는 Authorization 헤더가 필요합니다 — 브라우저 주소 표시줄에 URL을 직접 열면 401이 반환됩니다. --retry 3statuscompleted로 바뀐 직후 가끔 발생하는 400을 처리합니다(CDN 동기화 지연).

매개변수 참조

JSON 모드와의 필드명 차이:
  • JSON 모드에서는 metadata.* 아래에 중첩됩니다(예: metadata.resolution)
  • Multipart 모드에서는 폼 필드로 평면화됩니다(resolution / aspectRatio / seed를 직접 사용)
  • 위의 코드 샘플은 이미 multipart 규칙을 사용합니다
흔한 실수:
  • input_reference를 JSON 본문 안의 Base64 문자열로 보내는 경우 — multipart 파일 필드를 사용해야 합니다
  • 필드명을 image / reference / input_image로 지정하는 경우 — 반드시 input_reference여야 합니다
  • 이미지를 2장 보내는 경우 — 서버는 첫 번째만 유지하고 두 번째는 조용히 버립니다
  • 원격 URL(https://cdn.../img.png)을 보내는 경우 — 허용되지 않으며, 파일 또는 Base64를 사용해야 합니다

응답 형식

응답 구조는 텍스트-투-비디오와 동일합니다: 1단계는 task_id + status: "queued"를 반환하고, 2단계 폴링은 status + 대략적인 progress를 반환하며, 3단계는 /content에서 MP4 이진 파일을 다운로드합니다.
⚠️ 응답 필드 주의사항
  • task_idid와 일치합니다. 하위 시스템은 task_id를 기준으로 표준화해야 합니다.
  • video_url 필드 없음; GET /v1/videos/{task_id}/content에서 다운로드합니다
  • progress는 0 / 50 / 100 사이에서만 점프하며, 선형이 아닙니다
  • /contentstatuscompleted로 바뀐 직후 가끔 400을 반환합니다. 4초 후 다시 시도하십시오
  • 이미지-투-비디오 작업은 일반적으로 동등한 텍스트-투-비디오 작업보다 10–30% 더 오래 걸립니다 (추가 이미지 인코딩 단계 때문입니다)
이 엔드포인트는 비동기 작업 진입점입니다. 과금은 작업이 completed에 도달할 때 발생하며, 모델 이름 기준으로 요청당 과금됩니다 (input_reference가 제공되는지와는 무관함; fast $0.3 / standard $1.2). POST 제출, 폴링, 다운로드 자체는 과금되지 않으며, 실패한 작업도 과금되지 않습니다.

인증

Authorization
string
header
필수

API Key from APIYI console (Default group + Pay-per-request or Pay-as-you-go Priority Token; pure Pay-as-you-go not supported)

본문

multipart/form-data
model
enum<string>
기본값:veo-3.1-fast-generate-preview
필수

Model ID (per-request billing):

  • veo-3.1-fast-generate-preview — $0.3/request
  • veo-3.1-generate-preview — $1.2/request
사용 가능한 옵션:
veo-3.1-fast-generate-preview,
veo-3.1-generate-preview
prompt
string
필수

Video generation prompt. Focus on how the scene should animate: camera motion, object action, lighting, audio atmosphere. Do not pass generateAudio — audio intent goes in the prompt.

예시:

"Camera slowly rises from the base of the lighthouse to the top, dusk lighting, waves lapping the rocks"

input_reference
file
필수

Reference image file. Field name is fixed as input_reference, only 1 image supported.

Accepted formats: image/jpeg / image/png / image/webp. Remote URLs not accepted — must be a file upload or Base64.

seconds
enum<string>
기본값:8

Video length. The field name is seconds (not duration), a string enum: "4" / "6" / "8". Sending duration is silently ignored and falls back to the default 4 sec. Must be "8" at 1080p / 4k.

사용 가능한 옵션:
4,
6,
8
size
enum<string>
기본값:1280x720

Output pixel dimensions; lower precedence than resolution

사용 가능한 옵션:
1280x720,
720x1280,
1920x1080,
1080x1920,
3840x2160,
2160x3840
resolution
enum<string>
기본값:720p

Resolution tier (multipart mode flattens this as a top-level form field; higher precedence than size)

사용 가능한 옵션:
720p,
1080p,
4k
aspectRatio
enum<string>
기본값:16:9

Aspect ratio: 16:9 landscape (default) or 9:16 portrait

사용 가능한 옵션:
16:9,
9:16
seed
string

Random seed (multipart form field; string-encoded number is fine). Fixed seed clusters outputs in style but does not byte-reproduce.

예시:

"20260521"

negativePrompt
string

Negative prompt; recommended "blurry, watermark, distorted, low quality"

예시:

"blurry, watermark, distorted, low quality"

응답

Task submitted; returns task_id and queued status

id
string

Task ID (matches task_id; downstream should standardize on task_id)

예시:

"task_xxxxxxxxxxxxxxxx"

task_id
string

Task ID for subsequent polling and download

예시:

"task_xxxxxxxxxxxxxxxx"

object
string

Object type, fixed to video

예시:

"video"

model
string

Model ID used for this task

예시:

"veo-3.1-fast-generate-preview"

status
enum<string>

Task status:

  • queued — submitted, awaiting processing
  • in_progress — generating
  • completed — done, downloadable (/v1/videos/{task_id}/content)
  • failed — failed (not billed), retry possible
사용 가능한 옵션:
queued,
in_progress,
completed,
failed
예시:

"queued"

progress
integer

Generation progress (coarse-grained, jumps only between 0 / 50 / 100)

예시:

0

created_at
integer

Task creation Unix timestamp (seconds)

예시:

1775025000

completed_at
integer

Task completion Unix timestamp (seconds); only present for completed status

예시:

1775025090