Send your first request to Darkbloom's OpenAI-compatible API.
- A Darkbloom account. Sign up at console.darkbloom.dev.
- An API key. Create one in Settings → API Keys in the console, or via
POST /v1/keysauthenticated with a Privy JWT (see authentication.md).
https://api.darkbloom.dev/v1
Send a Bearer token in the Authorization header. requireAuth accepts either an API key (sk-db-...) or a Privy JWT (eyJ...), but the console/web flows require Privy and sensitive key-management endpoints reject API keys entirely (coordinator/api/server.go:1776-1888).
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.darkbloom.dev/v1/modelsfrom openai import OpenAI
client = OpenAI(
base_url="https://api.darkbloom.dev/v1",
api_key="YOUR_API_KEY",
)
response = client.chat.completions.create(
model="gemma-4-26b", # use the ID returned by GET /v1/models
messages=[{"role": "user", "content": "Hello, Darkbloom!"}],
stream=True,
)
for chunk in response:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")curl -X POST https://api.darkbloom.dev/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemma-4-26b",
"messages": [{"role": "user", "content": "Hello!"}],
"stream": true
}'import anthropic
client = anthropic.Anthropic(
base_url="https://api.darkbloom.dev/v1",
api_key="YOUR_API_KEY",
)
response = client.messages.create(
model="gemma-4-26b",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}],
)Models are loaded from the coordinator's DB-backed model registry, not hardcoded in the consumer docs. The authoritative list is always:
GET /v1/modelsYou can also use the provider-facing catalog at GET /v1/models/catalog. Aliases such as gemma-4-26b may resolve to different concrete builds over time; the consumer endpoint hides build details and exposes only the public alias (coordinator/api/model_alias_handlers_test.go:956-962).
Darkbloom uses per-token pricing. Platform-set model prices are returned by GET /v1/pricing; if no platform price is configured, the fallback is $0.05 per 1M input tokens and $0.20 per 1M output tokens (coordinator/payments/pricing.go:24-29). Every charged request has a $0.0001 (100 micro-USD) minimum (coordinator/payments/pricing.go:31-32).
During public alpha the platform fee is 0%, so providers keep 100% of the per-token revenue (coordinator/payments/pricing.go:39-43).
Requests routed to your own provider machine via self-route are not charged. See self-route.
- API Contracts — endpoint details and request/response schemas
- Authentication — API keys, Privy JWTs, and per-key limits
- Billing — deposits, usage, and balance
- Models — how the model catalog works
- Privacy Expectations — what the coordinator can and cannot see