Create an Inference Token and send your first request to Hetzner Inference API in a few minutes.
Prerequisites
- A Hetzner account
- A project in Hetzner Console
Step 1: Create an Inference Token
- Open Create Inference Token in Hetzner Console. In the dialog, select your project and click on
Continue. - Set the consumption cap and enter a name for the Inference Token.
- Click on
Create & Buy now. - Click on
Click to show, copy the Inference Token, and click onDone.
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.