Python & JavaScript
Use an OpenAI-compatible SDK for enabled Chat Completions models.
Documentation preview. Existing API behavior remains authoritative. Orbis route activation and retail pricing are still pending.
JavaScript
Install the openai package and configure the key in your server environment.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.BADASSMODEL_API_KEY,
baseURL: "https://badassmodel.com/v1",
});
const result = await client.chat.completions.create({
model: "ENABLED_MODEL_ID",
messages: [{ role: "user", content: "Hello" }],
max_tokens: 128,
});
console.log(result.choices[0].message.content);Python
Install openai and use a model ID returned by the live catalog.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["BADASSMODEL_API_KEY"],
base_url="https://badassmodel.com/v1",
)
result = client.chat.completions.create(
model="ENABLED_MODEL_ID",
messages=[{"role": "user", "content": "Hello"}],
max_tokens=128,
)
print(result.choices[0].message.content)Tool configuration
For tools with a custom OpenAI-compatible provider, set the base URL to https://badassmodel.com/v1 and use a BadAssModel API key. Claude Code and Codex may require other protocols: their upstream guides are not proof those endpoints are enabled here.