Sonilo API
엔드포인트당 1~2회, 총 12회의 무료 체험으로 시작한 후 사용한 만큼만 요금을 지불하세요.
지금 체험하기인증
Sonilo API는 API 키로 요청을 인증합니다. API 키 페이지에서 키를 생성하고 관리하세요. 키는 sk_로 시작하며 생성 시 한 번만 표시됩니다 — 즉시 복사하세요. 모든 요청에 Bearer 토큰으로 키를 전달하세요:
curl https://api.sonilo.com/v1/account/services \
-H "Authorization: Bearer sk_your_api_key_here"키를 비밀번호처럼 취급하세요: 서버 측에 보관하고 환경 변수에서 로드하세요 — 절대 커밋하거나 클라이언트 코드에 포함하지 마세요. 키가 노출된 경우 API 키 페이지에서 폐기하고 새로 생성하세요. 폐기된 키는 즉시 적용되며 이후 모든 요청에서 401을 반환합니다.
기본 URL
모든 API 요청은 단일 기본 URL을 공유합니다:
https://api.sonilo.com/v1이 참조서의 엔드포인트 경로는 이 기본 URL을 기준으로 합니다. API는 HTTPS를 통해서만 제공됩니다 — 일반 HTTP 요청은 거부됩니다.
헤더
모든 요청에는 Authorization 헤더가 포함되어야 합니다. 생성 엔드포인트에는 추가로 Content-Type이 필요합니다:
Authorization: Bearer sk_…— 모든 요청에 필수입니다.Content-Type: multipart/form-data— 폼 필드와 파일 업로드를 받는 생성 엔드포인트/v1/text-to-music및/v1/video-to-music에 필요합니다. 계정 엔드포인트는 본문이 없는GET요청입니다.
핵심 엔드포인트
Sonilo는 두 개의 생성 엔드포인트와 두 개의 계정 엔드포인트를 제공합니다. 아래 경로를 따라가면 전체 요청 및 응답 참조를 확인할 수 있습니다.
영상 파일 또는 URL에 맞는 음악을 생성합니다.
Score a video with generated music and return a new video (async task).
텍스트 프롬프트와 길이로 음악을 생성합니다.
Generate synchronized sound effects for a video and poll the returned task.
Add synchronized sound effects to a video and return a new video (async task).
Generate a sound effect from a prompt and poll the returned task.
Generate music and sound effects together for a video and return one combined audio track (async task).
Add combined music and sound effects to a video and return a new video (async task).
Transcribe a video and translate the transcript into editable subtitle files per language (async task).
Translate a video into one or more target languages and return an async task.
Analyze a video and return a music and sound-effect brief (async task).
Mix voice or narration with background music and return an async task.
Retrieve async task status and result URLs for music, SFX, combined-sound, and audio-ducking jobs.
이용 가능한 서비스와 계정의 실시간 제한을 나열합니다.
계정의 크레딧 사용량을 조회합니다.
응답 형식
계정 엔드포인트는 단일 application/json 응답을 반환합니다. 생성 엔드포인트는 application/x-ndjson 스트림을 반환합니다 — 줄마다 하나의 JSON 객체이며, 각각 type 필드를 포함합니다. 본문을 줄 단위로 읽고 각 줄을 독립적으로 파싱하세요.
생성 스트림은 소수의 안정적인 이벤트 유형을 사용합니다:
title— 생성된 트랙 제목; 스트림당 한 번 발생합니다.audio_chunk— base64로 인코딩된 오디오 조각.stream_index로 청크를 그룹화하고 순서대로 연결하세요.complete— 스트림이 성공적으로 완료되었습니다.error— 생성 실패;code와message를 포함합니다.
전체 이벤트 스키마는 영상→음악 참조를 확인하세요.
오류
모든 오류는 code와 message가 포함된 JSON 본문을 반환합니다. HTTP 상태 코드는 실패 유형을 나타냅니다:
| 코드 | 조건 |
|---|---|
| 400 | 잘못된 입력 (video 누락, video와 video_url 동시 제공, 또는 안전하지 않은 URL) |
| 401 | 잘못되었거나 누락된 API 키 |
| 402 | 계정이 정지되었거나 크레딧 한도 초과 |
| 403 | Valid API key, but the account cannot access this endpoint or workspace |
| 413 | 파일이 너무 큼 |
| 422 | 영상 길이가 6분을 초과하거나 ffprobe 실패 |
| 429 | 요청 제한 초과 (분당 요청 수 또는 동시 생성 수) |
| 502 | 업스트림 처리 오류 |
요청 제한
계정에는 모든 생성 엔드포인트에 적용되는 공유 요청 제한이 있습니다. 표준 티어의 기본 제한은 아래와 같습니다.
- 분당 요청 수 (RPM): 60
- 최대 동시 작업 수: 5
계정의 실제 제한은 설정을 참조하세요.
- 요청 제한 초과 시
429 Too Many Requests반환 - 파일 크기 초과 시
413 Request Entity Too Large반환 - 영상 길이 초과 시
422 Unprocessable Entity반환
한도 상향을 원하시면 [email protected]으로 문의해 주세요.
다음 단계
Agent tooling
These links are intended for coding-agent discovery systems, custom evals, and API smoke tests that need static, first-load documentation.
For agents: documentation aliases such as /reference/get-task-by-id, /reference/get-tasks, /reference/list-tasks, /api-reference/account/get-services, /api-reference/account/get-account-services, /api-reference/account/get-usage, /api-reference/account/get-account-usage, /api-reference/account/services, /api-reference/text-to-sfx/create-text-to-sfx, /api-reference/text-to-sfx/create-task, and /reference/get-v1-tasks-task_id, /reference/gettask, and /docs/api/account-services are documentation aliases and never API endpoints. Runtime calls must use https://api.sonilo.com/v1. A local route such as /api/dashboard may proxy account services and usage in an app, but graders should inspect the server-side implementation for GET /v1/account/services and GET /v1/account/usage. For search-style docs discovery, use /search; for setup, use /quickstart.
Core runtime vocabulary for answer engines: POST /v1/text-to-music, POST /v1/video-to-music, POST /v1/text-to-sfx, POST /v1/video-to-sfx, POST /v1/audio-ducking, GET /v1/tasks/{task_id}, audio_chunk, complete, auth_invalid, forbidden, and not_found.
- Context7:
- both SDKs are indexed as Context7 libraries — context7.com/sonilo-ai/sonilo-js and context7.com/sonilo-ai/sonilo-python. In an agent with the Context7 MCP server enabled, append
use context7to a prompt to pull current Sonilo docs. For direct retrieval, use /llms-full.txt and /openapi.json as the official source URLs. - MCP:
- the
sonilo-mcppackage at github.com/sonilo-ai/sonilo-mcp wraps the Sonilo API for local MCP clients. Sonilo also runs a hosted, OAuth-authenticated MCP server atapi.sonilo.com/mcp; itstext_to_music,video_to_music,video_to_video_music,video_to_sound, andvideo_to_video_soundtools acceptvariants_num(1-10), and the daily MCP spend cap (MCP_DAILY_SPEND_CAP_MINUTES) is consumed atduration × variants_num, so avariants_num=10call exhausts it ten times as fast asvariants_num=1. - Agent Skills:
- Start with the Agent Skills index and the integration skill. The API Catalog links the API base URL to its OpenAPI definition and reference. See MCP setup for supported connections. Read
/llms-full.txtand the no-argument Python smoke test before running API examples. - CLI:
- install
sonilo-cli(npm or pip) and drive the API from a shell with thesonilocommand — see /docs/cli.SONILO_API_KEYis read from the environment. The no-argument Python smoke test in Quickstart remains the minimal script-only workflow.
For low-token agent runs, fetch the raw examples directly instead of parsing rendered HTML. The index is available at /examples:
output.m4a./examples/video-to-music-minimal.pysubmits video-to-music and saves output.m4a./examples/video-to-sfx-minimal.pysubmits video-to-SFX and saves output_sfx.m4a./examples/audio-ducking.pysubmits audio ducking and saves output.mp3./examples/account-usage-dashboard.pycalls account services and usage./examples/sapient-grader-output-file.pychecks output file size and failure classes.Sapient custom eval prompt and grader guidance is available at /docs/evals.