From c988b7510b8911d0986cb1f95ed84c0d93ba77c4 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Wed, 29 Oct 2025 09:49:54 -0700 Subject: [PATCH 1/2] 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 --- src/content/docs/ai-gateway/usage/providers/replicate.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/content/docs/ai-gateway/usage/providers/replicate.mdx b/src/content/docs/ai-gateway/usage/providers/replicate.mdx index 156be810ab61a0..41b00b292a7447 100644 --- a/src/content/docs/ai-gateway/usage/providers/replicate.mdx +++ b/src/content/docs/ai-gateway/usage/providers/replicate.mdx @@ -30,9 +30,10 @@ When making requests to Replicate, ensure you have the following: ```bash title="Request" curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/replicate/predictions \ - --header 'Authorization: Token {replicate_api_token}' \ + --header 'Authorization: Bearer {replicate_api_token}' \ --header 'Content-Type: application/json' \ --data '{ + "version": "anthropic/claude-4.5-haiku", "input": { "prompt": "What is Cloudflare?" From cf057d343690f5ce591f60c161c60dd19d5bf1fa Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Wed, 29 Oct 2025 10:07:33 -0700 Subject: [PATCH 2/2] Update replicate.mdx --- src/content/docs/ai-gateway/usage/providers/replicate.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/docs/ai-gateway/usage/providers/replicate.mdx b/src/content/docs/ai-gateway/usage/providers/replicate.mdx index 41b00b292a7447..c317e0835fefa9 100644 --- a/src/content/docs/ai-gateway/usage/providers/replicate.mdx +++ b/src/content/docs/ai-gateway/usage/providers/replicate.mdx @@ -21,8 +21,8 @@ When making requests to Replicate, ensure you have the following: - Your AI Gateway Account ID. - Your AI Gateway gateway name. -- An active Replicate API token. -- The name of the Replicate model you want to use. +- An active Replicate API token. You can create one at [replicate.com/settings/api-tokens](https://replicate.com/settings/api-tokens) +- The name of the Replicate model you want to use, like `anthropic/claude-4.5-haiku` or `google/nano-banana`. ## Example @@ -36,7 +36,7 @@ curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/replicate/pr "version": "anthropic/claude-4.5-haiku", "input": { - "prompt": "What is Cloudflare?" + "prompt": "Write a haiku about Cloudflare" } }' ```