AchiralAchiral

Docs · LLMs and developers

Version3.12.1

OpenAI-compatible chat completion routes for memory-augmented inference.

Inference gateway

The inference gateway is Achiral's OpenAI-compatible memory endpoint.

It authenticates a Context Access Token, verifies the request organization, adds organization memory, and returns the response through the public chiro model id.

The public model id is chiro. Internal provider and registry names are intentionally hidden from clients.

Routes

MethodPathPurpose
GET/v1/healthLiveness check. No auth required.
GET/v1/modelsReturn the public model id, chiro.
POST/v1/chat/completionsRun a memory-augmented chat completion. Supports streaming and non-streaming responses.

Change Base URL

Use Achiral from OpenAI-compatible clients by changing the client's baseURL and API key.

Organization-level memory inference:

TypeScript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.ACHIRAL_API_KEY,
  baseURL: "https://your-org-slug.achiral.ai/v1",
});

const response = await client.chat.completions.create({
  model: "chiro",
  messages: [
    { role: "user", content: "What changed in onboarding this week?" },
  ],
});

Shelby agent-bound runtime:

TypeScript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.ACHIRAL_AGENT_TOKEN,
  baseURL: "https://your-org-slug.achiral.ai/v1/agents/api-sentinel",
});

const stream = await client.chat.completions.create({
  model: "chiro",
  stream: true,
  messages: [
    { role: "user", content: "What should I know before touching auth?" },
  ],
});

Agent-bound tokens cannot access agents outside their allowed agent IDs.

Example

Shell
export ACHIRAL_MEMORY_ENDPOINT="https://your-org-slug.achiral.ai/v1"
export ACHIRAL_TOKEN="acm_..."

curl "$ACHIRAL_MEMORY_ENDPOINT/chat/completions" \
  -H "Authorization: Bearer $ACHIRAL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "chiro",
    "messages": [
      {"role": "user", "content": "What changed in our onboarding workflow this week?"}
    ],
    "temperature": 0.2,
    "max_tokens": 600
  }'

Use Memory API for the full surface map.