---
title: Custom Providers
---

[Skip to content](#_top)

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

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

Copy Markdown

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

---

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

# Custom Providers

##### [List custom providers](https://developers.cloudflare.com/api/python/resources/ai_gateway/subresources/custom_providers/methods/list)

ai\_gateway.custom\_providers.list(CustomProviderListParams\*\*kwargs) -> SyncV4PagePaginationArray\[[CustomProviderListResponse](<https://developers.cloudflare.com/api/python/resources/ai_gateway#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_list_response%20%3E%20(schema)>)]

GET/accounts/{account\_id}/ai-gateway/custom-providers

##### [Get a custom provider](https://developers.cloudflare.com/api/python/resources/ai_gateway/subresources/custom_providers/methods/get)

ai\_gateway.custom\_providers.get(strid, CustomProviderGetParams\*\*kwargs) -> [CustomProviderGetResponse](<https://developers.cloudflare.com/api/python/resources/ai_gateway#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_get_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/ai-gateway/custom-providers/{id}

##### [Create a custom provider](https://developers.cloudflare.com/api/python/resources/ai_gateway/subresources/custom_providers/methods/create)

ai\_gateway.custom\_providers.create(CustomProviderCreateParams\*\*kwargs) -> [CustomProviderCreateResponse](<https://developers.cloudflare.com/api/python/resources/ai_gateway#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_create_response%20%3E%20(schema)>)

POST/accounts/{account\_id}/ai-gateway/custom-providers

##### [Delete a custom provider](https://developers.cloudflare.com/api/python/resources/ai_gateway/subresources/custom_providers/methods/delete)

ai\_gateway.custom\_providers.delete(strid, CustomProviderDeleteParams\*\*kwargs) -> [CustomProviderDeleteResponse](<https://developers.cloudflare.com/api/python/resources/ai_gateway#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_delete_response%20%3E%20(schema)>)

DELETE/accounts/{account\_id}/ai-gateway/custom-providers/{id}

##### ModelsExpand Collapse

<details>

<summary>

class CustomProviderListResponse: …

</summary>

id: str

formatuuid

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

base\_url: str

formaturi

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_list_response%20%3E%20(schema)%20%3E%20(property)%20base_url">Link to this property</a>

created\_at: datetime

formatdate-time

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_list_response%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

modified\_at: datetime

formatdate-time

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

name: str

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_list_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

slug: str

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_list_response%20%3E%20(schema)%20%3E%20(property)%20slug">Link to this property</a>

beta: Optional\[bool]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_list_response%20%3E%20(schema)%20%3E%20(property)%20beta">Link to this property</a>

curl\_example: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_list_response%20%3E%20(schema)%20%3E%20(property)%20curl_example">Link to this property</a>

description: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_list_response%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

enable: Optional\[bool]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_list_response%20%3E%20(schema)%20%3E%20(property)%20enable">Link to this property</a>

headers: Optional\[str]

JSON object of extra HTTP headers that AI Gateway sends to the provider. Values can contain credentials.

maxLength8192

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_list_response%20%3E%20(schema)%20%3E%20(property)%20headers">Link to this property</a>

js\_example: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_list_response%20%3E%20(schema)%20%3E%20(property)%20js_example">Link to this property</a>

link: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_list_response%20%3E%20(schema)%20%3E%20(property)%20link">Link to this property</a>

logo: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_list_response%20%3E%20(schema)%20%3E%20(property)%20logo">Link to this property</a>

position: Optional\[int]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_list_response%20%3E%20(schema)%20%3E%20(property)%20position">Link to this property</a>

</details>

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

<details>

<summary>

class CustomProviderGetResponse: …

</summary>

id: str

formatuuid

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

base\_url: str

formaturi

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_get_response%20%3E%20(schema)%20%3E%20(property)%20base_url">Link to this property</a>

created\_at: datetime

formatdate-time

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_get_response%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

modified\_at: datetime

formatdate-time

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

name: str

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_get_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

slug: str

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_get_response%20%3E%20(schema)%20%3E%20(property)%20slug">Link to this property</a>

beta: Optional\[bool]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_get_response%20%3E%20(schema)%20%3E%20(property)%20beta">Link to this property</a>

curl\_example: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_get_response%20%3E%20(schema)%20%3E%20(property)%20curl_example">Link to this property</a>

description: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_get_response%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

enable: Optional\[bool]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_get_response%20%3E%20(schema)%20%3E%20(property)%20enable">Link to this property</a>

headers: Optional\[str]

JSON object of extra HTTP headers that AI Gateway sends to the provider. Values can contain credentials.

maxLength8192

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_get_response%20%3E%20(schema)%20%3E%20(property)%20headers">Link to this property</a>

js\_example: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_get_response%20%3E%20(schema)%20%3E%20(property)%20js_example">Link to this property</a>

link: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_get_response%20%3E%20(schema)%20%3E%20(property)%20link">Link to this property</a>

logo: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_get_response%20%3E%20(schema)%20%3E%20(property)%20logo">Link to this property</a>

position: Optional\[int]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_get_response%20%3E%20(schema)%20%3E%20(property)%20position">Link to this property</a>

</details>

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

<details>

<summary>

class CustomProviderCreateResponse: …

</summary>

id: str

formatuuid

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

base\_url: str

formaturi

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_create_response%20%3E%20(schema)%20%3E%20(property)%20base_url">Link to this property</a>

created\_at: datetime

formatdate-time

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_create_response%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

modified\_at: datetime

formatdate-time

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

name: str

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_create_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

slug: str

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_create_response%20%3E%20(schema)%20%3E%20(property)%20slug">Link to this property</a>

beta: Optional\[bool]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_create_response%20%3E%20(schema)%20%3E%20(property)%20beta">Link to this property</a>

curl\_example: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_create_response%20%3E%20(schema)%20%3E%20(property)%20curl_example">Link to this property</a>

description: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_create_response%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

enable: Optional\[bool]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_create_response%20%3E%20(schema)%20%3E%20(property)%20enable">Link to this property</a>

headers: Optional\[str]

JSON object of extra HTTP headers that AI Gateway sends to the provider. Values can contain credentials.

maxLength8192

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_create_response%20%3E%20(schema)%20%3E%20(property)%20headers">Link to this property</a>

js\_example: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_create_response%20%3E%20(schema)%20%3E%20(property)%20js_example">Link to this property</a>

link: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_create_response%20%3E%20(schema)%20%3E%20(property)%20link">Link to this property</a>

logo: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_create_response%20%3E%20(schema)%20%3E%20(property)%20logo">Link to this property</a>

position: Optional\[int]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_create_response%20%3E%20(schema)%20%3E%20(property)%20position">Link to this property</a>

</details>

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

<details>

<summary>

class CustomProviderDeleteResponse: …

</summary>

id: str

formatuuid

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

base\_url: str

formaturi

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_delete_response%20%3E%20(schema)%20%3E%20(property)%20base_url">Link to this property</a>

created\_at: datetime

formatdate-time

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_delete_response%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

modified\_at: datetime

formatdate-time

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

name: str

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_delete_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

slug: str

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_delete_response%20%3E%20(schema)%20%3E%20(property)%20slug">Link to this property</a>

beta: Optional\[bool]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_delete_response%20%3E%20(schema)%20%3E%20(property)%20beta">Link to this property</a>

curl\_example: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_delete_response%20%3E%20(schema)%20%3E%20(property)%20curl_example">Link to this property</a>

description: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_delete_response%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

enable: Optional\[bool]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_delete_response%20%3E%20(schema)%20%3E%20(property)%20enable">Link to this property</a>

headers: Optional\[str]

JSON object of extra HTTP headers that AI Gateway sends to the provider. Values can contain credentials.

maxLength8192

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_delete_response%20%3E%20(schema)%20%3E%20(property)%20headers">Link to this property</a>

js\_example: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_delete_response%20%3E%20(schema)%20%3E%20(property)%20js_example">Link to this property</a>

link: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_delete_response%20%3E%20(schema)%20%3E%20(property)%20link">Link to this property</a>

logo: Optional\[str]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_delete_response%20%3E%20(schema)%20%3E%20(property)%20logo">Link to this property</a>

position: Optional\[int]

<a href="#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20custom_provider_delete_response%20%3E%20(schema)%20%3E%20(property)%20position">Link to this property</a>

</details>

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