docs

API quickstart

Create a key, point an OpenAI-compatible client at the /v1 base URL, and choose a model ID. This page covers the first request and the mistakes that cause most support tickets.

Last updated: 2026-10-23

1. Create a key

Register with an account ID and password. There is no email step. In dashboard/keys, create a key and copy it immediately; the plaintext key is shown once. Set a daily cap if you want a hard spend limit.

2. Set the base URL

Base URL
https://abliteratly.beer/v1
Chat endpoint
POST https://abliteratly.beer/v1/chat/completions
Models
GET https://abliteratly.beer/v1/models
Auth
Authorization: Bearer sk-ub-...

3. Send a request

curl https://abliteratly.beer/v1/chat/completions \
  -H "Authorization: Bearer $ABLITERATLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "magnum-v4-72b",
    "messages": [{"role": "user", "content": "Reply with one sentence."}]
  }'

Python with the OpenAI SDK:

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://abliteratly.beer/v1",
    api_key=os.environ["ABLITERATLY_API_KEY"]
)

r = client.chat.completions.create(
    model="magnum-v4-72b",
    messages=[{"role": "user", "content": "Reply with one sentence."}]
)
print(r.choices[0].message.content)

Node with the OpenAI SDK:

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://abliteratly.beer/v1",
  apiKey: process.env.ABLITERATLY_API_KEY,
});

const r = await client.chat.completions.create({
  model: "magnum-v4-72b",
  messages: [{ role: "user", content: "Reply with one sentence." }],
});
console.log(r.choices[0].message.content);

4. Stream a response

Streaming uses the same endpoint with "stream": true. Read chunks until the stream ends. Handle client disconnects; a stream that never completes is still a failed request and should be retried with backoff.

stream = client.chat.completions.create(
    model="magnum-v4-72b",
    messages=[{"role": "user", "content": "Count to five."}],
    stream=True
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")

5. Tools and JSON mode

Tool calls and JSON mode work where the selected model supports them. Check the model page before building a loop around them. A model that is good at chat is not automatically good at structured tool calls. For a coding-agent setup, see coding agents.

6. Errors

StatusMeaningAction
401Invalid or missing keyCheck the Bearer header and revoke/recreate the key if needed.
402Insufficient credit for the holdLower max_tokens or top up.
404Model not found or disabledCopy a current model ID from the directory.
429Account rate limitHonour Retry-After and back off.
502/503Upstream failureRetry with backoff. Failed requests are not charged.

7. Billing

Usage is metered from the provider's token counts. Before a call, the maximum estimated cost is held against the balance; the unused amount is released after the response. Streaming responses include a final usage chunk with the charge in usage.cost (USD). See pricing for rates and OpenCode setup for a one-command client install.

Questions

What base URL should I use?

Use https://abliteratly.beer/v1. The SDK appends /chat/completions, so do not include that path in the base URL.

Why do I get 401?

The key is missing, revoked or sent without the Bearer prefix. Check the Authorization header.

Why do I get 404?

The model ID is disabled, misspelled or no longer in the catalog. Copy the ID from the model directory.

Why do I get 402?

The balance is below the maximum estimated cost of the request. Lower the output limit or add credit.

Create account - no emailSee pricingBrowse models