API
Figurement exposes a REST API that lets you automate workflows, manage scenes, libraries, assets, rendering jobs, and more from scripts, CI pipelines, or external tools.
Why Use the API?
If you want to automate Figurement, the API is the right place to start. It is useful for batch rendering scenes, syncing assets from a database, integrating Figurement into a product pipeline, or building custom internal tooling. In practice, it gives you a scriptable version of the work you would otherwise do through the UI.
Interactive API Reference
The full OpenAPI 3.1 specification is available as an interactive reference powered by Scalar:
If you prefer working with external API tools, the raw OpenAPI spec is also available at /api/docs/openapi.json. You can import that file into tools like Postman, Insomnia, or a code generator.
Authentication
The API supports two authentication methods, depending on whether you are working in the browser or from an external script.
Session Cookie (Browser)
When you are logged in to Figurement in the browser, authentication happens through an HTTP-only token cookie. That is how the frontend talks to the backend, so there is nothing extra you need to configure for normal in-browser use.
Bearer token (API key)
For scripts, integrations, and external tools, use an API key as a bearer token
Authorization: Bearer <your API key>
API keys are tied to your user account and carry the same permissions as your session, which makes them a convenient option for automation.
Managing API Keys
You can create and manage API keys from the Figurement app or via the API itself:
| Endpoint | Method | Description |
|---|---|---|
/api/keys | GET | List your active API keys |
/api/keys | POST | Create a new API key |
/api/keys/:id | PATCH | Rename an API key |
/api/keys/:id | DELETE | Revoke an API key |
Creating a Key
Create a key in Account → API Keys and copy it: the key is shown only once. Keys expire after 30 days unless you choose otherwise. You can also create one with POST /api/keys from a signed-in session; the response’s token field is the key, and "expires_in_days": null makes a key that never expires.
Using a Key
Send the key as a bearer token on every request. For example, to list the libraries that hold your scenes:
curl -H "Authorization: Bearer <your API key>" "https://app.figurement.com/api/libraries/by-type/scene"
Then GET /api/libraries/<library id>/assets/of-type/scene lists the scenes in one of them.
Revoking access
- API key: delete it in Account → API Keys, or call
DELETE /api/keys/:id. It stops working at once. - AI assistant or plugin that signed in with your account: open Account → Connected apps and click Disconnect. Its access stops at once.
Requests and responses
- Bodies are JSON (
Content-Type: application/json), except file uploads, which aremultipart/form-datawith the file in afilefield. - Successful responses are JSON, or the file itself for downloads such as exports, renders and thumbnails. The API reference gives the shape of each.
- Errors carry a status code and, usually, a short plain-text explanation in the body; a
401has no body.
| Code | Meaning |
|---|---|
200 / 201 / 204 | Success, created, or success with no body |
400 | The request is not valid; the body says why |
401 | No valid API key or session |
403 | Signed in, but not allowed to do this, or your plan’s limit is reached (the body says which) |
404 | Not found, or not visible to you |
409 | Conflicts with the current state, for example a scene that is being updated; try again shortly |
429 / 503 | Too many requests or too much work at once; wait and try again (Retry-After says how long, when given) |
The API Reference
The interactive API reference lists every public endpoint with its parameters, body and responses, and /api/docs/openapi.json is the same as an OpenAPI 3.1 specification for tools and code generators. It covers scenes, libraries and assets, rendering, files, webhooks and API keys. Endpoints only the Figurement app itself uses, such as sign-in, billing and teams, are not part of it.
For ready-made recipes (keeping a scene in sync with CAD, rendering, downloading exports, webhooks and AI assistants), see Automation and Integrations.
Rate Limits
Some work is limited per user so it stays fair for everyone: a few exports and renders run at once, and further requests are refused with 429 or 503 until one finishes. Scripts should wait and retry rather than send requests in a tight loop.