Limits
This page covers the limits both HTTP APIs enforce, and how each one pages through lists.
Where the APIs differ
| Evals API | Agent API | |
|---|---|---|
| Rate limit | The shared limit | The shared limit |
429 body | { "ok": false, "error": "rate_limited", ... } | The Agent API error format, with error.type rate_limit_error |
| Sizes | Evals API sizes | Agent API sizes |
| Paging | Cursor or page number, by endpoint | limit, page and next_page |
Rate limit
| Key | Requests per minute |
|---|---|
| Personal task API key | 7,500 |
| Service account key | 2,500 |
One rate limiter covers both APIs. Each task API key has its own budget, counted in fixed one-minute windows across every request it sends to /api/*, /cc/api/* and /v1/*, so Evals API calls, Evals CLI commands and Agent API calls share it. Your deployment’s administrator sets these numbers and decides whether going over the limit is refused or only recorded. Rate limits apply only where your deployment enforces them.
Over budget, the server answers 429 Too Many Requests with a Retry-After header in whole seconds (at least 1). The Evals API’s body:
Code
scope: "principal" means your key used up its own budget. The Agent API returns the same status and header with its own error format. Wait at least Retry-After seconds, then retry, and spread scheduled jobs out instead of starting them on the same second.
Agent API streams
| Limit | Value |
|---|---|
| Open event streams | 24 per key on each server instance, unless your deployment sets another number. A deployment can run more than one instance, so don’t count on more than that in total. |
Over the limit, opening a stream returns 429. Stream events sends only the events that happen after the stream opens, says how a stream ends and how to reconnect without losing events.
Agent API sizes
| Limit | Value |
|---|---|
| File upload | Your deployment’s upload limit: 5 GiB unless your administrator set it lower. 10 MiB for an upload sent without Content-Length. |
| Skill upload | 32 MiB per request, and 30 MiB for the skill’s files once unpacked. |
| Other request bodies | 10 MiB per request. |
| Uploads in progress | 4 file uploads and 2 skill uploads per key on each server instance. |
| Message text | 100,000 characters per event. |
| Session title | 280 characters. |
| One step | 4 hours by default. A session can set up to your deployment’s maximum with max_step_minutes. The maximum is 12 hours unless your administrator changed it, and no deployment allows more than 24 hours. A step that runs longer is stopped, and the session goes back to idle. See Create a session. |
| Files attached to a session | 50. See Agent API status codes for what a request with more returns. |
| Page size | 20 by default, up to 100. For events, 100 by default, up to 1,000. For skills, up to 200. |
Evals API sizes
| Limit | Value |
|---|---|
Page size (limit, pageSize) | 1 to 100; a run’s task results 1 to 50. Defaults differ by endpoint. |
totalCount | On GET /traces/sessions and GET /traces/calls, counts up to 10,000, then reports totalCountIsCapped: true. |
Trace search and filters | Up to 500 characters, and up to 20 filter conditions. |
| Trace time window | 90 days unless your administrator sets another maximum. A longer window is shortened; on GET /traces/sessions, the response’s window object says so. |
A file for a task (evals file upload) | 100 MiB. The CLI refuses a larger file before sending anything, with exit code 2. |
| A CLI request that changes data | 10 MiB. The server refuses a larger one, such as a large dataset import, with 413, and the CLI exits 1. |
| An HTTP request body | 1 MiB, sent as JSON. A larger one gets 413. |
Evals API query values
Every endpoint is under https://api.context.ai/api/v1/evals. Single values are plain query parameters. The server reads true and false as booleans, numbers as numbers, a repeated key as a list, and a value that starts with { or [ as JSON. A key sent once stays one value; send lists as JSON. A text value that looks like a number (404, -1, 1.5), or is true or false, is read as a number or a boolean and refused with 400. Send objects and lists, such as trace filters, a workspace scope or workflowIds, as JSON in one query value, and let your HTTP library URL-encode them. Unknown parameters are ignored without an error, so a typo such as workspace= gets the default scope. Inside a filter, value is always a string.
Code
The Agent API returns 400 for an unknown query parameter.
Paging
| API | How it pages |
|---|---|
| Evals API, cursor paging | Pass the previous response’s nextCursor back as cursor (GET /analytics/records returns it as pageInfo.nextCursor); a null nextCursor means the last page. GET /traces/sessions, GET /traces/sessions/{sessionId}, GET /runs/{runId}/tasks and GET /analytics/records page this way. |
| Evals API, page numbers | GET /feedback and GET /traces/calls take page, starting at 1. |
| Evals API, no paging | Over HTTP, smaller lists such as datasets and evaluations return everything in one response; the CLI’s list commands page them with --cursor and --limit. |
| Agent API | List endpoints take limit and page and return next_page. Pass next_page back as page until it is null. |
On the Agent API, page values are opaque, except on List events, where they are event IDs.
next_page only moves forward, and the prev_page on List sessions is
always null. List files also takes after_id and before_id. A
response to a before_id request has next_page: null. To page further back, pass that response’s first_id as the
next before_id.
Code
Evals API responses are JSON. Times are ISO 8601 strings in UTC, IDs are strings and costs are numbers in U.S. dollars. Ignore fields you don’t know, because new fields can be added.