Documentation
Going to production
What to check before real traffic: keys, retries, limits, time zones and costs.
Keys
- Live keys stay on your server. The only key a browser may hold is a publishable key limited to your domains.
- Give each app its own key, with only the scopes it needs.
- Keep test and live keys apart. Sandbox keys reach everything for free, so build with them.
Errors and retries
- Retry only when
retryableistrue, with backoff and jitter. See errors. - Send an Idempotency-Key with every call, so a retry after a timeout is never charged twice.
- Handle
429 quota_exhaustedand403 plan_family_not_includedwith a clear message.
Time
- Send local time and an IANA zone, not an offset, so clock changes are handled for you.
- Show the choices when the API says a time was ambiguous. Never pick one for the person.
Cost
- Cache answers. A birth chart never changes, so you need to fetch it only once.
- Use a single endpoint rather than a whole bundle when you need one thing. See single endpoints.
- Set up webhooks for low credits, or turn on overage with a cap in Billing.
Long jobs
- Run PDFs and audio as jobs, and use a webhook instead of polling where you can.
- Download a file soon after it is ready. Links expire, and poll the job for a fresh one.


