Quickstart

Last change on 2026-11-11 • Created on 2026-11-11 • ID: AI-64B7B

Create an Inference Token and send your first request to Hetzner Inference API in a few minutes.

Prerequisites

Step 1: Create an Inference Token

  1. Open Create Inference Token in Hetzner Console. In the dialog, select your project and click on Continue.
  2. Set the consumption cap and enter a name for the Inference Token.
  3. Click on Create & Buy now.
  4. Click on Click to show, copy the Inference Token, and click on Done.

Please note: Hetzner Console shows the Inference Token only once. Store it in a secure place right away.

For detailed instructions with all settings, see Creating an Inference Token.

Step 2: Store the Inference Token

Store the Inference Token in an environment variable:

export HETZNER_INFERENCE_TOKEN="<your-inference-token>"

Step 3: Send your first request

Send a message to the GLM 5.3 Flash model:

curl https://inference.hetzner.com/v1/chat/completions \
  -H "Authorization: Bearer $HETZNER_INFERENCE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zai-org/GLM-5.3-Flash",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

The answer of the model is in the choices[0].message.content field.

Next steps

Table of Contents