Figranium class takes a single options object. Every option is optional; the SDK falls back to sensible defaults so a local install works with new Figranium({ apiKey }).
Constructor options
Absolute URL of your Figranium server. Must use
http or https. Trailing slashes are trimmed. Defaults to http://localhost:11345.API key sent as
Authorization: Bearer <key> by default. Create keys from the Figranium web UI.Client-wide default timeout for non-stream requests, in milliseconds. Defaults to
30_000 (30 seconds). Streams have no default timeout.Any
fetch-compatible implementation. Useful for tracing, retries, cookie jars, test doubles, or proxying through instrumented HTTP clients.Option details
baseUrl
apiKey and apiKeyHeader
Pass apiKey to authenticate every request with an API key. By default the key is sent as Authorization: Bearer <key>. Set apiKeyHeader: "x-api-key" if your deployment expects that header.
timeoutMs
Client-wide default timeout for non-stream requests, in milliseconds. Defaults to 30_000 (30 seconds). Streams have no default timeout; set a per-call timeoutMs if you want a terminal deadline.
{ timeoutMs }. See Request options.
fetch
Provide any fetch-compatible implementation. Useful for tracing, retries, cookie jars, test doubles, or proxying through instrumented HTTP clients.
headers
Default headers merged into every request. Per-call headers override these.
Complete example
Client resources
TheFigranium instance exposes one property per resource, plus a few top-level convenience helpers.
Top-level shortcuts:
figranium.runTask(id, input?)proxies totasks.run.figranium.scrape(input)proxies toexecution.scrape.figranium.agent(input)proxies toexecution.agent.figranium.headful(input)proxies toexecution.headful.