> ## Documentation Index
> Fetch the complete documentation index at: https://docs.naga.ac/llms.txt
> Use this file to discover all available pages before exploring further.

# Production checklist

> What to set up on keys, balance, models, requests and errors before you send production traffic to NagaAI, and why each item matters.

Before you send production traffic to NagaAI, set a spending limit on every key and keep a balance that covers your peak load. Then handle the errors NagaAI can return.

## Keys

Create one API key per environment and service, each with a `credit_limit`, see [API keys](https://docs.naga.ac/account/api-keys.md). A runaway loop then stops at the key's limit instead of draining the whole balance. You can also revoke one service's key without touching the others.

Keep keys in server-side secrets. A key in browser or mobile code can be read by anyone who opens the app.

## Balance

Set a low balance alert on the [Credits](https://naga.ac/dashboard/credits) page, above a day of spend. You then have time to top up before requests start failing with `402`.

Keep enough balance for your peak concurrency. Each running paid request reserves 0.05 credits, so a balance of \$5 runs at most 100 paid requests at once, see [Limits](https://docs.naga.ac/build/rate-limits.md#balance).

## Models

Copy model ids from the catalog and check the `parameters` of their operation and their `input_modalities`. NagaAI drops a parameter the serving provider doesn't support without an error, so a setting your app depends on can silently have no effect.

Pick a fallback model for your main one and switch to it when a request fails with `503`. NagaAI already retries across the providers of the same model, but it doesn't switch models for you, see [Routing](https://docs.naga.ac/build/routing.md#provider-and-model-choice).

## Requests

Set a client timeout that fits your longest answers, because long reasoning requests can run for minutes. NagaAI still finishes and charges a request your client gave up on.

For Responses, send the full conversation in every call, because NagaAI keeps no state between requests. See [Conversation state](https://docs.naga.ac/guides/conversation-state.md).

Choose a [routing strategy](https://docs.naga.ac/build/routing.md#strategies) if latency or cache hits matter to you.

## Errors

Retry `408`, `429` and `503` with backoff, and wait for `Retry-After` when the response carries it, see [Errors](https://docs.naga.ac/build/error-handling.md#retry-failed-requests).

Make stream handlers expect an error event after content has started. At that point the status is already `200`, see [Errors in a stream](https://docs.naga.ac/build/error-handling.md#errors-in-a-stream).

Log the `x-request-id` header of every response. Support uses it to find the request.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.