> ## Documentation Index
> Fetch the complete documentation index at: https://docs.portkey.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Response Schema

With each request, Portkey sends back **Portkey-specific** headers that can help you identify the state of specific Portkey features you are using.

We send the following 4 response headers:

| Header                             | Value                                                                                                                                                                                                                                                                                                                                                                 |
| :--------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `x-portkey-trace-id`               | Returns a `unique trace id` for each response. In case the user has already sent a trace id with x-portkey-trace-id in their `request body,` then that is used here instead of generating a new id.                                                                                                                                                                   |
| `x-portkey-retry-attempt-count`    | Returns the number of `retry attempts` made for the call. Request made for the first time is not counted, `only` the attempts are counted. So, if the value is 3, that means that a total of 4 (1+3) calls were made.                                                                                                                                                 |
| `x-portkey-cache-status`           | Returns the `cache status` for the call. • HIT (simple cache hit) • SEMANTIC HIT (semantic cache hit) • MISS (simple cache header was sent in the request, but returned a miss) • SEMANTIC MISS (semantic cache header was sent in the request, but returned a miss) • DISABLED (no cache header sent) • REFRESH (cache force refresh was true in the request header) |
| `x-portkey-last-used-option-index` | Returns the nested `target index` (as jsonpath) for the Config id used while making the call.                                                                                                                                                                                                                                                                         |

***

<Card title="Portkey is now PRISMA AIRS AI Gateway. See it in action." href="https://www.paloaltonetworks.in/ai-security/ai-gateway?utm_source=portkey&utm_medium=referral&utm_campaign=prisma_airs&utm_content=docs_nav#contact" icon="arrow-up-right-from-square">
  Contact Us
</Card>


## Related topics

- [Portkey Models](/docs/product/model-catalog/portkey-models.md)
- [Building an LLM-as-a-Judge System for AI (Customer Support) Agent](/docs/guides/prompts/llm-as-a-judge.md)
- [Bring Your Own Guardrails](/docs/integrations/guardrails/bring-your-own-guardrails.md)
- [January](/docs/changelog/2026/january.md)
- [Enforcing JSON Schema with Anyscale & Together](/docs/guides/use-cases/enforcing-json-schema-with-anyscale-and-together.md)
