SDKs
Official Python, TypeScript, and Go client libraries.
Eridian provides official SDKs for Python, TypeScript, and Go. All SDKs target https://api.geteridian.com/v1, send eridian_sk_ keys, and return eridian.inference.response objects with routing, cost, and residency fields populated.
Install
# Python 3.10+
pip install eridian-sdk
# TypeScript / Node 18+
npm install @eridian/sdk
# Go 1.21+
go get github.com/eridian-ai/sdk-go
Language-specific references:
Configuration
| Option | Python | TypeScript | Go |
|---|---|---|---|
| API key | api_key= or ERIDIAN_API_KEY | apiKey | WithAPIKey() |
| Project | project_id= or ERIDIAN_PROJECT_ID | projectId | WithProjectID() |
| Base URL | base_url= | baseURL | WithBaseURL() |
| Timeout | timeout= | timeout | context.WithTimeout |
| Retries | max_retries= | maxRetries | WithRetryPolicy() |
| Region | region= | region | WithRegion() |
Default base URL is https://api.geteridian.com/v1. Do not point production traffic at this documentation host.
Minimal Inference
from eridian import Eridian
client = Eridian(api_key="eridian_sk_...")
response = client.inference.create(
model="auto",
project_id="prj_legal_001",
messages=[{"role": "user", "content": "Summarize this clause."}],
features=["pii_redaction"],
)
print(response.eridian.route)
import { Eridian } from "@eridian/sdk";
const client = new Eridian({ apiKey: process.env.ERIDIAN_API_KEY! });
const response = await client.inference.create({
model: "auto",
projectId: "prj_legal_001",
messages: [{ role: "user", content: "Summarize this clause." }],
features: ["pii_redaction"],
});
OpenAI Compatibility
Eridian accepts the OpenAI chat-completions shape. Change the base URL and API key, then pass Eridian extensions:
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "eridian_sk_...",
baseURL: "https://api.geteridian.com/v1",
});
const response = await client.chat.completions.create({
model: "auto",
messages: [{ role: "user", content: "Hello" }],
// @ts-expect-error Eridian field
project_id: "prj_dev_001",
});
features, routing_policy, and pii_config pass through as additional JSON properties. Prefer official SDKs when you need typed eridian metadata.
Errors
SDK errors wrap the HTTP error object:
{
"error": {
"code": "rate_limit_exceeded",
"message": "Project prj_legal_001 exceeded 300 requests per minute.",
"request_id": "axm_req_8f3a2b1c",
"type": "eridian.error"
}
}
Retry 429 and 503 with exponential backoff. Do not retry 401, 403, or 409. See Errors.
Versioning
SDKs follow the API's 90-day deprecation window. Pin a major version in production. Breaking field removals are announced on the changelog.
See Inference for the request schema and Migration for moving off direct provider SDKs.
Production API credentials are issued with an institution workspace. Contact sales if you need access.