Skip to content

Commit 6dd7a72

Browse files
authored
fix: update AI Gateway docs for Replicate provider (#26152)
* fix: update Replicate example to use Bearer auth and include version - Change Authorization header from 'Token' to 'Bearer' prefix - Add version field to request body with anthropic/claude-4.5-haiku example - These changes reflect the actual working implementation * Update replicate.mdx
1 parent 76d1744 commit 6dd7a72

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/content/docs/ai-gateway/usage/providers/replicate.mdx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,22 @@ When making requests to Replicate, ensure you have the following:
2121

2222
- Your AI Gateway Account ID.
2323
- Your AI Gateway gateway name.
24-
- An active Replicate API token.
25-
- The name of the Replicate model you want to use.
24+
- An active Replicate API token. You can create one at [replicate.com/settings/api-tokens](https://replicate.com/settings/api-tokens)
25+
- The name of the Replicate model you want to use, like `anthropic/claude-4.5-haiku` or `google/nano-banana`.
2626

2727
## Example
2828

2929
### cURL
3030

3131
```bash title="Request"
3232
curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/replicate/predictions \
33-
--header 'Authorization: Token {replicate_api_token}' \
33+
--header 'Authorization: Bearer {replicate_api_token}' \
3434
--header 'Content-Type: application/json' \
3535
--data '{
36+
"version": "anthropic/claude-4.5-haiku",
3637
"input":
3738
{
38-
"prompt": "What is Cloudflare?"
39+
"prompt": "Write a haiku about Cloudflare"
3940
}
4041
}'
4142
```

0 commit comments

Comments
 (0)