---
title: "Inference gateway"
description: "OpenAI-compatible chat completion routes for memory-augmented inference."
date: "2026-07-07"
modified: "2026-07-07"
reviewed: "2026-07-07"
---

# Inference gateway

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

Published on: 2026-07-07

Last updated on: 2026-07-07

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

| Method | Path | Purpose |
| --- | --- | --- |
| `GET` | `/v1/health` | Liveness check. No auth required. |
| `GET` | `/v1/models` | Return the public model id, `chiro`. |
| `POST` | `/v1/chat/completions` | Run 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:

```ts
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:

```ts
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

```bash
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](/docs/memory/api) for the full surface map.
