Getting started
Authentication
Every /v1/* endpoint expects a bearer token. Keys are prefixed with
obsidianx- followed by a 32-character secret. Keep it server-side — never ship it in a browser bundle.
Authorization: Bearer obsidianx-<32-char-key>
You'll get a 401 back immediately, before any tokens are billed. Rotate compromised keys right away.
Don't have a key?
Join our Discord and run /register to get your token API key instantly. It's the only place keys and credits come from — no sign-ups, no payments.
Quickstart
Already on the OpenAI SDK? Change two lines — the base URL and the key — and every model on the pricing table is yours.
curl https://obsidian-x-api.vercel.app/v1/chat/completions \
-H "Authorization: Bearer $OBSIDIANX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"messages": [{ "role": "user", "content": "Hello" }]
}'
/v1/chat/completions
OpenAI-compatible chat completion. Supports streaming via SSE, tool calling, JSON mode, deterministic seeds and reasoning tokens. Streaming responses are billed on the final aggregated usage.
{
"model": "deepseek-v4-flash",
"messages": [{ "role": "user", "content": "Hello" }],
"stream": false,
"temperature": 0.7,
"max_tokens": 2048
}
{
"id": "chatcmpl-…", "choices": [ … ],
"x_obsidian": {
"cost": 0.0002, // billed for this call ($)
"balance": 9.54 // remaining balance ($)
}
}
See how the model thinks