For the complete documentation index, see llms.txt. This page is also available as Markdown.

Best Practices

1. Use Environment Variables

Never hardcode your API key.

2. Implement Retries

Retry on:

- 429 (rate limit)

- 500 (server error)

3. Log Token Usage

Include:

- model

- prompt tokens

- completion tokens

- total tokens

4. Separate API Keys

Use different keys for:

- development

- staging

- production

Last updated