Skip to main content
CAMEL-AI supports multiple model backends. Choose one below and configure your environment variables.

1. OpenAI API

Obtain your OPENAI_API_KEY from OpenAI Dashboard.
1

Unix (macOS/Linux)

Replace ~/.zshrc with ~/.bashrc if using bash.
2

Windows (Permanent)

You may need to restart your terminal for changes to apply.
3

.env File (Project-specific)

Create a .env file in your project root:
Load in Python:
To configure an API_BASE_URL (e.g., Azure), also set:

2. Other Hosted APIs

For non-OpenAI providers, see Using Models by API Calling.

3. Local Models

To run fully on-device with open-source models, refer to Local Models Guide