Skip to content

Commit a4f3fe9

Browse files
authored
Update json-endpoint.mdx
1 parent 7cbe327 commit a4f3fe9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/content/docs/browser-rendering/rest-api/json-endpoint.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ Browser Rendering can use a custom model for which you supply credentials. List
254254
- `model` should be formed as `<provider>/<model_name>` and the provider must be one of these [supported providers](/ai-gateway/chat-completion/#supported-providers).
255255
- `authorization` is the bearer token or API key that allows Browser Rendering to call the provider on your behalf.
256256

257-
This example uses the `custom_ai` parameter to instruct Browser Rendering to use a custom Anthropic model. The prompt asks the model to extract the main `<h1>` and `<h2>` headings from the target URL and return them in a structured JSON object.
257+
This example uses the `custom_ai` parameter to instruct Browser Rendering to use a Anthropic's Claude Sonnet 4 model. The prompt asks the model to extract the main `<h1>` and `<h2>` headings from the target URL and return them in a structured JSON object.
258258

259259
```bash
260260
curl --request POST \
@@ -302,9 +302,9 @@ curl --request POST \
302302
303303
### Using a custom model with fallbacks
304304
305-
You may specify multiple models to provide automatic failover. Browser Rendering will attempt the models in order until one succeeds. To add failover, list additional models.
305+
You may specify multiple models to provide automatic failover. Browser Rendering will attempt the models in order until one succeeds. To add failover, list additional models in the `custom_ai` array.
306306
307-
In this example, Browser Rendering first calls claude-sonnet-4-20250514. If that request returns an error, it automatically retries with gpt-4o.
307+
In this example, Browser Rendering first calls Anthropic's Claude Sonnet 4 model. If that request returns an error, it automatically retries with Meta Llama 3.3 70B from [Workers AI](/workers-ai/), then OpenAI's GPT-4o.
308308
309309
```
310310
"custom_ai": [
@@ -313,6 +313,10 @@ In this example, Browser Rendering first calls claude-sonnet-4-20250514. If that
313313
"authorization": "Bearer <ANTHROPIC_API_KEY>"
314314
},
315315
{
316+
"model": "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
317+
"authorization": "Bearer <CLOUDFLARE_AUTH_TOKEN>"
318+
},
319+
{
316320
"model": "openai/gpt-4o",
317321
"authorization": "Bearer <OPENAI_API_KEY>"
318322
}

0 commit comments

Comments
 (0)