Connect

OpenAI-compatible API — point any existing SDK at the All AIs base URL and keep your code unchanged.

cURL

bash
curl https://YOUR-HOST/api/v1/chat/completions \
  -H "Authorization: Bearer $ALLAIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "allais/glm-5-2",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Python (OpenAI SDK)

python
from openai import OpenAI

client = OpenAI(
    base_url="https://YOUR-HOST/api/v1",
    api_key="YOUR_ALLAIS_KEY",
)

resp = client.chat.completions.create(
    model="allais/glm-5-2",
    messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)

JavaScript (OpenAI SDK)

js
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://YOUR-HOST/api/v1",
  apiKey: process.env.ALLAIS_API_KEY,
});

const resp = await client.chat.completions.create({
  model: "allais/glm-5-2",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(resp.choices[0].message.content);

Agent runs

bash
# Deploy an agent from the marketplace, then:
curl https://YOUR-HOST/api/v1/agents/AGENT_DEPLOYMENT_ID/runs \
  -H "Authorization: Bearer $ALLAIS_API_KEY" \
  -d '{"input": {"ticket": "My invoice is wrong"}}'

Endpoints

POST /api/v1/chat/completionsChat completions (OpenAI-compatible)
POST /api/v1/agents/:id/runsRun a deployed marketplace agent
POST /api/batchSubmit a batch inference job
POST /api/fine-tuningCreate a fine-tuning job
POST /api/sourcing/probeProbe live GPU market pricing