Sheaf.us
SheafDocsAPIErrors and limits

Errors and limits

Every error has one JSON shape with the HTTP status as its code, and each key works within fixed limits.

The shape

{ "error": "what went wrong, in a sentence" }

An error from run a workflow after the case exists adds applicationId, so you continue with that case instead of sending the packet again. The red-flag refusal also adds flags.

Statuses

StatusMeaning
400The request is malformed: a missing field, a wrong multipart field name, a file that is not a PDF, an image or a text file, a PDF that needs a password to open, a text file over 10 MB, or more files than a call takes.
401No key, or a wrong or revoked one.
403Not something a key, or your role, may do. Also: a run was asked of an organization that has no email yet — a Manager adds one in the app first.
404Not there, or not in your organization.
409A conflict with the state of the case: a workflow already active ("Parse → Classify workflow active"), a draft workflow, red flags at the gate, nothing new to read, a document in edit, a fourth Priority document, or archiving part of a matched document.
413A file is over the size limit.
429Too many requests. Retry-After says how many seconds to wait.
502The analyzer could not be reached. The case was put back as it was.

Limits

LimitValue
Requests per key500 a minute
Requests per guest key10 a minute
Guest sandboxes3 a day in all
Research questions in a workspace without an email20 an hour, 50 a day
Briefs in a workspace without an email5 an hour, 10 a day
Pages a workspace without an email holds50 (a text file counts its pages)
Files per call100, of any type
File size100 MB
Text file size10 MB, in pages of about 2,000 tokens, estimated as characters ÷ 2.8 + 20 a line
File type when running a workflowPDF, image (jpg, png) or text file (HTML, markdown, plain text)

Doing the same thing twice

Run a workflow is not idempotent: every successful call without an applicationId creates a new case. If a call fails after the case is made, the error carries applicationId. Continue with that case; do not send the packet again.

This page as markdown · llms.txt · API contract