API 레퍼런스
Gemini Omni 캐릭터 생성
create character 엔드포인트를 사용하여 동일한 응답에서 결과를 받으세요.
01
개요
create character 엔드포인트를 사용하고 동일한 응답에서 결과를 읽으세요.
빠른 시작
- API 키를 만들고 RUNAPI_API_KEY로 설정합니다.
- 요청 스키마와 일치하는 본문으로 POST 요청을 전송하세요.
- 성공 응답 본문에서 결과를 읽습니다.
엔드포인트
- Base URL
https://runapi.ai- API 버전
v1- 인증
Authorization: Bearer YOUR_API_TOKEN
02
지원 모델
현재 가격, 속도 제한 및 상업적 이용 세부 정보는 모델 페이지를 여십시오.
03
JSON 본문요청 스키마
이 엔드포인트에 선언된 필드만 전송하세요.
gemini-omni-character필드 5개
audio_idsarray
선택
create-audio가 반환하는 오디오 프리셋 ID.
body_reference_image_urlstring
선택
선택적 공개 전신 참조 이미지 URL; reference_image_url은 초상 이미지를 제공해야 합니다.
character_namestring
선택
캐릭터 표시 이름.
제한:210
descriptionsstring
필수
캐릭터의 외모, 정체성, 스타일, 의상 또는 성격 설명.
제한:20000
reference_image_urlstring
필수
공개 초상 참조 이미지 URL입니다.
04
HTTP 200성공 응답
POST /api/v1/gemini_omni/create_character
응답 스키마
JSON
{
"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
},
"character": {
"properties": {
"id": {
"description": "생성된 캐릭터 식별자.",
"type": "string"
},
"images": {
"description": "순서가 지정된 캐릭터 참조 이미지; 초상 이미지가 첫 번째이고 선택적 전신 이미지가 두 번째입니다.",
"items": {
"properties": {
"url": {
"type": "string",
"x-runapi-generated-media": true
}
},
"required": [
"url"
],
"type": "object",
"unevaluatedProperties": false
},
"maxItems": 2,
"type": "array"
},
"name": {
"description": "캐릭터 표시 이름.",
"type": "string"
}
},
"required": [
"id"
],
"type": "object",
"unevaluatedProperties": false
},
"id": {
"description": "생성된 캐릭터 식별자.",
"type": "string"
}
},
"required": [
"id",
"character",
"billing"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
JSON
{
"billing": {
"refund": null,
"reservation": null,
"settlement": null
},
"character": {
"id": "chr_reference_presenter",
"images": [
{
"url": "https://cdn.runapi.ai/public/samples/portrait.jpg"
},
{
"url": "https://cdn.runapi.ai/public/samples/image.jpg"
}
],
"name": "Studio Presenter"
},
"id": "chr_reference_presenter"
}
05
HTTP 401오류
POST /api/v1/gemini_omni/create_character
응답 스키마
JSON
{
"properties": {
"error": {
"description": "사람이 읽을 수 있는 오류 메시지.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
JSON
{
"error": "Authentication required"
}
06
HTTP 400오류
POST /api/v1/gemini_omni/create_character
응답 스키마
JSON
{
"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
}
]
}
응답 예시
JSON
{
"error": "Validation failed",
"errors": {
"descriptions": [
"is required"
]
}
}
07
HTTP 402오류
POST /api/v1/gemini_omni/create_character
응답 스키마
JSON
{
"properties": {
"error": {
"description": "사람이 읽을 수 있는 오류 메시지.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
JSON
{
"error": "Insufficient balance"
}
08
HTTP 429오류
POST /api/v1/gemini_omni/create_character
응답 스키마
JSON
{
"properties": {
"error": {
"description": "사람이 읽을 수 있는 오류 메시지.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
JSON
{
"error": "API key credit limit exceeded"
}
09
HTTP 409오류
POST /api/v1/gemini_omni/create_character
응답 스키마
JSON
{
"properties": {
"error": {
"description": "사람이 읽을 수 있는 오류 메시지.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
JSON
{
"error": "The request uses features that are not supported for the selected model"
}
10
HTTP 429오류
POST /api/v1/gemini_omni/create_character
응답 스키마
JSON
{
"properties": {
"error": {
"description": "사람이 읽을 수 있는 오류 메시지.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
JSON
{
"error": "Rate limit reached. Please retry later."
}
11
HTTP 503오류
POST /api/v1/gemini_omni/create_character
응답 스키마
JSON
{
"properties": {
"error": {
"description": "사람이 읽을 수 있는 오류 메시지.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
JSON
{
"error": "Service under maintenance, please try again later"
}
12
HTTP 504오류
POST /api/v1/gemini_omni/create_character
응답 스키마
JSON
{
"properties": {
"error": {
"description": "사람이 읽을 수 있는 오류 메시지.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
응답 예시
JSON
{
"error": "The request timed out"
}
13
생성된 코드 샘플
cURL을 직접 사용하거나 해당 언어의 SDK를 설치하세요. 각 샘플은 이 레퍼런스에 표시된 유효성 검사된 요청을 제출합니다.
설치
Shell
pip install runapi-gemini-omni
PYTHON
import os
from runapi.gemini_omni import GeminiOmniClient
client = GeminiOmniClient(api_key=os.environ["RUNAPI_API_KEY"])
result = client.create_character.run(
descriptions="A presenter wearing a blue jacket in a bright studio.",
reference_image_url="https://cdn.runapi.ai/public/samples/portrait.jpg",
body_reference_image_url="https://cdn.runapi.ai/public/samples/image.jpg",
character_name="Studio Presenter"
)