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

> ## Agent Instructions
> If you're integrating Kardinal into an application with an SDK, start with Integration paths: https://developers.kardinal.ai/getting-started/integration-paths.md. It lists the sections to read, in order. If you follow Integration paths, you don't need llms-full.txt or openapi.yaml. Each step links the section you need.

# Moving from sandbox to production

> How sandbox and production differ for the same builder account, a checklist to run before switching, and how to manage a separate API token per environment.

Sandbox and production are two **agencies** of the same builder account — not separate hosts or separate logins. You sign up once; that single account gives you a long-term API token for each agency, and nothing you create in one agency is visible from the other. Moving to production is mostly a matter of pointing your integration at your production token and re-validating what you already tested, rather than a code change or a host change.

## Differences between sandbox and production

| Aspect | What differs |
| - | - |
| API token | Each agency has its own long-term API token — see [Authentication and API keys](https://developers.kardinal.ai/guides/authentication.md). A token issued for one agency does not work against the other. |
| Data | Plans, resources, and orders are entirely separate per agency — nothing in sandbox carries over automatically. |
| Host, sign-up, login | Identical — both agencies are served at the same host, `https://app.kardinal.ai/api/v2`; only the token you use determines which one a call applies to. |
| Credits | Plans submitted with a sandbox token don't consume credits; production plans do — see [Pricing and credits](https://developers.kardinal.ai/reference/pricing-and-credits.md). Run your smoke, schema, and modeling tests in the sandbox. |
| Routing | The sandbox computes every route crow-fly, whatever the `vehicleProfile`, and turns predictive traffic (`withTraffic`) off, with a warning: road network, traffic, and vehicle restrictions (height, weight, tunnels, hazardous goods) only apply in production. Test anything that depends on them with a production token. |
| Optimization time | The sandbox caps `maxOptimizationDuration` at 5 seconds. That is enough to check that a plan is accepted and modeled as intended, not to judge the quality of an optimization on a real plan. Evaluate that in production. Production caps `maxOptimizationDuration` at 6 hours by default. When you omit it, production uses 15 minutes. A sandbox plan finishes in a few seconds. Give `wait`, or your own wait loop, a time limit of about one minute. See [Tracking progress without blocking](https://developers.kardinal.ai/sdks/plan-lifecycle.md#tracking-progress-without-blocking) and [Limits and quotas](https://developers.kardinal.ai/reference/limits-and-quotas.md). |
| Rate limits | See [Limits and quotas](https://developers.kardinal.ai/reference/limits-and-quotas.md) for the full defaults, and contact [customer.success@kardinal.ai](mailto:customer.success@kardinal.ai) if your account's values differ. |

## Checklist before switching to production

1. **Confirm account-specific quotas** (rate limit, max payload size, simultaneous-running-plans threshold) against the [published defaults](https://developers.kardinal.ai/reference/limits-and-quotas.md); contact [customer.success@kardinal.ai](mailto:customer.success@kardinal.ai) if your account's values differ from the defaults.
2. **Re-run your integration against production with real data volumes.** If your production order/resource counts are meaningfully larger than what you tested in sandbox, re-check your `maxOptimizationDuration` sizing — see [Handling large volumes](https://developers.kardinal.ai/guides/handling-large-volumes.md#sizing-maxoptimizationduration-for-a-large-problem) rather than assuming sandbox-derived durations still apply. If your code gives `wait`, or your own wait loop, a time limit, make it longer than the plan's longest wait in production. That wait is the plan's `maxOptimizationDuration`, plus the time the plan spends waiting and processing before the search starts. See [The quality vs. computation time trade-off](https://developers.kardinal.ai/concepts/how-the-optimization-engine-works.md#the-quality-vs-computation-time-trade-off). When you omit `maxOptimizationDuration`, production uses 15 minutes. When the time limit runs out, `wait` fails with `KardinalTimeoutError`, but the plan keeps running. Don't submit the plan again. Read its state later instead.
3. **Re-verify geocoding.** The API does not geocode addresses (see [Positions and geocoding](https://developers.kardinal.ai/reference/data-model.md#positions-and-geocoding)); confirm the same geocoding provider and pipeline used in sandbox testing is wired up for production data before go-live.
4. **Rotate to your production API token everywhere**, including any long-lived config or secrets manager entries — see the next section.

## Managing your long-term API token per environment

Each agency has its own long-term API token, obtained via the Console, once per agency — not a separate username/password pair (see [Authentication and API keys](https://developers.kardinal.ai/guides/authentication.md)). For production:

* Store the `sandbox` and `production` tokens as **separate secrets**, scoped to their respective deployment environments, so a staging deploy can never accidentally authenticate against production (or vice versa).
* Confirm which agency a given long-term token was issued for before debugging a request that behaves unexpectedly — a token always authenticates successfully against its own agency, so using the wrong one doesn't fail: it silently succeeds against that agency's data instead. Check the `agencyId` field in the response to confirm which agency you actually hit.
* With an [SDK](https://developers.kardinal.ai/sdks/configuration.md#sandbox-and-production), the switch is only a different `KARDINAL_API_KEY` value per environment — same host, same code. `kardinal auth check` shows which agency the key in use belongs to.
* Regenerating a token **replaces** the previous one for that agency — roll the new value out everywhere before discarding the old one (see [Token lifetime](https://developers.kardinal.ai/guides/authentication.md#token-lifetime)).

## See also

* [Authentication and API keys](https://developers.kardinal.ai/guides/authentication.md) — obtaining, rotating, and storing your long-term API token.
* [Limits and quotas](https://developers.kardinal.ai/reference/limits-and-quotas.md) — rate limits, payload size, and SLA, and how to confirm the values for your account.
* [Handling large volumes](https://developers.kardinal.ai/guides/handling-large-volumes.md) — sizing `maxOptimizationDuration` and paginating for production-scale data.


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