x-api-key header. The same key authenticates every access path: REST requests, the Andi CLI, and the MCP server.
Getting an API key
- Sign in to the API Console
- Go to API Keys
- Click Create Key
- Copy the key — it’s only shown once
Setting up your environment
Store your API key as an environment variable rather than hardcoding it in your code.Local development
Local development
Create a Load it in your code:Or export directly in your shell:
.env file in your project root:Docker
Docker
Pass the key as an environment variable:Or use an env file:
CI/CD (GitHub Actions)
CI/CD (GitHub Actions)
Add
ANDI_API_KEY as a repository secret, then reference it in your workflow:Vercel / Netlify
Vercel / Netlify
Add
ANDI_API_KEY in your project’s environment variables settings. These are automatically available as process.env.ANDI_API_KEY in your server-side code.Managing keys
The API Console lets you:- Create multiple keys for different applications or environments
- Rename keys to identify their purpose
- Enable/disable keys without deleting them
- Revoke keys that are no longer needed
Security practices
- Store keys in environment variables or a secrets manager
- Use separate keys for development and production
- Rotate keys periodically
- Revoke keys immediately if compromised
- Restrict key access to team members who need it
- Add
.envto your.gitignore
Next steps
Search modes
Automatic effort by default, manual control when you want it.
Build with AI agents
Use your key with the MCP server and agent tools.
API Console
Manage your API keys, monitor usage, and configure rate limits.
Error handling
Handle authentication errors and other failures.

