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.
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.
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);
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="")
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.
| Status | Meaning | Action |
|---|---|---|
| 401 | Invalid or missing key | Check the Bearer header and revoke/recreate the key if needed. |
| 402 | Insufficient credit for the hold | Lower max_tokens or top up. |
| 404 | Model not found or disabled | Copy a current model ID from the directory. |
| 429 | Account rate limit | Honour Retry-After and back off. |
| 502/503 | Upstream failure | Retry with backoff. Failed requests are not charged. |
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.
Use https://abliteratly.beer/v1. The SDK appends /chat/completions, so do not include that path in the base URL.
The key is missing, revoked or sent without the Bearer prefix. Check the Authorization header.
The model ID is disabled, misspelled or no longer in the catalog. Copy the ID from the model directory.
The balance is below the maximum estimated cost of the request. Lower the output limit or add credit.