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:
- Set SONILO_API_KEY in the environment.
- Send a descriptive User-Agent.
- Respect Retry-After and back off on 429 responses.
- Treat payment_required with Insufficient balance as insufficient_balance.
- 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.