Skip to content

Commit cc53097

Browse files
Changelog: Secrets Store <> AI Gateway integration (#24711)
* updated date * adding-changelog * updated date * updated-code-snippets * Update 2025-08-25-secrets-store-ai-gateway.mdx * Update 2025-08-25-secrets-store-ai-gateway.mdx * Update 2025-08-25-secrets-store-ai-gateway.mdx * Add required date and description fields * Fix typo * Replace colon with period --------- Co-authored-by: Rebecca Tamachiro <[email protected]> Co-authored-by: Rebecca Tamachiro <[email protected]>
1 parent 1b3bbea commit cc53097

File tree

3 files changed

+51
-2
lines changed

3 files changed

+51
-2
lines changed
231 KB
Loading

src/content/changelog/ssl/2025-05-19-paygo-updates.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Increased limits for Cloudflare for SaaS and Secrets Store free and pay-as-you-go plans
3-
description: With upgraded limits to [all free and paid plans](https://www.cloudflare.com/plans/), you can now extend the benefits of Cloudflare to more end customers via [Cloudflare for SaaS](https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/) and deploy more account level variables through [Cloudflare Secrets Store](https://developers.cloudflare.com/secrets-store/).
4-
date: 2025-05-27
3+
description: With upgraded limits to [all free and paid plans](https://www.cloudflare.com/plans/), you can now extend the benefits of Cloudflare to more end customers via [Cloudflare for SaaS](https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/) and deploy more account level variables through [Cloudflare Secrets Store](https://developers.cloudflare.com/secrets-store/).
4+
date: 2025-05-27T11:00:00Z
55
products:
66
- ssl
77
- cloudflare-for-saas
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Manage and deploy your AI provider keys through Bring Your Own Key (BYOK) with AI Gateway, now powered by Cloudflare Secrets Store
3+
products:
4+
- secrets-store
5+
- ai-gateway
6+
description: 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](https://developers.cloudflare.com/ai-gateway/configuration/bring-your-own-keys/).
7+
date: 2025-08-25T11:00:00Z
8+
---
9+
10+
import { Card, Render, Details } from "~/components"
11+
12+
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](https://developers.cloudflare.com/ai-gateway/configuration/bring-your-own-keys/). 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.
13+
14+
You can now create a secret directly from your AI Gateway [in the dashboard](http://dash.cloudflare.com/?to=/:account/ai-gateway) by navigating into your gateway -> **Provider Keys** -> **Add**.
15+
16+
![Import repo or choose template](~/assets/images/ssl/add-secret-ai-gateway.png)
17+
18+
You can also create your secret with the newly available **ai_gateway** scope via [wrangler](https://developers.cloudflare.com/workers/wrangler/commands/), the [Secrets Store dashboard](http://dash.cloudflare.com/?to=/:account/secrets-store), or the [API](https://developers.cloudflare.com/api/resources/secrets_store/).
19+
20+
Then, pass the key in the request header using its Secrets Store reference:
21+
22+
```
23+
curl -X POST https://gateway.ai.cloudflare.com/v1/<ACCOUNT_ID>/my-gateway/anthropic/v1/messages \
24+
--header 'cf-aig-authorization: ANTHROPIC_KEY_1 \
25+
--header 'anthropic-version: 2023-06-01' \
26+
--header 'Content-Type: application/json' \
27+
--data '{"model": "claude-3-opus-20240229", "messages": [{"role": "user", "content": "What is Cloudflare?"}]}'
28+
```
29+
30+
Or, using Javascript:
31+
32+
```
33+
import Anthropic from '@anthropic-ai/sdk';
34+
35+
36+
const anthropic = new Anthropic({
37+
apiKey: "ANTHROPIC_KEY_1",
38+
baseURL: "https://gateway.ai.cloudflare.com/v1/<ACCOUNT_ID>/my-gateway/anthropic",
39+
});
40+
41+
42+
const message = await anthropic.messages.create({
43+
model: 'claude-3-opus-20240229',
44+
messages: [{role: "user", content: "What is Cloudflare?"}],
45+
max_tokens: 1024
46+
});
47+
```
48+
49+
For more information, check out the [blog](https://blog.cloudflare.com/ai-gateway-aug-2025-refresh)!

0 commit comments

Comments
 (0)