Skip to main content
Darkbloom exposes an OpenAI-compatible API at https://api.darkbloom.dev/v1. If you have used the OpenAI SDK before, the main changes are the base URL and your API key. This guide gets you a key, makes your first request, and shows how to discover the current model catalog. Have an Apple silicon Mac? You can also run models on your own Mac with a local OpenAI-compatible API, and pass only the requests it can’t take to the network.
1

Get an API key

Sign in at console.darkbloom.dev with your email address, open the API console page (/api-console), and create a key. The secret starts with sk-db- and is shown only once.
Store your API key somewhere safe. You cannot view it again after closing the creation dialog; rotate it if you lose it.
2

Find a model

GET /v1/models is the authoritative catalog. It lists each model’s ID, context limits, modalities and prices.
Pick one ID and export it:
A model that is listed but has no routable_providers is temporarily at capacity. Requests queue or return 429 with Retry-After; it is not a missing model.
3

Send your first chat completion

4

Stream a response

Add stream=True (Python) or stream: true (Node.js) to receive tokens as they are generated instead of waiting for the full response.
The streaming response uses server-sent events. Each event is a data: field carrying a JSON chunk, and the stream ends with data: [DONE]. There may be no output until a provider has produced the first content; a real error status can still arrive in that window.

Use the Responses API

POST /v1/responses is registered on the same handler as chat completions. Send an input field instead of messages:

Use the Anthropic Messages API

Darkbloom also serves POST /v1/messages. The coordinator reads credentials only from Authorization: Bearer, and the Anthropic SDK’s api_key option sends x-api-key instead, so pass the key as auth_token:

Handle errors

  • 401 authentication_error — missing or invalid bearer token.
  • 402 — the balance cannot cover the request’s worst-case reservation, or a key spend cap is exhausted.
  • 403 model_not_allowed — the key’s allowed_models list excludes the model.
  • 404 model_not_found — the ID is not in GET /v1/models.
  • 429 rate_limit_exceeded — wait for Retry-After.
  • 503 model_unavailable — no provider can serve the model right now.
Darkbloom is an experimental research prototype. Do not use it in production applications.