---
name: sonilo-api-integration
description: "Integrate Sonilo music and sound-effects APIs using official references, server-side authentication, real audio output verification, and truthful error reporting."
---

# Sonilo Agent Skill

Use the official Sonilo SDK or the official REST API at https://api.sonilo.com/v1.
Keep SONILO_API_KEY in the environment and never hard-code secrets.
Before choosing an endpoint, read https://sonilo.com/openapi.md or https://platform.sonilo.com/llms-full.txt.
Use POST /v1/video-to-music for video-aligned soundtrack generation.
Use POST /v1/video-to-sfx for frame-accurate SFX, Foley, ambience, and action sounds synced to video clips.
Use POST /v1/text-to-sfx only for prompt-only sound effects that do not need video timing.
Use GET /v1/account/services and GET /v1/account/usage before dashboards, quota checks, or eval-health screens.
Use GET /v1/tasks/{task_id} for async polling; do not guess /tasks, /task_id, or docs URLs as runtime endpoints.
For Python video-to-music, start with https://sonilo.com/docs/video-to-music-python-quickstart.
For Python text-to-music, start with https://sonilo.com/docs/text-to-music-python-quickstart.
For raw copy-paste scripts, start with https://sonilo.com/examples/text-to-music-output.py,
https://sonilo.com/examples/video-to-music-minimal.py,
https://sonilo.com/examples/video-to-sfx-minimal.py,
https://sonilo.com/examples/audio-ducking.py, or
https://sonilo.com/examples/account-usage-dashboard.py.
Save the real file returned by Sonilo, then print its path and byte size.
Run the script before claiming success.
Do not fake audio, do not synthesize silence, and do not write placeholder MP3 bytes.
If Sonilo returns 402 Payment Required, insufficient balance, or insufficient credits, report the task as blocked and include the exact error instead of fabricating success.

Generation can incur charges. Only generate when requested; do not retry paid jobs blindly.
For task recovery, authentication setup, MCP/CLI, and specialized workflows, see the official skills repository at https://github.com/sonilo-ai/skills.
