Errors
Errors come as {"error": "message"} with one of these statuses. Calls that fail cost nothing. A search that finds nothing isn't a failure: it costs its usual credits.
| Status | Means | What to do |
|---|---|---|
400 | The body isn't the JSON we expected. | The message shows the shape to send. |
401 | No API key, or not a valid one. | Send Authorization: Bearer gw_.... |
402 | Out of credits, or past this key's monthly cap. | Top up, upgrade, or raise the key's cap. |
404 | No such collection, document or endpoint. | Check the name; GET /api/collections lists them. |
409 | You already have a collection with that name. | Use it, or pick another name. |
422 | The request can't run: no q, a regex that doesn't compile, a bad name, too many documents. | The message says which. |
429 | Your team has its plan's most requests running at once. | Wait for one to finish, then retry. |
503 | Busy, or storing a write failed (nothing was written). | Retry in a moment; a retried write is safe. |
Limits
| Limit | Value |
|---|---|
| Documents a write or delete request | 10,000 |
| Text a document | 2,000,000 bytes |
| Document id | 512 bytes, one line |
| Request body | 16 MB |
| Collection name | 1 to 64 of a-z, 0-9, - and _ |
| Bucket objects synced | Text up to 4 MB (unzipped) |
| Results a search | 20 by default, up to your plan's most |
| Requests at once | Per team, by plan |
| A page fetch | 15 seconds |
Results a search and requests at once for each plan are on pricing and credits.
Try it on your own documentsExact and regex search for your agents, from one API. Or see the engine on npm's source first.