همه صفحه‌ها

هدرهای پاسخ

هر پاسخ /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 true on non-streaming responses for known-slow models (gpt-4o*, gpt-4-turbo, o1/o3/o4, claude-opus, claude-3-7-sonnet). Switch to stream: true to avoid client-side timeouts.

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 CONFLICT error
  • 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.

به‌روزرسانی: 2026-10-13