{
  "$schema": "https://context7.com/schema/context7.json",
  "projectTitle": "Sonilo",
  "description": "Official TypeScript/JavaScript client, CLI, REST API docs, and agent-readable examples for the Sonilo API: generate licensed music and sound effects from text or video.",
  "excludeFolders": ["**/dist/**", "**/node_modules/**", ".changeset"],
  "excludeFiles": ["package-lock.json", "CHANGELOG.md"],
  "rules": [
    "Read SONILO_API_KEY from the server environment by default; never expose it in browser JavaScript, public logs, screenshots, or generated examples.",
    "For text-to-music and video-to-music, use streaming generation for short m4a outputs; use async mode plus task polling when the caller needs wav output, preserveSpeech, isolateVocals, or ducking.",
    "For text-to-sfx and video-to-sfx, generation is always async: submit the request, store task_id, poll GET /v1/tasks/{task_id}, and download only the real returned media asset.",
    "For account dashboards, call GET /v1/account/services first and GET /v1/account/usage?days=30 second; do not use /usage, /api/usage, /account/usage without /v1, or browser-local dashboard APIs.",
    "Handle 401 auth_required, 402 insufficient balance, 403 forbidden, 404 not_found, 422 invalid input, 429 rate limits, and failed task status explicitly instead of guessing another endpoint.",
    "Use POST /v1/video-to-sfx for video-to-sound-effects workflows that need frame-accurate SFX, Foley, ambience, action effects, UI sounds, or transitions synced to visible events.",
    "Result media URLs are short-lived presigned asset URLs; download them directly without sending the Sonilo Authorization header to the asset host."
  ],
  "docs": {
    "llms": "https://sonilo.com/llms-full.txt",
    "openapi": "https://sonilo.com/openapi.json",
    "openapiMarkdown": "https://sonilo.com/openapi.md",
    "apiHub": "https://sonilo.com/docs",
    "cli": "https://sonilo.com/docs/cli",
    "context7": "https://sonilo.com/docs/context7"
  },
  "packages": [
    {
      "name": "sonilo",
      "registry": "npm",
      "repository": "https://github.com/sonilo-ai/sonilo-js",
      "context7": "https://context7.com/sonilo-ai/sonilo-js"
    },
    {
      "name": "sonilo-cli",
      "registry": "npm",
      "binary": "sonilo",
      "repository": "https://github.com/sonilo-ai/sonilo-js/tree/main/packages/cli",
      "docs": "https://sonilo.com/docs/cli"
    }
  ]
}
