Quickstart Integration

Create an Aegis key, point your client at the proxy, and send your first OpenAI-compatible request.

Create An API Key

Aegis keys are created from the Console. Open the dashboard, go to API Keys, generate a key, and copy it immediately.

The full key value is shown once. After that, only the masked prefix remains visible in the dashboard.

  • Sign in to Aegis.
  • Open Console > API Keys.
  • Enter a label such as `Production agents` or `Local dev`.
  • Click `Generate Key` and store the `aegis_...` value right away.
Delete a key from the API Keys page when an agent, laptop, or CI environment should no longer have access.

Endpoint Contract

Aegis exposes an OpenAI-compatible `/v1/chat/completions` endpoint. Send the Aegis key as the bearer token and pick any supported model ID from the Models page.

For most client setups, you only need two values: the API key and the proxy base URL.

export AEGIS_API_KEY="aegis_..."
export OPENAI_BASE_URL="https://proxy.aegis.dev/v1"

Make Your First Request

Use the same request shape you would use with an OpenAI-compatible chat completions endpoint.

cURL

curl https://proxy.aegis.dev/v1/chat/completions \
  -H "Authorization: Bearer $AEGIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.2",
    "messages": [
      {"role": "system", "content": "You are a helpful coding assistant."},
      {"role": "user", "content": "Explain what this repository does in two sentences."}
    ]
  }'

Python

from openai import OpenAI
import os

client = OpenAI(
    base_url="https://proxy.aegis.dev/v1",
    api_key=os.environ["AEGIS_API_KEY"],
)

response = client.chat.completions.create(
    model="glm-5.2",
    messages=[
        {"role": "system", "content": "You are a helpful coding assistant."},
        {"role": "user", "content": "Explain what this repository does in two sentences."},
    ],
)

print(response.choices[0].message.content)

Node.js

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://proxy.aegis.dev/v1",
  apiKey: process.env.AEGIS_API_KEY,
});

const response = await client.chat.completions.create({
  model: "glm-5.2",
  messages: [
    { role: "system", content: "You are a helpful coding assistant." },
    { role: "user", content: "Explain what this repository does in two sentences." },
  ],
});

console.log(response.choices[0].message.content);

Choose A Model

Model IDs must match the exact values shown on `/models`, such as `glm-5.2`, `qwen3.5-397b`, or `kimi-k2.7-code`.

Aegis keys are not tied to one model. Switch models in your client or agent config without rotating the key.