API authentication
Every EvalGate API request exceptGET /api/mcp/tools must include a bearer token. The token identifies the caller, determines which organization the request can access, and enforces the rate limits for your plan.
Add the authorization header
Include your API key in theAuthorization header on every request:
401 Unauthorized.
Get your API key
- Open the Developer Dashboard.
- Go to Settings -> API Keys.
- Create a new key.
- Copy the API key and the Organization ID shown in the creation dialog.
Environment variables
The TypeScript and Python SDKs read these environment variables automatically:| Variable | Description |
|---|---|
EVALGATE_API_KEY | Your API key, required for authenticated requests |
EVALGATE_ORGANIZATION_ID | Your organization UUID, used by SDK methods that create org-scoped resources |
.env file:
organizationId in the body or query only where an endpoint explicitly documents it.
Authentication errors
Your request did not include an
Authorization header, or the key is invalid, expired, or revoked.Your key is valid but lacks the required permissions for this resource. This can mean the key does not have the necessary scopes, or the key does not belong to the organization that owns the requested resource.
Anonymous endpoint
GET /api/mcp/tools does not require authentication. It returns the list of available MCP tools and their input schemas for any caller. All other MCP endpoints, including POST /api/mcp/call, require a valid bearer token.
If you integrate EvalGate with an AI agent or IDE assistant via MCP, tool discovery is public, but tool execution uses your API key. Configure your MCP client with
Authorization: Bearer YOUR_API_KEY for execution requests.