Applies to:
- Plan -
- Deployment -
Summary
BTQL queries through the MCP server or API hit rate limits of approximately 20 requests per minute on Starter and Pro plans, causing HTTP 429 errors that block productivity. Rate limits are enforced because BTQL queries consume significant backend resources and costs that aren’t accounted for in lower-tier plans. Contact sales to discuss increased rate limits for your organization’s usage requirements.Resolution Steps
If you’re on a Starter or Pro plan
Step 1: Contact sales
Reach out to discuss higher rate limits based on your usage patterns and requirements.Step 2: Optimize queries while waiting
Reduce query frequency by caching results, batching requests, or adding time delays between queries.If you’re self-hosting (Hybrid deployment)
Step 1: Configure rate limit environment variables
SetRATELIMIT_BTQL_DEFAULT to control queries allowed per organization per window, which defaults to 60 seconds. To set a tighter limit on an individual project, add a <project_id>=<max_queries> entry to RATELIMIT_BTQL_PROJECT. Project limits require data plane v2.2.1 or later. Enforcement is off by default, so also set RATELIMIT_BTQL_ENFORCE to true to return an HTTP 429 response when a limit is exceeded.
Step 2: Update deployment configuration
There is no dedicated Terraform variable or Helm value for these settings. Pass them as environment variables to the API services, usingbraintrust_api_extra_env_vars for AWS or api.extraEnvVars in values.yaml for GCP and Azure. See Set inbound request rate limits for the full set of variables and examples.
Additional Information
Rate limit behavior
Rate limits apply per organization, and additionally per project, and track queries over a fixed time window. Queries from the API, SDKs, and MCP server count toward these limits. Queries issued from the Braintrust UI are exempt.Query timeout limits
Queries also have a 30-second timeout limit. Self-hosted customers can adjust this usingBRAINSTORE_QUERY_TIMEOUT_SECONDS.