Gemini Omni 텍스트→비디오
텍스트를 비디오로 변환하는 엔드포인트를 사용하여 비동기 Task를 생성하세요.
개요
지원되는 모델로 텍스트를 비디오로 변환하는 엔드포인트를 사용하세요. 반환된 Task ID로 상태를 조회하거나, 아래에 문서화된 전달을 위해 callback_url을 제공하세요.
빠른 시작
- API 키를 만들고 RUNAPI_API_KEY로 설정합니다.
- 지원되는 모델을 선택하고 해당 모델의 스키마와 일치하는 본문으로 POST 요청을 전송합니다.
- 반환된 작업 ID를 저장한 후, 터미널 상태가 될 때까지 폴링하거나 아래에 문서화된 콜백을 처리하세요.
엔드포인트
- Base URL
https://runapi.ai- API 버전
v1- 인증
Authorization: Bearer YOUR_API_TOKEN
지원 모델
현재 가격, 속도 제한 및 상업적 이용 세부 정보는 모델 페이지를 여십시오.
요청 스키마
필드와 허용 값은 선택된 모델에 따라 다릅니다. 제공된 경우 callback_url은 아래에 문서화된 Task 전달을 수신합니다.
gemini-omni-flash-1-1필드 16개
aspect_ratiostring출력 화면 비율.
허용 값:16:9, 9:16
audio_idsarraycreate-audio가 반환하는 오디오 프리셋 ID.
항목 제한:3
callback_urlstring최종 Task 전달을 위한 웹훅 URL.
character_idsarraycreate-character로 반환된 Character ID; 이중 이미지 캐릭터는 공유된 7개의 참조 단위 중 두 개를 소비합니다.
항목 제한:3
duration_secondsinteger출력 지속 시간(초).
허용 값:4, 6, 8, 10
first_frame_image_urlstring공개 첫 번째 프레임 이미지 URL; 참조 이미지, 오디오 ID, 비디오 클립, Character ID와 상호 배타적입니다.
last_frame_image_urlstring공개 마지막 프레임 이미지 URL. first_frame_image_url이 필요합니다.
modelstring모델 슬러그; 생략 시 기본값은 gemini-omni-text-to-video입니다.
output_resolutionstring출력 해상도.
허용 값:360p, 720p, 1080p, 4k
기본값: 720p
promptstring비디오 생성 프롬프트.
제한:20000
reference_image_urlsarray공개 참조 이미지 URL. 이미지, 비디오 클립, 캐릭터는 총 7개의 참조 한도를 공유합니다.
항목 제한:7
seedinteger결정론적 생성 시드.
범위:0 - 2147483647
video_listarray소스 비디오 클립; 각 클립은 두 개의 레퍼런스 단위를 소비합니다.
항목 제한:1
video_list[].endsnumber클립 종료 시간(초). 시작 시간보다 크고 시작 시간으로부터 10초 이내여야 합니다.
제한:0
video_list[].startnumber클립 시작 시간(초).
제한:0
video_list[].urlstring공개 소스 비디오 URL.
gemini-omni-flash-preview필드 5개
aspect_ratiostring출력 화면 비율.
허용 값:16:9, 9:16
기본값: 16:9
callback_urlstring최종 Task 전달을 위한 웹훅 URL.
modelstring모델 슬러그; 생략 시 기본값은 gemini-omni-text-to-video입니다.
output_resolutionstring출력 해상도.
허용 값:720p
기본값: 720p
promptstring비디오 생성 프롬프트.
제한:20000
gemini-omni-text-to-video필드 14개
aspect_ratiostring출력 화면 비율.
허용 값:16:9, 9:16
audio_idsarraycreate-audio가 반환하는 오디오 프리셋 ID.
항목 제한:3
callback_urlstring최종 Task 전달을 위한 웹훅 URL.
character_idsarraycreate-character로 반환된 Character ID; 이중 이미지 캐릭터는 공유된 7개의 참조 단위 중 두 개를 소비합니다.
항목 제한:3
duration_secondsinteger출력 지속 시간(초).
허용 값:4, 6, 8, 10
modelstring모델 슬러그; 생략 시 기본값은 gemini-omni-text-to-video입니다.
기본값:gemini-omni-text-to-video
output_resolutionstring출력 해상도.
허용 값:720p, 1080p, 4k
기본값: 720p
promptstring비디오 생성 프롬프트.
제한:20000
reference_image_urlsarray공개 참조 이미지 URL. 이미지, 비디오 클립, 캐릭터는 총 7개의 참조 한도를 공유합니다.
항목 제한:7
seedinteger결정론적 생성 시드.
범위:0 - 2147483647
video_listarray소스 비디오 클립; 각 클립은 두 개의 레퍼런스 단위를 소비합니다.
항목 제한:1
video_list[].endsnumber클립 종료 시간(초). 시작 시간보다 크고 시작 시간으로부터 10초 이내여야 합니다.
제한:0
video_list[].startnumber클립 시작 시간(초).
제한:0
video_list[].urlstring공개 소스 비디오 URL.
조건부 규칙
이 요구 사항은 나열된 모든 조건이 일치할 때 적용됩니다.
-
다음의 경우
first_frame_image_url = {"present" => true},model = gemini-omni-flash-1-1- 필수
- 허용되지 않음
reference_image_urls,audio_ids,video_list,character_ids
-
다음의 경우
last_frame_image_url = {"present" => true},model = gemini-omni-flash-1-1- 필수
first_frame_image_url- 허용되지 않음
-
다음의 경우
model = gemini-omni-flash-preview- 필수
- 허용되지 않음
reference_image_urls,audio_ids,video_list,character_ids,first_frame_image_url,last_frame_image_url,duration_seconds,seed
-
다음의 경우
model = gemini-omni-text-to-video- 필수
- 허용되지 않음
first_frame_image_url,last_frame_image_url
수락 만들기
POST /api/v1/gemini_omni/text_to_video
응답 스키마
{
"properties": {
"billing": {
"properties": {
"refund": {
"oneOf": [
{
"properties": {
"refunded_at": {
"type": "string"
}
},
"required": [
"refunded_at"
],
"type": "object",
"unevaluatedProperties": false
},
{
"enum": [
null
]
}
]
},
"reservation": {
"oneOf": [
{
"properties": {
"amount_cents": {
"type": "integer"
}
},
"required": [
"amount_cents"
],
"type": "object",
"unevaluatedProperties": false
},
{
"enum": [
null
]
}
]
},
"settlement": {
"oneOf": [
{
"properties": {
"amount_micro_cents": {
"type": "integer"
},
"charged_amount_cents": {
"type": "integer"
}
},
"required": [
"charged_amount_cents",
"amount_micro_cents"
],
"type": "object",
"unevaluatedProperties": false
},
{
"enum": [
null
]
}
]
}
},
"required": [
"reservation",
"settlement",
"refund"
],
"type": "object",
"unevaluatedProperties": false
},
"id": {
"type": "string"
},
"status": {
"enum": [
"processing"
],
"type": "string"
},
"task_replayed": {
"type": "boolean"
}
},
"required": [
"id",
"status",
"billing"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
{
"billing": {
"refund": null,
"reservation": null,
"settlement": null
},
"id": "tsk_reference_demo",
"status": "processing"
}
폴링 처리 중
GET /api/v1/gemini_omni/text_to_video/:id
응답 스키마
{
"properties": {
"billing": {
"properties": {
"refund": {
"oneOf": [
{
"properties": {
"refunded_at": {
"type": "string"
}
},
"required": [
"refunded_at"
],
"type": "object",
"unevaluatedProperties": false
},
{
"enum": [
null
]
}
]
},
"reservation": {
"oneOf": [
{
"properties": {
"amount_cents": {
"type": "integer"
}
},
"required": [
"amount_cents"
],
"type": "object",
"unevaluatedProperties": false
},
{
"enum": [
null
]
}
]
},
"settlement": {
"oneOf": [
{
"properties": {
"amount_micro_cents": {
"type": "integer"
},
"charged_amount_cents": {
"type": "integer"
}
},
"required": [
"charged_amount_cents",
"amount_micro_cents"
],
"type": "object",
"unevaluatedProperties": false
},
{
"enum": [
null
]
}
]
}
},
"required": [
"reservation",
"settlement",
"refund"
],
"type": "object",
"unevaluatedProperties": false
},
"id": {
"type": "string"
},
"status": {
"enum": [
"processing"
],
"type": "string"
}
},
"required": [
"id",
"status",
"billing"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
{
"billing": {
"refund": null,
"reservation": null,
"settlement": null
},
"id": "tsk_reference_demo",
"status": "processing"
}
폴링 완료
GET /api/v1/gemini_omni/text_to_video/:id
응답 스키마
{
"properties": {
"billing": {
"properties": {
"refund": {
"oneOf": [
{
"properties": {
"refunded_at": {
"type": "string"
}
},
"required": [
"refunded_at"
],
"type": "object",
"unevaluatedProperties": false
},
{
"enum": [
null
]
}
]
},
"reservation": {
"oneOf": [
{
"properties": {
"amount_cents": {
"type": "integer"
}
},
"required": [
"amount_cents"
],
"type": "object",
"unevaluatedProperties": false
},
{
"enum": [
null
]
}
]
},
"settlement": {
"oneOf": [
{
"properties": {
"amount_micro_cents": {
"type": "integer"
},
"charged_amount_cents": {
"type": "integer"
}
},
"required": [
"charged_amount_cents",
"amount_micro_cents"
],
"type": "object",
"unevaluatedProperties": false
},
{
"enum": [
null
]
}
]
}
},
"required": [
"reservation",
"settlement",
"refund"
],
"type": "object",
"unevaluatedProperties": false
},
"id": {
"type": "string"
},
"status": {
"enum": [
"completed"
],
"type": "string"
},
"videos": {
"items": {
"properties": {
"url": {
"type": "string",
"x-runapi-generated-media": true
}
},
"required": [
"url"
],
"type": "object",
"unevaluatedProperties": false
},
"type": "array"
}
},
"required": [
"id",
"status",
"videos",
"billing"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
{
"billing": {
"refund": null,
"reservation": null,
"settlement": null
},
"id": "tsk_reference_demo",
"status": "completed",
"videos": [
{
"url": "https://file.runapi.ai/reference-video.mp4"
}
]
}
폴링 실패
GET /api/v1/gemini_omni/text_to_video/:id
응답 스키마
{
"properties": {
"billing": {
"properties": {
"refund": {
"oneOf": [
{
"properties": {
"refunded_at": {
"type": "string"
}
},
"required": [
"refunded_at"
],
"type": "object",
"unevaluatedProperties": false
},
{
"enum": [
null
]
}
]
},
"reservation": {
"oneOf": [
{
"properties": {
"amount_cents": {
"type": "integer"
}
},
"required": [
"amount_cents"
],
"type": "object",
"unevaluatedProperties": false
},
{
"enum": [
null
]
}
]
},
"settlement": {
"oneOf": [
{
"properties": {
"amount_micro_cents": {
"type": "integer"
},
"charged_amount_cents": {
"type": "integer"
}
},
"required": [
"charged_amount_cents",
"amount_micro_cents"
],
"type": "object",
"unevaluatedProperties": false
},
{
"enum": [
null
]
}
]
}
},
"required": [
"reservation",
"settlement",
"refund"
],
"type": "object",
"unevaluatedProperties": false
},
"error": {
"type": "string"
},
"id": {
"type": "string"
},
"status": {
"enum": [
"failed"
],
"type": "string"
}
},
"required": [
"id",
"status",
"error",
"billing"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
{
"billing": {
"refund": null,
"reservation": null,
"settlement": null
},
"error": "Task processing failed.",
"id": "tsk_reference_demo",
"status": "failed"
}
고객 콜백: 완료됨
POST callback_url
응답 스키마
{
"properties": {
"id": {
"type": "string"
},
"status": {
"enum": [
"completed"
],
"type": "string"
},
"videos": {
"items": {
"properties": {
"url": {
"type": "string",
"x-runapi-generated-media": true
}
},
"required": [
"url"
],
"type": "object",
"unevaluatedProperties": false
},
"type": "array"
}
},
"required": [
"id",
"status",
"videos"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
{
"id": "tsk_reference_demo",
"status": "completed",
"videos": [
{
"url": "https://file.runapi.ai/reference-video.mp4"
}
]
}
고객 콜백: 실패함
POST callback_url
응답 스키마
{
"properties": {
"error": {
"oneOf": [
{
"type": "string"
},
{
"properties": {
"code": {
"type": "string"
},
"limit_cents": {
"type": "integer"
},
"message": {
"type": "string"
},
"reset_at": {
"format": "date-time",
"type": [
"string",
"null"
]
},
"used_cents": {
"type": "integer"
},
"window": {
"enum": [
"1h",
"1d",
"7d",
"daily",
"weekly",
"monthly",
"lifetime"
],
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"unevaluatedProperties": false
}
]
},
"id": {
"type": "string"
},
"status": {
"enum": [
"failed"
],
"type": "string"
}
},
"required": [
"id",
"status",
"error"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
{
"error": {
"code": "generation_failed",
"message": "Task processing failed."
},
"id": "tsk_reference_demo",
"status": "failed"
}
오류
POST /api/v1/gemini_omni/text_to_video
응답 스키마
{
"properties": {
"error": {
"description": "사람이 읽을 수 있는 오류 메시지.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
{
"error": "Authentication required"
}
오류
GET /api/v1/gemini_omni/text_to_video/:id
응답 스키마
{
"properties": {
"error": {
"description": "사람이 읽을 수 있는 오류 메시지.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
{
"error": "Authentication required"
}
오류
POST /api/v1/gemini_omni/text_to_video
응답 스키마
{
"oneOf": [
{
"properties": {
"error": {
"description": "사람이 읽을 수 있는 오류 메시지.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
},
{
"properties": {
"error": {
"description": "사람이 읽을 수 있는 유효성 검사 요약입니다.",
"type": "string"
},
"errors": {
"additionalProperties": {
"items": {
"type": "string"
},
"type": "array"
},
"description": "공개 요청 필드를 키로 하는 유효성 검사 메시지로, 각 필드에 대해 사람이 읽을 수 있는 문자열 배열이 포함됩니다.",
"type": "object"
}
},
"required": [
"error",
"errors"
],
"type": "object",
"unevaluatedProperties": false
}
]
}
응답 예시
{
"error": "model must be one of: gemini-omni-flash-1-1, gemini-omni-flash-preview, gemini-omni-text-to-video"
}
오류
POST /api/v1/gemini_omni/text_to_video
응답 스키마
{
"properties": {
"error": {
"description": "사람이 읽을 수 있는 오류 메시지.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
{
"error": "Insufficient balance"
}
오류
POST /api/v1/gemini_omni/text_to_video
응답 스키마
{
"properties": {
"error": {
"description": "사람이 읽을 수 있는 오류 메시지.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
{
"error": "API key credit limit exceeded"
}
오류
POST /api/v1/gemini_omni/text_to_video
응답 스키마
{
"properties": {
"error": {
"description": "사람이 읽을 수 있는 오류 메시지.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
{
"error": "The request uses features that are not supported for the selected model"
}
오류
POST /api/v1/gemini_omni/text_to_video
응답 스키마
{
"properties": {
"error": {
"description": "사람이 읽을 수 있는 오류 메시지.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
{
"error": "Rate limit reached. Please retry later."
}
오류
POST /api/v1/gemini_omni/text_to_video
응답 스키마
{
"properties": {
"error": {
"description": "사람이 읽을 수 있는 오류 메시지.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
{
"error": "Service under maintenance, please try again later"
}
오류
POST /api/v1/gemini_omni/text_to_video
응답 스키마
{
"properties": {
"error": {
"description": "사람이 읽을 수 있는 오류 메시지.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
{
"error": "The request timed out"
}
오류
GET /api/v1/gemini_omni/text_to_video/:id
응답 스키마
{
"properties": {
"error": {
"description": "사람이 읽을 수 있는 오류 메시지.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
{
"error": "Task with id 'tsk_reference_demo' not found"
}
생성된 코드 샘플
cURL을 직접 사용하거나 해당 언어의 SDK를 설치하세요. 각 샘플은 이 레퍼런스에 표시된 유효성 검사된 요청을 제출합니다.
설치
pip install runapi-gemini-omni
import os
from runapi.gemini_omni import GeminiOmniClient
client = GeminiOmniClient(api_key=os.environ["RUNAPI_API_KEY"])
task = client.text_to_video.create(
model="gemini-omni-text-to-video",
prompt="A presenter walks through a bright studio.",
duration_seconds=4
)