Skip to main content
eigenpal is the official Python SDK. It is a typed wrapper over the EigenPal API, generated from the OpenAPI spec. Source is open at github.com/eigenpal/sdk-python.

Install

pip install eigenpal
Requires Python 3.9+. Get an API key from the dashboard under Settings, API Keys.

Quick start

import os
from pathlib import Path
from eigenpal import EigenpalClient, EigenpalValidationError

client = EigenpalClient(api_key=os.environ["EIGENPAL_API_KEY"])

# Pass a Path / file handle / { content, filename, mime_type }. The SDK uploads
# the request as multipart/form-data, no base64 needed.
result = client.workflows.executions.run_and_wait(
    "extract-invoice",
    input={"contract_document": Path("contract.pdf")},
)

print(result["status"], result["result"])

Authentication

Pass the key explicitly, or set EIGENPAL_API_KEY and let the SDK pick it up:
client = EigenpalClient(api_key=os.environ["EIGENPAL_API_KEY"])
The api_key argument always wins over the environment fallback.

Starting runs

client.run(target, input=None, ...) starts a workflow or agent. Targets are strings like workflows.extract-invoice or agents.invoice-agent. Use run_and_wait to block until the run finishes and return its result.

Self-hosted

Point the SDK at your own deployment:
client = EigenpalClient(
    api_key=os.environ["EIGENPAL_API_KEY"],
    base_url=os.environ.get("EIGENPAL_BASE_URL", "https://eigenpal.acme.internal"),
)
base_url wins over the EIGENPAL_BASE_URL fallback and defaults to the hosted cloud.

Errors

Catch EigenpalValidationError when inputs do not match the workflow schema; it carries the field-level detail so you can surface it to the caller. See the API reference for the endpoints the SDK calls.