---
title: "AzatAI Sandbox: Configuration | AzatAI"
description: "The settings of the Python client, and how to set them with environment variables or arguments."
url: "https://azat.ai/docs/sandbox/configuration"
language: "en"
image: "https://azat.ai/og/en.png"
---

[All docs](https://azat.ai/docs)

AzatAI Sandbox

- [Get started](https://azat.ai/docs/sandbox)
- [Configuration](https://azat.ai/docs/sandbox/configuration)

[Product page](https://azat.ai/products/sandbox)

AzatAI Sandbox

# Configuration

The settings of the Python client, and how to set them with environment variables or arguments.

The client reads its settings from environment variables. A keyword argument with the same role overrides the variable, for example `Sandbox.create(api_key=...)`.

## Settings

| Variable                 | Argument      | Role                                                                                             |
| ------------------------ | ------------- | ------------------------------------------------------------------------------------------------ |
| `AZATAI_API_KEY`         | `api_key`     | Your API key                                                                                     |
| `AZATAI_SANDBOX_DOMAIN`  | `domain`      | The sandbox domain. The API is at `https://api.<domain>` and the sandboxes at `https://<domain>` |
| `AZATAI_SANDBOX_API_URL` | `api_url`     | The API address, if it is not `https://api.<domain>`                                             |
| `AZATAI_SANDBOX_URL`     | `sandbox_url` | The sandbox address, if it is not `https://<domain>`                                             |

## What to set

1. Set `AZATAI_API_KEY`.
2. Set `AZATAI_SANDBOX_DOMAIN`, or set both `AZATAI_SANDBOX_API_URL` and `AZATAI_SANDBOX_URL`.

If a setting is missing, the client raises `azatai.ConfigError`.

## Keep your key safe

Keep the API key out of your code and out of version control. Read it from the environment or from a secret store, and give each system its own key.
```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"AzatAI","item":"https://azat.ai"},{"@type":"ListItem","position":2,"name":"Configuration","item":"https://azat.ai/docs/sandbox/configuration"}]}
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://azat.ai/#organization","name":"AzatAI","url":"https://azat.ai/","logo":{"@type":"ImageObject","url":"https://azat.ai/icon-512.png","width":512,"height":512},"description":"AzatAI is an AI company. AzatAI Stack, our trust layer for AI products, gives them sign-in for people and AI agents, data and encrypted file storage. Our own products and our client systems run on it.","slogan":"The trust layer for AI"},{"@type":"WebSite","@id":"https://azat.ai/#website","name":"AzatAI","url":"https://azat.ai","inLanguage":"en","publisher":{"@id":"https://azat.ai/#organization"}}]}
```
