Getting started

Quickstart

A complete first request in curl, Python, and TypeScript. Each example uses the base URL and the 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 openai
npm install openai

Send 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": "qwen/qwen3-30b-a3b",
    "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="qwen/qwen3-30b-a3b",
    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: "qwen/qwen3-30b-a3b",
  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 pages under API reference document each request body in full.