Skip to main content
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:
When using the Anthropic SDK, pass your Darkbloom API key as the api_key argument alongside the custom base_url.

Request

string
required
The model ID to use. See Models for the list of available IDs.
object[]
required
The conversation as an array of message objects. Each object must have:
  • role"user" or "assistant"
  • content — the message text (string)
integer
required
Maximum number of tokens to generate. Required in Anthropic format.
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.
string
Unique identifier for the request.
string
Always "message".
string
Always "assistant".
object[]
Array of content blocks. Text responses contain a single block with type: "text".
string
Why generation stopped. "end_turn" for natural completion; "max_tokens" if the token limit was reached.
object

Examples

Example response