Hetzner Cloud API returns 429 Too Many Requests
{"error":{"code":"rate_limit_exceeded","message":"Rate limit exceeded"}}
HTTP 429What's happening
Hetzner's Cloud API enforces a limit of 3600 requests per hour per API token (roughly 1/second sustained), tracked via the `RateLimit-Remaining` response header. This shows up most often in automation scripts that poll a resource's status in a tight loop (e.g. checking if a server finished provisioning) without backoff, or in scripts that fan out many parallel requests (bulk server creation, bulk snapshot checks) without throttling.
Fix
1. Read the rate limit headers on every response and back off proactively instead of waiting for a 429: ``` RateLimit-Limit: 3600 RateLimit-Remaining: 42 RateLimit-Reset: 1699999999 ``` 2. Replace tight polling loops with exponential backoff (start at 1-2s, double up to a cap) instead of fixed 200-500ms intervals. 3. Batch bulk operations (e.g. creating many servers) with a queue that respects a max concurrency of a few requests at a time, not all at once. 4. If you're already careful and still hitting it, check for a second script/cron job hitting the same token — the limit is per-token, not per-script.
Got a different error? Paste it here for a free diagnosis.