Figranium and AsyncFigranium classes accept keyword-only constructor arguments. Every option is optional, and the SDK falls back to sensible defaults so a local install works with Figranium(api_key="...").
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 seconds. Defaults to
30.0. Streams have no default timeout.A preconfigured
httpx.Client (or httpx.AsyncClient for AsyncFigranium). Useful for tracing, retries, proxies, or test doubles. The SDK does not close a caller-supplied client.Default headers merged into every request. Per-call
headers override these.Option details
base_url
filename.py
api_key and api_key_header
Pass api_key to authenticate every request with an API key. By default the key is sent as Authorization: Bearer <key>. Set api_key_header="x-api-key" if your deployment expects that header.
filename.py
timeout
Client-wide default timeout for non-stream requests, in seconds. Defaults to 30.0. Streams have no default timeout; set a per-call timeout if you want a terminal deadline.
filename.py
options={"timeout": 5.0}. See Request options.
http_client
Provide a preconfigured httpx.Client (or httpx.AsyncClient for AsyncFigranium). Useful for tracing, retries, proxies, or test doubles. The SDK does not close a caller-supplied client.
filename.py
headers
Default headers merged into every request. Per-call headers override these.
filename.py
Complete example
filename.py
Client lifecycle
Use the client as a context manager so it closes automatically, or call.close() explicitly.
filename.py
async with:
filename.py
Client resources
TheFigranium instance exposes one property per resource, plus a few top-level convenience helpers.
Top-level shortcuts:
client.run_task(id, input?)proxies totasks.run.client.scrape(input)proxies toexecution.scrape.client.agent(input)proxies toexecution.agent.client.headful(input)proxies toexecution.headful.