Errors & limits

Every error code the Partner API returns, and every cap it enforces.

Every failure has the same shape. Branch on error.error_code; log description for a human; never match on its text. error.error_attributes carries the details a code defines, and is null for the rest.

{
  "description": "story_document: the link serves \"text/html\", which this input does not accept. Point at the file itself.",
  "code": "url_type_not_allowed",
  "error": {
    "id": null,
    "error_code": "url_type_not_allowed",
    "error_attributes": null,
    "user_readable_message": null,
    "locale": "en"
  }
}

code repeats error.error_code for older clients; read error.error_code.

Error codes

HTTPerror_codeMeansWhat to do
400invalid_requesta body or input value is wrong; the description names the inputfix it and resend. Never retry unchanged
400url_not_fetchablea link could not be fetched, broke one of the link rules, or served an empty filecheck it against Passing files by URL
400url_type_not_allowedthe link served a content type this input does not take, or bytes that are not the type it claimedserve the file itself, with its real type
400url_too_largethe file is over the input's max_bytes, or over what the run has left of its byte budgetsend a smaller file
401unauthorizedthe key is missing, malformed, revoked or expiredstop and alert someone. A retry cannot help
403api_key_credit_limit_reachedthe key is at one of its own credit limits; error_attributes.period says whichask an admin to raise the key's limit in Studio, or wait for a daily or monthly limit to reset
403credits_exhaustedthe organization has no credits lefttop up the organization
403access_deniedorg_id is not the key's organization, the key lacks the scope, or it may not run this workflowcheck the key's scopes and workflow allowlist in Studio
404entity_not_foundno such workflow, project, run or webhook endpoint in your organization — or a run of a workflow outside the key's allowlistcheck the id
409idempotency_conflictthe same idempotency_key arrived with a different bodyuse a new key for new work
429too_many_requestsa read limit was reachedwait Retry-After, then resend
500internal_erroroursretry with backoff; if it persists, send us the x-morphic-trace-id

Limits

LimitDefaultNotes
Creditsthe key's own limitsa total every key has, and optional daily and monthly caps — see Credit limits
Reads of one run30 per minute, per keyone read a minute per run is plenty; wait=45 is cheaper still
Reads of all runs1,200 per minute, per keyroom to follow hundreds of runs at once
Links per run10across all file inputs together
Bytes per run500 MBacross all links together
Bytes per filethe input's max_bytesdocuments up to 100 MB; media caps are per input
Run lifetime24 hoursa run not finished by expires_at becomes expired
Webhook endpoints10 per organizationremove one before adding another

Starting runs is never rate-limited: a key's credit limits bound what a retry loop can spend, and an idempotency_key turns a retry into a replay. The read limits are raised on request for a volume we have discussed.

Billing

Credits for a run started over the API are billed to the organization that owns the key, and counted against the key that started it. An admin sees the spend under Billing & usage → Credit activity in Studio, and each key's limits on the API keys page.

A run keeps counting against the key that started it even if somebody steps into the chat in Studio and takes it over, so the key's remaining budget is the budget for the whole run.

A run refused before it starts — a bad link, or a key or organization without credit — costs nothing. A run that fails partway through has consumed whatever its completed steps cost; credits_used on the run says how much.

On this page