Errors and limits
The error format, every status code the API returns, usage limits, file limits and timeouts.
Error format
Errors are JSON with a detail field — usually a sentence:
{ "detail": "This API key is not valid for this collection" }Validation errors (422) list each problem, including fields the endpoint does not accept:
{ "detail": [{ "type": "extra_forbidden", "loc": ["body", "top_k"], "msg": "Extra inputs are not permitted" }] }Usage-limit errors (429) carry a structured body:
{
"detail": {
"error": "quota_exceeded",
"message": "…",
"would_exceed": "…",
"remaining_quota": "…"
}
}Status codes
| Status | When | What to do |
|---|---|---|
400 | The request is valid JSON but cannot be done: an unsupported file type, a file over a size, page or character limit, no document content sent, or an unknown search mode. | Read detail; fix the input. |
401 | No key, or an unknown or revoked key. On chat the message reads Chat is not publicly available for this knowledge base. | Send a current key in x-api-key. |
403 | The key belongs to another collection, the action is not allowed for keys (Collection API keys cannot call this endpoint), or the key's creator lacks the role for it. | Use the right collection's key; do owner tasks in the app. |
404 | Unknown document, or a session_id from another collection. | Check the ids. |
422 | Body validation failed — a missing query, a wrong type, an unknown field. | Fix the request using detail[].loc. |
429 | A usage limit is reached (see below). | Wait for the period to reset, or raise the limit. |
500 | An unexpected server error. | Retry with backoff; report persistent errors with the request and time. |
When streaming, a failure after the stream has started arrives as a data: {"error": "…"} frame with HTTP status 200. See Streaming.
Usage limits
Limits belong to the collection owner's account and count everything — the app, shared chats and every API key. Trial accounts start with:
| Limit | Trial |
|---|---|
| Messages (chat questions) per day | 50 |
| Messages per month | 500 |
| New conversations per month | 100 |
| Documents | 50 |
| Web pages (URLs) | 10 |
| Collections | 10 |
| Model tokens per month | 1,000,000 |
The app's Usage & Limits card shows your current use against your account's limits. When the owner adds their own model provider keys (Add credentials in the app), document ingestion is no longer capped by the trial item limits. Need more? Contact FutureSmart.
File limits
Direct upload (file) | 5 MB |
| PDF and DOCX | 10 pages |
| TXT, Markdown, HTML | 100,000 characters |
| Batch | 50 files per call |
| Upload URL | valid for 5 minutes; upload with the same Content-Type you requested |
Timeouts and retries
- Adding a document returns in about a second; reading it takes 10 seconds to a few minutes depending on length and type. Poll the status every few seconds rather than holding a request open.
- A non-streamed chat answer takes 5–20 seconds. Use a client timeout of at least 60 seconds, 120 to be safe.
- Retry
429after its period resets and500with exponential backoff. Don't retry other4xxerrors unchanged. - Adding the same file twice creates two documents. To update a document in place, send your own
source_idandlast_modifiedinextra_metadata(see Add documents).