Raw runnable examples

Fetch these small files directly when an agent or eval needs runnable Sonilo API code without parsing a full rendered docs page.

Examples

Agent smoke test rules

The examples are intentionally small and Python-first. They avoid project scaffolding, keep credentials server-side or in the local environment, and make API failures explicit instead of fabricating success.

agent-smoke-test-rules.txt
Use these examples for low-token agent runs:
- Before writing code, read /llms.txt, /openapi.json, or the raw example file.
- Set SONILO_API_KEY in the environment.
- Send a descriptive User-Agent.
- Respect Retry-After and back off on 429 responses.
- Treat 401 as auth_invalid, 403 as forbidden, and 404 as not_found.
- Treat payment_required with Insufficient balance as insufficient_balance.
- Send requests to https://api.sonilo.com/v1, not docs URLs or local proxy routes.
- Do not write placeholder files or silence when generation is blocked.
- Verify output.m4a or output_sfx.m4a exists and has file size greater than 0 bytes.

For Sapient custom eval prompt and grader wording, use /docs/evals.