---
title: Dynamic Routing
---

[Skip to content](#_top)

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

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

Copy Markdown

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

---

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

# Dynamic Routing

##### [List dynamic routes](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/list)

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

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

##### [Get a dynamic route](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/get)

client.AIGateway.DynamicRouting.Get(ctx, gatewayID, id, query) (\*[DynamicRoutingGetResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.dynamic_routing%20%3E%20(model)%20DynamicRoutingGetResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/routes/{id}

##### [Create a dynamic route](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/create)

client.AIGateway.DynamicRouting.New(ctx, gatewayID, params) (\*[DynamicRoutingNewResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.dynamic_routing%20%3E%20(model)%20DynamicRoutingNewResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/routes

##### [Rename a dynamic route](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/update)

client.AIGateway.DynamicRouting.Update(ctx, gatewayID, id, params) (\*[DynamicRoutingUpdateResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.dynamic_routing%20%3E%20(model)%20DynamicRoutingUpdateResponse%20%3E%20(schema)>), error)

PATCH/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/routes/{id}

##### [Delete a dynamic route](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/delete)

client.AIGateway.DynamicRouting.Delete(ctx, gatewayID, id, body) (\*[DynamicRoutingDeleteResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.dynamic_routing%20%3E%20(model)%20DynamicRoutingDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/routes/{id}

##### [List dynamic route deployments](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/list_deployments)

client.AIGateway.DynamicRouting.ListDeployments(ctx, gatewayID, id, query) (\*[DynamicRoutingListDeploymentsResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.dynamic_routing%20%3E%20(model)%20DynamicRoutingListDeploymentsResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/routes/{id}/deployments

##### [Deploy a dynamic route version](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/create_deployment)

client.AIGateway.DynamicRouting.NewDeployment(ctx, gatewayID, id, params) (\*[DynamicRoutingNewDeploymentResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.dynamic_routing%20%3E%20(model)%20DynamicRoutingNewDeploymentResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/routes/{id}/deployments

##### [List dynamic route versions](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/list_versions)

client.AIGateway.DynamicRouting.ListVersions(ctx, gatewayID, id, query) (\*[DynamicRoutingListVersionsResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.dynamic_routing%20%3E%20(model)%20DynamicRoutingListVersionsResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/routes/{id}/versions

##### [Create a dynamic route version](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/create_version)

client.AIGateway.DynamicRouting.NewVersion(ctx, gatewayID, id, params) (\*[DynamicRoutingNewVersionResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.dynamic_routing%20%3E%20(model)%20DynamicRoutingNewVersionResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/routes/{id}/versions

##### [Get a dynamic route version](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/get_version)

client.AIGateway.DynamicRouting.GetVersion(ctx, gatewayID, id, versionID, query) (\*[DynamicRoutingGetVersionResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.dynamic_routing%20%3E%20(model)%20DynamicRoutingGetVersionResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/routes/{id}/versions/{version\_id}