API Documentation
BadAssModeles is a drop-in OpenAI-compatible API. If a tool speaks OpenAI, it speaks BadAssModeles.
The two things every tool asks for
Base URL: https://badassmodel.com/v1
API Key: sk-bam-... (Dashboard → API Keys → Create key)
curl (the 30-second test)
curl https://badassmodel.com/v1/chat/completions \
-H "Authorization: Bearer sk-bam-..." \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-r1",
"stream": true,
"messages": [{"role": "user", "content": "hello"}]
}'List models: curl https://badassmodel.com/v1/models -H "Authorization: Bearer sk-bam-..."
Pick your model
Every model you can call is in GET /v1/models. Take the id of the one you want and put it in the "model" field of your request — that’s the whole selection mechanism, same as OpenAI.
curl https://badassmodel.com/v1/models -H "Authorization: Bearer sk-bam-..."
→ {"data": [
{"id": "euryale-l3.3-70b-uncensored", "kind": "chat", ...},
{"id": "qwen3-vl-235b-instruct", "kind": "chat", ...},
{"id": "flux-1-dev", "kind": "image", ...},
{"id": "kokoro-82m", "kind": "tts", ...},
...]}The kind tells you which endpoint serves it: chat → /chat/completions, image → /images/generations,tts → /audio/speech. The live list with per-model prices is on the pricing page.
Vision: chat models with vl or vision in the name (e.g. qwen3-vl-235b-instruct) accept images via OpenAI content parts —{"type": "image_url", "image_url": {"url": "https://…"}} alongside your text.
Python (official openai SDK)
from openai import OpenAI
client = OpenAI(base_url="https://badassmodel.com/v1", api_key="sk-bam-...")
stream = client.chat.completions.create(
model="deepseek-r1",
messages=[{"role": "user", "content": "hello"}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")OpenCode
export BADASS_API_KEY=sk-bam-...
# add to ~/.config/opencode/opencode.json:
{
"provider": {
"badassmodeles": {
"npm": "@ai-sdk/openai-compatible",
"name": "BadAssModeles",
"options": { "baseURL": "https://badassmodel.com/v1", "apiKey": "{env:BADASS_API_KEY}" },
"models": { "deepseek-r1": { "name": "DeepSeek R1" } }
}
}
}Cursor / VS Code (Cline, Roo, Continue) / Open WebUI / SillyTavern
Choose OpenAI Compatible as the provider and fill in:
Base URL: https://badassmodel.com/v1
API Key: sk-bam-...
Model: any id from GET https://badassmodel.com/v1/models
Image generation
OpenAI-shaped POST /v1/images/generations. Billed flat per image returned (see pricing); n is capped at 4.
curl https://badassmodel.com/v1/images/generations \
-H "Authorization: Bearer sk-bam-..." \
-H "Content-Type: application/json" \
-d '{
"model": "flux-1-schnell",
"prompt": "a cat riding a skateboard",
"n": 1,
"size": "1024x1024"
}'Returns {"created": ..., "data": [{"b64_json": "..."}]}.
Text to speech
OpenAI-shaped POST /v1/audio/speech. Billed per input character.
curl https://badassmodel.com/v1/audio/speech \
-H "Authorization: Bearer sk-bam-..." \
-H "Content-Type: application/json" \
-d '{
"model": "kokoro-82m",
"input": "The quick brown fox jumps over the lazy dog"
}' \
--output speech.wavReturns raw audio bytes (audio/wav or audio/mpeg).
Billing & limits
Prepaid credits only — $1 = 1 credit. Deposit via crypto (NOWPayments, no fee) or Whop (card, Apple Pay, more — 5% processing fee, so a $50 deposit adds 47.50 credits); $5 minimum. Every request is billed from your balance — per token for chat, per image for generations, per character for speech — no balance, no requests (HTTP 402). 60 requests/min per key. Deposit any amount from $5 up; a single deposit of $50+, $100+, or $200+ permanently unlocks lower rates (see pricing). All deposits are final — no refunds.