---
title: List provider keys
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/python)

[AI Gateway](https://developers.cloudflare.com/api/python/resources/ai_gateway)

[Provider Configs](https://developers.cloudflare.com/api/python/resources/ai_gateway/subresources/provider_configs)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# List provider keys

ai\_gateway.provider\_configs.list(strgateway\_id, ProviderConfigListParams\*\*kwargs) -> SyncV4PagePaginationArray\[[ProviderConfigListResponse](<https://developers.cloudflare.com/api/python/resources/ai_gateway#(resource)%20ai_gateway.provider_configs%20%3E%20(model)%20provider_config_list_response%20%3E%20(schema)>)]

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/provider\_configs

Lists the provider keys stored for an AI Gateway. Responses show a masked preview of each key, never the key itself.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### ParametersExpand Collapse

account\_id: str

[Link to this property](<#(resource)%20ai_gateway.provider_configs%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

gateway\_id: str

Unique identifier of the AI Gateway within the account.

maxLength64

minLength1

[Link to this property](<#(resource)%20ai_gateway.provider_configs%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20gateway_id%20%3E%20(schema)>)

page: Optional\[int]

minimum1

[Link to this property](<#(resource)%20ai_gateway.provider_configs%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20page%20%3E%20(schema)>)

per\_page: Optional\[int]

maximum100

minimum1

[Link to this property](<#(resource)%20ai_gateway.provider_configs%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20per_page%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class ProviderConfigListResponse: …

</summary>

id: str

<a href="#(resource)%20ai_gateway.provider_configs%20%3E%20(model)%20provider_config_list_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

alias: str

<a href="#(resource)%20ai_gateway.provider_configs%20%3E%20(model)%20provider_config_list_response%20%3E%20(schema)%20%3E%20(property)%20alias">Link to this property</a>

default\_config: bool

<a href="#(resource)%20ai_gateway.provider_configs%20%3E%20(model)%20provider_config_list_response%20%3E%20(schema)%20%3E%20(property)%20default_config">Link to this property</a>

gateway\_id: str

Unique identifier of the AI Gateway within the account.

maxLength64

minLength1

<a href="#(resource)%20ai_gateway.provider_configs%20%3E%20(model)%20provider_config_list_response%20%3E%20(schema)%20%3E%20(property)%20gateway_id">Link to this property</a>

modified\_at: datetime

formatdate-time

<a href="#(resource)%20ai_gateway.provider_configs%20%3E%20(model)%20provider_config_list_response%20%3E%20(schema)%20%3E%20(property)%20modified_at">Link to this property</a>

provider\_slug: str

<a href="#(resource)%20ai_gateway.provider_configs%20%3E%20(model)%20provider_config_list_response%20%3E%20(schema)%20%3E%20(property)%20provider_slug">Link to this property</a>

secret\_id: str

<a href="#(resource)%20ai_gateway.provider_configs%20%3E%20(model)%20provider_config_list_response%20%3E%20(schema)%20%3E%20(property)%20secret_id">Link to this property</a>

secret\_preview: str

<a href="#(resource)%20ai_gateway.provider_configs%20%3E%20(model)%20provider_config_list_response%20%3E%20(schema)%20%3E%20(property)%20secret_preview">Link to this property</a>

rate\_limit: Optional\[float]

<a href="#(resource)%20ai_gateway.provider_configs%20%3E%20(model)%20provider_config_list_response%20%3E%20(schema)%20%3E%20(property)%20rate_limit">Link to this property</a>

rate\_limit\_period: Optional\[float]

<a href="#(resource)%20ai_gateway.provider_configs%20%3E%20(model)%20provider_config_list_response%20%3E%20(schema)%20%3E%20(property)%20rate_limit_period">Link to this property</a>

</details>

[Link to this property](<#(resource)%20ai_gateway.provider_configs%20%3E%20(model)%20provider_config_list_response%20%3E%20(schema)>)

### List provider keys

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
page = client.ai_gateway.provider_configs.list(
    gateway_id="my-gateway",
    account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
)
page = page.result[0]
print(page.id)
```

200 example

```
{
  "result": [
    {
      "id": "id",
      "alias": "alias",
      "default_config": true,
      "gateway_id": "my-gateway",
      "modified_at": "2019-12-27T18:11:19.117Z",
      "provider_slug": "provider_slug",
      "secret_id": "secret_id",
      "secret_preview": "secret_preview",
      "rate_limit": 0,
      "rate_limit_period": 0
    }
  ],
  "success": true
}
```

##### Returns Examples

200 example

```
{
  "result": [
    {
      "id": "id",
      "alias": "alias",
      "default_config": true,
      "gateway_id": "my-gateway",
      "modified_at": "2019-12-27T18:11:19.117Z",
      "provider_slug": "provider_slug",
      "secret_id": "secret_id",
      "secret_preview": "secret_preview",
      "rate_limit": 0,
      "rate_limit_period": 0
    }
  ],
  "success": true
}
```