Every limit Gridsay applies to a question, and what you get back when one is reached. None of these refusals is charged.
Characters are counted as JavaScript counts a string's length; bytes are UTF-8.
| What | Data Grid endpoint | Over it |
|---|---|---|
| The whole body | 2 MB (2,097,152 bytes) | 413 context_too_large |
| What the first model call for a question is sent | 73,728 bytes | 413 context_too_large |
query | 1 to 8,000 characters | 400 invalid_request |
context | 1,000,000 characters | 413 context_too_large |
options.additionalContext, additionalContext | 20,000 characters each | 400 invalid_request |
conversationId | 255 characters | 400 invalid_request |
options.metadata.referenceId | 127 characters | 400 invalid_request |
A column id in grid.columns | 255 characters | 400 invalid_request |
aggregationFunctions of a column | 32 entries of 64 characters | 400 invalid_request |
options of a column | 500 entries; text of 255 characters | 400 invalid_request |
There is no limit on the number of columns as such: the limits above bound them.
The 73,728-byte limit counts the text of the first model call for a question: our instructions, your columns or schema, the current view, your notes and the question, plus the earlier turns that fit. It is not the size of your request body, and it does not cover everything a question can send: when an answer is corrected, the correction call adds that answer and what was wrong with it, up to 16,896 bytes more. A question over it is refused before anything is spent, and detail gives the size:
{ "ok": false, "statusCode": 413, "code": "context_too_large", "message": "This table is too large for the assistant.", "detail": "This question would send the model 80,214 bytes, over the limit of 73,728. Send fewer or shorter example values, shorter column descriptions, or fewer columns in one request. Refused before the model; not charged; no Usage log row."}To fit, send fewer or shorter example values, shorter descriptions, or fewer columns. A follow-up that fits only without some earlier turns drops the oldest: see Follow-up questions.
Gridsay sets no fixed number of questions per minute for your plan. What can stop a question:
| Limit | Applies to | Set by | Answer |
|---|---|---|---|
| Key limits: per minute, hour, day or month | One publishable key, all its users | You, on the key | 429 rate_limited with retryAfter |
| User rules: the same windows, per signed-in user | Each user of one publishable key | You, on the key | 429 rate_limited with retryAfter, and your rule's sentence if you wrote one |
| Sign-in checks: more than 20 a minute, counting failed checks and checks still in progress | One publishable key and client address | Gridsay | 429 rate_limited with retryAfter |
| Questions in progress | Your organization, and each user or key | Gridsay | 429 rate_limited, retryAfter 5 |
| Spending on failed questions, which we do not charge | Your organization, and each user or key, per hour, day, week and billing period | Gridsay | 429 rate_limited with the wait |
| The credits of your period | Your organization | Your plan and extra-usage cap | 402 quota_exceeded or billing_limit_exceeded |
There is no deadline on the whole request. Each model call is stopped after 15 seconds; a question can make more than one call, when an answer is corrected or a second model takes over after a failure, so allow for more than 15 seconds. On a key set to auto, choosing the tier takes at most 750 milliseconds; past that, fast answers.
A client that disconnects before the answer is ready is not charged, and the model calls answering its question are stopped. On a key set to auto, choosing the tier is not stopped: it ends on its own, within about 750 milliseconds.
| Pro | Business | Enterprise | |
|---|---|---|---|
| Keys per organization, secret and publishable together | 5 | No limit | No limit, unless your contract sets one |
| Request history read for follow-ups | 30 days | 90 days | As your contract says |
| Credits per period | By plan size | By plan size | By contract |
The trial is Pro, for 7 days, with its own credit allowance and no extra usage. Credits per plan and their prices are on Pricing; what a question costs in credits is in Tiers and credits.
POST /api/v1/sessions mints a user's token from your server with a secret key. It uses no credits.
| What | Limit | Over it |
|---|---|---|
| The whole body | 16 KB | 400 invalid_request |
userId | 1 to 255 characters | 400 invalid_request |
attributes | 8,192 bytes as JSON | 400 invalid_request |
ttlSeconds | 60 to 86,400; default 3,600 | 400 invalid_request |