Integration · Updated 2025-11-22

System APIs and SDK

OpenAI-compatible APIs plus governance headers for routing requests to Mavaia.

apisdkintegration

Endpoint overview

`POST /api/runtime/infer` is OpenAI-compatible. We extend the schema with `thynaptic-routing-profile` for selecting local/hybrid execution and `thynaptic-trace-id` for linking to audit logs.

  • Bearer token authentication sourced from Payload
  • Requests capped at 4,096 tokens locally
  • Streaming supported via Server-Sent Events

SDK

The SDK (next release) lives in `/cms/client.ts` and wraps fetch with governance-aware retries. Today, import `callRuntime` from `cms/client.ts` for SSR-safe invocations.

Governance headers

Every call should include `X-Mavaia-Purpose` describing the institutional workload and `X-Mavaia-Data-Tier` describing classification. These values flow into the evaluation note audit log.

Resources