> ## Documentation Index
> Fetch the complete documentation index at: https://docs.darkbloom.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart: call the Darkbloom API in 5 minutes

> Get an API key, send your first chat completion, and list available models using any OpenAI-compatible SDK. Works with Python, Node.js, and curl.

Darkbloom exposes an OpenAI-compatible API at `https://api.darkbloom.dev/v1`. If you've used the OpenAI SDK before, the only change is the base URL and your API key — everything else works the same way. This guide walks you through getting a key, making your first request, and exploring what's available.

<Steps>
  <Step title="Get an API key">
    Go to [darkbloom.dev](https://darkbloom.dev) and sign up for an account. Once you're logged in, open the console and create an API key. Your key will start with `eigeninference-`.

    <Warning>
      Store your API key somewhere safe. You won't be able to view it again after closing the creation dialog.
    </Warning>
  </Step>

  <Step title="Send your first chat completion">
    Point any OpenAI-compatible SDK at `https://api.darkbloom.dev/v1` and pass your API key. The request format is identical to the OpenAI Chat Completions API.

    <CodeGroup>
      ```python Python theme={null}
      from openai import OpenAI

      client = OpenAI(
          base_url="https://api.darkbloom.dev/v1",
          api_key="eigeninference-..."  # replace with your key
      )

      response = client.chat.completions.create(
          model="qwen3.5-27b-claude-opus-8bit",
          messages=[
              {"role": "user", "content": "Explain the difference between a mutex and a semaphore."}
          ]
      )

      print(response.choices[0].message.content)
      ```

      ```javascript Node.js theme={null}
      import OpenAI from "openai";

      const client = new OpenAI({
        baseURL: "https://api.darkbloom.dev/v1",
        apiKey: "eigeninference-...", // replace with your key
      });

      const response = await client.chat.completions.create({
        model: "qwen3.5-27b-claude-opus-8bit",
        messages: [
          { role: "user", content: "Explain the difference between a mutex and a semaphore." }
        ],
      });

      console.log(response.choices[0].message.content);
      ```

      ```bash curl theme={null}
      curl https://api.darkbloom.dev/v1/chat/completions \
        -H "Authorization: Bearer eigeninference-..." \
        -H "Content-Type: application/json" \
        -d '{
          "model": "qwen3.5-27b-claude-opus-8bit",
          "messages": [
            {"role": "user", "content": "Explain the difference between a mutex and a semaphore."}
          ]
        }'
      ```
    </CodeGroup>

    <Tip>
      `qwen3.5-27b-claude-opus-8bit` is a good general-purpose starting point — it's a frontier-quality reasoning model distilled from Claude Opus. See [available models](#list-available-models) below for the full catalog.
    </Tip>
  </Step>

  <Step title="List available models">
    To see which models are currently online and accepting requests, call `GET /v1/models`.

    <CodeGroup>
      ```python Python theme={null}
      models = client.models.list()

      for model in models.data:
          print(model.id)
      ```

      ```javascript Node.js theme={null}
      const models = await client.models.list();

      for (const model of models.data) {
        console.log(model.id);
      }
      ```

      ```bash curl theme={null}
      curl https://api.darkbloom.dev/v1/models \
        -H "Authorization: Bearer eigeninference-..."
      ```
    </CodeGroup>

    The response lists only models that have at least one provider currently online. If a model isn't in the list, no provider is serving it right now.

    | Model ID                                | Best for                                  |
    | --------------------------------------- | ----------------------------------------- |
    | `qwen3.5-27b-claude-opus-8bit`          | Frontier reasoning, Claude Opus distilled |
    | `mlx-community/gemma-4-26b-a4b-it-8bit` | Fast multimodal requests                  |
    | `mlx-community/Trinity-Mini-8bit`       | Fast agentic inference                    |
    | `mlx-community/Qwen3.5-122B-A10B-8bit`  | Highest quality reasoning                 |
    | `mlx-community/MiniMax-M2.5-8bit`       | State-of-the-art coding, \~100 tok/s      |
  </Step>

  <Step title="Stream a response">
    Add `stream=True` (Python) or `stream: true` (Node.js) to receive tokens as they're generated instead of waiting for the full response.

    <CodeGroup>
      ```python Python theme={null}
      stream = client.chat.completions.create(
          model="qwen3.5-27b-claude-opus-8bit",
          messages=[
              {"role": "user", "content": "Write a haiku about distributed systems."}
          ],
          stream=True
      )

      for chunk in stream:
          delta = chunk.choices[0].delta.content
          if delta:
              print(delta, end="", flush=True)
      ```

      ```javascript Node.js theme={null}
      const stream = await client.chat.completions.create({
        model: "qwen3.5-27b-claude-opus-8bit",
        messages: [
          { role: "user", content: "Write a haiku about distributed systems." }
        ],
        stream: true,
      });

      for await (const chunk of stream) {
        const delta = chunk.choices[0]?.delta?.content;
        if (delta) process.stdout.write(delta);
      }
      ```

      ```bash curl theme={null}
      curl https://api.darkbloom.dev/v1/chat/completions \
        -H "Authorization: Bearer eigeninference-..." \
        -H "Content-Type: application/json" \
        -d '{
          "model": "qwen3.5-27b-claude-opus-8bit",
          "messages": [
            {"role": "user", "content": "Write a haiku about distributed systems."}
          ],
          "stream": true
        }'
      ```
    </CodeGroup>

    The streaming response uses server-sent events, the same format as the OpenAI API. Each line is prefixed with `data:` and the stream ends with `data: [DONE]`.
  </Step>
</Steps>

## Using the Anthropic Messages API

Darkbloom also supports the Anthropic Messages API format at `/v1/messages`. Use this if your code is already written for the Anthropic SDK or if you prefer the `system` parameter as a top-level field.

```bash theme={null}
curl https://api.darkbloom.dev/v1/messages \
  -H "Authorization: Bearer eigeninference-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.5-27b-claude-opus-8bit",
    "max_tokens": 1024,
    "messages": [
      {"role": "user", "content": "What is the capital of France?"}
    ]
  }'
```

<Note>
  Darkbloom is an experimental research prototype. Do not use it in production applications.
</Note>
