Quickstart
Make your first Merius API call in curl, Python, or TypeScript. Point the OpenAI client at the base URL and call any model.
A complete first request in curl, Python, and TypeScript. Each example uses the base URL and your API key from Authentication. Swap the model slug for any model we serve.
Install a client (optional)
There is no Merius package to install. Because the API is OpenAI-compatible, the official OpenAI SDKs work directly — install the one for your language if you do not already have it:
# curl is already on your system — nothing to install.pip install openainpm install openaiSend a request
Set the base URL and key once, then call /chat/completions. The base URL is the only line that
differs from a call to OpenAI:
curl https://api.merius.ai/v1/chat/completions \
-H "Authorization: Bearer $MERIUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "z-ai/glm-5.1",
"messages": [{"role": "user", "content": "Hello"}]
}'import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.merius.ai/v1", # the one line that changes
api_key=os.environ["MERIUS_API_KEY"],
)
resp = client.chat.completions.create(
model="z-ai/glm-5.1",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.merius.ai/v1", // the one line that changes
apiKey: process.env.MERIUS_API_KEY,
});
const resp = await client.chat.completions.create({
model: "z-ai/glm-5.1",
messages: [{ role: "user", content: "Hello" }],
});
console.log(resp.choices[0].message.content);Where to go next
From here, stream responses token by token, give the model tools to call, or ask for JSON you can parse. The API reference documents every request body in full.