هدرهای پاسخ
هر پاسخ /v1/* هدرهای تشخیصی هرمز را دارد: X-Hormouz-Admission-Latency-Ms (زمان احراز هویت و بلوکهٔ اعتبار)، X-Hormouz-Upstream-Latency-Ms (زمان انتظار برای مدل) و X-Hormouz-Proxy-Latency-Ms (سربار درگاه). دو هدر توصیهای هم ممکن است بیایند: X-Suggest-Stream: true برای مدلهای کند و X-Client-Timeout-Hint با مقدار تایماوت پیشنهادی به میلیثانیه.
هدرهای پاسخ
| فیلد | توضیح |
|---|---|
| X-Hormouz-Admission-Latency-Ms | Milliseconds spent on authentication and billing hold. |
| X-Hormouz-Upstream-Latency-Ms | Milliseconds waiting for the upstream provider. |
| X-Hormouz-Proxy-Latency-Ms | Total proxy overhead in milliseconds. |
| X-Suggest-Stream | Set to |
| X-Client-Timeout-Hint | Present when the operator has configured a recommended HTTP client timeout for your account. Set your SDK's client timeout to this value (in ms). |
هدر Idempotency-Key
Optional deduplication token (any string up to 200 characters).
How it works:
- Same key + same request body → cached response replayed (safe retry)
- Same key + different body →
409 CONFLICTerror - Keys expire after 24 hours
When to use: Add this header when you want to safely retry a request after a network timeout without risking a duplicate operation.