This guide assumes you have already obtained an API key. If you don't have one yet, contact denbi-cloud@bih-charite.de.
The API is compatible with the OpenAI Chat Completions format, so it works with any OpenAI client library or tool that supports custom endpoints.
You're not limited to curl or Python. Here are popular alternatives — all require you to configure the endpoint and API key in their settings. After configuring, remember to also select the model from our available models list when starting a conversation.
Run models locally on your own machine — no API key needed. Download and run open-weight models directly on your hardware for offline use.
A desktop GUI for chatting with LLMs. Supports multiple providers and custom OpenAI-compatible endpoints.
A clean, cross-platform chat interface. Works great with custom API endpoints for team use.
Disclaimer: These third-party tools are listed as examples only. We are not affiliated with, endorsed by, or responsible for any of these programs, their functionality, security, or improper usage. Please review each tool's privacy policy and terms of service independently. For official support, use the curl or Python examples provided in this guide.
General tip for GUI tools (Cherry Studio, Chatbox): Look for settings labeled "OpenAI Compatible", "Custom API", or "Remote Provider". Set the Base URL to our endpoint (https://denbi-llm-api.bihealth.org/v1) and the API Key you obtained from denbi-cloud@bih-charite.de. After configuring, don't forget to select the model — the model field can be any model ID from our available models list (e.g., gpt-oss-120b, qwen3.8-27b).
Use our endpoint from anywhere:
https://denbi-llm-api.bihealth.org/v1
check our page regularly for updates
Each model has a short identifier (model-id) that you pass in your request. Check the Available Models section on the main page for the full list.
gpt-oss-120b
qwen3.8-27b
gemma-4-31b
Set "model": "gpt-oss-120b" in the JSON body.
Replace YOUR_API_KEY with your API key:
curl https://denbi-llm-api.bihealth.org/v1/chat/completions -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"model": "gpt-oss-120b", "messages": [{"role": "user", "content": "What is the capital of France?"}], "max_tokens": 512}'
# Basic chat completion with max_tokens limit
curl https://denbi-llm-api.bihealth.org/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-oss-120b",
"messages": [
{"role": "user", "content": "What is the capital of France?"}
],
"max_tokens": 512
}'
Note: The endpoint path is /v1/chat/completions — this matches the OpenAI API structure exactly. The max_tokens parameter limits the response length.
Set up a Python virtual environment, install the OpenAI library, and make your first request:
# Create a virtual environment
python3 -m venv denbi-env
# Activate it (Linux/Mac)
source denbi-env/bin/activate
# Activate it (Windows PowerShell)
# .\denbi-env\Scripts\Activate.ps1
# Activate it (Windows CMD)
# denbi-env\Scripts\activate.bat
pip install openai
chat.py and add this code:from openai import OpenAI
client = OpenAI(
base_url="https://denbi-llm-api.bihealth.org/v1",
api_key="YOUR_API_KEY"
)
response = client.chat.completions.create(
model="gpt-oss-120b",
messages=[
{"role": "user", "content": "Explain DNA replication in one sentence."}
],
max_tokens=512
)
print(response.choices[0].message.content)
python chat.py
Tip: Replace YOUR_API_KEY with your API key. Store sensitive keys in environment variables, never hard-code them in production.
For long outputs, enable streaming to get tokens as they're generated:
from openai import OpenAI
client = OpenAI(
base_url="https://denbi-llm-api.bihealth.org/v1",
api_key="YOUR_API_KEY"
)
stream = client.chat.completions.create(
model="gpt-oss-120b",
messages=[{"role": "user", "content": "Write a short poem about bioinformatics."}],
max_tokens=1024,
stream=True
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")
Tip: Streaming is especially useful for interactive applications and long-form generation. The max_tokens parameter prevents excessively long responses.
| Parameter | Type | Description |
|---|---|---|
| model | string | The model ID to use (e.g., gpt-oss-120b) |
| messages | array | Array of message objects with role and content |
| max_tokens | integer | Maximum number of tokens to generate. Default: varies by model. Recommended: 512–2048. |
| stream | boolean | If true, tokens are sent as server-sent events. Default: false. |
Include previous messages to maintain context across turns. The model sees the full conversation history:
curl https://denbi-llm-api.bihealth.org/v1/chat/completions -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"model": "gpt-oss-120b", "messages": [{"role": "system", "content": "You are a helpful biology assistant."}, {"role": "user", "content": "What is CRISPR?"}, {"role": "assistant", "content": "CRISPR is a gene-editing technology..."}, {"role": "user", "content": "Can you explain it simpler?"}], "max_tokens": 512}'
curl https://denbi-llm-api.bihealth.org/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-oss-120b",
"messages": [
{"role": "system", "content": "You are a helpful biology assistant."},
{"role": "user", "content": "What is CRISPR?"},
{"role": "assistant", "content": "CRISPR is a gene-editing technology..."},
{"role": "user", "content": "Can you explain it simpler?"}
],
"max_tokens": 512
}'
Important: Longer conversations consume more tokens. Be mindful of your token usage for very long threads. Use max_tokens to control response length.
The API returns standard HTTP status codes and error messages:
| Status | Meaning | What to do |
|---|---|---|
| 200 | Success | Your response is in the JSON body |
| 401 | Unauthorized | Check your API key |
| 429 | Rate limited | Wait and retry with exponential backoff |
| 500 | Server error | Contact support if persistent |
Errors include a message field with details. Always check this when debugging.
max_tokens (e.g. 2048) to control response length and avoid surprises
Contact denbi-cloud@bih-charite.de for technical support, questions, or feedback.