Eridian

Python SDK

eridian-sdk: sync, async, streaming, and errors.

eridian-sdk is the official Python client. It targets https://api.geteridian.com/v1, sends eridian_sk_ keys, and returns typed eridian.inference.response objects.

Install

pip install eridian-sdk

Requires Python 3.10 or later. Pin a major version in production (eridian-sdk>=2,<3).

Client

from eridian import Eridian

client = Eridian(
    api_key="eridian_sk_...",
    project_id="prj_legal_001",
    timeout=30.0,
    max_retries=3,
)

Environment variables: ERIDIAN_API_KEY, ERIDIAN_PROJECT_ID, ERIDIAN_BASE_URL. Do not pass a key you committed to git.

Inference

response = client.inference.create(
    model="auto",
    messages=[{"role": "user", "content": "Summarize termination risk."}],
    features=["pii_redaction", "semantic_cache"],
    idempotency_key="contract-summary-4821-v1",
)

print(response.object)  # eridian.inference.response
print(response.eridian.route)  # gpt or gemini
print(response.eridian.cost_usd)
print(response.eridian.region)

Streaming

for chunk in client.inference.stream(
    model="auto",
    project_id="prj_legal_001",
    messages=[{"role": "user", "content": "Draft the notice."}],
):
    delta = chunk.choices[0].delta.content
    if delta:
        print(delta, end="", flush=True)

Async

from eridian import EridianAsync

async def run() -> None:
    client = EridianAsync(api_key="eridian_sk_...", project_id="prj_legal_001")
    response = await client.inference.create(
        model="gemini",
        messages=[{"role": "user", "content": "Extract covenants."}],
    )
    await client.close()

Prefer auto unless the workflow is pinned to GPT or Gemini for an eval.

Errors

from eridian.errors import EridianError, RateLimitError, APIStatusError

try:
    client.inference.create(model="auto", messages=[{"role": "user", "content": "Hello"}])
except RateLimitError as exc:
    print(exc.request_id, exc.reset_at)
except APIStatusError as exc:
    print(exc.status_code, exc.code)
except EridianError:
    raise

Retries apply to 408, 429, and 503. They require an idempotency_key on POST inference if you also retry in your own code.

Other Resources

client.models.list()
client.usage.retrieve(project_id="prj_legal_001", start="2026-09-01", end="2026-09-30")
client.templates.retrieve("tpl_contract_summary_v3")
client.audit.events.list(project_id="prj_legal_001", start="2026-09-01", end="2026-09-30")

See SDKs, Inference, and Errors.

Production API credentials are issued with an institution workspace. Contact sales if you need access.