http://localhost:11345 (default)
Health
GET /api/health
Returns the server status and storage backend connectivity. Use this endpoint for uptime monitoring, load-balancer health checks, or verifying that Figranium is ready to accept work.
Response (healthy):
| Field | Description |
|---|---|
status | "ok" or "degraded" |
uptime | Server uptime in seconds |
storage | "json" (file-based) or "postgres" |
storage_error | Present only when the database is unreachable |
200 when healthy and 503 when degraded. This endpoint does not require authentication.
Authentication
If enabled, authentication must be provided via one of the following methods:- Header:
x-api-key: your_keyorkey: your_key - Authorization Header:
Authorization: Bearer your_key - Request Body:
{"apiKey": "your_key"}or{"key": "your_key"}
Tasks
GET /api/tasks
Lists all saved tasks. Each task includes its full configuration except for the version history, which is fetched separately when you open a task in the editor.
Response:
description field is optional and only present if the task has one.
POST /api/tasks
Creates or updates a task. If a task with the same id already exists, it is overwritten. Include ?version=true in the query string to save a version snapshot before overwriting.
Body:
description field is optional. When set, it appears on the canvas trigger card and in the GET /api/tasks/list response so external tools and AI agents have context about the task without fetching its full definition.
POST /api/tasks/:id/api
Triggers an execution of a specific task.
Body:
| Field | Type | Required | Description |
|---|---|---|---|
variables | object | No | Override task-level variables for this run |
webhookUrl | string | No | URL to receive a POST callback with the execution result |
statelessExecution | boolean | No | Run in a clean browser context with no saved cookies |
Completion webhook
When you include awebhookUrl, Figranium sends a POST request to that URL after the task finishes. The webhook URL is validated against the same SSRF rules as all other outbound requests (see Security). If the URL points to a private network and ALLOW_PRIVATE_NETWORKS is false, the request returns 400 INVALID_WEBHOOK_URL.
The callback payload looks like this:
POST /api/tasks/generate-selector
Uses the configured AI provider to generate a CSS selector from a plain-language description and the current page DOM. The endpoint runs the task up to the specified action index to capture the live HTML, then sends it to the AI provider chain (Gemini → OpenAI → Claude → Ollama) and returns the first successful result. Requires authentication.
Body:
| Field | Type | Required | Description |
|---|---|---|---|
task | object | Yes | The full task object, including url and actions |
actionIndex | number | Yes | Run actions up to this index to capture the page state |
prompt | string | Yes | A natural-language description of the element to find |
| Status | Cause |
|---|---|
400 | Missing task, actionIndex, or prompt, or no AI provider keys configured |
500 | All configured AI providers failed to generate a selector, or the DOM extraction failed |
Ollama requests from this endpoint go through redirect-safe fetching with SSRF validation at every hop. See Ollama URL validation for details.
POST /api/tasks/generate-script
Uses the configured AI provider to generate a JavaScript extraction script from a plain-language description. The endpoint tries each provider in order (Gemini → OpenAI → Claude → Ollama) and returns the first successful result. Requires authentication.
Body:
| Field | Type | Required | Description |
|---|---|---|---|
description | string | Yes | A natural-language description of the data to extract |
| Status | Cause |
|---|---|
400 | Missing or empty description, or no AI provider keys configured |
502 | All configured AI providers failed to generate a script |
Ollama requests from this endpoint go through redirect-safe fetching with SSRF validation at every hop. See Ollama URL validation for details.
Executions
GET /api/executions
Lists execution history.
Query Parameters:
limit: Number of results (default 50).status: Filter by status code.
GET /api/executions/:id
Gets detailed logs and result for a specific execution.
DELETE /api/executions/:id
Deletes a single execution record by ID.
Response:
POST /api/executions/clear
Deletes all execution records. Use this endpoint to free disk space or reset history after large batch runs.
Response:
Data
GET /api/data/captures
Lists all captured files (screenshots, recordings).
DELETE /api/data/captures/:name
Deletes a specific capture file.
Settings
AI provider keys
Manage API keys for each AI provider. All providers support multiple keys for automatic failover.GET /api/settings/gemini-api-key
Returns the configured Gemini API keys.
POST /api/settings/gemini-api-key
Saves one or more Gemini API keys.
Body:
GET /api/settings/openai-api-key
Returns the configured OpenAI API keys.
POST /api/settings/openai-api-key
Saves one or more OpenAI API keys.
Body:
GET /api/settings/claude-api-key
Returns the configured Claude (Anthropic) API keys.
POST /api/settings/claude-api-key
Saves one or more Claude API keys.
Body:
GET /api/settings/ollama-api-key
Returns the configured Ollama instances.
POST /api/settings/ollama-api-key
Saves one or more Ollama instance configurations. Each entry is a JSON string containing the base URL and model name.
Body:
"http://localhost:11434"), in which case the default model gemma4:e2b is used.
AI model settings
GET /api/settings/ai-models
Returns the currently configured default model for each AI provider. Requires authentication.
Response:
POST /api/settings/ai-models
Updates the default model for one or more AI providers. Omitted providers keep their current value. Requires authentication.
Body:
GET response).
Proxies
GET /api/settings/proxies
Lists configured proxies.
POST /api/settings/proxies
Adds a new proxy.
Body:
Credentials
GET /api/credentials
Lists all saved credentials. Tokens are redacted in the response.
Response:
POST /api/credentials
Creates a new output provider credential.
Body:
baseUrl is validated against SSRF rules. If the URL points to a private or internal network address (and ALLOW_PRIVATE_NETWORKS is false), the request returns:
PUT /api/credentials/:id
Updates an existing credential. The same URL validation applies when updating the baseUrl.
DELETE /api/credentials/:id
Deletes a credential by ID.
Response:
GET /api/credentials/:id/proxy/baserow/databases
Lists all Baserow databases accessible by the credential. This proxies the request through Figranium so your Baserow token is never exposed to the browser.
Response:
GET /api/credentials/:id/proxy/baserow/databases/:databaseId/tables
Lists all tables within a specific Baserow database. The databaseId parameter must be a numeric value.
Response:
| Status | Error code | Cause |
|---|---|---|
400 | INVALID_DATABASE_ID | The databaseId parameter is not a valid number |
POST /api/settings/api-key
Generates or regenerates the system API key. If you include an apiKey field in the request body, that value is saved as the new key (max 512 characters). If omitted, a new key is generated automatically.
Body (optional):
| Status | Error code | Cause |
|---|---|---|
400 | API_KEY_TOO_LONG | The supplied key exceeds 512 characters |
GET /api/settings/selector-finder
Returns the default selector finder preference.
Response:
"highlight" (standard point-and-click picker) or "ai" (AI Selector Finder).
POST /api/settings/selector-finder
Sets the default selector finder tool.
Body:
Headful
GET /api/headful/status
Returns the current state of the headful (VNC) browser session. Requires authentication.
Response (VNC enabled, session active):
| Field | Description |
|---|---|
useNovnc | Whether VNC support is enabled on the server |
novncPort | The port the noVNC viewer is running on (only present when enabled) |
isRunning | Whether a headful browser session is currently active |