> ## 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.

# Strict OpenAI Compliance

By default, all the responses sent back from Prisma AIRS AI Gateway are compliant with the [OpenAI specification](https://platform.openai.com/docs/api-reference/chat/create).

In some cases, a response from a provider like Perplexity may contain useful fields which do not have a corresponding 1:1 mapping to OpenAI fields.
To get those fields in the response, you can do one of the following:

* HTTP requests: Pass this header `x-portkey-strict-open-ai-compliance: false` with your request

> [!NOTE]
>
> By default strict\_open\_ai\_compliance=false in AI Gateway Python and Node SDK

> [tab] cURL
>
> Add the following header to your request
> `x-portkey-strict-open-ai-compliance: false`

> [tab] OpenAI python
>
> ```python theme={"system"}
> from openai import OpenAI
>
> openai = OpenAI(
>     api_key="PORTKEY_API_KEY",
>     base_url="https://aigw.portkey.ai/v1",
>     default_headers={"x-portkey-provider": "openai"}
> )
> ```

> [tab] OpenAI Node SDK
>
> ```js theme={"system"}
> import OpenAI from 'openai'; // We're using the v4 SDK
>
> const openai = new OpenAI({
>   apiKey: "PORTKEY_API_KEY", // defaults to process.env["OPENAI_API_KEY"],
>   baseURL: "https://aigw.portkey.ai/v1",
>   defaultHeaders: {
>       "x-portkey-provider": "openai",
>       // defaults to process.env["PORTKEY_API_KEY"]
>       "x-portkey-strict-open-ai-compliance": false,
>   }
> });
> ```


## Related topics

- [Google Gemini](https://docs.portkey.ai/docs/aigw/integrations/llms/gemini.md)
- [Perplexity AI](https://docs.portkey.ai/docs/aigw/integrations/llms/perplexity-ai.md)
- [Enterprise Gateway](https://docs.portkey.ai/docs/changelog/enterprise.md)
- [Thinking Mode](https://docs.portkey.ai/docs/aigw/product/ai-gateway/multimodal-capabilities/thinking-mode.md)
- [Google Vertex AI](https://docs.portkey.ai/docs/aigw/integrations/llms/vertex-ai.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.