> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify-poc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# openai_list_models_with_raw_response()

> List models and get the raw HTTP response

List available models and receive the raw HTTP response. Use this when you need access to HTTP headers, status codes,
or other low-level response details.

## Arguments

| Name            | Type      | Default | Required | Description                                                       |
| --------------- | --------- | ------- | -------- | ----------------------------------------------------------------- |
| `api_key`       | `TEXT`    | `NULL`  | ✖        | OpenAI API key. If not provided, uses `ai.openai_api_key` setting |
| `api_key_name`  | `TEXT`    | `NULL`  | ✖        | Name of the secret containing the API key                         |
| `extra_headers` | `JSONB`   | `NULL`  | ✖        | Additional HTTP headers to include in the API request             |
| `extra_query`   | `JSONB`   | `NULL`  | ✖        | Additional query parameters for the API request                   |
| `verbose`       | `BOOLEAN` | `FALSE` | ✖        | Enable verbose logging for debugging                              |
| `client_config` | `JSONB`   | `NULL`  | ✖        | Advanced client configuration options                             |

## Returns

`JSONB`: The complete HTTP response including headers and body.

## Related functions

* [`openai_list_models()`][openai_list_models]: standard model listing function

[openai_list_models]: /api-reference/pgai/model-calling/openai/openai_list_models
