Molecule OS
Endpoints

Errors

The error envelope and status codes every molecule.v1 endpoint returns.

Errors return a JSON body with a single error string and an appropriate HTTP status.

Error envelope
{ "error": "this action requires a key with an internal_agent surface" }

Status codes

Prop

Type

Examples

401 — no key
{ "error": "missing API key" }
403 — policy denied
{ "error": "surface 'agent_assist' is not permitted for this key" }
400 — invalid body
{ "error": "query: String must contain at least 1 character(s)" }

Request validation is driven by the same Zod schemas the client SDK imports, so a request that type-checks against @molecule/core will pass validation.

On this page