Start small.
See what happens.
One request, a readable answer, and the token usage returned with it.
Official API examples
The Oathbreaker AI examples repository contains small Python and JavaScript programs plus a Hermes walkthrough. The code is MIT-licensed and maintained for the Oathbreaker service operated by Formacha LLC.
Create an account, add prepaid credit, and create an API key in your console. Set OATHBREAKER_API_KEY in your server or terminal environment. Keep it out of browser applications, source control, and public issue reports.
git clone https://github.com/Oathbreaker-AI/api-examples.git
cd api-examplesJavaScript
Use Node.js 22 or newer. The example uses built-in fetch and does not require installing a package. Read the complete JavaScript source before running it.
node javascript/hello.mjsPython
Use Python 3.10 or newer. The example uses the standard library. Read the complete Python source before running it.
python3 python/hello.pyWhat the examples do
Each sends one non-streaming Chat Completions request using oathbreaker-glm-5.3, low reasoning effort, and a 2,048-token output budget. It prints the completed answer and usage. Reasoning counts toward the output budget.
Running either example with a real key uses prepaid credit. The examples do not retry automatically. If a request times out or reaches its output limit, inspect your usage before sending another request. Review current pricing, errors and retry behavior, and data handling.
The repository tests run both languages against a local fixture server without paid inference. They verify authentication, request format, usage handling, and errors. They do not measure live model quality or latency.
Hermes, streaming, and tools
For an agent, follow the Hermes setup guide. For your own application, use the streaming reference and function-calling reference. Your application validates and executes tools; these introductory examples only request text.
Questions about these examples belong in the public repository. For account or billing questions, email support@oathbreaker.ai.