Connect
OpenAI-compatible API — point any existing SDK at the All AIs base URL and keep your code unchanged.
cURL
bashcurl 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)
pythonfrom 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)
jsimport 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/completions | Chat completions (OpenAI-compatible) |
| POST /api/v1/agents/:id/runs | Run a deployed marketplace agent |
| POST /api/batch | Submit a batch inference job |
| POST /api/fine-tuning | Create a fine-tuning job |
| POST /api/sourcing/probe | Probe live GPU market pricing |