Skip to main content

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.

The messages endpoint implements the Anthropic Messages API format, letting you use the official Anthropic SDK with Darkbloom by pointing it at https://api.darkbloom.dev. The request and response shapes follow the Anthropic API specification; the coordinator routes the request through the same provider dispatch and attestation pipeline as all other inference endpoints.

Authentication

All inference endpoints require a Bearer token:
Authorization: Bearer eigeninference-...
When using the Anthropic SDK, pass your Darkbloom API key as the api_key argument alongside the custom base_url.

Request

model
string
required
The model ID to use. See Models for the list of available IDs.
messages
object[]
required
The conversation as an array of message objects. Each object must have:
  • role"user" or "assistant"
  • content — the message text (string)
max_tokens
integer
required
Maximum number of tokens to generate. Required in Anthropic format.
system
string
An optional system prompt that sets context or persona for the assistant.

Response

The response follows the Anthropic response shape with a content array.
id
string
Unique identifier for the request.
type
string
Always "message".
role
string
Always "assistant".
content
object[]
Array of content blocks. Text responses contain a single block with type: "text".
stop_reason
string
Why generation stopped. "end_turn" for natural completion; "max_tokens" if the token limit was reached.
usage
object

Examples

import anthropic

client = anthropic.Anthropic(
    base_url="https://api.darkbloom.dev",
    api_key="eigeninference-...",
)

message = client.messages.create(
    model="qwen3.5-27b-claude-opus-8bit",
    max_tokens=512,
    system="You are a helpful assistant.",
    messages=[
        {"role": "user", "content": "What is the difference between a process and a thread?"}
    ],
)

print(message.content[0].text)

Example response

{
  "id": "msg_01XFDUDYJgAACTvhG8fDDBEc",
  "type": "message",
  "role": "assistant",
  "content": [
    {
      "type": "text",
      "text": "A process is an independent program with its own memory space..."
    }
  ],
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 22,
    "output_tokens": 94
  }
}