Get startedAPI referenceGoing to productionExplore models

Account & operations

Going to production

Move from a working example to a predictable integration with explicit limits, observability, and controlled rollouts.

Protect credentials

Use separate keys for development and production. Set key budgets, expiration, model allowlists, and IP allowlists where appropriate. Rotate a compromised key and remove it from application configuration.

Bound work and latency

Set request timeouts and output-token limits. Bound client concurrency, close streams on cancellation, and combine application retries with SDK retries into one total retry budget.

Observe and validate

Record HTTP status, error code, latency, and X-Request-ID for troubleshooting. Avoid logging secrets or private prompts. Validate model changes with representative requests before rolling them out.

Copied