Idempotent retries
Send an Idempotency-Key header on billed POSTs. A retry with the same key and body replays the first response (header idempotent-replayed: true) instead of running — and billing — again; a retry while the first is still running gets 409. Keys are kept 24 hours per API key.
curl https://api.ultragpt.pro/v1/chat/completions \
-H "Authorization: Bearer $ULTRAGPT_API_KEY" \
-H "Idempotency-Key: order-1234-summary" \
-H "Content-Type: application/json" \
-d '{ "model": "grok-4.7", "messages": [{ "role": "user", "content": "Hello!" }] }'