Zum Inhalt springen
DeutschlandGPT

Platform API

An OpenAI-compatible REST API that brings DeutschlandGPT's AI models into your own applications, hosted on German infrastructure.

The DeutschlandGPT Platform API gives your own software access to the same AI models as the chat: text generation, embeddings, images, video, avatar video, speech and transcription. It speaks the OpenAI wire format and, for Claude Code and the Anthropic SDK, the Anthropic one.

Base URLs for your deployment: https://api.deutschlandgpt.de/v2 for the OpenAI-compatible endpoints, https://api.deutschlandgpt.de/anthropic for the Anthropic-compatible ones. The two are siblings, so the Anthropic base URL never sits below /v2.

SurfaceHostedSelf-hosted
OpenAI-compatiblehttps://api.deutschlandgpt.de/v2https://<your-domain>/platform-api/api/v2
Anthropic-compatiblehttps://api.deutschlandgpt.de/anthropichttps://<your-domain>/platform-api/api/anthropic

Append the endpoint path to the OpenAI-compatible base URL, for example /chat/completions. The Anthropic SDK appends /v1/messages itself.

What you can do

  • Chat completions and responses: send messages and get answers, with streaming, function calling and structured output, on /chat/completions or /responses.
  • Anthropic Messages: a native Anthropic Messages endpoint, so the Anthropic SDK and Claude Code work unmodified against every hosted model.
  • Web search: run a live web search and get ranked results with title, URL and snippet.
  • Embeddings: turn text into vectors for semantic search, classification and clustering.
  • Images: generate images from a prompt or edit existing ones.
  • Video and avatar video: generate short videos from a prompt, or talking-head videos from a script. You can create your own avatar from a photo. Both kinds of video run as an asynchronous job you poll.
  • Speech, voices and music: turn text into audio, clone a voice from audio samples, and generate music from a prompt.
  • Transcription: turn audio files into text, with an optional language hint.
  • Document folders: create folders, upload files and search your organisation's documents semantically.
  • Custom GPTs: create and manage Custom GPTs with their own instructions, files and model settings.
  • API key permissions: restrict keys to specific models, folders and Custom GPTs, with spending limits.
  • Admin analytics: monitor usage across your workspace by day, model and key.

The Models endpoint tells you which models your workspace can use.

Who can use it

In an organisation, the Platform API needs the role permission Use the Platform API and manage API keys. Buying credits and changing spending limits needs Manage credits and spending limits. Your administrator grants both in the role settings.

How billing works

Each request costs money according to the model and the tokens, images or seconds it uses. The cost is charged to your workspace, which holds the credit balance, payment methods and API keys. You don't create a workspace yourself: it is set up automatically the first time you open the Platform API. In an organisation, all members share one workspace.

Most workspaces are prepaid: you buy credits up front and each request deducts its cost. Some organisations are instead billed by invoice under an agreement with DeutschlandGPT. Details for both: Billing.

The same balance also pays for pay-as-you-go chat and for Workflows. The overview of the Platform API shows Spend this month, split by product, for example Chat (pay-as-you-go), API and Workflows.

Every model's price is public: Models & pricing lists the rates for text models, embeddings and images. No account needed.

Before your first call you need an API key and, on a prepaid workspace, some credit. See Quickstart.

Authentication

Every request must include an Authorization header with a Bearer token:

CODE
Authorization: Bearer YOUR_API_KEY

API keys are created and managed from the Platform API dashboard.

OpenAI compatibility

The API follows the OpenAI API specification for /chat/completions, /responses, /embeddings, /images/generations, /images/edits, /audio/speech and /audio/transcriptions. You can point any OpenAI-compatible SDK or tool at the DeutschlandGPT base URL with minimal configuration changes.

Anthropic compatibility

The API also speaks Anthropic's Messages wire format at /anthropic/v1/messages. Point the Anthropic SDK or Claude Code at https://api.deutschlandgpt.de/anthropic (the SDK's baseURL option, or the ANTHROPIC_BASE_URL environment variable) and authenticate with x-api-key. Every hosted model is then reachable through this wire format, not just Claude. A self-hosted instance uses https://<your-domain>/platform-api/api/anthropic.

The Anthropic base URL is a sibling of /v2, not a path inside it. The SDK appends /v1/messages itself, so https://api.deutschlandgpt.de/anthropic is correct while https://api.deutschlandgpt.de/v2/anthropic returns 404.

See Create a message for the full reference.


Was this page helpful?