This guide covers the optional organisation service. Configuration, console and API paths refer to your Lolly Work instance. The packaged console keeps its release-matched copy of this guide.
Your Lolly Work server can render on-brand files for a script, a pipeline or an agent, with the same tools, design system and policy the Lolly apps use. This page takes you from a token to a finished file, then covers the rest of the automation surface: schemas, the document verbs, background jobs, batches and provider assets.
Every other route the console, the lw CLI and the apps call is in the Lolly Work API reference.
Render your first file
From a token to a file, in four steps:
- Get a token An owner mints one with only the reach it needs. The secret,
lwt_…, is shown once. - Ask what the token may do The formats this server renders, and whether the token may render at all.
- Read the tool's inputs The inputs this caller may set, after policy and design-system rules.
- Render The tool, the format and the inputs go in, and the file comes back.
lw tokens create --label ci --scopes render # an owner mints the token
export LW_TOKEN=lwt_...
curl -H "Authorization: Bearer $LW_TOKEN" https://work.example.com/api/v1/discovery/me
curl -H "Authorization: Bearer $LW_TOKEN" -H 'content-type: application/json' \
-d '{"toolId":"qr-code","format":"svg","inputs":{"url":"https://example.com"}}' \
https://work.example.com/api/v1/render > qr.svgqr.svg holds the fileThe answer is the file itself, with its media type, an x-lolly-cache-key header and an x-lolly-brand-check header (see design-system rules).
Add ?async=1 to get a job instead, which you can poll or have the server call you back about.
From a token to a file
- 1Get a token
lw tokens createAn owner mints it once. Send it as
Bearer lwt_… - 2Ask what it may do
GET /api/v1/discovery/meFormats this server renders, and whether the token may render
- 3Read the inputs
GET /api/v1/schema/:toolIdHidden, locked and choice inputs already applied
- 4Render
POST /api/v1/render{ toolId, format, inputs }
Step 4 answers in one of two ways
200 with the bytes, their media type and an x-lolly-brand-check header
?async=1
202 { jobId, statusUrl }- read the result with the
x-lw-job-tokenheader - or take a signed callback at
notify.webhook.url - or deliver it to a destination by reference
The path a script takes: a token, a check of what the token may do and which inputs it may set, then a render that answers with the file or with a job.
signed by Lollywork-automation-api-journey.htmlHTMLpixels, not shapes9 KBAI generatedgenerated by Claude Opus 5.5Check it yourselfGet the signed fileBefore you start: a token and a permission
The token. Service tokens are minted by owners (token.manage), from the console or lw tokens create --label <name> --scopes <scope,...> [--tools <id,...>] [--days <n>]. The label says which automation holds the token, up to 80 characters. A token lasts 90 days unless you choose 1 to 365. Send it as Authorization: Bearer lwt_…; the lw CLI reads it from LW_TOKEN or --token. The routes are in service tokens.
The scopes. Scopes say which routes a token may reach:
| Scope | What it opens |
|---|---|
render | POST /api/v1/render, durable renders, render batches, POST /api/v1/batch, their jobs, tool schemas, POST /api/v1/validate and POST /api/v1/intents/resolve |
documents | compile, validate, inspect, measure, optimize, diff and package, their jobs and tool schemas |
files | uploads and file references |
delivery | listing destinations, sending this token's own finished job to one, and reading or retrying those deliveries |
catalog.read | catalog files, tool files, catalog fields and catalog search |
audit.read | the audit trail and its head |
approvals.request | opt-in: filing an export review on this token's own finished render, reading those requests and withdrawing them. Deciding stays with people (requests from agents) |
Every scoped token can read GET /api/v1/discovery, GET /api/v1/discovery/me and GET /api/auth/session. Any other route answers 403 TOKEN_SCOPE, and new routes stay closed until a release adds them to a scope. --tools limits the token to the tools you list, wherever a request gives a tool id: schemas, renders, batches, jobs and the document verbs. Scopes and the tool list are fixed when the token is minted, so a change means a new token.
The role. A token with scopes and no --role takes the automation role, which holds tool.use, export.server, delivery.create, catalog.read and audit.export, so a render token needs no admin authority. No person can hold this role. You can also combine scopes with another role, and then a route must pass both: a viewer token with the render scope still cannot render, because a scope only narrows. A token with no scopes reaches all that its role allows, as before, and needs --role, which is any role but guest or automation.
The permission. Rendering on the server needs tool.use for the tool and export.server. Admins and the automation role hold export.server by default and a grant can give it to anyone else, so a token with the member role cannot render until someone grants that permission. The other verbs need tool.use for any tool they name. A deny grant on user:svc_<id> applies to a scoped token as it does to any other.
What a token is. A token acts as its own account, with its role and no groups. Its jobs and file references belong to the token, not to the owner who minted the token. A token is refused wherever a person has to decide or act, such as deciding an approval, a delivery to a destination that needs approval and live collaboration. A token holding approvals.request may ask for that approval, and its delivery then waits for a person instead of being refused. Who can call what lists every credential.
On an open instance, a caller with no credential may also use and render any tool that no visibility rule hides. On a gated instance, every route on this page except the public GET /api/v1/discovery answers 401 without a credential; a job's result token counts as one for that job's result.
Find out what you can do
| Route | Who | What it answers |
|---|---|---|
GET /api/v1/discovery | public | What this deployment can do, the same for everyone: document API and engine versions, server render formats, hooked tools, Content Credentials, automation verbs and batch limits, live collaboration, document agents, the organisation MCP endpoint (agents.organisationMcp), whether file references are on (files.references), and unavailable entries for what it lacks. Shared caches may hold it; it carries an ETag |
GET /api/v1/discovery/me | member or service token; anyone on an instance that is not gated | What the caller can do: principal (member, service or guest), can bits for tool.use, export.server, export.request, delivery.create and catalog.read, which a scoped token holds only when its scopes reach them, provider reference schemes that resolve for the caller, for a scoped token its token with scopes, scopesVersion and tools, limits, the render worker's live readiness when one is configured, and unavailable entries. Private, never cached |
GET /api/v1/discovery/tools?limit=&cursor= | as above | The tools the caller can use, sorted by id, 25 a page by default and at most 100. Each entry has name, version, renderer, the server formats the caller may request, can.render, its schema URL and unavailable entries. next is an opaque cursor, or null on the last page |
GET /api/v1/schema/:toolId?view=&format=&template= | tool.use | The caller's effective input schema (below). view=raw returns the tool's own schema and needs policy.edit. format selects the output format whose design-system rules apply. Without it, the schema carries only the rules that apply to every format. template=inst/<id> describes a render that starts from that published template, for a template the caller's feed carries (templates by purpose) |
Discovery lives under /api/v1 rather than /.well-known/, because on a shared origin /.well-known/ belongs to the web shell, whose static /.well-known/lolly.json describes the shell. In the same way, the list of brand pages lives at /api/v1/brand-pages/public. The one exact path /.well-known/lolly-brand.json also answers, as a Lolly convention.
Read a tool's effective schema
GET /api/v1/schema/:toolId answers with apiVersion and schema. The schema is the effective one for this caller, built from the tool, the tool policy that applies to the caller, the design-system choice rules for the format and the deployment's render probe:
- An input the policy hides is absent from
propertiesandrequired, and the response omits that input. - A locked input has
readOnly: trueand, when the rule carries a value, that value asconstanddefault. The server applies it, so leave it out of requests: sending it is refused withINPUT_LOCKED. - A choice input gains an
enumof the values the policy allows, narrowed to the tool's own options when it declares some. A reviewed design-system choice rule does the same, withreasonnaming the rule.
The ETag header moves with any change to the effective contract, so If-None-Match answers 304 while the contract holds. A script can cache the schema and re-check it for the price of one header.
The rest of the schema response
The response adds view, toolId, tool (name, version), versions (engine, tool, policy, design, catalog, and rules when design-system rules apply), policy, render (renderer, formats, and format when one was requested), unavailable and etag.
Each policy entry is one change the policy made: an effect of locked, choice or format-excluded with the input or format, plus the overlay's name as by and the rule's reason when they exist. Entries never show groups or values from rules that do not apply to the caller.
Each unavailable entry, here and in discovery, identifies one format, action or feature with a stable code and a reason.
Start from what the piece has to do
POST /api/v1/intents/resolve takes a visual intent: what the piece has to do, where it will be seen and what it has to say. It answers with the tool this caller can render it with on each surface, the input values, what is missing and why. It renders nothing.
curl -X POST "$LW_BASE/api/v1/intents/resolve" \
-H "Authorization: Bearer $LW_TOKEN" -H 'content-type: application/json' \
-d '{ "version": 1, "purpose": "direct", "surfaces": [{ "id": "social-square" }],
"content": { "url": "https://example.com/spring" } }'
lw intent resolve intent.json # exits 0 when every surface is ready, 4 otherwiseThe answer has the shape in Reading the answer, the one lolly intent and lolly_resolve_intent give. No model is in this path: the same request and the same tools give the same answer, and a prompt is carried and never read.
What this caller gets. The route uses the rules the render routes use, so the answer is about this caller on this instance:
- A tool appears only when the caller may render that tool: the
renderscope,tool.use,export.server, the token's tool list and tool visibility all apply. A hidden tool appears nowhere in the answer, and preferring one reads like preferring a tool that does not exist. - A tool appears only when this deployment and tool policy leave it a format. Many tools with a declared purpose lay out HTML or run hooks, so an instance with no render worker offers few of them and can answer
refused. Discovery'sunavailablesays which tools need the worker. - A tool with no
intents.jsonis not offered. - A locked or hidden input is never filled. Content meant for one is listed in
unused, and a role that needs one is met when the server holds a value. - Choices narrow to what policy allows. A purpose or a declared surface that depends on a value this caller may not set is not offered. An input limited to a list of values can be filled from an intent only when it is a
select.
Render what comes back. Send a ready surface's toolId, format and inputs to POST /api/v1/renders or POST /api/v1/render. When its sizeSetBy is export, add the width, height and unit from exportDims to inputs. POST /api/v1/validate checks inputs without the size. Where a surface lists gaps, ask the person for those values.
The route applies the design-system rules every format shares. A rule for one format is checked when that format renders, so a render can still refuse a value with INPUT_NOT_ALLOWED.
Nothing is kept. The route writes no audit record, as POST /api/v1/validate writes none. It has no background mode, because a job record would hold the request, so ?async=1 and Prefer: respond-async change nothing. The prompt and other free text come back to the caller who sent them and are not stored or logged. The route shares the automation rate limit.
What a render records. A render on Work does not record the intent in its Content Credential. recordPrompt is carried in the answer and has no effect here. Recording an intent in a file is available from the command line and the MCP server.
A request the parser refuses answers 400 INTENT_INVALID with errors, a list of { code, path, message }. A body over 512 KiB answers 413 PAYLOAD_TOO_LARGE. A caller who can render no tool here answers 403 FORBIDDEN.
Render and the other document verbs
The automation surface mirrors the open-source engine's document verbs:
| Route | What it does |
|---|---|
POST /api/v1/render | renders a file: { toolId, format, inputs }. format is required (400 INVALID_INPUT without one). Needs export.server |
POST /api/v1/compile | turns { toolId, inputs } into a document, with locked values applied |
POST /api/v1/validate | checks inputs and reports problems as errors, without rendering |
POST /api/v1/inspect | describes a file (sent as below) or a document |
POST /api/v1/measure | measures a document, sent as document or as { toolId, inputs } |
POST /api/v1/optimize | shrinks a file (sent as below), or optimizes a document |
POST /api/v1/diff | compares two documents, a and b |
POST /api/v1/package | packs a compiled document, or { toolId, inputs }, into a .lolly file |
Inputs travel as JSON in inputs, not as URL merge fields. Schema, compile, package and render all enforce the caller's tool.use decision and the tool-visibility overlay, so a document verb cannot be used to discover a tool hidden from that caller.
Policy. Compile, validate, package and the rows of a batch check inputs against the same policy the schema shows:
- compile and package refuse a locked, hidden or not-allowed input with
422and the code the render route uses (INPUT_LOCKED,INPUT_HIDDENorINPUT_NOT_ALLOWED), with theinput,byandreason; - validate reports the same codes as errors, and does not count a missing locked or hidden input against the caller;
- a batch row that breaks the policy fails
ROW_VALIDATION_FAILEDbefore the job is queued; - durable renders and render batches check the current policy at each attempt, so one admitted before a policy change records that attempt's failure with the same codes.
Design-system rules
Design-system rules can apply to some output formats only. Compile, validate and package take an optional format, one the tool declares, and then apply that format's rules, as the schema read with the same format shows. Without one they apply only the rules every format shares. A batch row is checked against the rules for the batch's format, and a render against the rules for its own format.
Rules that are not choices, such as a text length, are not in the schema. The render checks them and refuses a value that breaks one with BRAND_RULE_VIOLATION. A render's x-lolly-brand-check header reports the check, and durable output metadata carries brandRules with its disposition, scope and revision. A passing check is not a review of how the output looks. Policy editors publish the rules through managed rule mappings.
Files in, files out
/inspect and /optimize take the file in one of four ways:
bytesBase64, the bytes in the request;- a provider
source(see provider assets); upload: { id, checksum }, the caller's own finishedautomation-inputupload, for a file too large for one request;file: { id, checksum }, one of the caller's file references.
/optimize with output: "file" keeps its output as a new file reference of the caller and answers { file, bytes, savedBytes, stages } instead of bytesBase64.
Render from a URL
GET /render/<toolId>.<format>?<inputs> renders with the inputs in the query, the way a Lolly share link carries them. It suits an image tag or a script with no JSON body.
Who may call it: a member who may use the tool and holds export.server; a guest whose link opens that tool; or, on an open instance, anyone without signing in, for a tool visible to everyone. A service token cannot call this route, because it reads only a session or a guest link; a script with a token uses POST /api/v1/render. A query that is not in canonical order is answered 308 to the canonical one.
For worker-backed renders, asset inputs use the same URL encoding as the Lolly shell. A user/team/<fileId> reference is resolved to that project's file endpoint only when the submitter can read the project and the file belongs to the render's scoped read ticket. The worker receives no general session credentials. Private files outside that scope stay out of reach; inline baked assets keep their original bytes.
Run work in the background
Any document verb, render or package takes ?async=1, or Prefer: respond-async, and answers 202 { jobId, statusUrl } with a Location header.
| Route | What it does |
|---|---|
GET /api/v1/jobs | the caller's jobs |
GET /api/v1/jobs/:id | one job: its state, progress, resultSha256 (computed from the output bytes, null until a result exists), resultToken and callback |
GET /api/v1/jobs/:id/result | the finished result |
DELETE /api/v1/jobs/:id | removes queued work or retained output; 409 JOB_OUTPUT_IN_USE while a delivery retains that output |
POST /api/v1/jobs/:id/deliveries | sends a completed render to an outbound destination without a download and upload round trip; the delivery shares the immutable result and records the job id |
Jobs belong to the member or service token that created them. Repeating a request with the same Idempotency-Key returns its existing job; reusing that key for different request bytes returns 409 IDEMPOTENCY_KEY_REUSED.
Callbacks
A job can call you back when it settles. callbackUrl is used only when it exactly matches the instance's own webhook endpoint, notify.webhook.url (configuration), or uses an origin listed in automation.callbacks.allowedOrigins. Each callback carries x-lolly-timestamp and an x-lolly-signature header signed with LW_WEBHOOK_SECRET, and its body is { jobId, state, resultUrl, resultToken, deliveryId }.
resultToken is a 24-hour token for that one job's result. Send it as the x-lw-job-token header on GET /api/v1/jobs/:id/result, and the receiver needs no session of its own. A completed job resource carries the same resultToken, and null before then.
The token used to travel in the URL, as resultUrl?token=…, and a URL ends up in access, proxy and CDN logs. In Lolly Work 1.1.2 and 1.2.0, resultUrl still carries ?token= and the result route still accepts the query token, answering with a Deprecation header (RFC 9745). A later release drops the query from resultUrl and refuses a query token, so move receivers to the header now.
Callbacks go through a durable outbox. The write that settles a job also stores its callback, and any Lolly Work process sends callbacks that are due, so a callback left unanswered by a restart is sent again afterwards.
Every attempt for one job carries the same id, in x-lolly-delivery-id and as deliveryId in the signed body. Act on each id once: that is the idempotency contract of a signed-HTTPS delivery. Each attempt has a fresh timestamp, signature, result URL and result token. A refusal, a timeout or a dropped connection is retried after 5 s, 30 s, 2 min, 10 min and 30 min, six attempts in all.
The job reports callback: { id, state, attempts, lastOutcome, lastStatus, nextAttemptAt }:
stateispending,acknowledged(the receiver answered 2xx) orfailed. Lolly Work never reports a callback as delivered, because a 2xx answer does not show what the receiver did next.lastOutcomeisacknowledged,refused,uncertain(the request may have reached the receiver) ornot-sent(the URL is not approved, or no signing secret is configured).callbackFailedstaystrueuntil the receiver acknowledges.
Make many files at once
POST /api/v1/batch { toolId, format, rows, keepGoing?, retries?, concurrency?, priority? } always creates a job and produces one ZIP. Requested concurrency is capped at four in this process, priority at 0 to 9 and retries at three. Progress is exposed as { done, total }, and the ZIP's manifest.json records every row outcome.
In place of rows, bind: { source, query?, as? } reads JSON or CSV from a governed provider:
asmay be the JSON Schema the schema route returns, and every row is also checked against the actual tool before it is queued;queryis a typed, nested equality selector, forwarded to the provider and enforced again over the returned objects;- CSV follows RFC 4180, including quoted commas, escaped quotes and embedded newlines, and its cell values are strings.
For batches whose rows each need their own durable record, use render batches instead.
Assets from providers
Provider references are resolved during compile, before the render cache identity is worked out:
image://brand,catalog://andlibrary://stay local and work offline.cms://<provider-id>/<remote-id>uses that enabled catalog provider's stored credential, exposure and lifecycle.net://<operator-allowed-origin>/<path>reaches only origins present in provider configuration.
Both remote kinds are bounded in time and bytes, content-addressed, and pass through immutable resize, format-conversion and metadata-strip stages.
Durable renders
POST /api/v1/renders submits a persistent single-tool request that survives a restart. List or get its state, retrieve its verified output, cancel it, or create a retry through the same API. The standalone server recovers expired leases; function-only hosts refuse new submissions. Recoverable renders has the request contract, routes, limits and deployment requirements.
- Evidence. New durable outputs expose a partial execution receipt at
GET /api/v1/renders/:id/evidence: loaded source hashes, prepared context, observed asset byte digests and the output digest under the same lease. The receipt lists its own coverage gaps; it is not a complete dependency lock. The download includes the output's render identity, which binds the typed request to the resolved tool source, engine version, sources and effective policy. - Verification. Render and batch requests accept
verification: "output-v1", orverification: { profile: "output-v1", widthPx: 1200, heightPx: 630 }. These assertions read the final file back before publication. Failed required checks keeperror.inspectionand publish no output. The verification profile lists formats and measurement limits; a passing check is not design approval. - Production checks. Durable render and batch requests accept
production: { contract, referenceBase64?, repair? }for the engine'slolly/production-still-v1profile;lolly/production-motion-v1is not accepted. The contract and repair choices are part of request identity and retries. A contract can protect a runtime input withkind: "input", a declared input id inlocationand a canonical JSON SHA-256 inexpected; such a check needs observed runtime values, which file-only inspection cannot reconstruct. Failed required checks return no artifact and keepPRODUCTION_VERIFICATION_FAILEDdiagnostics on the render record. See production still checks. - Callbacks.
callbackUrlon a render or batch request sends one signedPOSTwhen it finishes, through the same outbox as job callbacks, and a batch calls back once. The URL is refused at submission unless this instance accepts that URL. See be told when a render finishes. - Delivery.
POST /api/v1/renders/:id/deliveriessends a finished output to an organisation destination by reference, under the same rules as a job output (delivering an automation output). - Render batches.
POST /api/v1/render-batchescreates a parent and up to 200 independent child renders in one atomic step, from typed rows or from a governed data source withbind. Read its ordered rows and output receipts, download a JSON manifest or the outputs as one ZIP, cancel unfinished rows, or retry a terminal batch while keeping its successful children. The batch API is separate from the/api/v1/batchjob and ZIP contract.
Connect an agent over MCP
/api/v1/mcp is the organisation MCP endpoint. An agent connects with a service token and can then do what that token can do across this instance. MCP (Model Context Protocol) is the standard way AI clients connect to tools.
Each tool call runs the HTTP route the table names, as the token. The scope check, the token's role and tool list, tool visibility, input policy and validation are the ones those routes always apply, so the endpoint adds no authority of its own.
lw tokens create --label brand-agent --scopes render --tools qr-code,event-card
export LW_TOKEN=lwt_...
lw mcp config --base https://work.example.comlw mcp config prints paste-ready settings for your MCP client. The settings name the LW_TOKEN variable and never hold the token. The console shows the same settings when you mint a service token.
| Tool | What it does | Route | Reached with |
|---|---|---|---|
list_tools | The tools this token may use, a page at a time | GET /api/v1/discovery/tools | render or documents |
describe_tool | One tool's effective input schema | GET /api/v1/schema/:toolId | render or documents |
validate | Check input values without rendering | POST /api/v1/validate | render or documents |
resolve_intent | Choose the tool for each surface of a visual intent | POST /api/v1/intents/resolve | render |
render_tool | Submit a durable render | POST /api/v1/renders | render |
get_render | State, attempts, failure and receipt | GET /api/v1/renders/:id | render |
get_render_output | The finished file, or a link to it | GET /api/v1/renders/:id/output/default | render |
cancel_render | Stop queued or running work | DELETE /api/v1/renders/:id | render |
submit_batch | Up to 200 rows as one batch | POST /api/v1/render-batches | render |
get_batch | Counts and ordered rows | GET /api/v1/render-batches/:id | render |
search_assets | Search catalog assets by text | GET /api/v1/catalog/search | catalog.read |
request_approval | Ask for an export review of one of this token's finished renders | POST /api/v1/approvals | approvals.request |
get_approval | One approval request this token made: its state, step and any decision | GET /api/v1/approvals/:id | approvals.request |
withdraw_approval | Withdraw a request nobody has decided yet | POST /api/v1/approvals/:id/withdraw | approvals.request |
list_destinations | The organisation destinations this token may send to | GET /api/v1/destinations | delivery |
deliver_render | Send a finished render to a destination | POST /api/v1/renders/:id/deliveries | delivery and render |
- Only a service token. A person's session and an invitation key are refused with
401. A person connects an agent through a document or project invitation, which is a different endpoint. A revoked or expired token stops at its next call. - Tools the token can reach.
tools/listleaves out a tool its scopes do not open or its role cannot do. A tool called by name gets the route's own refusal, such asTOKEN_SCOPEorFORBIDDEN. A token with no scopes gets the tools its role allows. A role that may render only through a grant on one tool does not see the render tools listed, and its calls still work. - Policy.
describe_toolleaves out hidden inputs and shows locked ones asreadOnlywith their value. A durable render checks policy at each attempt, so a locked input sent torender_toolrecords a failed attempt withINPUT_LOCKED. Callvalidatefirst to see a problem at once. - Errors. A refused call returns
isError: truewith{ code, message, status }and the route's own details, using the same codes as HTTP. - Sending a file.
deliver_rendersends this token's own finished render, unchanged, and needs a Content Credential on the file, as delivery does for any send. A destination with an approval chain refuses a token withHUMAN_APPROVAL_REQUIREDand sends nothing, unless the token holdsapprovals.request: then the delivery waits for a person's approval. - Files. A file up to 1 MiB comes back in the result, as an image or a resource. A larger one comes back as a link that needs the same token.
- Brand context. The endpoint also serves resources:
lolly-work://me(who the token is, its scopes, limits and today's use) andlolly-work://brandwith the brand'sDESIGN.md, tokens,AGENTS.md, checks and skills, plus a partner token's own company, templates and kit. The brand's files and the partner reads needcatalog.read. The same reads are atGET /api/v1/context/*. What an agent reads lists them. - Data, not instructions. Tool descriptions on this endpoint are fixed text. Anything a tool author or policy editor wrote, and the contents of any file, arrive only inside a result. The endpoint tells clients to read results as data.
- Records and limits. The audit log records
mcp.connectand eachmcp.tool-callwith the token's label, the tool, the outcome and the refusal code, never the input values. Each message counts once againstrateLimit.automation, and against the token's own limits when it has some. - No session. The endpoint keeps no state between calls, so any replica can answer.
GETanswers405. - Hosts without a long-lived server. A function-only host leaves out the render tools and keeps
resolve_intent, and discovery reportsagents.organisationMcp.renderTools: false.
Retries, delivery of a /jobs result and the other document verbs stay on the HTTP routes, and deciding an approval stays with people.
Limits and errors
The automation routes share the rateLimit.automation bucket, per client IP: discovery, schemas, the document verbs, POST /api/v1/intents/resolve, renders, batches and jobs, GET /render/…, agent connections, the organisation MCP endpoint and the outbound delivery POSTs. That includes the public GET /api/v1/discovery, so reading it never costs a sign-in attempt. The bucket is admission control, not pricing. A service token can also carry its own limits on calls a minute and renders a day or a month. A token in a partner programme starts with 120 calls a minute and 2,000 renders a day; any other token has none unless an owner sets them (limits and usage). Sizes are in configuration.
Errors keep the { "error": { "code", "message" } } shape. The table below holds the codes an automation script meets most; the common codes cover sign-in, permissions and links.
The codes an automation script meets most
| Code | Status | Meaning |
|---|---|---|
INVALID_INPUT | 400 | a required field is missing or malformed |
INTENT_INVALID | 400 | the visual intent was refused, and errors lists each problem |
TOOL_NOT_FOUND | 404 | no tool has this id on this instance |
TOOL_UNAVAILABLE | 500 | the tool exists, but this server could not read its files |
DOCUMENT_API_ERROR | 400 | the compile, inspect, diff, measure, optimize or package operation could not be performed |
DATA_BINDING_ERROR | 400 | a live JSON or CSV provider binding could not resolve, parse, query or validate |
UNSUPPORTED_FORMAT | 400 | a format this deployment cannot produce (org-config's render.formats lists what it can) |
FORMAT_NOT_ALLOWED | 403 | the format exists here, but this tool's overlay policy excludes that format |
TOKEN_SCOPE | 403 | the service token's scopes do not cover this route; requiredScopes lists the scopes that open it, when any do |
INPUT_LOCKED | 422 | a locked input was supplied by the caller |
INPUT_HIDDEN | 422 | the caller supplied an input that policy hides from them |
INPUT_NOT_ALLOWED | 422 | the value is not one of those a choice rule allows |
BRAND_RULE_VIOLATION | 422 | a render input breaks a reviewed design-system rule for that format |
ROW_VALIDATION_FAILED | 422 | a batch row does not satisfy the selected tool contract |
IDEMPOTENCY_KEY_REUSED | 409 | the caller reused an idempotency key for different request bytes |
CALLBACK_URL_NOT_ALLOWED | 403 | a durable render or batch named a callback URL this instance does not send to |
OUTPUT_EXPIRED | 410 | output retention removed this output; its record and receipt remain |
HOOKED_TOOL_NEEDS_CHROMIUM | 501 | the tool runs scripts and no worker is configured (org-config's render.hookedTools is false) |
TOOL_REQUIRES_UNMET | 501 | the manifest's requires lists a host.* API the in-process render host lacks (text, compose, audio, the device APIs); route the tool through the Chromium worker |
RENDER_BUSY | 503 | the render worker is at capacity; retry after Retry-After seconds |
Related
- Every other route, grouped by job: Lolly Work API reference
- Persistent renders and their evidence: recoverable renders
- Sending large files in parts: resumable uploads
- The same surface from a terminal: lw CLI
- What an intent says and how a tool is chosen: start from what the piece has to do
- Agents that work inside one document or project: document agents