Get started

Quickstart

1. Get an API key

  1. Sign in to the dashboard and open a project. Every organization starts with one.
  2. Create an API key. It starts with ut_live_. It is shown once, so copy it now.
  3. Add credit on the Billing page. Requests fail with insufficient_credits when the balance is zero.

Export the key:

export UTMOST_API_KEY="ut_live_..."

2. Base URL

All examples use https://api.utmost.site/v1. Every client below lets you change it: baseURL in TypeScript, base_url in Python, or the UTMOST_BASE_URL environment variable for the Utmost SDKs.

3. First call

curl

curl https://api.utmost.site/v1/chat/completions \
  -H "Authorization: Bearer $UTMOST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "messages": [{"role": "user", "content": "Explain TLS session resumption in two sentences."}]
  }'

auto lets the router choose the model. Add -i to see the response headers that say which model ran and what it cost:

x-request-id: req_vhX379RVYQlmrhnWrPHvHUfU
x-utmost-model: utmost/qwen3-30b-a3b
x-utmost-route: auto->small/standard
x-utmost-input-tokens: 5
x-utmost-cached-tokens: 0
x-utmost-output-tokens: 22
x-utmost-cost-usd: 0.000007

TypeScript with the official OpenAI SDK

npm install openai
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.UTMOST_API_KEY,
  baseURL: "https://api.utmost.site/v1",
});

const completion = await client.chat.completions.create({
  model: "auto",
  messages: [{ role: "user", content: "Explain TLS session resumption in two sentences." }],
});
console.log(completion.choices[0].message.content);

TypeScript with the Utmost SDK

npm install @utmost/sdk
import { Utmost } from "@utmost/sdk";

const client = new Utmost(); // reads UTMOST_API_KEY

const { data, meta } = await client.chat.completions.create({
  model: "auto",
  messages: [{ role: "user", content: "Explain TLS session resumption in two sentences." }],
});
console.log(data.choices[0].message.content);
console.log(meta.model, meta.route, meta.costUsd);

Python with the official OpenAI SDK

pip install openai
import os
from openai import OpenAI

client = OpenAI(api_key=os.environ["UTMOST_API_KEY"], base_url="https://api.utmost.site/v1")

completion = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Explain TLS session resumption in two sentences."}],
)
print(completion.choices[0].message.content)

Python with the Utmost SDK

pip install utmost
from utmost import Utmost

client = Utmost()  # reads UTMOST_API_KEY

r = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Explain TLS session resumption in two sentences."}],
)
print(r.data["choices"][0]["message"]["content"])
print(r.meta.model, r.meta.route, r.meta.cost_usd)

4. Pin a model

To always use one model, pass its id instead of an alias. Pinned requests are never sent to a different model.

curl https://api.utmost.site/v1/chat/completions \
  -H "Authorization: Bearer $UTMOST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "utmost/llama-4-scout", "messages": [{"role": "user", "content": "Hello"}]}'

List model ids with GET /v1/models. It works without a key.

curl https://api.utmost.site/v1/models

Abliterated ids end in -abl and need a Verified organization. Without one, the call fails with tier_required.

Next