Skip to main content
The Datagrid API enforces rate limits to protect the platform from abuse and ensure fair usage across all consumers.

Default rate limit

The default rate limit is 200 requests per 60-second sliding window, but individual endpoints may enforce their own limits. Check the X-RateLimit-Limit response header to see the effective limit for any given endpoint. The limit is scoped per teamspace, endpoint path, and HTTP method. For example, POST /v1/converse and GET /v1/agents maintain independent rate limit windows within the same teamspace.

Response headers

Every Datagrid API response includes rate limit headers so you can monitor your usage proactively:

429 Too Many Requests

When the rate limit is exceeded, the API returns a 429 status code with the following body:
statusCode is deprecated and will be removed in a future version. Use status_code instead.
The response also includes the Retry-After header indicating how many seconds to wait before retrying.

Batch prediction rate limits

Batch prediction endpoints also use 429 Too Many Requests, but they return RFC 9457 problem details (application/problem+json) instead of the legacy JSON shape above.
Batch prediction 429 responses may also include: Batch create requests can be rejected by organization concurrency, enqueued-item, create-rate, or temporary global-capacity policies. Treat these responses as retryable and honor Retry-After before submitting more batch work.

Credit caps

Account admins can set a daily and a monthly credit cap in Control Tower. Caps apply to the whole account, so usage from every teamspace and every client (API, app, and integrations) counts toward them. When a cap is configured, endpoints that check credits before they run report how many credits are left under it. The headers are also on streaming responses (stream: true) and on the error returned when a cap is reached (402, or 403 problem details for batch predictions). These endpoints are:
  • POST /v1/converse and POST /v1/beta/converse
  • GET /v1/search, POST /v1/search/ai, and GET /v1/search/tree
  • POST /v1/knowledge, POST /v1/knowledge/connect, and POST /v1/knowledge/{knowledge_id}/reindex
  • POST /v1/files
  • POST /v1/batch-predictions
  • POST /v1/data-views
  • POST /v1/user-memories
  • POST /v1/skills/generate
  • POST /v1/beta/rewrite
  • POST /v1/voice
A header is omitted when its cap isn’t configured. 0 means the cap has been reached:
  • Daily cap: advisory. Requests are not blocked, so use the header to slow down or pause your own traffic.
  • Monthly cap: credit-consuming requests return 402 Credit limit exceeded (403 for batch predictions) until the next calendar month.
Usage is measured when the request starts, so a single long-running request can take the account past a cap.

Best practices

The official Python and TypeScript/JavaScript SDKs automatically retry 429 responses up to 2 times with exponential backoff. You can configure this via the maxRetries option:
Python
TypeScript
If you are using the SDK, you typically do not need to implement your own retry logic.
If you are calling the API directly (without the SDK), implement retry logic yourself. When you receive a 429, wait for the number of seconds specified in the Retry-After header before retrying. If Retry-After is not available, use exponential backoff starting at 1 second, doubling with each retry up to a maximum of 60 seconds.
Python
TypeScript
Check the X-RateLimit-Remaining header on every response. If it drops below a threshold (e.g., 10% of the limit), slow down your request rate before hitting a 429.
Since rate limits are scoped per endpoint path and HTTP method, you can make concurrent requests to different endpoints without them counting against the same window.