Cloudflare Secrets Store is now integrated with AI Gateway, allowing you to store, manage, and deploy your AI provider keys in a secure and seamless configuration through Bring Your Own Key. Instead of passing your AI provider keys directly in every request header, you can centrally manage each key with Secrets Store and deploy in your gateway configuration using only a reference, rather than passing the value in plain text.
You can now create a secret directly from your AI Gateway in the dashboard by navigating into your gateway -> Provider Keys -> Add.
You can also create your secret with the newly available ai_gateway scope via wrangler, the Secrets Store dashboard, or the API.
Then, pass the key in the request header using its Secrets Store reference:
curl -X POST https://gateway.ai.cloudflare.com/v1/<ACCOUNT_ID>/my-gateway/anthropic/v1/messages \ --header 'cf-aig-authorization: ANTHROPIC_KEY_1 \ --header 'anthropic-version: 2023-06-01' \ --header 'Content-Type: application/json' \ --data '{"model": "claude-3-opus-20240229", "messages": [{"role": "user", "content": "What is Cloudflare?"}]}'Or, using Javascript:
import Anthropic from '@anthropic-ai/sdk';
const anthropic = new Anthropic({ apiKey: "ANTHROPIC_KEY_1", baseURL: "https://gateway.ai.cloudflare.com/v1/<ACCOUNT_ID>/my-gateway/anthropic",});
const message = await anthropic.messages.create({ model: 'claude-3-opus-20240229', messages: [{role: "user", content: "What is Cloudflare?"}], max_tokens: 1024});For more information, check out the blog!
Source: Cloudflare
Latest Posts
- GCP Release Notes: May 05, 2026

- 4 new Qwen models for multimodal reasoning, agentic coding, and multilingual applications are now available in Amazon SageMaker JumpStart

- Data Privacy: Microsoft Online Services Subprocessor Disclosure [MC1301809]
![Data Privacy: Microsoft Online Services Subprocessor Disclosure [MC1301809] 4 pexels anthony derosa 39577 211816](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Microsoft 365 Copilot Cowork: Plugins, connectors, and partner integrations (Frontier) [MC1301832]
![Microsoft 365 Copilot Cowork: Plugins, connectors, and partner integrations (Frontier) [MC1301832] 5 pexels jplenio 1118873](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)



![Data Privacy: Microsoft Online Services Subprocessor Disclosure [MC1301809] 4 pexels anthony derosa 39577 211816](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-anthony-derosa-39577-211816-150x150.webp)
![Microsoft 365 Copilot Cowork: Plugins, connectors, and partner integrations (Frontier) [MC1301832] 5 pexels jplenio 1118873](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-jplenio-1118873-150x150.webp)
![Microsoft Teams: Microsoft Graph APIs for Teams administration now available in beta [MC1169072] 8 Microsoft Teams: Microsoft Graph APIs for Teams administration now available in beta [MC1169072]](https://mwpro.co.uk/wp-content/uploads/2025/06/pexels-fauxels-3184457-96x96.webp)