---
title: List provider keys
---

[Skip to content](#_top)

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

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

[Provider Configs](https://developers.cloudflare.com/api/go/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

client.AIGateway.ProviderConfigs.List(ctx, gatewayID, params) (\*V4PagePaginationArray\[[ProviderConfigListResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.provider_configs%20%3E%20(model)%20ProviderConfigListResponse%20%3E%20(schema)>)], error)

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

gatewayID string

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)>)

<details>

<summary>

params ProviderConfigListParams

</summary>

AccountID param.Field\[string]

Path param

<a href="#(resource)%20ai_gateway.provider_configs%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

Page param.Field\[int64]Optional

Query param

minimum1

<a href="#(resource)%20ai_gateway.provider_configs%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20page">Link to this property</a>

PerPage param.Field\[int64]Optional

Query param

maximum100

minimum1

<a href="#(resource)%20ai_gateway.provider_configs%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20per_page">Link to this property</a>

</details>

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

##### ReturnsExpand Collapse

<details>

<summary>

type ProviderConfigListResponse struct{…}

</summary>

ID string

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

Alias string

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

DefaultConfig bool

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

GatewayID string

Unique identifier of the AI Gateway within the account.

maxLength64

minLength1

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

ModifiedAt Time

formatdate-time

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

ProviderSlug string

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

SecretID string

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

SecretPreview string

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

RateLimit float64Optional

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

RateLimitPeriod float64Optional

<a href="#(resource)%20ai_gateway.provider_configs%20%3E%20(model)%20ProviderConfigListResponse%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)%20ProviderConfigListResponse%20%3E%20(schema)>)

### List provider keys

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/ai_gateway"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  page, err := client.AIGateway.ProviderConfigs.List(
    context.TODO(),
    "my-gateway",
    ai_gateway.ProviderConfigListParams{
      AccountID: cloudflare.F("3ebbcb006d4d46d7bb6a8c7f14676cb0"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

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
}
```