Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,6 @@
- `model` should be formed as `<provider>/<model_name>` and the provider must be one of these [supported providers](/ai-gateway/usage/chat-completion/#supported-providers).
- `authorization` is the bearer token or API key that allows Browser Rendering to call the provider on your behalf.

:::caution[Anthropic models and response_format]

When using Anthropic models (such as Claude), do not use the `response_format` parameter. Anthropic's API expects `output_schema` instead of `response_format`, which will cause an `invalid_request_error`. Use only the `prompt` parameter with Anthropic models until this is resolved.

:::

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.

```bash
Expand Down Expand Up @@ -341,7 +335,7 @@
},
"custom_ai": [
{
"model": "anthropic/claude-sonnet-4-20250514",

Check warning on line 338 in src/content/docs/browser-rendering/rest-api/json-endpoint.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)
"authorization": "Bearer <ANTHROPIC_API_KEY>"
}
]
Expand All @@ -367,7 +361,7 @@
```
"custom_ai": [
{
"model": "anthropic/claude-sonnet-4-20250514",

Check warning on line 364 in src/content/docs/browser-rendering/rest-api/json-endpoint.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)
"authorization": "Bearer <ANTHROPIC_API_KEY>"
},
{
Expand Down