Skip to main content
You can create Maitai API keys in the Portal under Settings > API Keys. For the REST API, pass the key in the X-Maitai-Api-Key header.
api_keys

Maitai API key (required)

Set MAITAI_API_KEY:
Or pass it directly when constructing the client:

Provider keys (optional)

Maitai can run requests across multiple providers. You can supply provider keys in two ways.

Option A: Environment variables

The Python SDK also supports DeepSeek (DEEPSEEK_API_KEY / deepseek_api_key).

Option B: Pass provider keys into the SDK constructor

If your company has provider keys configured in the Portal, the SDK can automatically use them after it initializes (so you don’t have to set provider env vars in every environment).

Managing provider keys in the Portal

To better organize credentials across environments, you can store provider keys in the Portal and associate them with a Maitai key. This lets you keep MAITAI_API_KEY as the only required secret for most integrations. api_keys For best practice, create a separate Maitai key per environment, then attach the provider keys you want that environment to use. api_keys_edit