Arelis SDK Documentation
Operation-first reference for one package with three surfaces: Unified SDK (`createArelis`) for governed model calls and agent loops, Platform API (`ArelisPlatform`) for `/api/v1/*` wrappers, and Runtime SDK (`createArelisClient`) for in-process governed orchestration.
npm install @arelis-ai/ai-governance-sdkfrom arelis import create_arelis_platform
import os
platform = create_arelis_platform({
"baseUrl": "https://api.arelis.digital",
"apiKey": os.environ["ARELIS_API_KEY"],
})Use `ArelisPlatform` for `/api/v1/*` HTTP wrappers. Use Runtime SDK exports for in-process governance orchestration (models, gates, compliance, and runtime registries). Both come from the same package.
For Platform API flows, create one ArelisPlatform instance per process and reuse it for all HTTP operation groups.
Use `apiKey` for service-to-service workloads and `token` for Firebase user-scoped operations. The client sends either `x-api-key` or `Authorization: Bearer` automatically.
Request failures throw `ArelisApiError` with RFC 7807 fields (`type`, `title`, `status`, `detail`, `instance`). Retries apply to 429 and 5xx responses plus network errors.
Each client method group page documents signatures, endpoint mapping, request parameters, return contracts, and dual code examples (SDK + REST).
node_modules/@arelis-ai/ai-governance-sdk/dist/index.d.ts.client.stream() over SSE.stream(options: {
onEvent: (type: string, data: unknown) => void;
eventTypes?: string[];
}): StreamConnectionPath
/api/v1/stream?token={apiKeyOrToken}
Default events
event:created, proof:created, risk:evaluated, replay:completed, policy:updated, usage:updated, key:updated
baseUrl: string
apiKey: string
token: string
maxRetries: number
timeout: number