<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>Cloudflare changelogs | AI Gateway</title><description>Cloudflare changelogs for AI Gateway</description><link>https://developers.stormtrust.net/changelog/</link><item><title>AI Gateway, Workers AI - Workers AI and AI Gateway unify model access and billing</title><link>https://developers.stormtrust.net/changelog/post/2026-08-07-workers-ai-unified-billing/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-08-07-workers-ai-unified-billing/</guid><description>
&lt;p&gt;Workers AI and AI Gateway now provide a unified path for accessing models and managing inference traffic. Use the same AI binding and REST API to call models hosted on Workers AI or by supported third-party providers, with AI Gateway providing observability, logging, caching, security, and billing controls.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;unified-entrypoints-and-observability&quot;&gt;Unified entrypoints and observability&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#unified-entrypoints-and-observability&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;anchor-icon&quot;&gt;&lt;svg width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;path fill=&quot;currentcolor&quot; d=&quot;m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;The &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/worker-binding-methods/&quot;&gt;AI binding&lt;/a&gt; supports both Workers AI and third-party models through &lt;code&gt;env.AI.run()&lt;/code&gt;. The &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/rest-api/&quot;&gt;REST API&lt;/a&gt; provides shared &lt;code&gt;/ai/&lt;/code&gt; endpoints with Cloudflare authentication across providers.&lt;/p&gt;
&lt;p&gt;Route a Workers AI request through AI Gateway by specifying a gateway ID. Use &lt;code&gt;default&lt;/code&gt; to automatically create a gateway on the first authenticated request, or specify an existing gateway to separate applications and workloads:&lt;/p&gt;
&lt;div&gt;&lt;div data-nb-tabs data-nb-sync-key=&quot;workersExamples&quot; class&gt;&lt;div class=&quot;relative flex border-b border-border&quot; role=&quot;tablist&quot; data-nb-tabs-list&gt;&lt;span class=&quot;bg-primary pointer-events-none absolute -bottom-px h-0.5 rounded-t-sm transition-[left,width] duration-200 ease-out&quot; data-nb-tabs-indicator aria-hidden=&quot;true&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;mt-3&quot;&gt;&lt;div role=&quot;tabpanel&quot; data-nb-tabs-content data-nb-tab-label=&quot;JavaScript&quot; class&gt;&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;js&quot;&gt;&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot; data-nb-lang=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; response&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; await&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; env.&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;AI&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;	&quot;@cf/zai-org/glm-5.2&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;		messages: [{ role: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;user&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, content: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;What is the capital of France?&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; }],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	},&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;		gateway: { id: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;default&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	},&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;&lt;div role=&quot;tabpanel&quot; data-nb-tabs-content data-nb-tab-label=&quot;TypeScript&quot; class&gt;&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;ts&quot;&gt;&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz&quot; tabindex=&quot;0&quot; data-language=&quot;ts&quot; data-nb-lang=&quot;ts&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; response&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; await&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; env.&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;AI&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;	&quot;@cf/zai-org/glm-5.2&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;		messages: [{ role: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;user&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, content: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;What is the capital of France?&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; }],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	},&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;		gateway: { id: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;default&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	},&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;script type=&quot;module&quot; src=&quot;https://developers.stormtrust.net/home/runner/work/infrastructure/infrastructure/org/apps/developers/src/components/ui/tabs/Tabs.astro?astro&amp;type=script&amp;index=0&amp;lang.ts&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&lt;p&gt;Requests routed through AI Gateway can be logged and included in analytics for request volume, errors, latency, token usage, and costs. You can also configure controls such as caching, rate limiting, and request retries on the gateway.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;unified-billing-and-higher-rate-limits&quot;&gt;Unified billing and higher rate limits&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#unified-billing-and-higher-rate-limits&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;anchor-icon&quot;&gt;&lt;svg width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;path fill=&quot;currentcolor&quot; d=&quot;m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;You can now use prepaid &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/features/unified-billing/&quot;&gt;AI Gateway credits&lt;/a&gt; to pay for Workers AI inference. This provides one credit balance for Workers AI and supported third-party model providers. To use credits for Workers AI, set the gateway&apos;s &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/configuration/manage-gateway/#configure-workers-ai-billing&quot;&gt;Workers AI billing setting&lt;/a&gt; to &lt;strong&gt;Unified billing&lt;/strong&gt;. Workers AI requests routed through that gateway deduct from your credit balance in real time.&lt;/p&gt;
&lt;p&gt;Prepaid credits also provide access to the following Workers AI frontier models without requiring the Workers Paid plan. Each frontier Workers AI model has a rate limit of 50 requests per minute per account, per model when billed with AI Gateway credits, compared to 20 requests per minute through standard Workers AI billing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/kimi-k2.6/&quot;&gt;&lt;code&gt;@cf/moonshotai/kimi-k2.6&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/kimi-k2.7-code/&quot;&gt;&lt;code&gt;@cf/moonshotai/kimi-k2.7-code&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/glm-5.2/&quot;&gt;&lt;code&gt;@cf/zai-org/glm-5.2&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These limits are designed for typical agentic and coding workloads, where requests to frontier models can take longer to complete.&lt;/p&gt;
&lt;p&gt;For details, refer to &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/platform/limits/&quot;&gt;Workers AI limits&lt;/a&gt;, &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/platform/pricing/&quot;&gt;Workers AI pricing&lt;/a&gt;, &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/features/unified-billing/&quot;&gt;Unified Billing&lt;/a&gt;, and the &lt;a href=&quot;https://developers.stormtrust.net/ai/models/&quot;&gt;AI Gateway model catalog&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Fri, 07 Aug 2026 00:00:00 GMT</pubDate><product>AI Gateway</product><category>AI Gateway</category><category>Workers AI</category></item><item><title>AI Gateway - Track AI spend and catch anomalous usage with User Insights</title><link>https://developers.stormtrust.net/changelog/post/2026-08-05-user-insights/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-08-05-user-insights/</guid><description>&lt;p&gt;AI Gateway now includes User Insights, a dashboard that gives you two things at once: clear visibility into how much your organization spends on AI, and a security signal that surfaces users whose usage suddenly looks abnormal. It works on the traffic already flowing through your gateway, so there is no additional setup.&lt;/p&gt;
&lt;p&gt;On the spend side, User Insights shows organization-wide totals for cost, requests, tokens, and adoption, and lets you drill into an individual user to see their spend, top models and providers, cache hit rate, and more. To attribute usage to individual users, add a user identifier with custom metadata or put your gateway behind Cloudflare Access.&lt;/p&gt;
&lt;p&gt;On the security side, User Insights baselines each user&apos;s normal usage from their 95th percentile (p95) session cost over the last 30 days, then flags sessions that exceed both that baseline and an organization-level threshold. A sudden jump above a user&apos;s own pattern is often the first sign of a compromised credential or a misbehaving agent, so you can investigate before it shows up on your bill.&lt;/p&gt;
&lt;p&gt;User Insights is available to all AI Gateway customers at no additional cost.&lt;/p&gt;</description><pubDate>Wed, 05 Aug 2026 20:00:00 GMT</pubDate><product>AI Gateway</product><category>AI Gateway</category></item><item><title>AI Gateway, Access - Identity-aware controls are now available in AI Gateway</title><link>https://developers.stormtrust.net/changelog/post/2026-08-05-access-user-id-metadata/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-08-05-access-user-id-metadata/</guid><description>&lt;p&gt;AI Gateway now integrates with Cloudflare Access, giving you two new capabilities:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Protect your gateway endpoint.&lt;/strong&gt; Put your AI Gateway behind Access so you can set policies that control who is allowed to call a specific gateway&apos;s endpoint.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Identity-aware controls.&lt;/strong&gt; When traffic reaches AI Gateway through an Access-protected custom domain, AI Gateway can use the authenticated user&apos;s Access identity in logs, analytics, routing, and spend controls.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With identity-aware controls, you can set spend limits by authenticated user, control which gateways different users can access, filter logs by user, and build policies without passing user IDs from the client application. AI Gateway adds the verified Access user ID to request metadata as &lt;code&gt;cf.user_id&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For setup instructions, refer to &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/configuration/cloudflare-access/&quot;&gt;Cloudflare Access&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Wed, 05 Aug 2026 00:00:00 GMT</pubDate><product>AI Gateway</product><category>AI Gateway</category><category>Access</category></item><item><title>AI Gateway - View the user agent of requests in AI Gateway logs</title><link>https://developers.stormtrust.net/changelog/post/2026-06-12-user-agent-logging/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-06-12-user-agent-logging/</guid><description>&lt;p&gt;AI Gateway logs now capture the user agent of the client that made each request, making it easier to identify which SDK, library, or application sent the traffic flowing through your gateway. For example, you can tell apart requests coming from &lt;code&gt;openai-python&lt;/code&gt; versus a custom application or a Cloudflare Worker.&lt;/p&gt;
&lt;p&gt;The user agent appears alongside the other details in each log entry, and you can filter logs by user agent (equals, does not equal, or contains) in the dashboard.&lt;/p&gt;
&lt;p&gt;For more information, refer to &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/observability/logging/&quot;&gt;Logging&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Fri, 12 Jun 2026 00:00:00 GMT</pubDate><product>AI Gateway</product><category>AI Gateway</category></item><item><title>AI Gateway - Control AI costs with spend limits</title><link>https://developers.stormtrust.net/changelog/post/2026-06-05-spend-limits/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-06-05-spend-limits/</guid><description>&lt;p&gt;AI Gateway now supports spend limits — cost-based budgets that track cumulative dollar spend and block requests when the budget is exceeded. Unlike rate limiting, which caps the number of requests, spend limits track actual cost based on token usage and model pricing.&lt;/p&gt;
&lt;p&gt;You can scope limits by model, provider, or custom metadata dimensions. For example, give each user a $200/day budget, cap total gateway spend at $10,000/day, or limit a specific model to $50/day per user. Each rule uses a configurable time window with fixed or sliding enforcement.&lt;/p&gt;
&lt;p&gt;Spend limits work with both &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/features/unified-billing/&quot;&gt;Unified Billing&lt;/a&gt; and &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/configuration/bring-your-own-keys/&quot;&gt;BYOK&lt;/a&gt; requests for models with known pricing.&lt;/p&gt;
&lt;p&gt;For more details, refer to the &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/features/spend-limits/&quot;&gt;Spend limits documentation&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Fri, 05 Jun 2026 00:00:00 GMT</pubDate><product>AI Gateway</product><category>AI Gateway</category></item><item><title>AI Gateway - Call any AI model through AI Gateway&apos;s new REST API</title><link>https://developers.stormtrust.net/changelog/post/2026-05-21-rest-api/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-05-21-rest-api/</guid><description>&lt;p&gt;AI Gateway now uses the AI REST API on &lt;code&gt;api.cloudflare.com&lt;/code&gt;. You can call any model — whether from OpenAI, Anthropic, Google, or hosted on Workers AI — through one unified API, using the same endpoints and authentication regardless of provider. Four endpoints are available:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;POST /ai/run&lt;/code&gt; — universal endpoint for all models and modalities&lt;/li&gt;
&lt;li&gt;&lt;code&gt;POST /ai/v1/chat/completions&lt;/code&gt; — OpenAI SDK compatible&lt;/li&gt;
&lt;li&gt;&lt;code&gt;POST /ai/v1/responses&lt;/code&gt; — OpenAI Responses API compatible&lt;/li&gt;
&lt;li&gt;&lt;code&gt;POST /ai/v1/messages&lt;/code&gt; — Anthropic SDK compatible&lt;/li&gt;
&lt;/ul&gt;
&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;bash&quot;&gt;&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot; data-nb-lang=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;curl&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; -X&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; POST&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &quot;https://api.cloudflare.com/client/v4/accounts/&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;$CLOUDFLARE_ACCOUNT_ID&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;/ai/v1/chat/completions&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;  --header&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &quot;Authorization: Bearer &lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;$CLOUDFLARE_API_TOKEN&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;  --header&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &quot;Content-Type: application/json&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;  --data&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;    &quot;model&quot;: &quot;openai/gpt-5.5&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;    &quot;messages&quot;: [{&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: &quot;What is Cloudflare?&quot;}]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;  }&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;All AI Gateway features — logging, caching, rate limiting, and guardrails — are applied automatically. Third-party models are billed through &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/features/unified-billing/&quot;&gt;Unified Billing&lt;/a&gt;, so you do not need to manage separate provider API keys.&lt;/p&gt;
&lt;p&gt;Third-party model requests are routed through your account&apos;s default gateway, which is created automatically on first use. To route requests through a specific gateway, add the &lt;code&gt;cf-aig-gateway-id&lt;/code&gt; header.&lt;/p&gt;
&lt;p&gt;If you are already calling Workers AI models through the existing REST API, that path (&lt;code&gt;/ai/run/@cf/{model}&lt;/code&gt;) continues to work. To call Workers AI models through AI Gateway, use the &lt;code&gt;@cf/&lt;/code&gt; model prefix (for example, &lt;code&gt;@cf/moonshotai/kimi-k2.6&lt;/code&gt;) and include the &lt;code&gt;cf-aig-gateway-id&lt;/code&gt; header to specify which gateway to route through.&lt;/p&gt;
&lt;p&gt;For more details and examples, refer to the &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/rest-api/&quot;&gt;REST API documentation&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Thu, 21 May 2026 00:00:00 GMT</pubDate><product>AI Gateway</product><category>AI Gateway</category></item><item><title>AI Gateway - Automatically retry on upstream provider failures on AI Gateway</title><link>https://developers.stormtrust.net/changelog/post/2026-04-02-auto-retry-upstream-failures/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-04-02-auto-retry-upstream-failures/</guid><description>&lt;p&gt;AI Gateway now supports automatic retries at the gateway level. When an upstream provider returns an error, your gateway retries the request based on the retry policy you configure, without requiring any client-side changes.&lt;/p&gt;
&lt;p&gt;You can configure the retry count (up to 5 attempts), the delay between retries (from 100ms to 5 seconds), and the backoff strategy (Constant, Linear, or Exponential). These defaults apply to all requests through the gateway, and per-request headers can override them.&lt;/p&gt;
&lt;img src=&quot;https://developers.stormtrust.net/cdn-cgi/image/onerror=redirect,width=2344,height=502,format=webp/_astro/auto-retry-changelog.DoCXZnDy.png&quot; alt=&quot;Retry Requests settings in the AI Gateway dashboard&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;2344&quot; height=&quot;502&quot;&gt;
&lt;p&gt;This is particularly useful when you do not control the client making the request and cannot implement retry logic on the caller side. For more complex failover scenarios — such as failing across different providers — use &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/features/dynamic-routing/&quot;&gt;Dynamic Routing&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For more information, refer to &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/configuration/manage-gateway/#retry-requests&quot;&gt;Manage gateways&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Thu, 02 Apr 2026 00:00:00 GMT</pubDate><product>AI Gateway</product><category>AI Gateway</category></item><item><title>AI Gateway - Log AI Gateway request metadata without storing payloads</title><link>https://developers.stormtrust.net/changelog/post/2026-03-17-collect-log-payload-header/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-03-17-collect-log-payload-header/</guid><description>&lt;p&gt;AI Gateway now supports the &lt;code&gt;cf-aig-collect-log-payload&lt;/code&gt; header, which controls whether request and response bodies are stored in logs. By default, this header is set to &lt;code&gt;true&lt;/code&gt; and payloads are stored alongside metadata. Set this header to &lt;code&gt;false&lt;/code&gt; to skip payload storage while still logging metadata such as token counts, model, provider, status code, cost, and duration.&lt;/p&gt;
&lt;p&gt;This is useful when you need usage metrics but do not want to persist sensitive prompt or response data.&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;bash&quot;&gt;&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot; data-nb-lang=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;curl&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; https://gateway.ai.cloudflare.com/v1/&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;$ACCOUNT_ID&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;$GATEWAY_ID&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;/openai/chat/completions&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;  --header&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &quot;Authorization: Bearer &lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;$TOKEN&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;  --header&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;Content-Type: application/json&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;  --header&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;cf-aig-collect-log-payload: false&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;  --data&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;    &quot;model&quot;: &quot;gpt-4o-mini&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;    &quot;messages&quot;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;      {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;        &quot;role&quot;: &quot;user&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;        &quot;content&quot;: &quot;What is the email address and phone number of user123?&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;      }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;    ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;  }&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;For more information, refer to &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/observability/logging/#collect-log-payload-cf-aig-collect-log-payload&quot;&gt;Logging&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Tue, 17 Mar 2026 00:00:00 GMT</pubDate><product>AI Gateway</product><category>AI Gateway</category></item><item><title>AI Gateway - Get started with AI Gateway automatically</title><link>https://developers.stormtrust.net/changelog/post/2026-03-02-default-gateway/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-03-02-default-gateway/</guid><description>&lt;p&gt;You can now start using AI Gateway with a single API call — no setup required. Use &lt;code&gt;default&lt;/code&gt; as your gateway ID, and AI Gateway creates one for you automatically on the first request.&lt;/p&gt;
&lt;p&gt;To try it out, &lt;a href=&quot;https://developers.stormtrust.net/fundamentals/api/get-started/create-token/&quot;&gt;create an API token&lt;/a&gt; with &lt;code&gt;AI Gateway - Read&lt;/code&gt;, &lt;code&gt;AI Gateway - Edit&lt;/code&gt;, and &lt;code&gt;Workers AI - Read&lt;/code&gt; permissions, then run:&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;bash&quot;&gt;&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot; data-nb-lang=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;curl&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; -X&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; POST&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; https://gateway.ai.cloudflare.com/v1/&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;$CLOUDFLARE_ACCOUNT_ID&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;/default/compat/chat/completions&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;  --header&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &quot;cf-aig-authorization: Bearer &lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;$CLOUDFLARE_API_TOKEN&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;  --header&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;Content-Type: application/json&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;  --data&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;    &quot;model&quot;: &quot;workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;    &quot;messages&quot;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;      {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;        &quot;role&quot;: &quot;user&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;        &quot;content&quot;: &quot;What is Cloudflare?&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;      }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;    ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;  }&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;AI Gateway gives you logging, caching, rate limiting, and access to multiple AI providers through a single endpoint. For more information, refer to &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/get-started/&quot;&gt;Get started&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Mon, 02 Mar 2026 00:00:00 GMT</pubDate><product>AI Gateway</product><category>AI Gateway</category></item><item><title>AI Gateway, Workers AI - AI dashboard experience improvements</title><link>https://developers.stormtrust.net/changelog/post/2026-02-19-ai-dashboard-experience-improvements/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-02-19-ai-dashboard-experience-improvements/</guid><description>&lt;p&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/&quot;&gt;Workers AI&lt;/a&gt; and &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/&quot;&gt;AI Gateway&lt;/a&gt; have received a series of dashboard improvements to help you get started faster and manage your AI workloads more easily.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Navigation and discoverability&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;AI now has its own top-level section in the Cloudflare dashboard sidebar, so you can find AI features without digging through menus.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://developers.stormtrust.net/cdn-cgi/image/onerror=redirect,width=2328,height=1140,format=webp/_astro/sidebar-navigation.BQNFBmAk.png&quot; alt=&quot;AI sidebar navigation in the Cloudflare dashboard&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;2328&quot; height=&quot;1140&quot;&gt;
&lt;em&gt;The new top-level AI section in the dashboard sidebar.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Onboarding and getting started&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/get-started/&quot;&gt;Getting started&lt;/a&gt; with AI Gateway is now simpler. When you create your first gateway, we now show your gateway&apos;s OpenAI-compatible endpoint and step-by-step guidance to help you configure it. The Playground also includes helpful prompts, and usage pages have clear next steps if you have not made any requests yet.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://developers.stormtrust.net/cdn-cgi/image/onerror=redirect,width=2400,height=1232,format=webp/_astro/onboarding-flow.DZ7aMcHa.png&quot; alt=&quot;AI Gateway onboarding flow&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;2400&quot; height=&quot;1232&quot;&gt;
&lt;em&gt;The first-run setup experience for new gateways.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;We&apos;ve also combined the previously separate code example sections into one view with dropdown selectors for API type, provider, SDK, and authentication method so you can now customize the exact code snippet you need from one place.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Dynamic Routing&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/features/dynamic-routing/&quot;&gt;route builder&lt;/a&gt; is now more performant and responsive.&lt;/li&gt;
&lt;li&gt;You can now copy route names to your clipboard with a single click.&lt;/li&gt;
&lt;li&gt;Code examples use the &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/universal/&quot;&gt;Universal Endpoint&lt;/a&gt; format, making it easier to integrate routes into your application.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Observability and analytics&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Small monetary values now display correctly in &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/observability/costs/&quot;&gt;cost analytics&lt;/a&gt; charts, so you can accurately track spending at any scale.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Accessibility&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Improvements to keyboard navigation within the AI Gateway, specifically when exploring usage by &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/providers/&quot;&gt;provider&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Improvements to sorting and filtering components on the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/&quot;&gt;Workers AI&lt;/a&gt; models page.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For more information, refer to the &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/&quot;&gt;AI Gateway documentation&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Thu, 19 Feb 2026 00:00:00 GMT</pubDate><product>AI Gateway</product><category>AI Gateway</category><category>Workers AI</category></item><item><title>Secrets Store, AI Gateway, SSL/TLS - Manage and deploy your AI provider keys through Bring Your Own Key (BYOK) with AI Gateway, now powered by Cloudflare Secrets Store</title><link>https://developers.stormtrust.net/changelog/post/2025-08-25-secrets-store-ai-gateway/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-08-25-secrets-store-ai-gateway/</guid><description>
&lt;p&gt;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 &lt;a href=&quot;https://developers.cloudflare.com/ai-gateway/configuration/bring-your-own-keys/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Bring Your Own Key&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;You can now create a secret directly from your AI Gateway &lt;a href=&quot;http://dash.cloudflare.com/?to=/:account/ai-gateway&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;in the dashboard&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt; by navigating into your gateway -&amp;gt; &lt;strong&gt;Provider Keys&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Add&lt;/strong&gt;.&lt;/p&gt;
&lt;img src=&quot;https://developers.stormtrust.net/cdn-cgi/image/onerror=redirect,width=2410,height=1842,format=webp/_astro/add-secret-ai-gateway.B-SIPr6s.png&quot; alt=&quot;Import repo or choose template&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;2410&quot; height=&quot;1842&quot;&gt;
&lt;p&gt;You can also create your secret with the newly available &lt;strong&gt;ai_gateway&lt;/strong&gt; scope via &lt;a href=&quot;https://developers.cloudflare.com/workers/wrangler/commands/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;wrangler&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;, the &lt;a href=&quot;http://dash.cloudflare.com/?to=/:account/secrets-store&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Secrets Store dashboard&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;, or the &lt;a href=&quot;https://developers.cloudflare.com/api/resources/secrets_store/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;API&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Then, pass the key in the request header using its Secrets Store reference:&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;bash&quot;&gt;&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot; data-nb-lang=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;curl&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; -X&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; POST&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; https://gateway.ai.cloudflare.com/v1/&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;ACCOUNT_I&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;D&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;/my-gateway/anthropic/v1/messages&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; --header&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;cf-aig-authorization: ANTHROPIC_KEY_1 \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; --header &apos;anthropic-version:&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; 2023-06-01&apos; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; --header &apos;Content-Type:&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; application/json&apos; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; --data  &apos;{&quot;model&quot;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &quot;claude-3-opus-20240229&quot;,&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &quot;messages&quot;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; [{&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;&quot;role&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &quot;user&quot;,&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &quot;content&quot;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &quot;What is Cloudflare?&quot;}]}&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;Or, using Javascript:&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;plaintext&quot;&gt;&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot; data-nb-lang=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;import Anthropic from &apos;@anthropic-ai/sdk&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;const anthropic = new Anthropic({&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt; apiKey: &quot;ANTHROPIC_KEY_1&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt; baseURL: &quot;https://gateway.ai.cloudflare.com/v1/&amp;lt;ACCOUNT_ID&amp;gt;/my-gateway/anthropic&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;const message = await anthropic.messages.create({&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt; model: &apos;claude-3-opus-20240229&apos;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt; messages: [{role: &quot;user&quot;, content: &quot;What is Cloudflare?&quot;}],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt; max_tokens: 1024&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;For more information, check out the &lt;a href=&quot;https://blog.cloudflare.com/ai-gateway-aug-2025-refresh&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;blog&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;!&lt;/p&gt;</description><pubDate>Mon, 25 Aug 2025 11:00:00 GMT</pubDate><product>Secrets Store</product><category>Secrets Store</category><category>AI Gateway</category><category>SSL/TLS</category></item><item><title>AI Gateway - AI Gateway adds OpenAI compatible endpoint</title><link>https://developers.stormtrust.net/changelog/post/2025-06-03-aig-openai-compatible-endpoint/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-06-03-aig-openai-compatible-endpoint/</guid><description>&lt;p&gt;Users can now use an &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/chat-completion/&quot;&gt;OpenAI Compatible endpoint&lt;/a&gt; in AI Gateway to easily switch between providers, while keeping the exact same request and response formats. We&apos;re launching now with the chat completions endpoint, with the embeddings endpoint coming up next.&lt;/p&gt;
&lt;p&gt;To get started, use the OpenAI compatible chat completions endpoint URL with your own account id and gateway id and switch between providers by changing the &lt;code&gt;model&lt;/code&gt; and &lt;code&gt;apiKey&lt;/code&gt; parameters.&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure nb-code-figure-titled&quot; data-nb-lang=&quot;js&quot;&gt;&lt;figcaption class=&quot;nb-code-title&quot;&gt;&lt;span class=&quot;nb-code-title-name&quot;&gt;OpenAI SDK Example&lt;/span&gt;&lt;span class=&quot;nb-code-title-lang&quot;&gt;js&lt;/span&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot; data-nb-lang=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; OpenAI &lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &quot;openai&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; client&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; new&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; OpenAI&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;({&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	apiKey: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;YOUR_PROVIDER_API_KEY&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;// Provider API key&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	baseURL:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;		&quot;https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/compat&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; response&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; await&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; client.chat.completions.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;create&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;({&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	model: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;google-ai-studio/gemini-2.0-flash&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	messages: [{ role: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;user&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, content: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;What is Cloudflare?&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; }],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;console.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(response.choices[&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;].message.content);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;Additionally, the &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/chat-completion/&quot;&gt;OpenAI Compatible endpoint&lt;/a&gt; can be combined with our &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/universal/&quot;&gt;Universal Endpoint&lt;/a&gt; to add fallbacks across multiple providers. That means AI Gateway will return every response in the same standardized format, no extra parsing logic required!&lt;/p&gt;
&lt;p&gt;Learn more in the &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/chat-completion/&quot;&gt;OpenAI Compatibility&lt;/a&gt; documentation.&lt;/p&gt;</description><pubDate>Tue, 03 Jun 2025 00:00:00 GMT</pubDate><product>AI Gateway</product><category>AI Gateway</category></item><item><title>AI Gateway - AI Gateway launches Realtime WebSockets API</title><link>https://developers.stormtrust.net/changelog/post/2025-03-20-websockets/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-03-20-websockets/</guid><description>&lt;p&gt;We are excited to announce that &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/&quot;&gt;AI Gateway&lt;/a&gt; now supports real-time AI interactions with the new &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/websockets-api/realtime-api/&quot;&gt;Realtime WebSockets API&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This new capability allows developers to establish persistent, low-latency connections between their applications and AI models, enabling natural, real-time conversational AI experiences, including speech-to-speech interactions.&lt;/p&gt;
&lt;p&gt;The Realtime WebSockets API works with the &lt;a href=&quot;https://platform.openai.com/docs/guides/realtime#connect-with-websockets&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;OpenAI Realtime API&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;, &lt;a href=&quot;https://ai.google.dev/gemini-api/docs/multimodal-live&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Google Gemini Live API&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;, and supports real-time text and speech interactions with models from &lt;a href=&quot;https://docs.cartesia.ai/api-reference/tts/tts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Cartesia&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;, and &lt;a href=&quot;https://elevenlabs.io/docs/conversational-ai/api-reference/conversational-ai/websocket&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;ElevenLabs&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here&apos;s how you can connect AI Gateway to &lt;a href=&quot;https://platform.openai.com/docs/guides/realtime#connect-with-websockets&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;OpenAI&apos;s Realtime API&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt; using WebSockets:&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure nb-code-figure-titled&quot; data-nb-lang=&quot;javascript&quot;&gt;&lt;figcaption class=&quot;nb-code-title&quot;&gt;&lt;span class=&quot;nb-code-title-name&quot;&gt;OpenAI Realtime API example&lt;/span&gt;&lt;span class=&quot;nb-code-title-lang&quot;&gt;javascript&lt;/span&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz&quot; tabindex=&quot;0&quot; data-language=&quot;javascript&quot; data-nb-lang=&quot;javascript&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; WebSocket &lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &quot;ws&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; url&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;	&quot;wss://gateway.ai.cloudflare.com/v1/&amp;lt;account_id&amp;gt;/&amp;lt;gateway&amp;gt;/openai?model=gpt-4o-realtime-preview-2024-12-17&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; ws&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; new&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; WebSocket&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(url, {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	headers: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;		&quot;cf-aig-authorization&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: process.env.&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;CLOUDFLARE_API_KEY&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;		Authorization: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;Bearer &quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; +&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; process.env.&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;		&quot;OpenAI-Beta&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;realtime=v1&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	},&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;});&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;ws.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;open&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, () &lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; console.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;Connected to server.&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;ws.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;message&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, (&lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;) &lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; console.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;JSON&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(message.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;())));&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;ws.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;send&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;	JSON&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;stringify&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;({&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;		type: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;response.create&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;		response: { modalities: [&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;text&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;], instructions: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;Tell me a joke&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	}),&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;Get started by checking out the &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/websockets-api/realtime-api/&quot;&gt;Realtime WebSockets API&lt;/a&gt; documentation.&lt;/p&gt;</description><pubDate>Fri, 21 Mar 2025 00:00:00 GMT</pubDate><product>AI Gateway</product><category>AI Gateway</category></item><item><title>AI Gateway - Introducing Guardrails in AI Gateway</title><link>https://developers.stormtrust.net/changelog/post/2025-02-26-guardrails/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-02-26-guardrails/</guid><description>&lt;p&gt;&lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/&quot;&gt;AI Gateway&lt;/a&gt; now includes &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/features/guardrails/&quot;&gt;Guardrails&lt;/a&gt;, to help you monitor your AI apps for harmful or inappropriate content and deploy safely.&lt;/p&gt;
&lt;p&gt;Within the AI Gateway settings, you can configure:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Guardrails&lt;/strong&gt;: Enable or disable content moderation as needed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Evaluation scope&lt;/strong&gt;: Select whether to moderate user prompts, model responses, or both.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hazard categories&lt;/strong&gt;: Specify which categories to monitor and determine whether detected inappropriate content should be blocked or flagged.&lt;/li&gt;
&lt;/ul&gt;
&lt;img src=&quot;https://developers.stormtrust.net/cdn-cgi/image/onerror=redirect,width=2524,height=444,format=webp/_astro/Guardrails.BTNc0qeC.png&quot; alt=&quot;Guardrails in AI Gateway&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;2524&quot; height=&quot;444&quot;&gt;
&lt;p&gt;Learn more in the &lt;a href=&quot;https://blog.cloudflare.com/guardrails-in-ai-gateway/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;blog&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt; or our &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/features/guardrails/&quot;&gt;documentation&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Wed, 26 Feb 2025 00:00:00 GMT</pubDate><product>AI Gateway</product><category>AI Gateway</category></item><item><title>AI Gateway - Request timeouts and retries with AI Gateway</title><link>https://developers.stormtrust.net/changelog/post/2025-02-05-aig-request-handling/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-02-05-aig-request-handling/</guid><description>&lt;p&gt;AI Gateway adds additional ways to handle requests - &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/configuration/request-handling/#request-timeouts&quot;&gt;Request Timeouts&lt;/a&gt; and &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/configuration/request-handling/#request-retries&quot;&gt;Request Retries&lt;/a&gt;, making it easier to keep your applications responsive and reliable.&lt;/p&gt;
&lt;p&gt;Timeouts and retries can be used on both the &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/universal/&quot;&gt;Universal Endpoint&lt;/a&gt; or directly to a &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/providers/&quot;&gt;supported provider&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Request timeouts&lt;/strong&gt;
A &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/configuration/request-handling/#request-timeouts&quot;&gt;request timeout&lt;/a&gt; allows you to trigger &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/configuration/fallbacks/&quot;&gt;fallbacks&lt;/a&gt; or a retry if a provider takes too long to respond.&lt;/p&gt;
&lt;p&gt;To set a request timeout directly to a provider, add a &lt;code&gt;cf-aig-request-timeout&lt;/code&gt; header.&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure nb-code-figure-titled&quot; data-nb-lang=&quot;bash&quot;&gt;&lt;figcaption class=&quot;nb-code-title&quot;&gt;&lt;span class=&quot;nb-code-title-name&quot;&gt;Provider-specific endpoint example&lt;/span&gt;&lt;span class=&quot;nb-code-title-lang&quot;&gt;bash&lt;/span&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot; data-nb-lang=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;curl&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/workers-ai/@cf/meta/llama-3.1-8b-instruct&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; --header&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;Authorization: Bearer {cf_api_token}&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; --header&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;Content-Type: application/json&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line highlighted&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; --header&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;cf-aig-request-timeout: 5000&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; --data&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;{&quot;prompt&quot;: &quot;What is Cloudflare?&quot;}&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Request retries&lt;/strong&gt;
A &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/configuration/request-handling/#request-retries&quot;&gt;request retry&lt;/a&gt; automatically retries failed requests, so you can recover from temporary issues without intervening.&lt;/p&gt;
&lt;p&gt;To set up request retries directly to a provider, add the following headers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;cf-aig-max-attempts (number)&lt;/li&gt;
&lt;li&gt;cf-aig-retry-delay (number)&lt;/li&gt;
&lt;li&gt;cf-aig-backoff (&quot;constant&quot; | &quot;linear&quot; | &quot;exponential)&lt;/li&gt;
&lt;/ul&gt;</description><pubDate>Thu, 06 Feb 2025 00:00:00 GMT</pubDate><product>AI Gateway</product><category>AI Gateway</category></item><item><title>AI Gateway - AI Gateway adds Cerebras, ElevenLabs, and Cartesia as new providers</title><link>https://developers.stormtrust.net/changelog/post/2025-02-04-aig-provider-cartesia-eleven-cerebras/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-02-04-aig-provider-cartesia-eleven-cerebras/</guid><description>&lt;p&gt;&lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/&quot;&gt;AI Gateway&lt;/a&gt; has added three new providers: &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/providers/cartesia/&quot;&gt;Cartesia&lt;/a&gt;, &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/providers/cerebras/&quot;&gt;Cerebras&lt;/a&gt;, and &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/providers/elevenlabs/&quot;&gt;ElevenLabs&lt;/a&gt;, giving you more even more options for providers you can use through AI Gateway. Here&apos;s a brief overview of each:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/providers/cartesia/&quot;&gt;Cartesia&lt;/a&gt; provides text-to-speech models that produce natural-sounding speech with low latency.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/providers/cerebras/&quot;&gt;Cerebras&lt;/a&gt; delivers low-latency AI inference to Meta&apos;s Llama 3.1 8B and Llama 3.3 70B models.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/providers/elevenlabs/&quot;&gt;ElevenLabs&lt;/a&gt; offers text-to-speech models with human-like voices in 32 languages.&lt;/li&gt;
&lt;/ul&gt;
&lt;img src=&quot;https://developers.stormtrust.net/cdn-cgi/image/onerror=redirect,width=2278,height=1020,format=webp/_astro/cerebras2.qHYP0ZnF.png&quot; alt=&quot;Example of Cerebras log in AI Gateway&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;2278&quot; height=&quot;1020&quot;&gt;
&lt;p&gt;To get started with AI Gateway, just update the base URL. Here&apos;s how you can send a request to &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/providers/cerebras/&quot;&gt;Cerebras&lt;/a&gt; using cURL:&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure nb-code-figure-titled&quot; data-nb-lang=&quot;bash&quot;&gt;&lt;figcaption class=&quot;nb-code-title&quot;&gt;&lt;span class=&quot;nb-code-title-name&quot;&gt;Example fetch request&lt;/span&gt;&lt;span class=&quot;nb-code-title-lang&quot;&gt;bash&lt;/span&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot; data-nb-lang=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;curl&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; -X&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; POST&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; https://gateway.ai.cloudflare.com/v1/ACCOUNT_TAG/GATEWAY/cerebras/chat/completions&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; --header&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;content-type: application/json&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; --header&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;Authorization: Bearer CEREBRAS_TOKEN&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; --data&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;    &quot;model&quot;: &quot;llama-3.3-70b&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;    &quot;messages&quot;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;        {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;            &quot;role&quot;: &quot;user&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;            &quot;content&quot;: &quot;What is Cloudflare?&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;    ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;}&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;</description><pubDate>Wed, 05 Feb 2025 00:00:00 GMT</pubDate><product>AI Gateway</product><category>AI Gateway</category></item><item><title>AI Gateway - AI Gateway Introduces New Worker Binding Methods</title><link>https://developers.stormtrust.net/changelog/post/2025-01-26-worker-binding-methods/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-01-26-worker-binding-methods/</guid><description>&lt;p&gt;We have released new &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/worker-binding-methods/&quot;&gt;Workers bindings API methods&lt;/a&gt;, allowing you to connect Workers applications to AI Gateway directly. These methods simplify how Workers calls AI services behind your AI Gateway configurations, removing the need to use the REST API and manually authenticate.&lt;/p&gt;
&lt;p&gt;To add an AI binding to your Worker, include the following in your &lt;a href=&quot;https://developers.stormtrust.net/workers/wrangler/configuration/&quot;&gt;Wrangler configuration file&lt;/a&gt;:&lt;/p&gt;
&lt;img src=&quot;https://developers.stormtrust.net/cdn-cgi/image/onerror=redirect,width=754,height=135,format=webp/_astro/add-binding.BoYTiyon.png&quot; alt=&quot;Add an AI binding to your Worker.&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;754&quot; height=&quot;135&quot;&gt;
&lt;p&gt;With the new AI Gateway binding methods, you can now:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Send feedback and update metadata with &lt;code&gt;patchLog&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Retrieve detailed log information using &lt;code&gt;getLog&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Execute &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/universal/&quot;&gt;universal requests&lt;/a&gt; to any AI Gateway provider with &lt;code&gt;run&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, to send feedback and update metadata using &lt;code&gt;patchLog&lt;/code&gt;:&lt;/p&gt;
&lt;img src=&quot;https://developers.stormtrust.net/cdn-cgi/image/onerror=redirect,width=736,height=235,format=webp/_astro/send-feedback.BGRzKmd9.png&quot; alt=&quot;Send feedback and update metadata using patchLog:&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;736&quot; height=&quot;235&quot;&gt;</description><pubDate>Thu, 30 Jan 2025 00:00:00 GMT</pubDate><product>AI Gateway</product><category>AI Gateway</category></item><item><title>AI Gateway - AI Gateway adds DeepSeek as a Provider</title><link>https://developers.stormtrust.net/changelog/post/2025-01-07-aig-provider-deepseek/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-01-07-aig-provider-deepseek/</guid><description>&lt;p&gt;&lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/&quot;&gt;&lt;strong&gt;AI Gateway&lt;/strong&gt;&lt;/a&gt; now supports &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/providers/deepseek/&quot;&gt;&lt;strong&gt;DeepSeek&lt;/strong&gt;&lt;/a&gt;, including their cutting-edge DeepSeek-V3 model. With this addition, you have even more flexibility to manage and optimize your AI workloads using AI Gateway. Whether you&apos;re leveraging DeepSeek or other providers, like OpenAI, Anthropic, or &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/&quot;&gt;Workers AI&lt;/a&gt;, AI Gateway empowers you to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Monitor&lt;/strong&gt;: Gain actionable insights with analytics and logs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Control&lt;/strong&gt;: Implement caching, rate limiting, and fallbacks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Optimize&lt;/strong&gt;: Improve performance with feedback and evaluations.&lt;/li&gt;
&lt;/ul&gt;
&lt;img src=&quot;https://developers.stormtrust.net/cdn-cgi/image/onerror=redirect,width=1600,height=131,format=webp/_astro/deepseek.hirkr3rv.png&quot; alt=&quot;AI Gateway adds DeepSeek as a provider&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1600&quot; height=&quot;131&quot;&gt;
&lt;p&gt;To get started, simply update the base URL of your DeepSeek API calls to route through AI Gateway. Here&apos;s how you can send a request using cURL:&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure nb-code-figure-titled&quot; data-nb-lang=&quot;bash&quot;&gt;&lt;figcaption class=&quot;nb-code-title&quot;&gt;&lt;span class=&quot;nb-code-title-name&quot;&gt;Example fetch request&lt;/span&gt;&lt;span class=&quot;nb-code-title-lang&quot;&gt;bash&lt;/span&gt;&lt;/figcaption&gt;&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot; data-nb-lang=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;curl&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/deepseek/chat/completions&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; --header&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;content-type: application/json&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; --header&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;Authorization: Bearer DEEPSEEK_TOKEN&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; --data&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;    &quot;model&quot;: &quot;deepseek-chat&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;    &quot;messages&quot;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;        {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;            &quot;role&quot;: &quot;user&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;            &quot;content&quot;: &quot;What is Cloudflare?&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;    ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;}&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;For detailed setup instructions, see our &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/usage/providers/deepseek/&quot;&gt;DeepSeek provider documentation&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Thu, 02 Jan 2025 00:00:00 GMT</pubDate><product>AI Gateway</product><category>AI Gateway</category></item></channel></rss>