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:
Authentication
All requests require a bearer token in the Authorization header:
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
| Endpoint | Description |
|---|---|
| Authentication | API key management and usage |
| Error Codes | Unified 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
| Endpoint | Method | Path | Description |
|---|---|---|---|
| Create a chat completion | POST | /v1/chat/completions | OpenAI-compatible chat, with streaming, tools and vision |
| Create a response | POST | /v1/responses | OpenAI Responses API (stateless subset) |
| Create a message | POST | /v1/messages | Anthropic-compatible Messages API, for Anthropic SDKs and tools |
| Create a text completion | POST | /v1/completions | OpenAI legacy text completions |
Embeddings & rerank
| Endpoint | Method | Path | Description |
|---|---|---|---|
| Create embeddings | POST | /v1/embeddings | Convert text to vector representations |
| Rerank documents | POST | /v1/rerank | Reorder documents by relevance to a query |
Images and models
| Endpoint | Method | Path | Description |
|---|---|---|---|
| Generate an image | POST | /v1/images/generations | Generate an image from a text prompt |
| List models | GET | /v1/models | List 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
3. Client libraries
- Python and JavaScript/TypeScript: configure the community
openaiclient withbase_url/baseURLset tohttps://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.aiand 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_paramsis 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/messagesand/v1/responses. - Media URLs. Image, audio, video and file URLs in a request must be
httporhttpsURLs on a public host, ordata: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, or400when it is sent withoutContent-Length. - Request IDs. Every response carries an
X-Request-IDheader; quote it when you contact support. You can send your ownX-Request-ID(1–128 characters ofA-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 do | Go 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