API Reference Overview

Complete reference for the Bitdeer AI inference APIs — endpoints, parameters, and response schemas.

Base URL

All API requests should be made to:

https://api-inference.bitdeer.ai/v1

Authentication

All requests require a bearer token in the Authorization header:

Authorization: Bearer {API_KEY}

Get your key from Bitdeer AI Console → API Keys. See Authentication for full details, including the Anthropic-style x-api-key header.

API groups

Basic APIs

EndpointDescription
AuthenticationAPI key management and usage
Error CodesUnified error response format and retry guidance

Inference API

OpenAI-compatible and Anthropic-compatible HTTP endpoints. The model field of every request takes a model code from List models or the Model Catalog.

Text generation

EndpointMethodPathDescription
Create a chat completionPOST/v1/chat/completionsOpenAI-compatible chat, with streaming, tools and vision
Create a responsePOST/v1/responsesOpenAI Responses API (stateless subset)
Create a messagePOST/v1/messagesAnthropic-compatible Messages API, for Anthropic SDKs and tools
Create a text completionPOST/v1/completionsOpenAI legacy text completions

Embeddings & rerank

EndpointMethodPathDescription
Create embeddingsPOST/v1/embeddingsConvert text to vector representations
Rerank documentsPOST/v1/rerankReorder documents by relevance to a query

Images and models

EndpointMethodPathDescription
Generate an imagePOST/v1/images/generationsGenerate an image from a text prompt
List modelsGET/v1/modelsList the published models

Quick start

1. Get your API key

Visit Bitdeer AI Console → API Keys to create and manage your keys.

2. Make your first request

curl https://api-inference.bitdeer.ai/v1/models \
  -H "Authorization: Bearer YOUR_API_KEY"

3. Client libraries

  • Python and JavaScript/TypeScript: configure the community openai client with base_url / baseURL set to https://api-inference.bitdeer.ai/v1. Request and response bodies match the HTTP API schemas.
  • Anthropic SDKs and tools built on them: set the base URL to https://api-inference.bitdeer.ai and call Create a message.

Request conventions

  • Extra parameters. For model-specific parameters with no OpenAI or Anthropic equivalent, put them under extra_params; they are merged into the top level of the request before it reaches the model, and a standard top-level field of the same name wins. extra_params is honoured on every endpoint except /v1/responses. Unknown top-level fields are forwarded to the model on chat, completions, embeddings, rerank and image requests, and ignored on /v1/messages and /v1/responses.
  • Media URLs. Image, audio, video and file URLs in a request must be http or https URLs on a public host, or data: URIs. At most 32 such URLs are allowed per request.
  • Request size. Request bodies are limited to 32 MiB. A larger body is rejected with 413, or 400 when it is sent without Content-Length.
  • Request IDs. Every response carries an X-Request-ID header; quote it when you contact support. You can send your own X-Request-ID (1–128 characters of A-Z a-z 0-9 . _ -) and it is echoed back; any other value is replaced by a generated ID.

Common use cases

What you want to doGo to
"How to get started?"Get Started + Authentication
"API error, status 401"Error Codes
"Generate text with LLM"Create a chat completion
"Use an Anthropic SDK or tool"Create a message
"Understand images with a VLM"Vision guide
"Build a RAG pipeline"RAG example
"Use function calling"Function Calling guide
"Stream responses"Streaming guide
"See all models"Model Catalog
"Connect to Cursor / LangChain"Integrations
"How do chat requests work?"LLM guide

Error handling

Errors use the OpenAI error envelope, except on /v1/messages, which uses the Anthropic envelope. See Error Codes for the complete reference.

Last updated on

On this page