메인 콘텐츠로 건너뛰기
오디오 입력은 멀티모달 Gemini 모델에서 지원됩니다. 두 경로가 있습니다:

경로 1: /v1/chat/completions의 OpenAI 형태 input_audio

게이트웨이가 OpenAI input_audio 컨텐츠 파트를 Gemini의 inline_data로 자동 변환합니다. format 필드는 올바른 MIME 타입에 매핑됩니다(mp3audio/mp3, wavaudio/wav 등).
curl https://api.orcarouter.ai/v1/chat/completions \
  -H "Authorization: Bearer sk-orca-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemini-2.5-flash",
    "messages": [{
      "role": "user",
      "content": [
        {"type": "text", "text": "What is happening in this audio clip?"},
        {"type": "input_audio", "input_audio": {"data": "<base64>", "format": "mp3"}}
      ]
    }]
  }'

경로 2: 네이티브 /v1beta/inline_data

이미 Gemini의 네이티브 프로토콜을 사용 중이라면 변환 없이 inline_data를 직접 전달하세요.
curl "https://api.orcarouter.ai/v1beta/models/google/gemini-2.5-flash:generateContent" \
  -H "Authorization: Bearer sk-orca-..." \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{
      "role": "user",
      "parts": [
        {"text": "What is happening in this audio clip?"},
        {"inline_data": {"mime_type": "audio/mp3", "data": "<base64>"}}
      ]
    }]
  }'

지원 모델 패밀리

Gemini 멀티모달 모델 — 예를 들어 google/gemini-2.5-flash와 Gemini 3.x 라인 — 가 인라인 오디오를 받습니다. 동작은 Google이 공개한 Gemini API와 정확히 일치합니다.

제한

인라인 오디오 페이로드는 업스트림 프로바이더에 의해 크기가 제한 됩니다. 더 긴 파일의 경우 프로바이더 자체 File API(OrcaRouter를 거치지 않고 자신의 앱에서 프로바이더로 직접 업로드)가 일반적인 우회 방법입니다. 현재 크기와 길이 제한은 Google Gemini API 문서를 확인하세요.

관련 항목