One API.
A different starting point.
Text chat completions, prepaid usage, and a familiar request format. Get complete responses or stream tokens as they arrive.
Connect to the API
Using Hermes, OpenCode, OpenWork, or Pi? Follow the agent setup guides.
Use an Oathbreaker API key and account credit to send requests from your application. Set OATHBREAKER_BASE_URL to https://oathbreaker.ai/v1. Use this same base URL in SDKs and agent settings; do not append a second /v1.
01 / Your first request
Create an API key in your console and store it in your server’s environment. Set your base URL and send a text request using your account credit.
curl "$OATHBREAKER_BASE_URL/chat/completions" \
-H "Authorization: Bearer $OATHBREAKER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "oathbreaker-glm-5.3",
"messages": [
{"role": "user", "content": "Suggest three ways to approach this idea."}
],
"max_tokens": 2048,
"reasoning_effort": "low",
"stream": false
}'Using the OpenAI Python SDK
The endpoint uses the Chat Completions format. Other OpenAI APIs and features are not implied by this compatibility.
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["OATHBREAKER_BASE_URL"],
api_key=os.environ["OATHBREAKER_API_KEY"],
timeout=650.0,
max_retries=0,
)
response = client.chat.completions.create(
model="oathbreaker-glm-5.3",
messages=[{"role": "user", "content": "Explore a different perspective."}],
max_tokens=2048,
reasoning_effort="low",
stream=False,
)
print(response.choices[0].message.content)02 / Keys & account access
Sign in to access your account console. API requests use an Oathbreaker key in the Authorization: Bearer … header. These are separate forms of authentication.
- New key secrets are shown once. Copy them to a password manager or server-side secret store.
- Keep keys out of browser code, public repositories, screenshots, and support messages.
- Create separate keys for separate applications. Revoke a key in the console when it is no longer needed or may have been exposed.
- Requests made with an active key use your account’s available credit.
- Use a server, local agent, or backend proxy. Cross-origin browser requests are not enabled; never embed a secret key in a public website.
03 / Model & limits
Use oathbreaker-glm-5.3 for text chat completions. The active gateway limits are listed below. Input is measured with the pinned GLM tokenizer. Input, output and safety headroom share the context window.
| Property | Configuration |
|---|---|
| Model alias | oathbreaker-glm-5.3 |
| Input admission budget | 131,072 tokens: input + safety headroom + requested output |
| Request size / history | 1,048,576 bytes; up to 256 messages. Both limits apply independently. |
| Maximum output | 32,768 tokens per request, including reasoning |
| Input / output | Text / text |
| Function calling | Supported; tools execute in your application |
| Reasoning | Low, high, or max effort |
| Response mode | Complete response or SSE stream |
| Prices / 1M tokens | $3 input; $0.3 cached input; $5 output. |
Context admission counts input with the pinned GLM tokenizer, then adds safety headroom and the requested output budget. All three share the allowance above. Reduce conversation history, tool schemas, or the output budget if a request exceeds the limit.
GLM-5.3 Abliterated, served through Refuseless, is based on GLM by Z.ai. Oathbreaker provides the API and account experience; the underlying model authors retain attribution.
Response time varies with context size, output length, and reasoning effort. Keep your client connected while a request completes. Requests have a ten-minute upstream deadline; a maximum output budget does not guarantee that every generation finishes before that deadline. The Python example allows time for a response and disables automatic retries.
04 / Request shape
POST /v1/chat/completions accepts text messages and can return a complete response or an SSE stream. Use the supported fields below.
| Field | Use |
|---|---|
model | Use oathbreaker-glm-5.3. Discover the active alias with GET /v1/models, or retrieve it with GET /v1/models/oathbreaker-glm-5.3, using your API key. |
messages | An array of text messages with role and content. Use system, user, or assistant roles. Tool workflows also use assistant tool_calls and matching tool result messages. |
max_tokens / max_completion_tokens | Requested output budget, up to 32,768 tokens. The examples use 2,048. If omitted, the budget is 8,192 tokens. Use one budget field per request. Reasoning and final-answer tokens share this budget. |
temperature | Optional, from 0 to 2. |
top_p | Optional, from 0 to 1. |
stream | Use false for a complete response, or true for SSE streaming. |
reasoning_effort | low (default), high, or max. Higher effort can increase response time and output-token usage. |
response_format | Optional {"type":"json_object"}. Instruct the model to return JSON and validate it in your application; JSON Schema mode is not supported. |
tools | Up to 128 named function definitions with JSON object parameter schemas. Strict schema enforcement is not supported. |
tool_choice | auto, none, required, or a named function from your supplied tools. |
parallel_tool_calls | Optional boolean controlling whether the model may request multiple function calls. |
This endpoint supports text input and output. Image inputs, audio, and embeddings are not supported.
Function calling
Provide your function definitions in tools. When a response contains message.tool_calls, validate its arguments and execute the requested functions in your own application. Oathbreaker returns function requests; it does not execute your tools.
Append the assistant message, then one tool message for every call, with a matching tool_call_id and a text result. Return all requested results before asking for the next completion. Preserve the assistant’s reasoning_content when it is present in a tool conversation. Assistant messages also accept reasoning as an alias. If you send both fields, use the same text.
Function calls work in complete responses and SSE streams. Assemble streamed function names and argument fragments before executing a tool. Each function call supports up to 64 KiB of UTF-8 arguments. The dashboard playground remains a text-only client; use your application or Hermes for tool workflows.
05 / Stream a response
Set stream: true and use stream_options: { include_usage: true } to request server-sent events. The stream includes a final usage chunk for accounting.
The optional stream_options object is accepted only with streaming. Its include_usage value may be true or false, but the service requests upstream usage and includes the final usage chunk regardless, so request costs can be settled.
Responses may include reasoning_content alongside final text; streamed reasoning arrives in delta fields. Reasoning tokens count toward output usage and the requested output budget.
Cancelling stops the upstream connection. If final usage is already confirmed, it is charged once; otherwise Oathbreaker releases the reservation without charging for unconfirmed usage. A cancelled request can occupy a generation slot for up to 15 seconds while the connection drains. If the gateway is interrupted before cleanup, its saved deadline allows recovery on the next account visit or API request after 11 minutes. Never execute an incomplete tool call or automatically replay an interrupted action.
06 / Prepaid, metered usage
The console shows available credit, held credit, and request usage. An output budget lets the service reserve enough credit before sending a request. Completed usage is then charged at the rates saved when that request began.
Recognized cache reads use the cached-input rate shown above. Cached tokens are a subset of prompt_tokens, reported in usage.prompt_tokens_details.cached_tokens when available; they are not charged again at the ordinary input rate. All other input uses the ordinary rate. A repeated prompt does not guarantee a cache hit. Reasoning tokens, when present, are included in completion tokens and charged once at the output rate.
A held balance is credit reserved for a request, not necessarily a final charge. Reservations assume ordinary input pricing because cache hits are known only after completion; settlement applies verified cached usage. Repeated interrupted requests are subject to a temporary recovery allowance. Billing-write failures and payment disputes still require review; cancellation never clears those protections. Check usage before repeating a request.
API and playground requests use the same account balance and token rates.
Rate limits
Each account can run 2 simultaneous generations and start up to 20 requests per minute, shared across its keys. The service currently admits 20 simultaneous generations in total. Requests awaiting billing reconciliation occupy a generation slot until resolved.
HTTP requests also have abuse limits. A 429 response is a temporary admission decision, not a token charge. Contact support@oathbreaker.ai before planning a larger workload. Higher capacity is arranged and tested before activation.
07 / Errors & retries
Errors use an error object with a human-readable message and a machine-readable code and type. Save the X-Request-Id response header or error.request_id for support. Accepted inference requests also appear by ID and time in your console’s Usage tab. A billing-review response does not mean your key was revoked.
- Check your key, configured model, account balance, and request limits before retrying a rejected request.
- A network timeout does not prove that upstream processing stopped. Check usage and held credit before repeating a request.
- SDKs may retry automatically. Review those defaults before enabling production traffic, particularly when costs or duplicate work matter.
- HTTP 429 includes
Retry-Afterin seconds. Wait at least that long before a new attempt. HTTP 401 means the key is missing, invalid, or revoked; HTTP 403 identifies an account restriction. - Only Chat Completions and model discovery are supported. Responses, Anthropic Messages, legacy Completions, and embeddings return a JSON
unsupported_endpointerror. - If inference is unavailable, wait for service to resume before retrying.