Hetzner Inference API

Source: hetzner.com
463 points by PaoloBarbolini 9 hours ago on hackernews | 154 comments

Hetzner Inference API

OpenAI-compatible
AI inference

Keep full control with the Hetzner Inference API. Use the latest open-weight models at transparent prices with zero data retention.

Four reasons to choose Hetzner

AI inference on your terms

You decide what your AI project will look like and how much it will cost. Choose the right plan and pay only for what you actually use—with no subscription fees or hidden costs. Your data stays in the EU and is neither stored nor shared.

Zero data retention

We do not store chat histories or generated output. None of this is used for training purposes.

Hosted in Europe

Without exception, the models run in our own data centers: GDPR-compliant and ISO 27001-certified.

Cost control

You can see how much your usage costs at any time, and you can set your own upper limit using usage limits.

Prompt caching

Here's where you can save money: For recurring prompts, we charge a much lower rate for your input tokens.

Open-weight models

Whether you're looking for an all-rounder or a specialized model, you'll find the right fit here. Openly available, no lock-in.

Ready to go

Create an API token in the Hetzner Console, select a model, and get started right away.

Model

We count everything you send to the model (prompts, attachments, chat history) as input tokens and bill you per million tokens.

The model’s responses are calculated as output tokens. The price is calculated per million output tokens.

Actions

GLM 5.3 Flash

Chat, code, vision

€ 0.1000, excl. VAT /mio. tokens € 0.0250, excl. VAT /mio. tokens cached

€ 0.4000, excl. VAT /mio. tokens

GLM 5.3

Chat, code

€ 0.6300, excl. VAT /mio. tokens € 0.1580, excl. VAT /mio. tokens cached

€ 2.5200, excl. VAT /mio. tokens

Kolibri 1

Chat, code

€ 0.0700, excl. VAT /mio. tokens € 0.0180, excl. VAT /mio. tokens cached

€ 0.2800, excl. VAT /mio. tokens

BGE M3

Embedding

€ 0.0100, excl. VAT /mio. tokens

free

100% renewable grid electricity

Waterless cooling

Hosted in Europe

Easy to migrate thanks to
the OpenAI-compatible API

In just three steps, you can migrate existing applications and workflows to the Hetzner Inference API.

1

Set base URL

Replace the current base URL with Hetzner's API endpoint.

Inference Grafiken Hetzner Inference API Swap Base URL

2

Add API Key

Create an API token and store it as an API key in your application.

Inference Grafiken Hetzner Inference API Key

3

Run your app

Select an available model and get started with the Hetzner Inference API.

Inference Grafiken Hetzner Inference API Play

from openai import OpenAI

client = OpenAI(
    base_url="https://inference.hetzner.com/v1",
    api_key="<YOUR_INFERENCE_TOKEN>",
)

r = client.chat.completions.create(
    model="zai-org/GLM-5.3-Flash",
    messages=[{"role": "user", "content": "Hello!"}],
)

print(r.choices[0].message.content)

Getting started made easy

The Hetzner Inference API can be integrated into many different applications and workflows. In the first tutorial, we’ll show you how to set it up in just a few steps. Afterward, you’ll see how you can use the Hetzner Inference API with OpenCode for AI-powered programming, with n8n for workflow automation, and with Open WebUI as a chat interface.

Inference Grafiken Hetzner Inference API Experiments Blog 2 01

How an experiment turned into a finished product

Here you can read about how it all began. The Hetzner Inference API started as an experiment in which we provided our customers with a free prototype so we could gain and share experiences together. You can read about the lessons we learned from this in the blog post.

Whether for personal projects or business: Many of you have been asking for an inference API. That’s what your feedback on our experiment showed us.

openingQuote

This is what we were looking for a long time. Processing our sensitive data in Europe, without influence of American or Chinese companies.

Jens Grünwald

, AI Engineer at ChurchTools Innovations GmbH

Frequently asked questions

  • For complex coding and agent tasks, use GLM 5.3. For quick answers, use GLM 5.3 Flash. It’s also the only model that processes images. Kolibri 1 handles German and English and works well for chat and RAG. Use BGE M3 to create embeddings. Test the models with your own use case. We bill based on usage, so a comparison costs very little.

  • Yes. The API offers /v1/chat/completions, /v1/responses, /v1/embeddings, and the Anthropic interface /v1/messages. The OpenAI SDK, OpenCode, Open WebUI, and other OpenAI-compatible tools continue to work. You only need to change the base URL and the token. Some endpoints are not available, such as /v1/completions and /v1/batches. You can find the complete list in our docs.

  • No. Initial tests usually cost only a few cents. Create your own inference token with a usage cap of 1 € for your tests. The spending cap keeps your testing costs low from the start. Each inference token has its own spending cap. The default is €10 (excluding VAT). If a token reaches its spending cap, the API rejects further requests with an HTTP 429 status code.

  • Each inference token can send 100 requests per minute per model. Concurrent requests count toward this limit. You can set a higher rate limit in the Console. In addition, the usage cap per token and an individual limit for your account apply. Within these limits, you may utilize the API to its full capacity, even on a continuous and automated basis.

  • No. Our zero-retention policy covers prompts and responses. We do not store them and do not use them to train or improve models. The policy applies to all customers; you do not need to set anything up. For prompt caching, we briefly store parts of prompts in RAM. You cannot retrieve these parts, and our servers automatically discard them. Log files and billing data do not contain any content from your requests.

The perfect addition to
your Hetzner Inference API

GPU Servers

Object Storage

General Purpose