Skip to main content
Applies to:
  • Plan - Starter, Pro, Enterprise
  • Deployment - Any
  • Use case - BTQL queries with frequent or resource-intensive query patterns

Summary

BTQL queries through the MCP server or API hit rate limits of 20 requests per minute, causing HTTP 429 errors that block productivity.

Resolution Steps

If you’re a SaaS or BYOC customer

Step 1: Contact support

Contact us to discuss options for 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.

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. When a function such as a code scorer or tool runs a query that exceeds a rate limit, invoking the function returns HTTP 429 instead of HTTP 500. If the rate limit error reports a retry delay, the response also includes a Retry-After header with the number of seconds to wait. When all remaining failures in a batch are transient, online scoring honors the delay only if the retry fits within the retry window.

Query timeout limits

Queries also have a 30-second timeout limit.

Retention window enforcement

Separate from rate limits, Starter and Pro plans enforce your plan’s data retention window (14-day retention on Starter, 30-day retention on Pro by default) on all SQL queries against logs and playground data. Experiments have up to 365-day retention on all plans. Data older than the window is silently filtered out rather than returned, so a query over older data returns empty results instead of an HTTP 429 error. Use a relative time interval to stay within the window.