@@ -53,12 +53,12 @@ To create a new custom provider using the API:
53532 . Send a ` POST ` request to create a new custom provider:
5454
5555``` bash title="Create Custom Provider"
56- curl -X POST " https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /custom-providers" \
56+ curl -X POST " https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /ai-gateway/ custom-providers" \
5757 -H " Authorization: Bearer $CLOUDFLARE_API_TOKEN " \
5858 -H " Content-Type: application/json" \
5959 -d ' {
6060 "name": "My Custom Provider",
61- "slug": "my-custom -provider",
61+ "slug": "some -provider",
6262 "base_url": "https://api.myprovider.com",
6363 "description": "Custom AI provider for internal models",
6464 "enable": true
@@ -88,7 +88,7 @@ curl -X POST "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/custom-p
8888 "account_id" : " abc123def456" ,
8989 "account_tag" : " my-account" ,
9090 "name" : " My Custom Provider" ,
91- "slug" : " my-custom -provider" ,
91+ "slug" : " some -provider" ,
9292 "base_url" : " https://api.myprovider.com" ,
9393 "description" : " Custom AI provider for internal models" ,
9494 "enable" : true ,
@@ -113,7 +113,7 @@ A default SVG logo is automatically generated for each custom provider. The logo
113113To create a new custom provider using the dashboard:
114114
1151151 . Log in to the [ Cloudflare dashboard] ( https://dash.cloudflare.com ) and select your account.
116- 2 . Go to [ ** Compute & AI** > ** AI Gateway** > ** Custom Providers** ] ( https://dash.cloudflare.com/?to=/:account/ai-gateway/custom-providers ) .
116+ 2 . Go to [ ** Compute & AI** > ** AI Gateway** > ** Custom Providers** ] ( https://dash.cloudflare.com/?to=/:account/ai/ai -gateway/custom-providers ) .
1171173 . Select ** Add Custom Provider** .
1181184 . Enter the following information:
119119 - ** Provider Name** : Display name for your provider
@@ -132,7 +132,7 @@ To create a new custom provider using the dashboard:
132132Retrieve all custom providers with optional filtering and pagination:
133133
134134``` bash title="List all providers"
135- curl " https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /custom-providers" \
135+ curl " https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /ai-gateway/ custom-providers" \
136136 -H " Authorization: Bearer $CLOUDFLARE_API_TOKEN "
137137```
138138
@@ -148,13 +148,13 @@ curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/custom-providers
148148
149149List only enabled providers:
150150``` bash
151- curl " https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /custom-providers?enable=true" \
151+ curl " https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /ai-gateway/ custom-providers?enable=true" \
152152 -H " Authorization: Bearer $CLOUDFLARE_API_TOKEN "
153153```
154154
155155Search for specific providers:
156156``` bash
157- curl " https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /custom-providers?search=custom" \
157+ curl " https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /ai-gateway/ custom-providers?search=custom" \
158158 -H " Authorization: Bearer $CLOUDFLARE_API_TOKEN "
159159```
160160
@@ -167,7 +167,7 @@ curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/custom-providers
167167 {
168168 "id" : " 550e8400-e29b-41d4-a716-446655440000" ,
169169 "name" : " My Custom Provider" ,
170- "slug" : " my-custom -provider" ,
170+ "slug" : " some -provider" ,
171171 "base_url" : " https://api.myprovider.com" ,
172172 "enable" : true ,
173173 "created_at" : 1700000000 ,
@@ -189,7 +189,7 @@ curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/custom-providers
189189To view all your custom providers:
190190
1911911 . Log in to the [ Cloudflare dashboard] ( https://dash.cloudflare.com ) and select your account.
192- 2 . Go to [ ** Compute & AI** > ** AI Gateway** > ** Custom Providers** ] ( https://dash.cloudflare.com/?to=/:account/ai-gateway/custom-providers ) .
192+ 2 . Go to [ ** Compute & AI** > ** AI Gateway** > ** Custom Providers** ] ( https://dash.cloudflare.com/?to=/:account/ai/ai -gateway/custom-providers ) .
1931933 . You will see a list of all your custom providers with their names, slugs, base URLs, and status.
194194
195195</TabItem >
@@ -203,7 +203,7 @@ To view all your custom providers:
203203Retrieve details for a specific custom provider by its ID:
204204
205205``` bash title="Get provider by ID"
206- curl " https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /custom-providers/{provider_id}" \
206+ curl " https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /ai-gateway/ custom-providers/{provider_id}" \
207207 -H " Authorization: Bearer $CLOUDFLARE_API_TOKEN "
208208```
209209
@@ -217,7 +217,7 @@ curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/custom-providers
217217 "account_id" : " abc123def456" ,
218218 "account_tag" : " my-account" ,
219219 "name" : " My Custom Provider" ,
220- "slug" : " my-custom -provider" ,
220+ "slug" : " some -provider" ,
221221 "base_url" : " https://api.myprovider.com" ,
222222 "description" : " Custom AI provider for internal models" ,
223223 "enable" : true ,
@@ -243,7 +243,7 @@ curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/custom-providers
243243Update an existing custom provider. All fields are optional - only include the fields you want to change:
244244
245245``` bash title="Update provider"
246- curl -X PATCH " https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /custom-providers/{provider_id}" \
246+ curl -X PATCH " https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /ai-gateway/ custom-providers/{provider_id}" \
247247 -H " Authorization: Bearer $CLOUDFLARE_API_TOKEN " \
248248 -H " Content-Type: application/json" \
249249 -d ' {
@@ -268,15 +268,15 @@ curl -X PATCH "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/custom-
268268
269269Enable a provider:
270270``` bash
271- curl -X PATCH " https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /custom-providers/{provider_id}" \
271+ curl -X PATCH " https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /ai-gateway/ custom-providers/{provider_id}" \
272272 -H " Authorization: Bearer $CLOUDFLARE_API_TOKEN " \
273273 -H " Content-Type: application/json" \
274274 -d ' {"enable": true}'
275275```
276276
277277Update provider URL:
278278``` bash
279- curl -X PATCH " https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /custom-providers/{provider_id}" \
279+ curl -X PATCH " https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /ai-gateway/ custom-providers/{provider_id}" \
280280 -H " Authorization: Bearer $CLOUDFLARE_API_TOKEN " \
281281 -H " Content-Type: application/json" \
282282 -d ' {"base_url": "https://api.newprovider.com"}'
@@ -292,7 +292,7 @@ Updates to custom providers automatically invalidate any cached entries related
292292To update an existing custom provider:
293293
2942941 . Log in to the [ Cloudflare dashboard] ( https://dash.cloudflare.com ) and select your account.
295- 2 . Go to [ ** Compute & AI** > ** AI Gateway** > ** Custom Providers** ] ( https://dash.cloudflare.com/?to=/:account/ai-gateway/custom-providers ) .
295+ 2 . Go to [ ** Compute & AI** > ** AI Gateway** > ** Custom Providers** ] ( https://dash.cloudflare.com/?to=/:account/ai/ai -gateway/custom-providers ) .
2962963 . Find the custom provider you want to update and select ** Edit** .
2972974 . Update the fields you want to change (name, slug, base URL, etc.).
2982985 . Select ** Save** to apply your changes.
@@ -308,7 +308,7 @@ To update an existing custom provider:
308308Delete a custom provider:
309309
310310``` bash title="Delete provider"
311- curl -X DELETE " https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /custom-providers/{provider_id}" \
311+ curl -X DELETE " https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /ai-gateway/ custom-providers/{provider_id}" \
312312 -H " Authorization: Bearer $CLOUDFLARE_API_TOKEN "
313313```
314314
@@ -320,7 +320,7 @@ curl -X DELETE "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/custom
320320 "result" : {
321321 "id" : " 550e8400-e29b-41d4-a716-446655440000" ,
322322 "name" : " My Custom Provider" ,
323- "slug" : " my-custom -provider"
323+ "slug" : " some -provider"
324324 }
325325}
326326```
@@ -335,7 +335,7 @@ Deleting a custom provider will immediately stop all requests routed through it.
335335To delete a custom provider:
336336
3373371 . Log in to the [ Cloudflare dashboard] ( https://dash.cloudflare.com ) and select your account.
338- 2 . Go to [ ** Compute & AI** > ** AI Gateway** > ** Custom Providers** ] ( https://dash.cloudflare.com/?to=/:account/ai-gateway/custom-providers ) .
338+ 2 . Go to [ ** Compute & AI** > ** AI Gateway** > ** Custom Providers** ] ( https://dash.cloudflare.com/?to=/:account/ai/ai -gateway/custom-providers ) .
3393393 . Find the custom provider you want to delete and select ** Delete** .
3403404 . Confirm the deletion when prompted.
341341
@@ -351,7 +351,7 @@ Deleting a custom provider will immediately stop all requests routed through it.
351351Once you've created a custom provider, you can route requests through AI Gateway. When referencing your custom provider, you must prefix the slug with ` custom- ` .
352352
353353:::note[ Custom provider prefix]
354- All custom provider slugs must be prefixed with ` custom- ` when making requests through AI Gateway. For example, if your provider slug is ` my-custom- provider` , you must use ` custom-my-custom -provider ` in your requests.
354+ All custom provider slugs must be prefixed with ` custom- ` when making requests through AI Gateway. For example, if your provider slug is ` some- provider` , you must use ` custom-some -provider ` in your requests.
355355:::
356356
357357### Via Unified API
@@ -362,7 +362,7 @@ curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/compat/chat/
362362 -H " cf-aig-authorization: Bearer $CF_AIG_TOKEN " \
363363 -H " Content-Type: application/json" \
364364 -d ' {
365- "model": "custom-my-custom -provider/model-name",
365+ "model": "custom-some -provider/model-name",
366366 "messages": [{"role": "user", "content": "Hello!"}]
367367 }'
368368```
@@ -372,7 +372,7 @@ In the Unified API, specify the model using the format: `custom-{slug}/{model-na
372372### Via provider-specific endpoint
373373
374374``` bash title="Direct provider endpoint"
375- curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/custom-my-custom -provider/your-endpoint \
375+ curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/custom-some -provider/your-endpoint \
376376 -H " Authorization: Bearer $PROVIDER_API_KEY " \
377377 -H " cf-aig-authorization: Bearer $CF_AIG_TOKEN " \
378378 -H " Content-Type: application/json" \
0 commit comments