<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>Cloudflare changelogs | Workers AI</title><description>Cloudflare changelogs for Workers AI</description><link>https://developers.stormtrust.net/changelog/</link><item><title>Workers AI - DeepSeek V4 Flash and Pro now available on Workers AI</title><link>https://developers.stormtrust.net/changelog/post/2026-08-14-deepseek-v4-workers-ai/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-08-14-deepseek-v4-workers-ai/</guid><description>&lt;p&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/deepseek-v4-pro-0813/&quot;&gt;&lt;code&gt;@cf/deepseek-ai/deepseek-v4-pro-0813&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/deepseek-v4-flash-0731/&quot;&gt;&lt;code&gt;@cf/deepseek-ai/deepseek-v4-flash-0731&lt;/code&gt;&lt;/a&gt; are now available on Workers AI.&lt;/p&gt;
&lt;p&gt;DeepSeek V4 Flash and DeepSeek V4 Pro are the first Workers AI models with a full &lt;strong&gt;one million (1,048,576) token context window&lt;/strong&gt;. Use them for long-horizon agentic workflows, large codebases, and multi-step reasoning that exceed the context limits of every other model hosted on the platform.&lt;/p&gt;
&lt;p&gt;DeepSeek V4 Flash is the faster, lower-cost sibling. This release supersedes the preview version with substantially enhanced agentic capabilities.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key capabilities:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Reasoning&lt;/strong&gt;: Both models support thinking mode for complex, step-by-step problem-solving.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Function calling&lt;/strong&gt;: Build agents that invoke tools and APIs across multiple conversation turns.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Long context&lt;/strong&gt;: Both models support a full 1,048,576 token context window.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Both models require the &lt;a href=&quot;https://developers.stormtrust.net/workers/platform/pricing/#workers&quot;&gt;Workers Paid plan&lt;/a&gt; or prepaid &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/features/unified-billing/&quot;&gt;AI Gateway credits&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Use these models through the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/configuration/bindings/&quot;&gt;Workers AI binding&lt;/a&gt; (&lt;code&gt;env.AI.run()&lt;/code&gt;), the REST API, the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/configuration/open-ai-compatibility/&quot;&gt;OpenAI-compatible endpoint&lt;/a&gt;, or &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/&quot;&gt;AI Gateway&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For more information, refer to the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/deepseek-v4-pro-0813/&quot;&gt;DeepSeek V4 Pro model page&lt;/a&gt;, the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/deepseek-v4-flash-0731/&quot;&gt;DeepSeek V4 Flash model page&lt;/a&gt;, and &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/platform/pricing/&quot;&gt;pricing&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Fri, 14 Aug 2026 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><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>Workers AI - Select models now require the Workers Paid plan</title><link>https://developers.stormtrust.net/changelog/post/2026-07-28-models-require-workers-paid/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-07-28-models-require-workers-paid/</guid><description>&lt;p&gt;We are limiting Workers Free plan access to a few resource-intensive models so we can prioritize capacity for the broader Workers AI user base. This helps everyone get a more reliable inference experience, with fewer &lt;code&gt;429&lt;/code&gt; and &lt;code&gt;3040&lt;/code&gt; (Out of Capacity) errors.&lt;/p&gt;
&lt;p&gt;The following models now require the &lt;a href=&quot;https://developers.stormtrust.net/workers/platform/pricing/#workers&quot;&gt;Workers Paid plan&lt;/a&gt;:&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;On the Workers Free plan, requests to these models now return a &lt;code&gt;403&lt;/code&gt; HTTP error (&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/platform/errors/&quot;&gt;internal error &lt;code&gt;5035&lt;/code&gt;&lt;/a&gt;) prompting you to upgrade. The Workers Paid plan starts at $5 per month and still includes the 10,000 free Neurons per day allocation, with usage beyond that billed at each &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/platform/pricing/&quot;&gt;model&apos;s pricing&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Many models remain available on the Workers Free plan, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/glm-4.7-flash/&quot;&gt;&lt;code&gt;@cf/zai-org/glm-4.7-flash&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/gemma-4-26b-a4b-it/&quot;&gt;&lt;code&gt;@cf/google/gemma-4-26b-a4b-it&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/nemotron-3-120b-a12b/&quot;&gt;&lt;code&gt;@cf/nvidia/nemotron-3-120b-a12b&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For the full list, refer to the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/&quot;&gt;Workers AI model catalog&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Tue, 28 Jul 2026 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers AI - Plain text output for Markdown Conversion</title><link>https://developers.stormtrust.net/changelog/post/2026-07-13-markdown-conversion-text-output/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-07-13-markdown-conversion-text-output/</guid><description>
&lt;p&gt;The &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/features/markdown-conversion/&quot;&gt;Markdown Conversion&lt;/a&gt; service now supports a new &lt;code&gt;output&lt;/code&gt; conversion option that controls the format of the converted content.&lt;/p&gt;
&lt;p&gt;Set &lt;code&gt;output.format&lt;/code&gt; to &lt;code&gt;text&lt;/code&gt; to receive plain text with Markdown syntax removed. The default value is &lt;code&gt;markdown&lt;/code&gt;, so existing conversions are unchanged.&lt;/p&gt;
&lt;p&gt;Use the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/features/markdown-conversion/usage/binding/&quot;&gt;&lt;code&gt;env.AI&lt;/code&gt;&lt;/a&gt; binding:&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;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;toMarkdown&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;	{ name: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;page.html&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, blob: &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; Blob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;([html]) },&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;		conversionOptions: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;			output: { format: &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; },&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;);&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;typescript&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;typescript&quot; data-nb-lang=&quot;typescript&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&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;toMarkdown&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;	{ name: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;page.html&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, blob: &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; Blob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;([html]) },&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;		conversionOptions: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;			output: { format: &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; },&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;);&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;Or call the REST API:&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://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/tomarkdown&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;  -H&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;Authorization: Bearer {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;  -F&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;files=@index.html&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;  -F&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;conversionOptions={&quot;output&quot;: {&quot;format&quot;: &quot;text&quot;}}&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;When you request text output, the &lt;code&gt;format&lt;/code&gt; field of each result is set to &lt;code&gt;text&lt;/code&gt;. For more details, refer to &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/features/markdown-conversion/conversion-options/#output&quot;&gt;Conversion Options&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Fri, 10 Jul 2026 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers AI, AI Search - Workers AI toMarkdown and AI Search now supports GIF and BMP image conversion</title><link>https://developers.stormtrust.net/changelog/post/2026-07-08-gif-bmp-image-support/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-07-08-gif-bmp-image-support/</guid><description>&lt;p&gt;Workers AI &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/features/markdown-conversion/&quot;&gt;Markdown conversion&lt;/a&gt; (&lt;code&gt;toMarkdown&lt;/code&gt;) now supports &lt;code&gt;.gif&lt;/code&gt; and &lt;code&gt;.bmp&lt;/code&gt; image files, in addition to the JPEG, PNG, WebP, and SVG formats already supported.&lt;/p&gt;
&lt;p&gt;GIF and BMP files run through the same &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/features/markdown-conversion/how-it-works/#images&quot;&gt;image pipeline&lt;/a&gt; as other formats. Each image is resized if needed (and for animated GIFs, only the first frame is used), then passed to an object-detection model to identify what it contains. Those detected objects prompt a vision model that writes a natural-language description of the image, which becomes searchable, machine-readable Markdown.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://developers.stormtrust.net/ai-search/&quot;&gt;AI Search&lt;/a&gt; uses &lt;code&gt;toMarkdown&lt;/code&gt; automatically to process the files it ingests, so any &lt;code&gt;.gif&lt;/code&gt; and &lt;code&gt;.bmp&lt;/code&gt; files are included the next time your index syncs, with no configuration changes required. This helps when your content mixes formats, for example a support knowledge base full of screenshots or an archive of BMP scans.&lt;/p&gt;
&lt;p&gt;Learn more about &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/features/markdown-conversion/&quot;&gt;Markdown conversion&lt;/a&gt; and the full list of &lt;a href=&quot;https://developers.stormtrust.net/ai-search/configuration/data-source/#supported-file-types&quot;&gt;AI Search&apos;s supported file types&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Wed, 08 Jul 2026 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category><category>AI Search</category></item><item><title>Workers AI - Moondream 3.1 now available on Workers AI</title><link>https://developers.stormtrust.net/changelog/post/2026-07-08-moondream3.1-workers-ai/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-07-08-moondream3.1-workers-ai/</guid><description>&lt;p&gt;Partnering with &lt;a href=&quot;https://moondream.ai/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Moondream&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt; to bring their latest model &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/moondream3.1-9B-A2B/&quot;&gt;&lt;code&gt;@cf/moondream/moondream3.1-9B-A2B&lt;/code&gt;&lt;/a&gt; to Workers AI. Moondream 3.1 is a fast vision language model built on a mixture-of-experts architecture with 9B total parameters and 2B active, delivering frontier-level visual reasoning while retaining fast, cost-efficient inference.&lt;/p&gt;
&lt;p&gt;Moondream 3.1 is designed for real-world vision tasks, with a 32K token context window for handling complex queries and structured outputs.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;key-capabilities&quot;&gt;Key capabilities&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#key-capabilities&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;ul&gt;
&lt;li&gt;&lt;strong&gt;Query&lt;/strong&gt; — ask open-ended questions about an image, with an optional reasoning parameter&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Caption&lt;/strong&gt; — generate short, normal, or long descriptions of an image&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Point&lt;/strong&gt; — return coordinates for objects matching a target phrase&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Detect&lt;/strong&gt; — return bounding boxes for objects matching a target phrase&lt;/li&gt;
&lt;/ul&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;real-time-vision-at-the-edge&quot;&gt;Real-time vision at the edge&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#real-time-vision-at-the-edge&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;Vision workloads like live camera feeds, robotics, content moderation, and interactive agents need answers in milliseconds, not seconds. Moondream 3.1&apos;s small active footprint (2B active parameters) pairs well with Workers AI&apos;s serverless, globally distributed inference: requests run close to your users, and streaming responses start returning tokens almost immediately.&lt;/p&gt;
&lt;p&gt;In our testing, first tokens streamed back in roughly 20–30 ms, and results were fast across every task. The example end-to-end times below (client-observed median, including network round trip) are for a simple, single-subject image. Actual latency depends heavily on the image and how much detail you ask for.&lt;/p&gt;
&lt;div class=&quot;table-scroll&quot; tabindex=&quot;0&quot; role=&quot;region&quot; aria-label=&quot;Table&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;End-to-end (p50)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;query&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;~770 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;caption&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;~480 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;point&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;~145 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;detect&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;~160 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;At these speeds you can call the model inline while handling a request rather than pushing the work to a background queue or a separate service. That opens up use cases where a slow response breaks the experience: moderating user-uploaded images before they are stored, locating an object in a video frame to drive a live overlay, extracting fields from a document during a form submission, or letting an agent inspect a screenshot and decide its next step within a single turn.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;get-started&quot;&gt;Get started&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#get-started&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;Use Moondream 3.1 through the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/configuration/bindings/&quot;&gt;Workers AI binding&lt;/a&gt; (&lt;code&gt;env.AI.run()&lt;/code&gt;) or the REST API at &lt;code&gt;/ai/run&lt;/code&gt;. You can also use &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/&quot;&gt;AI Gateway&lt;/a&gt; with these endpoints.&lt;/p&gt;
&lt;p&gt;For more information, refer to the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/moondream3.1-9B-A2B/&quot;&gt;Moondream 3.1 model page&lt;/a&gt; and &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/platform/pricing/&quot;&gt;pricing&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Wed, 08 Jul 2026 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers, Agents, Workers AI - Introducing GLM-5.2 on Workers AI</title><link>https://developers.stormtrust.net/changelog/post/2026-06-16-glm-5.2-workers-ai/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-06-16-glm-5.2-workers-ai/</guid><description>&lt;p&gt;We are excited to announce &lt;strong&gt;GLM-5.2&lt;/strong&gt; on Workers AI, Z.ai&apos;s flagship agentic coding model.&lt;/p&gt;
&lt;p&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; is a text generation model built for agentic coding workflows. With function calling and reasoning support, it can handle long codebases, multi-step planning, and tool-augmented agents.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key features and use cases:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Agentic coding&lt;/strong&gt;: Designed for autonomous coding tasks, long-horizon planning, and complex software engineering workflows&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Large context window&lt;/strong&gt;: GLM-5.2 supports up to a 1,048,576 token context window. Workers AI is launching the model with a 262,144 token context window and plans to increase this in the future&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Function calling&lt;/strong&gt;: Build agents that invoke tools and APIs across multiple conversation turns&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reasoning&lt;/strong&gt;: Tackles complex problem-solving and step-by-step reasoning tasks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Use GLM-5.2 through the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/configuration/bindings/&quot;&gt;Workers AI binding&lt;/a&gt; (&lt;code&gt;env.AI.run()&lt;/code&gt;), the REST API at &lt;code&gt;/run&lt;/code&gt; or &lt;code&gt;/v1/chat/completions&lt;/code&gt;, or &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/&quot;&gt;AI Gateway&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Pricing is available on the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/glm-5.2/&quot;&gt;model page&lt;/a&gt; or &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/platform/pricing/&quot;&gt;pricing page&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Tue, 16 Jun 2026 00:00:00 GMT</pubDate><product>Workers</product><category>Workers</category><category>Agents</category><category>Workers AI</category></item><item><title>Workers AI - Moonshot AI Kimi K2.7 Code now available on Workers AI</title><link>https://developers.stormtrust.net/changelog/post/2026-06-12-kimi-k2-7-code-workers-ai/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-06-12-kimi-k2-7-code-workers-ai/</guid><description>&lt;p&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; is now available on Workers AI. Kimi K2.7 Code is a code-optimized variant of the Kimi K2 family, built on a Mixture-of-Experts architecture with 1T total parameters and 32B active per token.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;improved-coding-and-agent-performance&quot;&gt;Improved coding and agent performance&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#improved-coding-and-agent-performance&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;K2.7 Code delivers meaningful gains over K2.6 on coding and agentic benchmarks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;+21.8%&lt;/strong&gt; on Kimi Code Bench v2&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;+11.0%&lt;/strong&gt; on Program Bench&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;+31.5%&lt;/strong&gt; on MLS Bench Lite&lt;/li&gt;
&lt;/ul&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;reasoning-efficiency&quot;&gt;Reasoning efficiency&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#reasoning-efficiency&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;K2.7 Code uses 30% fewer reasoning tokens compared to K2.6, reducing overthinking and lowering inference cost for reasoning-heavy workloads.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;key-capabilities&quot;&gt;Key capabilities&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#key-capabilities&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;ul&gt;
&lt;li&gt;&lt;strong&gt;262.1k token context window&lt;/strong&gt; for retaining full conversation history, tool definitions, and codebases across long-running agent sessions&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Long-horizon coding&lt;/strong&gt; with improved instruction following and higher end-to-end coding task success rates&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vision inputs&lt;/strong&gt; for processing images alongside text&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Thinking mode&lt;/strong&gt; with configurable reasoning depth via &lt;code&gt;chat_template_kwargs.thinking&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multi-turn tool calling&lt;/strong&gt; for building agents that invoke tools across multiple conversation turns&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Structured outputs&lt;/strong&gt; with JSON schema support&lt;/li&gt;
&lt;/ul&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;differences-from-kimi-k26&quot;&gt;Differences from Kimi K2.6&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#differences-from-kimi-k26&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;If you are migrating from Kimi K2.6, note the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;K2.7 Code is optimized for coding tasks with improved benchmark performance and reasoning efficiency&lt;/li&gt;
&lt;li&gt;Cached input token pricing is $0.19 per M tokens (vs $0.16 for K2.6)&lt;/li&gt;
&lt;li&gt;API usage is identical — no parameter changes required&lt;/li&gt;
&lt;/ul&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;get-started&quot;&gt;Get started&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#get-started&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;Use Kimi K2.7 Code through the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/configuration/bindings/&quot;&gt;Workers AI binding&lt;/a&gt; (&lt;code&gt;env.AI.run()&lt;/code&gt;), the REST API at &lt;code&gt;/ai/run&lt;/code&gt;, or the OpenAI-compatible endpoint at &lt;code&gt;/v1/chat/completions&lt;/code&gt;. You can also use &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/&quot;&gt;AI Gateway&lt;/a&gt; with any of these endpoints.&lt;/p&gt;
&lt;p&gt;For more information, refer to the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/kimi-k2.7-code/&quot;&gt;Kimi K2.7 Code model page&lt;/a&gt; and &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/platform/pricing/&quot;&gt;pricing&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Fri, 12 Jun 2026 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers AI - Planned model deprecations on Workers AI</title><link>https://developers.stormtrust.net/changelog/post/2026-05-08-planned-model-deprecations/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-05-08-planned-model-deprecations/</guid><description>&lt;p&gt;We are refreshing the Workers AI model catalog to make room for newer releases. Please update your apps to remove references to the models listed below before the deprecation date.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;recommended-replacements&quot;&gt;Recommended replacements&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#recommended-replacements&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;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/glm-4.7-flash/&quot;&gt;&lt;code&gt;@cf/zai-org/glm-4.7-flash&lt;/code&gt;&lt;/a&gt; — fast multilingual model with multi-turn tool calling and coding capabilities.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/gemma-4-26b-a4b-it/&quot;&gt;&lt;code&gt;@cf/google/gemma-4-26b-a4b-it&lt;/code&gt;&lt;/a&gt; — efficient open model with vision and tool calling.&lt;/li&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; — capable tool-calling and vision model for agentic workloads and coding.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For pricing, refer to the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/platform/pricing/&quot;&gt;Workers AI pricing page&lt;/a&gt;.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;kimi-k25&quot;&gt;Kimi K2.5&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#kimi-k25&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;We originally stated Kimi K2.5 would be deprecated on May 10, 2026, however we have extended the deprecation date to May 30, 2026. Requests will be automatically aliased to Kimi K2.6 on May 30, 2026, which has a higher price. Please review the &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; pricing and model capabilities prior to May 30, 2026 to ensure that the model suits your needs.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;models-deprecated-on-may-30-2026&quot;&gt;Models deprecated on May 30, 2026&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#models-deprecated-on-may-30-2026&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;ul&gt;
&lt;li&gt;&lt;code&gt;@cf/moonshotai/kimi-k2.5&lt;/code&gt; --&amp;gt; &lt;code&gt;@cf/moonshotai/kimi-k2.6&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@hf/meta-llama/meta-llama-3-8b-instruct&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@cf/meta/llama-3-8b-instruct&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@cf/meta/llama-3-8b-instruct-awq&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@cf/meta/llama-3.1-8b-instruct&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@cf/meta/llama-3.1-8b-instruct-awq&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@cf/meta/llama-3.1-70b-instruct&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@cf/meta/llama-2-7b-chat-int8&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@cf/meta/llama-2-7b-chat-fp16&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@cf/mistral/mistral-7b-instruct-v0.1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@hf/mistral/mistral-7b-instruct-v0.2&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@hf/google/gemma-7b-it&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@cf/google/gemma-3-12b-it&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@hf/nousresearch/hermes-2-pro-mistral-7b&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@cf/microsoft/phi-2&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@cf/defog/sqlcoder-7b-2&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@cf/unum/uform-gen2-qwen-500m&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@cf/facebook/bart-large-cnn&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;variants-that-remain-active&quot;&gt;Variants that remain active&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#variants-that-remain-active&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;code&gt;-fast&lt;/code&gt; and &lt;code&gt;-lora&lt;/code&gt; variants of models will remain active, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;@cf/meta/llama-3.3-70b-instruct-fp8-fast&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@cf/meta/llama-3.1-8b-instruct-fast&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@cf/google/gemma-7b-it-lora&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@cf/google/gemma-2b-it-lora&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@cf/mistral/mistral-7b-instruct-v0.2-lora&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@cf/meta-llama/llama-2-7b-chat-hf-lora&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;LoRA models may be deprecated in the future. We will be adding more LoRA capabilities to the catalog, and will communicate when new LoRA models come online to give users time to train new LoRAs before we deprecate old ones.&lt;/p&gt;
&lt;p&gt;For the full list of available models, refer to the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/&quot;&gt;Workers AI model catalog&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Fri, 08 May 2026 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers AI - Moonshot AI Kimi K2.6 now available on Workers AI</title><link>https://developers.stormtrust.net/changelog/post/2026-04-20-kimi-k2-6-workers-ai/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-04-20-kimi-k2-6-workers-ai/</guid><description>&lt;p&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; is now available on Workers AI, in partnership with Moonshot AI for Day 0 support. Kimi K2.6 is a native multimodal agentic model from Moonshot AI that advances practical capabilities in long-horizon coding, coding-driven design, proactive autonomous execution, and swarm-based task orchestration.&lt;/p&gt;
&lt;p&gt;Built on a Mixture-of-Experts architecture with 1T total parameters and 32B active per token, Kimi K2.6 delivers frontier-scale intelligence with efficient inference. It scores competitively against GPT-5.4 and Claude Opus 4.6 on agentic and coding benchmarks, including BrowseComp (83.2), SWE-Bench Verified (80.2), and Terminal-Bench 2.0 (66.7).&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;key-capabilities&quot;&gt;Key capabilities&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#key-capabilities&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;ul&gt;
&lt;li&gt;&lt;strong&gt;262.1k token context window&lt;/strong&gt; for retaining full conversation history, tool definitions, and codebases across long-running agent sessions&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Long-horizon coding&lt;/strong&gt; with significant improvements on complex, end-to-end coding tasks across languages including Rust, Go, and Python&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Coding-driven design&lt;/strong&gt; that transforms simple prompts and visual inputs into production-ready interfaces and full-stack workflows&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Agent swarm orchestration&lt;/strong&gt; scaling horizontally to 300 sub-agents executing 4,000 coordinated steps for complex autonomous tasks&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vision inputs&lt;/strong&gt; for processing images alongside text&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Thinking mode&lt;/strong&gt; with configurable reasoning depth&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multi-turn tool calling&lt;/strong&gt; for building agents that invoke tools across multiple conversation turns&lt;/li&gt;
&lt;/ul&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;differences-from-kimi-k25&quot;&gt;Differences from Kimi K2.5&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#differences-from-kimi-k25&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;If you are migrating from Kimi K2.5, note the following API changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;K2.6 uses &lt;code&gt;chat_template_kwargs.thinking&lt;/code&gt; to control reasoning, replacing &lt;code&gt;chat_template_kwargs.enable_thinking&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;K2.6 returns reasoning content in the &lt;code&gt;reasoning&lt;/code&gt; field, replacing &lt;code&gt;reasoning_content&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;get-started&quot;&gt;Get started&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#get-started&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;Use Kimi K2.6 through the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/configuration/bindings/&quot;&gt;Workers AI binding&lt;/a&gt; (&lt;code&gt;env.AI.run()&lt;/code&gt;), the REST API at &lt;code&gt;/ai/run&lt;/code&gt;, or the OpenAI-compatible endpoint at &lt;code&gt;/v1/chat/completions&lt;/code&gt;. You can also use &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/&quot;&gt;AI Gateway&lt;/a&gt; with any of these endpoints.&lt;/p&gt;
&lt;p&gt;For more information, refer to the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/kimi-k2.6/&quot;&gt;Kimi K2.6 model page&lt;/a&gt; and &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/platform/pricing/&quot;&gt;pricing&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Mon, 20 Apr 2026 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers AI - Google Gemma 4 26B A4B now available on Workers AI</title><link>https://developers.stormtrust.net/changelog/post/2026-04-04-gemma-4-26b-a4b-workers-ai/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-04-04-gemma-4-26b-a4b-workers-ai/</guid><description>&lt;p&gt;We are partnering with Google to bring &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/gemma-4-26b-a4b-it/&quot;&gt;&lt;code&gt;@cf/google/gemma-4-26b-a4b-it&lt;/code&gt;&lt;/a&gt; to Workers AI. Gemma 4 26B A4B is a Mixture-of-Experts (MoE) model built from Gemini 3 research, with 26B total parameters and only 4B active per forward pass. By activating a small subset of parameters during inference, the model runs almost as fast as a 4B-parameter model while delivering the quality of a much larger one.&lt;/p&gt;
&lt;p&gt;Gemma 4 is Google&apos;s most capable family of open models, designed to maximize intelligence-per-parameter.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;key-capabilities&quot;&gt;Key capabilities&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#key-capabilities&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;ul&gt;
&lt;li&gt;&lt;strong&gt;Mixture-of-Experts architecture&lt;/strong&gt; with 8 active experts out of 128 total (plus 1 shared expert), delivering frontier-level performance at a fraction of the compute cost of dense models&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;256,000 token context window&lt;/strong&gt; for retaining full conversation history, tool definitions, and long documents across extended sessions&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Built-in thinking mode&lt;/strong&gt; that lets the model reason step-by-step before answering, improving accuracy on complex tasks&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vision understanding&lt;/strong&gt; for object detection, document and PDF parsing, screen and UI understanding, chart comprehension, OCR (including multilingual), and handwriting recognition, with support for variable aspect ratios and resolutions&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Function calling&lt;/strong&gt; with native support for structured tool use, enabling agentic workflows and multi-step planning&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multilingual&lt;/strong&gt; with out-of-the-box support for 35+ languages, pre-trained on 140+ languages&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Coding&lt;/strong&gt; for code generation, completion, and correction&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Use Gemma 4 26B A4B through the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/configuration/bindings/&quot;&gt;Workers AI binding&lt;/a&gt; (&lt;code&gt;env.AI.run()&lt;/code&gt;), the REST API at &lt;code&gt;/run&lt;/code&gt; or &lt;code&gt;/v1/chat/completions&lt;/code&gt;, or the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/configuration/open-ai-compatibility/&quot;&gt;OpenAI-compatible endpoint&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For more information, refer to the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/gemma-4-26b-a4b-it/&quot;&gt;Gemma 4 26B A4B model page&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Sat, 04 Apr 2026 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers AI - Moonshot AI Kimi K2.5 now available on Workers AI</title><link>https://developers.stormtrust.net/changelog/post/2026-03-19-kimi-k2-5-workers-ai/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-03-19-kimi-k2-5-workers-ai/</guid><description>&lt;p&gt;Workers AI is officially in the big models game. &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/kimi-k2.5/&quot;&gt;&lt;code&gt;@cf/moonshotai/kimi-k2.5&lt;/code&gt;&lt;/a&gt; is the first frontier-scale open-source model on our AI inference platform — a large model with a full 256k context window, multi-turn tool calling, vision inputs, and structured outputs. By bringing a frontier-scale model directly onto the Cloudflare Developer Platform, you can now run the entire agent lifecycle on a single, unified platform.&lt;/p&gt;
&lt;p&gt;The model has proven to be a fast, efficient alternative to larger proprietary models without sacrificing quality. As AI adoption increases, the volume of inference is skyrocketing — now you can access frontier intelligence at a fraction of the cost.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;key-capabilities&quot;&gt;Key capabilities&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#key-capabilities&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;ul&gt;
&lt;li&gt;&lt;strong&gt;256,000 token context window&lt;/strong&gt; for retaining full conversation history, tool definitions, and entire codebases across long-running agent sessions&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multi-turn tool calling&lt;/strong&gt; for building agents that invoke tools across multiple conversation turns&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vision inputs&lt;/strong&gt; for processing images alongside text&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Structured outputs&lt;/strong&gt; with JSON mode and JSON Schema support for reliable downstream parsing&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Function calling&lt;/strong&gt; for integrating external tools and APIs into agent workflows&lt;/li&gt;
&lt;/ul&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;prefix-caching-and-session-affinity&quot;&gt;Prefix caching and session affinity&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#prefix-caching-and-session-affinity&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;When an agent sends a new prompt, it resends all previous prompts, tools, and context from the session. The delta between consecutive requests is usually just a few new lines of input. Prefix caching avoids reprocessing the shared context, saving time and compute from the prefill stage. This means faster Time to First Token (TTFT) and higher Tokens Per Second (TPS) throughput.&lt;/p&gt;
&lt;p&gt;Workers AI has done prefix caching, but we are now surfacing cached tokens as a usage metric and offering a discount on cached tokens compared to input tokens (pricing is listed on the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/kimi-k2.5/&quot;&gt;model page&lt;/a&gt;).&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-dzsirb&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;https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run/@cf/moonshotai/kimi-k2.5&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;  -H&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &quot;Authorization: Bearer {api_token}&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;  -H&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;  -H&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &quot;x-session-affinity: ses_12345678&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;  -d&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;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;system&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;You are a helpful assistant.&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;        &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 prefix caching and why does it matter?&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;    &quot;max_tokens&quot;: 2400,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;    &quot;stream&quot;: true&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;Some clients like &lt;a href=&quot;https://opencode.ai&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;OpenCode&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt; implement session affinity automatically. The &lt;a href=&quot;https://github.com/cloudflare/agents&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Agents SDK&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt; starter also sets up the wiring for you.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;redesigned-asynchronous-api&quot;&gt;Redesigned asynchronous API&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#redesigned-asynchronous-api&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;For volumes of requests that exceed synchronous rate limits, you can submit batches of inferences to be completed asynchronously. We have revamped the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/features/batch-api/&quot;&gt;Asynchronous Batch API&lt;/a&gt; with a pull-based system that processes queued requests as soon as capacity is available. With internal testing, async requests usually execute within 5 minutes, but this depends on live traffic.&lt;/p&gt;
&lt;p&gt;The async API is the best way to avoid capacity errors in durable workflows. It is ideal for use cases that are not real-time, such as code scanning agents or research agents.&lt;/p&gt;
&lt;p&gt;To use the asynchronous API, pass &lt;code&gt;queueRequest: true&lt;/code&gt;:&lt;/p&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-21nrsd&quot;&gt;// 1. Push a batch of requests into the queue&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; res&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/moonshotai/kimi-k2.5&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;		requests: [&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;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;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;Explain the Pythagoras theorem&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;	},&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	{ queueRequest: &lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;true&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-21nrsd&quot;&gt;// 2. Grab the request ID&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; requestId&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; res.request_id;&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-21nrsd&quot;&gt;// 3. Poll for the result&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; result&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 class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;@cf/moonshotai/kimi-k2.5&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;	request_id: requestId,&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;if&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; (result.status &lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;===&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &quot;queued&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; result.status &lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;===&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &quot;running&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-21nrsd&quot;&gt;	// Retry by polling again&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 class=&quot;nb-shiki-1itgoe&quot;&gt;else&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;	return&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; Response.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(result);&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;You can also set up &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/platform/event-subscriptions/&quot;&gt;event notifications&lt;/a&gt; to know when inference is complete instead of polling.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;get-started&quot;&gt;Get started&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#get-started&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;Use Kimi K2.5 through the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/configuration/bindings/&quot;&gt;Workers AI binding&lt;/a&gt; (&lt;code&gt;env.AI.run()&lt;/code&gt;), the REST API at &lt;code&gt;/run&lt;/code&gt; or &lt;code&gt;/v1/chat/completions&lt;/code&gt;, &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/&quot;&gt;AI Gateway&lt;/a&gt;, or via the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/configuration/open-ai-compatibility/&quot;&gt;OpenAI-compatible endpoint&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For more information, refer to the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/kimi-k2.5/&quot;&gt;Kimi K2.5 model page&lt;/a&gt;, &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/platform/pricing/&quot;&gt;pricing&lt;/a&gt;, and &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/features/prompt-caching/&quot;&gt;prompt caching&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Thu, 19 Mar 2026 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers AI - NVIDIA Nemotron 3 Super now available on Workers AI</title><link>https://developers.stormtrust.net/changelog/post/2026-03-11-nemotron-3-super-workers-ai/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-03-11-nemotron-3-super-workers-ai/</guid><description>
&lt;p&gt;We&apos;re excited to partner with NVIDIA to bring &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/nemotron-3-120b-a12b/&quot;&gt;&lt;code&gt;@cf/nvidia/nemotron-3-120b-a12b&lt;/code&gt;&lt;/a&gt; to Workers AI. NVIDIA Nemotron 3 Super is a Mixture-of-Experts (MoE) model with a hybrid Mamba-transformer architecture, 120B total parameters, and 12B active parameters per forward pass.&lt;/p&gt;
&lt;p&gt;The model is optimized for running many collaborating agents per application. It delivers high accuracy for reasoning, tool calling, and instruction following across complex multi-step tasks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key capabilities:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Hybrid Mamba-transformer architecture&lt;/strong&gt; delivers over 50% higher token generation throughput compared to leading open models, reducing latency for real-world applications&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tool calling&lt;/strong&gt; support for building AI agents that invoke tools across multiple conversation turns&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multi-Token Prediction (MTP)&lt;/strong&gt; accelerates long-form text generation by predicting several future tokens simultaneously in a single forward pass&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;32,000 token context window&lt;/strong&gt; for retaining conversation history and plan states across multi-step agent workflows&lt;/li&gt;
&lt;/ul&gt;
&lt;aside role=&quot;note&quot; aria-label=&quot;Prompt caching&quot; class=&quot;aside-card flex items-start gap-3 rounded-lg px-4 py-3 my-4&quot; style=&quot;--_c: var(--nb-info); --_t: var(--nb-info-muted);&quot; data-astro-cid-znle5jil&gt;&lt;span class=&quot;flex h-[1.375em] shrink-0 items-center&quot; aria-hidden=&quot;true&quot; data-astro-cid-znle5jil&gt;&lt;svg width=&quot;1em&quot; height=&quot;1em&quot; viewBox=&quot;0 0 256 256&quot; class=&quot;h-[1em] w-[1em]&quot; data-astro-cid-znle5jil=&quot;true&quot; data-icon=&quot;ph:info&quot;&gt;&lt;path fill=&quot;currentColor&quot; d=&quot;M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 192a88 88 0 1 1 88-88a88.1 88.1 0 0 1-88 88m16-40a8 8 0 0 1-8 8a16 16 0 0 1-16-16v-40a8 8 0 0 1 0-16a16 16 0 0 1 16 16v40a8 8 0 0 1 8 8m-32-92a12 12 0 1 1 12 12a12 12 0 0 1-12-12&quot;/&gt;&lt;/svg&gt;&lt;/span&gt;&lt;div class=&quot;flex min-w-0 flex-1 flex-col gap-0.5&quot; data-astro-cid-znle5jil&gt;&lt;p class=&quot;m-0 text-base leading-snug font-semibold&quot; data-astro-cid-znle5jil&gt;Prompt caching&lt;/p&gt;&lt;div class=&quot;aside-card-body text-sm leading-normal&quot; data-astro-cid-znle5jil&gt;&lt;p&gt;For optimal performance with multi-turn conversations, send the &lt;code&gt;x-session-affinity&lt;/code&gt; header with a unique session identifier to enable prompt caching. This routes requests to the same model instance, reducing latency and inference costs. For details, refer to &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/features/prompt-caching/&quot;&gt;Prompt caching&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;p&gt;Use Nemotron 3 Super through the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/configuration/bindings/&quot;&gt;Workers AI binding&lt;/a&gt; (&lt;code&gt;env.AI.run()&lt;/code&gt;), the REST API at &lt;code&gt;/run&lt;/code&gt; or &lt;code&gt;/v1/chat/completions&lt;/code&gt;, or the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/configuration/open-ai-compatibility/&quot;&gt;OpenAI-compatible endpoint&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For more information, refer to the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/nemotron-3-120b-a12b/&quot;&gt;Nemotron 3 Super model page&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Wed, 11 Mar 2026 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers AI, Realtime - Real-time transcription in RealtimeKit now supports 10 languages with regional variants</title><link>https://developers.stormtrust.net/changelog/post/2026-03-06-realtimekit-multilingual-transcription/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-03-06-realtimekit-multilingual-transcription/</guid><description>&lt;p&gt;&lt;a href=&quot;https://developers.stormtrust.net/realtime/realtimekit/ai/transcription/&quot;&gt;Real-time transcription&lt;/a&gt; in RealtimeKit now supports 10 languages with regional variants, powered by &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/nova-3/&quot;&gt;Deepgram Nova-3&lt;/a&gt; running on &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/&quot;&gt;Workers AI&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;During a meeting, participant audio is routed through &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/&quot;&gt;AI Gateway&lt;/a&gt; to Nova-3 on Workers AI — so transcription runs on Cloudflare&apos;s network end-to-end, reducing latency compared to routing through external speech-to-text services.&lt;/p&gt;
&lt;p&gt;Set the language when &lt;a href=&quot;https://developers.stormtrust.net/realtime/realtimekit/concepts/meeting/&quot;&gt;creating a meeting&lt;/a&gt; via &lt;code&gt;ai_config.transcription.language&lt;/code&gt;:&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;json&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;json&quot; data-nb-lang=&quot;json&quot;&gt;&lt;code&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-dzsirb&quot;&gt;	&quot;ai_config&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-dzsirb&quot;&gt;		&quot;transcription&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-dzsirb&quot;&gt;			&quot;language&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;fr&quot;&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;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;Supported languages include English, Spanish, French, German, Hindi, Russian, Portuguese, Japanese, Italian, and Dutch — with regional variants like &lt;code&gt;en-AU&lt;/code&gt;, &lt;code&gt;en-GB&lt;/code&gt;, &lt;code&gt;en-IN&lt;/code&gt;, &lt;code&gt;en-NZ&lt;/code&gt;, &lt;code&gt;es-419&lt;/code&gt;, &lt;code&gt;fr-CA&lt;/code&gt;, &lt;code&gt;de-CH&lt;/code&gt;, &lt;code&gt;pt-BR&lt;/code&gt;, and &lt;code&gt;pt-PT&lt;/code&gt;. Use &lt;code&gt;multi&lt;/code&gt; for automatic multilingual detection.&lt;/p&gt;
&lt;p&gt;If you are building voice agents or real-time translation workflows, your agent can now transcribe in the caller&apos;s language natively — no extra services or routing logic needed.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/realtime/realtimekit/ai/transcription/&quot;&gt;Transcription docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/nova-3/&quot;&gt;Nova-3 model page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/&quot;&gt;Workers AI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/&quot;&gt;AI Gateway&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><pubDate>Fri, 06 Mar 2026 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category><category>Realtime</category></item><item><title>Workers AI - New conversion options for Markdown Conversion</title><link>https://developers.stormtrust.net/changelog/post/2026-03-04-new-markdown-conversion-options/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-03-04-new-markdown-conversion-options/</guid><description>
&lt;p&gt;You can now customize how the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/features/markdown-conversion/&quot;&gt;Markdown Conversion&lt;/a&gt; service processes different file types by passing a &lt;code&gt;conversionOptions&lt;/code&gt; object.&lt;/p&gt;
&lt;p&gt;Available options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Images&lt;/strong&gt;: Set the language for AI-generated image descriptions&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;HTML&lt;/strong&gt;: Use CSS selectors to extract specific content, or provide a hostname to resolve relative links&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PDF&lt;/strong&gt;: Exclude metadata from the output&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Use the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/features/markdown-conversion/usage/binding/&quot;&gt;&lt;code&gt;env.AI&lt;/code&gt;&lt;/a&gt; binding:&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;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;toMarkdown&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;	{ name: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;page.html&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, blob: &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; Blob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;([html]) },&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;		conversionOptions: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;			html: { cssSelector: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;article.content&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;			image: { descriptionLanguage: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;es&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;);&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;typescript&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;typescript&quot; data-nb-lang=&quot;typescript&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&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;toMarkdown&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;	{ name: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;page.html&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, blob: &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; Blob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;([html]) },&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;		conversionOptions: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;			html: { cssSelector: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;article.content&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;			image: { descriptionLanguage: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;es&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;);&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;Or call the REST API:&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://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/tomarkdown&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;  -H&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;Authorization: Bearer {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;  -F&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;files=@index.html&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;  -F&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;conversionOptions={&quot;html&quot;: {&quot;cssSelector&quot;: &quot;article.content&quot;}}&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;For more details, refer to &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/features/markdown-conversion/conversion-options/&quot;&gt;Conversion Options&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Wed, 04 Mar 2026 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</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>Workers, Agents, Workers AI - Introducing GLM-4.7-Flash on Workers AI, @cloudflare/tanstack-ai, and workers-ai-provider v3.1.1</title><link>https://developers.stormtrust.net/changelog/post/2026-02-13-glm-4.7-flash-workers-ai/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-02-13-glm-4.7-flash-workers-ai/</guid><description>&lt;p&gt;We&apos;re excited to announce &lt;strong&gt;GLM-4.7-Flash&lt;/strong&gt; on Workers AI, a fast and efficient text generation model optimized for multilingual dialogue and instruction-following tasks, along with the brand-new &lt;a href=&quot;https://www.npmjs.com/package/@cloudflare/tanstack-ai&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;strong&gt;@cloudflare/tanstack-ai&lt;/strong&gt;&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt; package and &lt;a href=&quot;https://www.npmjs.com/package/workers-ai-provider&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;strong&gt;workers-ai-provider v3.1.1&lt;/strong&gt;&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can now run AI agents entirely on Cloudflare. With GLM-4.7-Flash&apos;s multi-turn tool calling support, plus full compatibility with TanStack AI and the Vercel AI SDK, you have everything you need to build agentic applications that run completely at the edge.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;glm-47-flash--multilingual-text-generation-model&quot;&gt;GLM-4.7-Flash — Multilingual Text Generation Model&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#glm-47-flash--multilingual-text-generation-model&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;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/glm-4.7-flash/&quot;&gt;&lt;code&gt;@cf/zai-org/glm-4.7-flash&lt;/code&gt;&lt;/a&gt; is a multilingual model with a 131,072 token context window, making it ideal for long-form content generation, complex reasoning tasks, and multilingual applications.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key Features and Use Cases:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Multi-turn Tool Calling for Agents&lt;/strong&gt;: Build AI agents that can call functions and tools across multiple conversation turns&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multilingual Support&lt;/strong&gt;: Built to handle content generation in multiple languages effectively&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Large Context Window&lt;/strong&gt;: 131,072 tokens for long-form writing, complex reasoning, and processing long documents&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fast Inference&lt;/strong&gt;: Optimized for low-latency responses in chatbots and virtual assistants&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Instruction Following&lt;/strong&gt;: Excellent at following complex instructions for code generation and structured tasks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Use GLM-4.7-Flash through the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/configuration/bindings/&quot;&gt;Workers AI binding&lt;/a&gt; (&lt;code&gt;env.AI.run()&lt;/code&gt;), the REST API at &lt;code&gt;/run&lt;/code&gt; or &lt;code&gt;/v1/chat/completions&lt;/code&gt;, &lt;a href=&quot;https://developers.stormtrust.net/ai-gateway/&quot;&gt;AI Gateway&lt;/a&gt;, or via &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/configuration/ai-sdk/&quot;&gt;workers-ai-provider&lt;/a&gt; for the Vercel AI SDK.&lt;/p&gt;
&lt;p&gt;Pricing is available on the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/glm-4.7-flash/&quot;&gt;model page&lt;/a&gt; or &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/platform/pricing/&quot;&gt;pricing page&lt;/a&gt;.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;cloudflaretanstack-ai-v011--tanstack-ai-adapters-for-workers-ai-and-ai-gateway&quot;&gt;@cloudflare/tanstack-ai v0.1.1 — TanStack AI adapters for Workers AI and AI Gateway&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#cloudflaretanstack-ai-v011--tanstack-ai-adapters-for-workers-ai-and-ai-gateway&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;We&apos;ve released &lt;code&gt;@cloudflare/tanstack-ai&lt;/code&gt;, a new package that brings Workers AI and AI Gateway support to &lt;a href=&quot;https://tanstack.com/ai&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;TanStack AI&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;. This provides a framework-agnostic alternative for developers who prefer TanStack&apos;s approach to building AI applications.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Workers AI adapters&lt;/strong&gt; support four configuration modes — plain binding (&lt;code&gt;env.AI&lt;/code&gt;), plain REST, AI Gateway binding (&lt;code&gt;env.AI.gateway(id)&lt;/code&gt;), and AI Gateway REST — across all capabilities:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Chat&lt;/strong&gt; (&lt;code&gt;createWorkersAiChat&lt;/code&gt;) — Streaming chat completions with tool calling, structured output, and reasoning text streaming.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Image generation&lt;/strong&gt; (&lt;code&gt;createWorkersAiImage&lt;/code&gt;) — Text-to-image models.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Transcription&lt;/strong&gt; (&lt;code&gt;createWorkersAiTranscription&lt;/code&gt;) — Speech-to-text.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Text-to-speech&lt;/strong&gt; (&lt;code&gt;createWorkersAiTts&lt;/code&gt;) — Audio generation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Summarization&lt;/strong&gt; (&lt;code&gt;createWorkersAiSummarize&lt;/code&gt;) — Text summarization.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;AI Gateway adapters&lt;/strong&gt; route requests from third-party providers — OpenAI, Anthropic, Gemini, Grok, and OpenRouter — through Cloudflare AI Gateway for caching, rate limiting, and unified billing.&lt;/p&gt;
&lt;p&gt;To get started:&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;sh&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;sh&quot; data-nb-lang=&quot;sh&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;npm&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; install&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; @cloudflare/tanstack-ai&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; @tanstack/ai&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;workers-ai-provider-v311--transcription-speech-reranking-and-reliability&quot;&gt;workers-ai-provider v3.1.1 — transcription, speech, reranking, and reliability&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#workers-ai-provider-v311--transcription-speech-reranking-and-reliability&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 Workers AI provider for the &lt;a href=&quot;https://ai-sdk.dev&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Vercel AI SDK&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt; now supports three new capabilities beyond chat and image generation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Transcription&lt;/strong&gt; (&lt;code&gt;provider.transcription(model)&lt;/code&gt;) — Speech-to-text with automatic handling of model-specific input formats across binding and REST paths.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Text-to-speech&lt;/strong&gt; (&lt;code&gt;provider.speech(model)&lt;/code&gt;) — Audio generation with support for voice and speed options.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reranking&lt;/strong&gt; (&lt;code&gt;provider.reranking(model)&lt;/code&gt;) — Document reranking for RAG pipelines and search result ordering.&lt;/li&gt;
&lt;/ul&gt;
&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;typescript&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;typescript&quot; data-nb-lang=&quot;typescript&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; { createWorkersAI } &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;workers-ai-provider&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;import&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;	experimental_transcribe,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	experimental_generateSpeech,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	rerank,&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 class=&quot;nb-shiki-1itgoe&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &quot;ai&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; workersai&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; createWorkersAI&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;({ binding: 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&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; transcript&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-1t8gfj&quot;&gt; experimental_transcribe&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: workersai.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;transcription&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;@cf/openai/whisper-large-v3-turbo&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;	audio: audioData,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;	mediaType: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;audio/wav&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; speech&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-1t8gfj&quot;&gt; experimental_generateSpeech&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: workersai.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;speech&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;@cf/deepgram/aura-1&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;	text: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;Hello world&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;	voice: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;asteria&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; ranked&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-1t8gfj&quot;&gt; rerank&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: workersai.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;reranking&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;@cf/baai/bge-reranker-base&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;	query: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;What is machine learning?&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;	documents: [&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;ML is a branch of AI.&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;The weather is sunny.&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;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;This release also includes a comprehensive reliability overhaul (v3.0.5):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Fixed streaming&lt;/strong&gt; — Responses now stream token-by-token instead of buffering all chunks, using a proper &lt;code&gt;TransformStream&lt;/code&gt; pipeline with backpressure.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fixed tool calling&lt;/strong&gt; — Resolved issues with tool call ID sanitization, conversation history preservation, and a heuristic that silently fell back to non-streaming mode when tools were defined.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Premature stream termination detection&lt;/strong&gt; — Streams that end unexpectedly now report &lt;code&gt;finishReason: &quot;error&quot;&lt;/code&gt; instead of silently reporting &lt;code&gt;&quot;stop&quot;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AI Search support&lt;/strong&gt; — Added &lt;code&gt;createAISearch&lt;/code&gt; as the canonical export (renamed from AutoRAG). &lt;code&gt;createAutoRAG&lt;/code&gt; still works with a deprecation warning.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To upgrade:&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;sh&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;sh&quot; data-nb-lang=&quot;sh&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;npm&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; install&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; workers-ai-provider@latest&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; ai&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;resources&quot;&gt;Resources&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#resources&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;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.npmjs.com/package/@cloudflare/tanstack-ai&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;@cloudflare/tanstack-ai on npm&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.npmjs.com/package/workers-ai-provider&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;workers-ai-provider on npm&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/cloudflare/ai&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;GitHub repository&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><pubDate>Fri, 13 Feb 2026 00:00:00 GMT</pubDate><product>Workers</product><category>Workers</category><category>Agents</category><category>Workers AI</category></item><item><title>Workers AI - Launching FLUX.2 [klein] 9B on Workers AI</title><link>https://developers.stormtrust.net/changelog/post/2026-01-28-flux-2-klein-9b-workers-ai/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-01-28-flux-2-klein-9b-workers-ai/</guid><description>&lt;p&gt;We have partnered with Black Forest Labs (BFL) again to bring their optimized FLUX.2 [klein] 9B model to Workers AI. This distilled model offers enhanced quality compared to the 4B variant, while maintaining cost-effective pricing. With a fixed 4-step inference process, Klein 9B is ideal for rapid prototyping and real-time applications where both speed and quality matter.&lt;/p&gt;
&lt;p&gt;Read the &lt;a href=&quot;https://bfl.ai/blog&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;BFL blog&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt; to learn more about the model itself, or try it out yourself on our &lt;a href=&quot;https://multi-modal.ai.cloudflare.com/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;multi modal playground&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Pricing documentation is available on the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/flux-2-klein-9b/&quot;&gt;model page&lt;/a&gt; or &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/platform/pricing/&quot;&gt;pricing page&lt;/a&gt;.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;workers-ai-platform-specifics&quot;&gt;Workers AI platform specifics&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#workers-ai-platform-specifics&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 model hosted on Workers AI is optimized for speed with a &lt;strong&gt;fixed 4-step inference process&lt;/strong&gt; and supports up to 4 image inputs. Since this is a distilled model, the &lt;code&gt;steps&lt;/code&gt; parameter is fixed at 4 and cannot be adjusted. Like FLUX.2 [dev] and FLUX.2 [klein] 4B, this image model uses multipart form data inputs, even if you just have a prompt.&lt;/p&gt;
&lt;p&gt;With the REST API, the multipart form data input looks like this:&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; --request&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; POST&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;  --url&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;https://api.cloudflare.com/client/v4/accounts/{ACCOUNT}/ai/run/@cf/black-forest-labs/flux-2-klein-9b&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 {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: multipart/form-data&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;  --form&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;prompt=a sunset at the alps&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;  --form&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; width=&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;1024&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;  --form&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; height=&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;1024&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;With the Workers AI binding, you can use it as such:&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;javascript&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;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;const&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; form&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; FormData&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;form.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;append&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;prompt&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;a sunset with a dog&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;form.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;append&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;width&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;1024&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;form.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;append&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;height&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;1024&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-21nrsd&quot;&gt;// FormData doesn&apos;t expose its serialized body or boundary. Passing it to a&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;// Request (or Response) constructor serializes it and generates the Content-Type&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;// header with the boundary, which is required for the server to parse the multipart fields.&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; formResponse&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; Response&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(form);&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; formStream&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; formResponse.body;&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; formContentType&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; formResponse.headers.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;content-type&apos;&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; resp&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 class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;@cf/black-forest-labs/flux-2-klein-9b&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;	multipart: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;		body: formStream,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;		contentType: formContentType,&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;The parameters you can send to the model are detailed here:&lt;/p&gt;
&lt;details&gt;&lt;p&gt;&lt;summary&gt;JSON Schema for Model&lt;/summary&gt;
&lt;strong&gt;Required Parameters&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;prompt&lt;/code&gt; (string) - Text description of the image to generate&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Optional Parameters&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;input_image_0&lt;/code&gt; (string) - Binary image&lt;/li&gt;
&lt;li&gt;&lt;code&gt;input_image_1&lt;/code&gt; (string) - Binary image&lt;/li&gt;
&lt;li&gt;&lt;code&gt;input_image_2&lt;/code&gt; (string) - Binary image&lt;/li&gt;
&lt;li&gt;&lt;code&gt;input_image_3&lt;/code&gt; (string) - Binary image&lt;/li&gt;
&lt;li&gt;&lt;code&gt;guidance&lt;/code&gt; (float) - Guidance scale for generation. Higher values follow the prompt more closely&lt;/li&gt;
&lt;li&gt;&lt;code&gt;width&lt;/code&gt; (integer) - Width of the image, default &lt;code&gt;1024&lt;/code&gt; Range: 256-1920&lt;/li&gt;
&lt;li&gt;&lt;code&gt;height&lt;/code&gt; (integer) - Height of the image, default &lt;code&gt;768&lt;/code&gt; Range: 256-1920&lt;/li&gt;
&lt;li&gt;&lt;code&gt;seed&lt;/code&gt; (integer) - Seed for reproducibility&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Since this is a distilled model, the &lt;code&gt;steps&lt;/code&gt; parameter is fixed at 4 and cannot be adjusted.&lt;/p&gt;&lt;/details&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;multi-reference-images&quot;&gt;Multi-reference images&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#multi-reference-images&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 FLUX.2 klein-9b model supports generating images based on reference images, just like FLUX.2 [dev] and FLUX.2 [klein] 4B. You can use this feature to apply the style of one image to another, add a new character to an image, or iterate on past generated images. You would use it with the same multipart form data structure, with the input images in binary. The model supports up to 4 input images.&lt;/p&gt;
&lt;p&gt;For the prompt, you can reference the images based on the index, like &lt;code&gt;take the subject of image 1 and style it like image 0&lt;/code&gt; or even use natural language like &lt;code&gt;place the dog beside the woman&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You must name the input parameter as &lt;code&gt;input_image_0&lt;/code&gt;, &lt;code&gt;input_image_1&lt;/code&gt;, &lt;code&gt;input_image_2&lt;/code&gt;, &lt;code&gt;input_image_3&lt;/code&gt; for it to work correctly. All input images must be smaller than 512x512.&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; --request&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; POST&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;  --url&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;https://api.cloudflare.com/client/v4/accounts/{ACCOUNT}/ai/run/@cf/black-forest-labs/flux-2-klein-9b&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 {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: multipart/form-data&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;  --form&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;prompt=take the subject of image 1 and style it like image 0&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;  --form&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; input_image_0=@/Users/johndoe/Desktop/icedoutkeanu.png&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;  --form&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; input_image_1=@/Users/johndoe/Desktop/me.png&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;  --form&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; width=&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;1024&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;  --form&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; height=&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;1024&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;Through Workers AI Binding:&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;javascript&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;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-21nrsd&quot;&gt;//helper function to convert ReadableStream to Blob&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;async&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; function&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; streamToBlob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;stream&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; ReadableStream&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;contentType&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; string&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; Promise&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;Blob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;&amp;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; reader&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; stream.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;getReader&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; chunks&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&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;  while&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;true&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-140thh&quot;&gt; { &lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;done&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; } &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; reader.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;read&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;    if&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; (done) &lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;break&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;    chunks.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(value);&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;  return&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; Blob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(chunks, { type: contentType });&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; image0&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-1t8gfj&quot;&gt; fetch&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;http://image-url&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; image1&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-1t8gfj&quot;&gt; fetch&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;http://image-url&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; form&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; FormData&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; image_blob0&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-1t8gfj&quot;&gt; streamToBlob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(image0.body, &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;image/png&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; image_blob1&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-1t8gfj&quot;&gt; streamToBlob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(image1.body, &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;image/png&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;form.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;input_image_0&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, image_blob0)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;form.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;input_image_1&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, image_blob1)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;form.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;prompt&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;take the subject of image 1 and style it like image 0&apos;&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-21nrsd&quot;&gt;// FormData doesn&apos;t expose its serialized body or boundary. Passing it to a&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;// Request (or Response) constructor serializes it and generates the Content-Type&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;// header with the boundary, which is required for the server to parse the multipart fields.&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; formResponse&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; Response&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(form);&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; formStream&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; formResponse.body;&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; formContentType&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; formResponse.headers.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;content-type&apos;&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; resp&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 class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;@cf/black-forest-labs/flux-2-klein-9b&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;    multipart: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;        body: formStream,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;        contentType: formContentType&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;</description><pubDate>Wed, 28 Jan 2026 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers AI - Launching FLUX.2 [klein] 4B on Workers AI</title><link>https://developers.stormtrust.net/changelog/post/2026-01-15-flux-2-klein-4b-workers-ai/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2026-01-15-flux-2-klein-4b-workers-ai/</guid><description>&lt;p&gt;We&apos;ve partnered with Black Forest Labs (BFL) again to bring their optimized FLUX.2 [klein] 4B model to Workers AI! This distilled model offers faster generation and cost-effective pricing, while maintaining great output quality. With a fixed 4-step inference process, Klein 4B is ideal for rapid prototyping and real-time applications where speed matters.&lt;/p&gt;
&lt;p&gt;Read the &lt;a href=&quot;https://bfl.ai/blog&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;BFL blog&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt; to learn more about the model itself, or try it out yourself on our &lt;a href=&quot;https://multi-modal.ai.cloudflare.com/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;multi modal playground&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Pricing documentation is available on the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/flux-2-klein-4b/&quot;&gt;model page&lt;/a&gt; or &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/platform/pricing/&quot;&gt;pricing page&lt;/a&gt;.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;workers-ai-platform-specifics&quot;&gt;Workers AI Platform specifics&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#workers-ai-platform-specifics&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 model hosted on Workers AI is optimized for speed with a &lt;strong&gt;fixed 4-step inference process&lt;/strong&gt; and supports up to 4 image inputs. Since this is a distilled model, the &lt;code&gt;steps&lt;/code&gt; parameter is fixed at 4 and cannot be adjusted. Like FLUX.2 [dev], this image model uses multipart form data inputs, even if you just have a prompt.&lt;/p&gt;
&lt;p&gt;With the REST API, the multipart form data input looks like this:&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; --request&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; POST&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;  --url&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;https://api.cloudflare.com/client/v4/accounts/{ACCOUNT}/ai/run/@cf/black-forest-labs/flux-2-klein-4b&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 {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: multipart/form-data&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;  --form&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;prompt=a sunset at the alps&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;  --form&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; width=&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;1024&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;  --form&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; height=&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;1024&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;With the Workers AI binding, you can use it as such:&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;javascript&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;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;const&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; form&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; FormData&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;form.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;append&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;prompt&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;a sunset with a dog&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;form.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;append&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;width&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;1024&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;form.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;append&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;height&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;1024&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-21nrsd&quot;&gt;// FormData doesn&apos;t expose its serialized body or boundary. Passing it to a&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;// Request (or Response) constructor serializes it and generates the Content-Type&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;// header with the boundary, which is required for the server to parse the multipart fields.&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; formResponse&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; Response&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(form);&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; formStream&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; formResponse.body;&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; formContentType&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; formResponse.headers.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;content-type&apos;&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; resp&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 class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;@cf/black-forest-labs/flux-2-klein-4b&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;	multipart: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;		body: formStream,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;		contentType: formContentType,&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;The parameters you can send to the model are detailed here:&lt;/p&gt;
&lt;details&gt;&lt;p&gt;&lt;summary&gt;JSON Schema for Model&lt;/summary&gt;
&lt;strong&gt;Required Parameters&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;prompt&lt;/code&gt; (string) - Text description of the image to generate&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Optional Parameters&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;input_image_0&lt;/code&gt; (string) - Binary image&lt;/li&gt;
&lt;li&gt;&lt;code&gt;input_image_1&lt;/code&gt; (string) - Binary image&lt;/li&gt;
&lt;li&gt;&lt;code&gt;input_image_2&lt;/code&gt; (string) - Binary image&lt;/li&gt;
&lt;li&gt;&lt;code&gt;input_image_3&lt;/code&gt; (string) - Binary image&lt;/li&gt;
&lt;li&gt;&lt;code&gt;guidance&lt;/code&gt; (float) - Guidance scale for generation. Higher values follow the prompt more closely&lt;/li&gt;
&lt;li&gt;&lt;code&gt;width&lt;/code&gt; (integer) - Width of the image, default &lt;code&gt;1024&lt;/code&gt; Range: 256-1920&lt;/li&gt;
&lt;li&gt;&lt;code&gt;height&lt;/code&gt; (integer) - Height of the image, default &lt;code&gt;768&lt;/code&gt; Range: 256-1920&lt;/li&gt;
&lt;li&gt;&lt;code&gt;seed&lt;/code&gt; (integer) - Seed for reproducibility&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Since this is a distilled model, the &lt;code&gt;steps&lt;/code&gt; parameter is fixed at 4 and cannot be adjusted.&lt;/p&gt;&lt;/details&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;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;## Multi-Reference Images&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;The FLUX.2 klein-4b model supports generating images based on reference images, just like FLUX.2 [dev]. You can use this feature to apply the style of one image to another, add a new character to an image, or iterate on past generated images. You would use it with the same multipart form data structure, with the input images in binary. The model supports up to 4 input images.&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;For the prompt, you can reference the images based on the index, like `take the subject of image 1 and style it like image 0` or even use natural language like `place the dog beside the woman`.&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;Note: you have to name the input parameter as `input_image_0`, `input_image_1`, `input_image_2`, `input_image_3` for it to work correctly. All input images must be smaller than 512x512.&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;```bash&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;curl --request POST \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  --url &apos;https://api.cloudflare.com/client/v4/accounts/{ACCOUNT}/ai/run/@cf/black-forest-labs/flux-2-klein-4b&apos; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  --header &apos;Authorization: Bearer {TOKEN}&apos; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  --header &apos;Content-Type: multipart/form-data&apos; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  --form &apos;prompt=take the subject of image 1 and style it like image 0&apos; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  --form input_image_0=@/Users/johndoe/Desktop/icedoutkeanu.png \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  --form input_image_1=@/Users/johndoe/Desktop/me.png \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  --form width=1024 \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  --form height=1024&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;Through Workers AI Binding:&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;javascript&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;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-21nrsd&quot;&gt;//helper function to convert ReadableStream to Blob&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;async&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; function&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; streamToBlob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;stream&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; ReadableStream&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;contentType&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; string&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; Promise&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;Blob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;&amp;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; reader&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; stream.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;getReader&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; chunks&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&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;  while&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;true&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-140thh&quot;&gt; { &lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;done&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; } &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; reader.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;read&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;    if&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; (done) &lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;break&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;    chunks.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(value);&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;  return&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; Blob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(chunks, { type: contentType });&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; image0&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-1t8gfj&quot;&gt; fetch&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;http://image-url&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; image1&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-1t8gfj&quot;&gt; fetch&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;http://image-url&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; form&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; FormData&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; image_blob0&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-1t8gfj&quot;&gt; streamToBlob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(image0.body, &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;image/png&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; image_blob1&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-1t8gfj&quot;&gt; streamToBlob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(image1.body, &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;image/png&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;form.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;input_image_0&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, image_blob0)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;form.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;input_image_1&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, image_blob1)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;form.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;prompt&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;take the subject of image 1 and style it like image 0&apos;&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-21nrsd&quot;&gt;// FormData doesn&apos;t expose its serialized body or boundary. Passing it to a&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;// Request (or Response) constructor serializes it and generates the Content-Type&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;// header with the boundary, which is required for the server to parse the multipart fields.&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; formResponse&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; Response&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(form);&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; formStream&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; formResponse.body;&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; formContentType&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; formResponse.headers.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;content-type&apos;&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; resp&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 class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;@cf/black-forest-labs/flux-2-klein-4b&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;    multipart: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;        body: formStream,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;        contentType: formContentType&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;</description><pubDate>Thu, 15 Jan 2026 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers AI - Launching FLUX.2 [dev] on Workers AI</title><link>https://developers.stormtrust.net/changelog/post/2025-11-25-flux-2-dev-workers-ai/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-11-25-flux-2-dev-workers-ai/</guid><description>&lt;p&gt;We&apos;ve partnered with Black Forest Labs (BFL) to bring their latest FLUX.2 [dev] model to Workers AI! This model excels in generating high-fidelity images with physical world grounding, multi-language support, and digital asset creation. You can also create specific super images with granular controls like JSON prompting.&lt;/p&gt;
&lt;p&gt;Read the &lt;a href=&quot;https://bfl.ai/flux2&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;BFL blog&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt; to learn more about the model itself. Read our &lt;a href=&quot;https://blog.cloudflare.com/flux-2-workers-ai&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Cloudflare blog&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt; to see the model in action, or try it out yourself on our &lt;a href=&quot;https://multi-modal.ai.cloudflare.com/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;multi modal playground&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Pricing documentation is available on the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/flux-2-dev/&quot;&gt;model page&lt;/a&gt; or &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/platform/pricing/&quot;&gt;pricing page&lt;/a&gt;. Note, we expect to drop pricing in the next few days after iterating on the model performance.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;workers-ai-platform-specifics&quot;&gt;Workers AI Platform specifics&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#workers-ai-platform-specifics&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 model hosted on Workers AI is able to support up to 4 image inputs (512x512 per input image). Note, this image model is one of the most powerful in the catalog and is expected to be slower than the other image models we currently support. One catch to look out for is that this model takes multipart form data inputs, even if you just have a prompt.&lt;/p&gt;
&lt;p&gt;With the REST API, the multipart form data input looks like this:&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; --request&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; POST&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;  --url&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;https://api.cloudflare.com/client/v4/accounts/{ACCOUNT}/ai/run/@cf/black-forest-labs/flux-2-dev&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 {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: multipart/form-data&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;  --form&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;prompt=a sunset at the alps&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;  --form&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; steps=&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;25&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;  --form&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; width=&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;1024&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;  --form&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; height=&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;1024&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;With the Workers AI binding, you can use it as such:&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;javascript&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;javascript&quot; data-nb-lang=&quot;javascript&quot;&gt;&lt;code&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; form&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; FormData&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;form.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;prompt&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;a sunset with a dog&apos;&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;form.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;width&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;1024&apos;&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;form.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;height&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;1024&apos;&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-21nrsd&quot;&gt;//this dummy request is temporary hack&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;//we&apos;re pushing a change to address this soon&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; formRequest&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; Request&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;http://dummy&apos;&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;  method: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;POST&apos;&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;  body: form&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-1itgoe&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; formStream&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; formRequest.body;&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; formContentType&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; formRequest.headers.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;content-type&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;) &lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;||&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;multipart/form-data&apos;&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; resp&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 class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;@cf/black-forest-labs/flux-2-dev&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;  multipart: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;    body: formStream,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;    contentType: formContentType&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;The parameters you can send to the model are detailed here:&lt;/p&gt;
&lt;details&gt;&lt;p&gt;&lt;summary&gt;JSON Schema for Model&lt;/summary&gt;
&lt;strong&gt;Required Parameters&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;prompt&lt;/code&gt; (string) - Text description of the image to generate&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Optional Parameters&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;input_image_0&lt;/code&gt; (string) - Binary image&lt;/li&gt;
&lt;li&gt;&lt;code&gt;input_image_1&lt;/code&gt; (string) - Binary image&lt;/li&gt;
&lt;li&gt;&lt;code&gt;input_image_2&lt;/code&gt; (string) - Binary image&lt;/li&gt;
&lt;li&gt;&lt;code&gt;input_image_3&lt;/code&gt; (string) - Binary image&lt;/li&gt;
&lt;li&gt;&lt;code&gt;steps&lt;/code&gt; (integer) - Number of inference steps. Higher values may improve quality but increase generation time&lt;/li&gt;
&lt;li&gt;&lt;code&gt;guidance&lt;/code&gt; (float) - Guidance scale for generation. Higher values follow the prompt more closely&lt;/li&gt;
&lt;li&gt;&lt;code&gt;width&lt;/code&gt; (integer) - Width of the image, default &lt;code&gt;1024&lt;/code&gt; Range: 256-1920&lt;/li&gt;
&lt;li&gt;&lt;code&gt;height&lt;/code&gt; (integer) - Height of the image, default &lt;code&gt;768&lt;/code&gt; Range: 256-1920&lt;/li&gt;
&lt;li&gt;&lt;code&gt;seed&lt;/code&gt; (integer) - Seed for reproducibility&lt;/li&gt;
&lt;/ul&gt;&lt;/details&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;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;## Multi-Reference Images&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;The FLUX.2 model is great at generating images based on reference images. You can use this feature to apply the style of one image to another, add a new character to an image, or iterate on past generate images. You would use it with the same multipart form data structure, with the input images in binary.&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;For the prompt, you can reference the images based on the index, like `take the subject of image 1 and style it like image 0` or even use natural language like `place the dog beside the woman`.&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;Note: you have to name the input parameter as `input_image_0`, `input_image_1`, `input_image_2` for it to work correctly. All input images must be smaller than 512x512.&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;```bash&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;curl --request POST \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  --url &apos;https://api.cloudflare.com/client/v4/accounts/{ACCOUNT}/ai/run/@cf/black-forest-labs/flux-2-dev&apos; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  --header &apos;Authorization: Bearer {TOKEN}&apos; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  --header &apos;Content-Type: multipart/form-data&apos; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  --form &apos;prompt=take the subject of image 1 and style it like image 0&apos; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  --form input_image_0=@/Users/johndoe/Desktop/icedoutkeanu.png \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  --form input_image_1=@/Users/johndoe/Desktop/me.png \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  --form steps=25&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  --form width=1024&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  --form height=1024&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;Through Workers AI Binding:&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;javascript&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;javascript&quot; data-nb-lang=&quot;javascript&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;//helper function to convert ReadableStream to Blob&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;async&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; function&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; streamToBlob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;stream&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; ReadableStream&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;contentType&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; string&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; Promise&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;Blob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;&amp;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; reader&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; stream.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;getReader&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; chunks&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&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;  while&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;true&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-140thh&quot;&gt; { &lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;done&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; } &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; reader.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;read&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;    if&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; (done) &lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;break&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;    chunks.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(value);&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;  return&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; Blob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(chunks, { type: contentType });&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; image0&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-1t8gfj&quot;&gt; fetch&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;http://image-url&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; image1&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-1t8gfj&quot;&gt; fetch&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;http://image-url&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; form&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; FormData&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; image_blob0&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-1t8gfj&quot;&gt; streamToBlob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(image0.body, &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;image/png&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; image_blob1&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-1t8gfj&quot;&gt; streamToBlob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(image1.body, &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;image/png&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;form.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;input_image_0&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, image_blob0)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;form.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;input_image_1&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, image_blob1)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;form.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;prompt&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;take the subject of image 1and style it like image 0&apos;&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-21nrsd&quot;&gt;//this dummy request is temporary hack&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;//we&apos;re pushing a change to address this soon&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; formRequest&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; Request&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;http://dummy&apos;&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;  method: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;POST&apos;&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;  body: form&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-1itgoe&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; formStream&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; formRequest.body;&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; formContentType&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; formRequest.headers.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;content-type&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;) &lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;||&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;multipart/form-data&apos;&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; resp&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 class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;@cf/black-forest-labs/flux-2-dev&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;    multipart: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;        body: form,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;        contentType: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;multipart/form-data&quot;&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 tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;json-prompting&quot;&gt;JSON Prompting&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#json-prompting&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 model supports prompting in JSON to get more granular control over images. You would pass the JSON as the value of the &apos;prompt&apos; field in the multipart form data. See the JSON schema below on the base parameters you can pass to the model.&lt;/p&gt;
&lt;details&gt;&lt;summary&gt;JSON Prompting Schema&lt;/summary&gt;&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;json&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;json&quot; data-nb-lang=&quot;json&quot;&gt;&lt;code&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-dzsirb&quot;&gt;  &quot;type&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;object&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-dzsirb&quot;&gt;  &quot;properties&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-dzsirb&quot;&gt;    &quot;scene&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-dzsirb&quot;&gt;      &quot;type&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;string&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-dzsirb&quot;&gt;      &quot;description&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;Overall scene setting or location&quot;&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-dzsirb&quot;&gt;    &quot;subjects&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-dzsirb&quot;&gt;      &quot;type&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;array&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-dzsirb&quot;&gt;      &quot;items&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-dzsirb&quot;&gt;        &quot;type&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;object&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-dzsirb&quot;&gt;        &quot;properties&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-dzsirb&quot;&gt;          &quot;type&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-dzsirb&quot;&gt;            &quot;type&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;string&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-dzsirb&quot;&gt;            &quot;description&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;Type of subject (e.g., desert nomad, blacksmith, DJ, falcon)&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-dzsirb&quot;&gt;          &quot;description&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-dzsirb&quot;&gt;            &quot;type&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;string&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-dzsirb&quot;&gt;            &quot;description&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;Physical attributes, clothing, accessories&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-dzsirb&quot;&gt;          &quot;pose&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-dzsirb&quot;&gt;            &quot;type&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;string&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-dzsirb&quot;&gt;            &quot;description&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;Action or stance&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-dzsirb&quot;&gt;          &quot;position&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-dzsirb&quot;&gt;            &quot;type&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;string&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-dzsirb&quot;&gt;            &quot;enum&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;foreground&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;midground&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;background&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-dzsirb&quot;&gt;            &quot;description&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;Depth placement in scene&quot;&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-dzsirb&quot;&gt;        &quot;required&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;type&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;description&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;pose&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;position&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-dzsirb&quot;&gt;    &quot;style&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-dzsirb&quot;&gt;      &quot;type&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;string&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-dzsirb&quot;&gt;      &quot;description&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;Artistic rendering style (e.g., digital painting, photorealistic, pixel art, noir sci-fi, lifestyle photo, wabi-sabi photo)&quot;&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-dzsirb&quot;&gt;    &quot;color_palette&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-dzsirb&quot;&gt;      &quot;type&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;array&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-dzsirb&quot;&gt;      &quot;items&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: { &lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;&quot;type&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;string&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-dzsirb&quot;&gt;      &quot;minItems&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;3&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;      &quot;maxItems&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;3&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;      &quot;description&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;Exactly 3 main colors for the scene (e.g., [&apos;navy&apos;, &apos;neon yellow&apos;, &apos;magenta&apos;])&quot;&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-dzsirb&quot;&gt;    &quot;lighting&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-dzsirb&quot;&gt;      &quot;type&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;string&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-dzsirb&quot;&gt;      &quot;description&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;Lighting condition and direction (e.g., fog-filtered sun, moonlight with star glints, dappled sunlight)&quot;&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-dzsirb&quot;&gt;    &quot;mood&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-dzsirb&quot;&gt;      &quot;type&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;string&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-dzsirb&quot;&gt;      &quot;description&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;Emotional atmosphere (e.g., harsh and determined, playful and modern, peaceful and dreamy)&quot;&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-dzsirb&quot;&gt;    &quot;background&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-dzsirb&quot;&gt;      &quot;type&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;string&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-dzsirb&quot;&gt;      &quot;description&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;Background environment details&quot;&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-dzsirb&quot;&gt;    &quot;composition&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-dzsirb&quot;&gt;      &quot;type&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;string&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-dzsirb&quot;&gt;      &quot;enum&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-mdbnqw&quot;&gt;        &quot;rule of thirds&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-mdbnqw&quot;&gt;        &quot;circular arrangement&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-mdbnqw&quot;&gt;        &quot;framed by foreground&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-mdbnqw&quot;&gt;        &quot;minimalist negative space&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-mdbnqw&quot;&gt;        &quot;S-curve&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-mdbnqw&quot;&gt;        &quot;vanishing point center&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-mdbnqw&quot;&gt;        &quot;dynamic off-center&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-mdbnqw&quot;&gt;        &quot;leading leads&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-mdbnqw&quot;&gt;        &quot;golden spiral&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-mdbnqw&quot;&gt;        &quot;diagonal energy&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-mdbnqw&quot;&gt;        &quot;strong verticals&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-mdbnqw&quot;&gt;        &quot;triangular arrangement&quot;&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-dzsirb&quot;&gt;      &quot;description&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;Compositional technique&quot;&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-dzsirb&quot;&gt;    &quot;camera&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-dzsirb&quot;&gt;      &quot;type&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;object&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-dzsirb&quot;&gt;      &quot;properties&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-dzsirb&quot;&gt;        &quot;angle&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-dzsirb&quot;&gt;          &quot;type&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;string&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-dzsirb&quot;&gt;          &quot;enum&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;eye level&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;low angle&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;slightly low&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;bird&apos;s-eye&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;worm&apos;s-eye&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;over-the-shoulder&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;isometric&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-dzsirb&quot;&gt;          &quot;description&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;Camera perspective&quot;&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-dzsirb&quot;&gt;        &quot;distance&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-dzsirb&quot;&gt;          &quot;type&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;string&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-dzsirb&quot;&gt;          &quot;enum&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;close-up&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;medium close-up&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;medium shot&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;medium wide&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;wide shot&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;extreme wide&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-dzsirb&quot;&gt;          &quot;description&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;Framing distance&quot;&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-dzsirb&quot;&gt;        &quot;focus&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-dzsirb&quot;&gt;          &quot;type&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;string&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-dzsirb&quot;&gt;          &quot;enum&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;deep focus&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;macro focus&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;selective focus&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;sharp on subject&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;soft background&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-dzsirb&quot;&gt;          &quot;description&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;Focus type&quot;&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-dzsirb&quot;&gt;        &quot;lens&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-dzsirb&quot;&gt;          &quot;type&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;string&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-dzsirb&quot;&gt;          &quot;enum&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;14mm&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;24mm&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;35mm&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;50mm&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;70mm&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;85mm&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-dzsirb&quot;&gt;          &quot;description&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;Focal length (wide to telephoto)&quot;&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-dzsirb&quot;&gt;        &quot;f-number&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-dzsirb&quot;&gt;          &quot;type&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;string&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-dzsirb&quot;&gt;          &quot;description&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;Aperture (e.g., f/2.8, the smaller the number the more blurry the background)&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-dzsirb&quot;&gt;        &quot;ISO&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-dzsirb&quot;&gt;          &quot;type&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;number&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-dzsirb&quot;&gt;          &quot;description&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;Light sensitivity value (comfortable range between 100 &amp;amp; 6400, lower = less sensitivity)&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;    },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;    &quot;effects&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-dzsirb&quot;&gt;      &quot;type&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;array&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-dzsirb&quot;&gt;      &quot;items&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: { &lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;&quot;type&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;string&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-dzsirb&quot;&gt;      &quot;description&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;Post-processing effects (e.g., &apos;lens flare small&apos;, &apos;subtle film grain&apos;, &apos;soft bloom&apos;, &apos;god rays&apos;, &apos;chromatic aberration mild&apos;)&quot;&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-dzsirb&quot;&gt;  &quot;required&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;scene&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;subjects&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;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/details&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;other-features-to-try&quot;&gt;Other features to try&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#other-features-to-try&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;ul&gt;
&lt;li&gt;The model also supports the most common latin and non-latin character languages&lt;/li&gt;
&lt;li&gt;You can prompt the model with specific hex codes like &lt;code&gt;#2ECC71&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Try creating digital assets like landing pages, comic strips, infographics too!&lt;/li&gt;
&lt;/ul&gt;</description><pubDate>Tue, 25 Nov 2025 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers AI - Workers AI Markdown Conversion: New endpoint to list supported formats</title><link>https://developers.stormtrust.net/changelog/post/2025-10-23-new-markdown-conversion-endpoint/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-10-23-new-markdown-conversion-endpoint/</guid><description>&lt;p&gt;Developers can now programmatically retrieve a list of all file formats supported by the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/features/markdown-conversion/&quot;&gt;Markdown Conversion utility&lt;/a&gt; in Workers AI.&lt;/p&gt;
&lt;p&gt;You can use the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/configuration/bindings/&quot;&gt;&lt;code&gt;env.AI&lt;/code&gt;&lt;/a&gt; binding:&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;typescript&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;typescript&quot; data-nb-lang=&quot;typescript&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&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;toMarkdown&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;supported&lt;/span&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;Or call the REST API:&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://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/tomarkdown/supported&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;  -H&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; &apos;Authorization: Bearer {API_TOKEN}&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;Both return a list of file formats that users can convert into Markdown:&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;json&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;json&quot; data-nb-lang=&quot;json&quot;&gt;&lt;code&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-dzsirb&quot;&gt;		&quot;extension&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;.pdf&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-dzsirb&quot;&gt;		&quot;mimeType&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;application/pdf&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-dzsirb&quot;&gt;		&quot;extension&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;.jpeg&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-dzsirb&quot;&gt;		&quot;mimeType&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;image/jpeg&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-2bbn9v&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;Learn more about our &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/features/markdown-conversion/&quot;&gt;Markdown Conversion utility&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Thu, 23 Oct 2025 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers AI - New Deepgram Flux model available on Workers AI</title><link>https://developers.stormtrust.net/changelog/post/2025-10-02-deepgram-flux/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-10-02-deepgram-flux/</guid><description>&lt;p&gt;Deepgram&apos;s newest Flux model &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/flux/&quot;&gt;&lt;code&gt;@cf/deepgram/flux&lt;/code&gt;&lt;/a&gt; is now available on Workers AI, hosted directly on Cloudflare&apos;s infrastructure. We&apos;re excited to be a launch partner with Deepgram and offer their new Speech Recognition model built specifically for enabling voice agents. Check out &lt;a href=&quot;https://deepgram.com/flux&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Deepgram&apos;s blog&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt; for more details on the release.&lt;/p&gt;
&lt;p&gt;The Flux model can be used in conjunction with Deepgram&apos;s speech-to-text model &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/nova-3/&quot;&gt;&lt;code&gt;@cf/deepgram/nova-3&lt;/code&gt;&lt;/a&gt; and text-to-speech model &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/aura-1/&quot;&gt;&lt;code&gt;@cf/deepgram/aura-1&lt;/code&gt;&lt;/a&gt; to build end-to-end voice agents. Having Deepgram on Workers AI takes advantage of our edge GPU infrastructure, for ultra low latency voice AI applications.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;promotional-pricing&quot;&gt;Promotional Pricing&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#promotional-pricing&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;For the month of October 2025, Deepgram&apos;s Flux model will be free to use on Workers AI. Official pricing will be announced soon and charged after the promotional pricing period ends on October 31, 2025. Check out the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/flux/&quot;&gt;model page&lt;/a&gt; for pricing details in the future.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;example-usage&quot;&gt;Example Usage&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#example-usage&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 new Flux model is WebSocket only as it requires live bi-directional streaming in order to recognize speech activity.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a worker that establishes a websocket connection with &lt;code&gt;@cf/deepgram/flux&lt;/code&gt;&lt;/li&gt;
&lt;/ol&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;export&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; default&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;  async&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; fetch&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;ctx&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; Promise&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;Response&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;&amp;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; resp&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 class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;@cf/deepgram/flux&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;      encoding: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;linear16&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;      sample_rate: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;16000&quot;&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;      websocket: &lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;true&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-1itgoe&quot;&gt;    return&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; resp;&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 class=&quot;nb-shiki-1itgoe&quot;&gt;satisfies&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; ExportedHandler&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;Env&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;&amp;gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;Deploy your worker&lt;/li&gt;
&lt;/ol&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;npx&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; wrangler&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt; deploy&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;Write a client script to connect to your worker and start sending random audio bytes to it&lt;/li&gt;
&lt;/ol&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; 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;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;wss://&amp;lt;your-worker-url.com&amp;gt;&apos;&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;onopen&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&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; {&lt;/span&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;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;Connected to WebSocket&apos;&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-21nrsd&quot;&gt;  // Generate and send random audio bytes&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;  // You can replace this part with a function&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;  // that reads from your mic or other audio source&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; audioData&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; generateRandomAudio&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;send&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(audioData);&lt;/span&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;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;Audio data sent&apos;&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;ws.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;onmessage&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;event&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; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;  // Transcription will be received here&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;  // Add your custom logic to parse the data&lt;/span&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;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;Received:&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, event.data);&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;onerror&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;error&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; {&lt;/span&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;error&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;WebSocket error:&apos;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, error);&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;onclose&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&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; {&lt;/span&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;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&apos;WebSocket closed&apos;&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-21nrsd&quot;&gt;// Generate random audio data (1 second of noise at 44.1kHz, mono)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; generateRandomAudio&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; sampleRate&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; 44100&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; duration&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; 1&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; numSamples&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; sampleRate &lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; duration;&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; buffer&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; ArrayBuffer&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(numSamples &lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; 2&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; view&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; Int16Array&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(buffer);&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;  for&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;let&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; i &lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;=&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;; i &lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; numSamples; i&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;++&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;    view[i] &lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; Math.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(Math.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;random&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;() &lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; 65536&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; -&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; 32768&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;  return&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; buffer;&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;</description><pubDate>Thu, 02 Oct 2025 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers AI - Introducing EmbeddingGemma from Google on Workers AI</title><link>https://developers.stormtrust.net/changelog/post/2025-09-05-embeddinggemma/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-09-05-embeddinggemma/</guid><description>&lt;p&gt;We&apos;re excited to be a launch partner alongside &lt;a href=&quot;https://developers.googleblog.com/en/introducing-embeddinggemma/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Google&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt; to bring their newest embedding model, &lt;strong&gt;EmbeddingGemma&lt;/strong&gt;, to Workers AI that delivers best-in-class performance for its size, enabling RAG and semantic search use cases.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/embeddinggemma-300m/&quot;&gt;&lt;code&gt;@cf/google/embeddinggemma-300m&lt;/code&gt;&lt;/a&gt; is a 300M parameter embedding model from Google, built from Gemma 3 and the same research used to create Gemini models. This multilingual model supports 100+ languages, making it ideal for RAG systems, semantic search, content classification, and clustering tasks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Using EmbeddingGemma in AI Search:&lt;/strong&gt;
Now you can leverage EmbeddingGemma directly through AI Search for your RAG pipelines. EmbeddingGemma&apos;s multilingual capabilities make it perfect for global applications that need to understand and retrieve content across different languages with exceptional accuracy.&lt;/p&gt;
&lt;p&gt;To use EmbeddingGemma for your AI Search projects:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Create&lt;/strong&gt; in the &lt;a href=&quot;https://dash.cloudflare.com/?to=/:account/ai/ai-search&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;AI Search dashboard&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Follow the setup flow for your new RAG instance&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Generate Index&lt;/strong&gt; step, open up &lt;strong&gt;More embedding models&lt;/strong&gt; and select &lt;code&gt;@cf/google/embeddinggemma-300m&lt;/code&gt; as your embedding model&lt;/li&gt;
&lt;li&gt;Complete the setup to create an AI Search&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Try it out and let us know what you think!&lt;/p&gt;</description><pubDate>Fri, 05 Sep 2025 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers AI - Deepgram and Leonardo partner models now available on Workers AI</title><link>https://developers.stormtrust.net/changelog/post/2025-08-27-partner-models/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-08-27-partner-models/</guid><description>&lt;p&gt;New state-of-the-art models have landed on Workers AI! This time, we&apos;re introducing new &lt;strong&gt;partner models&lt;/strong&gt; trained by our friends at &lt;a href=&quot;https://deepgram.com&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Deepgram&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt; and &lt;a href=&quot;https://leonardo.ai&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Leonardo&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;, hosted on Workers AI infrastructure.&lt;/p&gt;
&lt;p&gt;As well, we&apos;re introuding a new turn detection model that enables you to detect when someone is done speaking — useful for building voice agents!&lt;/p&gt;
&lt;p&gt;Read the &lt;a href=&quot;https://blog.cloudflare.com/workers-ai-partner-models&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; for more details and check out some of the new models on our platform:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/aura-1&quot;&gt;&lt;code&gt;@cf/deepgram/aura-1&lt;/code&gt;&lt;/a&gt; is a text-to-speech model that allows you to input text and have it come to life in a customizable voice&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/nova-3&quot;&gt;&lt;code&gt;@cf/deepgram/nova-3&lt;/code&gt;&lt;/a&gt; is speech-to-text model that transcribes multilingual audio at a blazingly fast speed&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/smart-turn-v2&quot;&gt;&lt;code&gt;@cf/pipecat-ai/smart-turn-v2&lt;/code&gt;&lt;/a&gt; helps you detect when someone is done speaking&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/lucid-origin&quot;&gt;&lt;code&gt;@cf/leonardo/lucid-origin&lt;/code&gt;&lt;/a&gt; is a text-to-image model that generates images with sharp graphic design, stunning full-HD renders, or highly specific creative direction&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/phoenix-1.0&quot;&gt;&lt;code&gt;@cf/leonardo/phoenix-1.0&lt;/code&gt;&lt;/a&gt; is a text-to-image model with exceptional prompt adherence and coherent text&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can filter out new partner models with the &lt;code&gt;Partner&lt;/code&gt; capability on our &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models&quot;&gt;Models&lt;/a&gt; page.&lt;/p&gt;
&lt;p&gt;As well, we&apos;re introducing WebSocket support for some of our audio models, which you can filter though the &lt;code&gt;Realtime&lt;/code&gt; capability on our &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models&quot;&gt;Models&lt;/a&gt; page. WebSockets allows you to create a bi-directional connection to our inference server with low latency — perfect for those that are building voice agents.&lt;/p&gt;
&lt;p&gt;An example python snippet on how to use WebSockets with our new Aura model:&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 json&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;import os&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;import asyncio&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;import websockets&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;uri = f&quot;wss://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/@cf/deepgram/aura-1&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;input = [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;    &quot;Line one, out of three lines that will be provided to the aura model.&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;    &quot;Line two, out of three lines that will be provided to the aura model.&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;    &quot;Line three, out of three lines that will be provided to the aura model. This is a last line.&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;async def text_to_speech():&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;    async with websockets.connect(uri, additional_headers={&quot;Authorization&quot;: os.getenv(&quot;CF_TOKEN&quot;)}) as websocket:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;        print(&quot;connection established&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;        for line in input:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;            print(f&quot;sending `{line}`&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;            await websocket.send(json.dumps({&quot;type&quot;: &quot;Speak&quot;, &quot;text&quot;: line}))&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;            print(&quot;line was sent, flushing&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;            await websocket.send(json.dumps({&quot;type&quot;: &quot;Flush&quot;}))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;            print(&quot;flushed, recving&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;            resp = await websocket.recv()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;            print(f&quot;response received {resp}&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;if __name__ == &quot;__main__&quot;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;    asyncio.run(text_to_speech())&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;</description><pubDate>Wed, 27 Aug 2025 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Agents, Workers AI - OpenAI open models now available on Workers AI</title><link>https://developers.stormtrust.net/changelog/post/2025-08-05-openai-open-models/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-08-05-openai-open-models/</guid><description>&lt;p&gt;We&apos;re thrilled to be a Day 0 partner with &lt;a href=&quot;http://openai.com/index/introducing-gpt-oss&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;OpenAI&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt; to bring their &lt;a href=&quot;https://openai.com/index/gpt-oss-model-card/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;latest open models&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt; to Workers AI, including support for Responses API, Code Interpreter, and Web Search (coming soon).&lt;/p&gt;
&lt;p&gt;Get started with the new models at &lt;code&gt;@cf/openai/gpt-oss-120b&lt;/code&gt; and &lt;code&gt;@cf/openai/gpt-oss-20b&lt;/code&gt;.
Check out the &lt;a href=&quot;https://blog.cloudflare.com/openai-gpt-oss-on-workers-ai&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; for more details about the new models, and the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/gpt-oss-120b&quot;&gt;&lt;code&gt;gpt-oss-120b&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/gpt-oss-20b&quot;&gt;&lt;code&gt;gpt-oss-20b&lt;/code&gt;&lt;/a&gt; model pages for more information about pricing and context windows.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;responses-api&quot;&gt;Responses API&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#responses-api&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;If you call the model through:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Workers Binding, it will accept/return Responses API – &lt;code&gt;env.AI.run(“@cf/openai/gpt-oss-120b”)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;REST API on &lt;code&gt;/run&lt;/code&gt; endpoint, it will accept/return Responses API – &lt;code&gt;https://api.cloudflare.com/client/v4/accounts/&amp;lt;account_id&amp;gt;/ai/run/@cf/openai/gpt-oss-120b&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;REST API on new &lt;code&gt;/responses&lt;/code&gt; endpoint, it will accept/return Responses API – &lt;code&gt;https://api.cloudflare.com/client/v4/accounts/&amp;lt;account_id&amp;gt;/ai/v1/responses&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;REST API for OpenAI Compatible endpoint, it will return Chat Completions (coming soon) – &lt;code&gt;https://api.cloudflare.com/client/v4/accounts/&amp;lt;account_id&amp;gt;/ai/v1/chat/completions&lt;/code&gt;&lt;/li&gt;
&lt;/ul&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;curl https://api.cloudflare.com/client/v4/accounts/&amp;lt;account_id&amp;gt;/ai/v1/responses \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  -H &quot;Content-Type: application/json&quot; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  -H &quot;Authorization: Bearer $CLOUDFLARE_API_KEY&quot; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;  -d &apos;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;    &quot;model&quot;: &quot;@cf/openai/gpt-oss-120b&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;    &quot;reasoning&quot;: {&quot;effort&quot;: &quot;medium&quot;},&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-wvjl67&quot;&gt;    &quot;input&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;        &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-wvjl67&quot;&gt;        &quot;content&quot;: &quot;What are the benefits of open-source models?&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;  }&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;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;code-interpreter&quot;&gt;Code Interpreter&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#code-interpreter&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 model is natively trained to support stateful code execution, and we&apos;ve implemented support for this feature using our &lt;a href=&quot;https://github.com/cloudflare/sandbox-sdk&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Sandbox SDK&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt; and &lt;a href=&quot;https://blog.cloudflare.com/containers-are-available-in-public-beta-for-simple-global-and-programmable/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Containers&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt;. Cloudflare&apos;s Developer Platform is uniquely positioned to support this feature, so we&apos;re very excited to bring our products together to support this new use case.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;web-search-coming-soon&quot;&gt;Web Search (coming soon)&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#web-search-coming-soon&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;We are working to implement Web Search for the model, where users can bring their own Exa API Key so the model can browse the Internet.&lt;/p&gt;</description><pubDate>Tue, 05 Aug 2025 00:00:00 GMT</pubDate><product>Agents</product><category>Agents</category><category>Workers AI</category></item><item><title>Workers AI - Workers AI for Developer Week - faster inference, new models, async batch API, expanded LoRA support</title><link>https://developers.stormtrust.net/changelog/post/2025-04-11-new-models-faster-inference/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-04-11-new-models-faster-inference/</guid><description>&lt;p&gt;Happy Developer Week 2025! Workers AI is excited to announce a couple of new features and improvements available today. Check out our &lt;a href=&quot;https://blog.cloudflare.com/workers-ai-improvements&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; for all the announcement details.&lt;/p&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;faster-inference--new-models&quot;&gt;Faster inference + New models&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#faster-inference--new-models&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;We’re rolling out some in-place improvements to our models that can help speed up inference by 2-4x! Users of the models below will enjoy an automatic speed boost starting today:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/llama-3.3-70b-instruct-fp8-fast/&quot;&gt;&lt;code&gt;@cf/meta/llama-3.3-70b-instruct-fp8-fast&lt;/code&gt;&lt;/a&gt; gets a speed boost of 2-4x, leveraging techniques like speculative decoding, prefix caching, and an updated inference backend.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/bge-small-en-v1.5/&quot;&gt;&lt;code&gt;@cf/baai/bge-small-en-v1.5&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/bge-base-en-v1.5/&quot;&gt;&lt;code&gt;@cf/baai/bge-base-en-v1.5&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/bge-large-en-v1.5/&quot;&gt;&lt;code&gt;@cf/baai/bge-large-en-v1.5&lt;/code&gt;&lt;/a&gt; get an updated back end, which should improve inference times by 2x.
&lt;ul&gt;
&lt;li&gt;With the &lt;code&gt;bge&lt;/code&gt; models, we’re also announcing a new parameter called &lt;code&gt;pooling&lt;/code&gt; which can take &lt;code&gt;cls&lt;/code&gt; or &lt;code&gt;mean&lt;/code&gt; as options. We highly recommend using &lt;code&gt;pooling: cls&lt;/code&gt; which will help generate more accurate embeddings. However, embeddings generated with cls pooling are not backwards compatible with mean pooling. For this to not be a breaking change, the default remains as mean pooling. Please specify &lt;code&gt;pooling: cls&lt;/code&gt; to enjoy more accurate embeddings going forward.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We’re also excited to launch a few new models in our catalog to help round out your experience with Workers AI. We’ll be deprecating some older models in the future, so stay tuned for a deprecation announcement. Today’s new models include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/mistral-small-3.1-24b-instruct/&quot;&gt;&lt;code&gt;@cf/mistralai/mistral-small-3.1-24b-instruct&lt;/code&gt;&lt;/a&gt;: a 24B parameter model achieving state-of-the-art capabilities comparable to larger models, with support for vision and tool calling.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/gemma-3-12b-it/&quot;&gt;&lt;code&gt;@cf/google/gemma-3-12b-it&lt;/code&gt;&lt;/a&gt;: well-suited for a variety of text generation and image understanding tasks, including question answering, summarization and reasoning, with a 128K context window, and multilingual support in over 140 languages.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/qwq-32b/&quot;&gt;&lt;code&gt;@cf/qwen/qwq-32b&lt;/code&gt;&lt;/a&gt;: a medium-sized reasoning model, which is capable of achieving competitive performance against state-of-the-art reasoning models, e.g., DeepSeek-R1, o1-mini.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/qwen2.5-coder-32b-instruct/&quot;&gt;&lt;code&gt;@cf/qwen/qwen2.5-coder-32b-instruct&lt;/code&gt;&lt;/a&gt;: the current state-of-the-art open-source code LLM, with its coding abilities matching those of GPT-4o.&lt;/li&gt;
&lt;/ul&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;batch-inference&quot;&gt;Batch Inference&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#batch-inference&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;Introducing a new batch inference feature that allows you to send us an array of requests, which we will fulfill as fast as possible and send them back as an array. This is really helpful for large workloads such as summarization, embeddings, etc. where you don’t have a human-in-the-loop. Using the batch API will guarantee that your requests are fulfilled eventually, rather than erroring out if we don’t have enough capacity at a given time.&lt;/p&gt;
&lt;p&gt;Check out the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/features/batch-api/&quot;&gt;tutorial&lt;/a&gt; to get started! Models that support batch inference today include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/llama-3.3-70b-instruct-fp8-fast/&quot;&gt;&lt;code&gt;@cf/meta/llama-3.3-70b-instruct-fp8-fast&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/bge-small-en-v1.5/&quot;&gt;&lt;code&gt;@cf/baai/bge-small-en-v1.5&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/bge-base-en-v1.5/&quot;&gt;&lt;code&gt;@cf/baai/bge-base-en-v1.5&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/bge-large-en-v1.5/&quot;&gt;&lt;code&gt;@cf/baai/bge-large-en-v1.5&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/bge-m3/&quot;&gt;&lt;code&gt;@cf/baai/bge-m3&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/m2m100-1.2b/&quot;&gt;&lt;code&gt;@cf/meta/m2m100-1.2b&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div tabindex=&quot;-1&quot; class=&quot;heading-wrapper level-h4&quot;&gt;&lt;h4 id=&quot;expanded-lora-support&quot;&gt;Expanded LoRA support&lt;/h4&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#expanded-lora-support&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;We’ve upgraded our LoRA experience to include 8 newer models, and can support ranks of up to 32 with a 300MB safetensors file limit (previously limited to rank of 8 and 100MB safetensors) Check out our &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/features/fine-tunes/loras/&quot;&gt;LoRAs page&lt;/a&gt; to get started. Models that support LoRAs now include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/llama-3.2-11b-vision-instruct/&quot;&gt;&lt;code&gt;@cf/meta/llama-3.2-11b-vision-instruct&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/llama-3.3-70b-instruct-fp8-fast/&quot;&gt;&lt;code&gt;@cf/meta/llama-3.3-70b-instruct-fp8-fast&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/llama-guard-3-8b/&quot;&gt;&lt;code&gt;@cf/meta/llama-guard-3-8b&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/llama-3.1-8b-instruct-fast/&quot;&gt;&lt;code&gt;@cf/meta/llama-3.1-8b-instruct-fast&lt;/code&gt;&lt;/a&gt; (coming soon)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/deepseek-r1-distill-qwen-32b/&quot;&gt;&lt;code&gt;@cf/deepseek-ai/deepseek-r1-distill-qwen-32b&lt;/code&gt;&lt;/a&gt; (coming soon)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/qwen2.5-coder-32b-instruct/&quot;&gt;&lt;code&gt;@cf/qwen/qwen2.5-coder-32b-instruct&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/qwq-32b/&quot;&gt;&lt;code&gt;@cf/qwen/qwq-32b&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/mistral-small-3.1-24b-instruct/&quot;&gt;&lt;code&gt;@cf/mistralai/mistral-small-3.1-24b-instruct&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/gemma-3-12b-it/&quot;&gt;&lt;code&gt;@cf/google/gemma-3-12b-it&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><pubDate>Fri, 11 Apr 2025 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers AI - Markdown conversion in Workers AI</title><link>https://developers.stormtrust.net/changelog/post/2025-03-20-markdown-conversion/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-03-20-markdown-conversion/</guid><description>&lt;p&gt;Document conversion plays an important role when designing and developing AI applications and agents. Workers AI now provides the &lt;code&gt;toMarkdown&lt;/code&gt; utility method that developers can use to for quick, easy, and convenient conversion and summary of documents in multiple formats to Markdown language.&lt;/p&gt;
&lt;p&gt;You can call this new tool using a binding by calling &lt;code&gt;env.AI.toMarkdown()&lt;/code&gt; or the using the &lt;a href=&quot;https://developers.stormtrust.net/api/resources/ai/&quot;&gt;REST API&lt;/a&gt; endpoint.&lt;/p&gt;
&lt;p&gt;In this example, we fetch a PDF document and an image from R2 and feed them both to &lt;code&gt;env.AI.toMarkdown()&lt;/code&gt;. The result is a list of converted documents. Workers AI models are used automatically to detect and summarize the image.&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;typescript&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;typescript&quot; data-nb-lang=&quot;typescript&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; { Env } &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;./env&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;export&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; default&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;	async&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; fetch&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; Request&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; Env&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;ctx&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; ExecutionContext&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-21nrsd&quot;&gt;		// https://pub-979cb28270cc461d94bc8a169d8f389d.r2.dev/somatosensory.pdf&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; pdf&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;R2&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;get&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;somatosensory.pdf&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-21nrsd&quot;&gt;		// https://pub-979cb28270cc461d94bc8a169d8f389d.r2.dev/cat.jpeg&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; cat&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;R2&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;get&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;cat.jpeg&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;		return&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; Response.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;json&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;			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;toMarkdown&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;					name: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;somatosensory.pdf&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;					blob: &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; Blob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&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; pdf.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;arrayBuffer&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;application/octet-stream&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;				{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;					name: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;cat.jpeg&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;					blob: &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; Blob&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&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; cat.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;arrayBuffer&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;application/octet-stream&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;			]),&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;};&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;This is the result:&lt;/p&gt;
&lt;figure class=&quot;nb-code-figure&quot; data-nb-lang=&quot;json&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;json&quot; data-nb-lang=&quot;json&quot;&gt;&lt;code&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-dzsirb&quot;&gt;		&quot;name&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;somatosensory.pdf&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-dzsirb&quot;&gt;		&quot;mimeType&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;application/pdf&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-dzsirb&quot;&gt;		&quot;format&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;markdown&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-dzsirb&quot;&gt;		&quot;tokens&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: &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;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;		&quot;data&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;# somatosensory.pdf&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;## Metadata&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;- PDFFormatVersion=1.4&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;- IsLinearized=false&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;- IsAcroFormPresent=false&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;- IsXFAPresent=false&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;- IsCollectionPresent=false&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;- IsSignaturesPresent=false&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;- Producer=Prince 20150210 (www.princexml.com)&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;- Title=Anatomy of the Somatosensory System&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;\n\n&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;## Contents&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;### Page 1&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;This is a sample document to showcase...&quot;&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-dzsirb&quot;&gt;		&quot;name&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;cat.jpeg&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-dzsirb&quot;&gt;		&quot;mimeType&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;image/jpeg&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-dzsirb&quot;&gt;		&quot;format&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;markdown&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-dzsirb&quot;&gt;		&quot;tokens&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;: &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;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt;		&quot;data&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;The image is a close-up photograph of Grumpy Cat, a cat with a distinctive grumpy expression and piercing blue eyes. The cat has a brown face with a white stripe down its nose, and its ears are pointed upright. Its fur is light brown and darker around the face, with a pink nose and mouth. The cat&apos;s eyes are blue and slanted downward, giving it a perpetually grumpy appearance. The background is blurred, but it appears to be a dark brown color. Overall, the image is a humorous and iconic representation of the popular internet meme character, Grumpy Cat. The cat&apos;s facial expression and posture convey a sense of displeasure or annoyance, making it a relatable and entertaining image for many people.&quot;&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;See &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/features/markdown-conversion/&quot;&gt;Markdown Conversion&lt;/a&gt; for more information on supported formats, REST API and pricing.&lt;/p&gt;</description><pubDate>Thu, 20 Mar 2025 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers AI - New models in Workers AI</title><link>https://developers.stormtrust.net/changelog/post/2025-03-17-new-workers-ai-models/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-03-17-new-workers-ai-models/</guid><description>&lt;p&gt;Workers AI is excited to add 4 new models to the catalog, including 2 brand new classes of models with a text-to-speech and reranker model. Introducing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/bge-m3/&quot;&gt;@cf/baai/bge-m3&lt;/a&gt; - a multi-lingual embeddings model that supports over 100 languages. It can also simultaneously perform dense retrieval, multi-vector retrieval, and sparse retrieval, with the ability to process inputs of different granularities.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/bge-reranker-base/&quot;&gt;@cf/baai/bge-reranker-base&lt;/a&gt; - our first reranker model! Rerankers are a type of text classification model that takes a query and context, and outputs a similarity score between the two. When used in RAG systems, you can use a reranker after the initial vector search to find the most relevant documents to return to a user by reranking the outputs.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/whisper-large-v3-turbo/&quot;&gt;@cf/openai/whisper-large-v3-turbo&lt;/a&gt; - a faster, more accurate speech-to-text model. This model was added earlier but is graduating out of beta with pricing included today.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/melotts/&quot;&gt;@cf/myshell-ai/melotts&lt;/a&gt; - our first text-to-speech model that allows users to generate an MP3 with voice audio from inputted text.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Pricing is available for each of these models on the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/platform/pricing/&quot;&gt;Workers AI pricing page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This docs update includes a few minor bug fixes to the model schema for llama-guard, llama-3.2-1b, which you can review on the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/changelog/&quot;&gt;product changelog&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Try it out and let us know what you think! Stay tuned for more models in the coming days.&lt;/p&gt;</description><pubDate>Mon, 17 Mar 2025 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers AI - Workers AI now supports structured JSON outputs.</title><link>https://developers.stormtrust.net/changelog/post/2025-02-25-json-mode/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-02-25-json-mode/</guid><description>
&lt;p&gt;Workers AI now supports structured JSON outputs with &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/features/json-mode/&quot;&gt;JSON mode&lt;/a&gt;, which allows you to request a structured output response when interacting with AI models.&lt;/p&gt;
&lt;p&gt;This makes it much easier to retrieve structured data from your AI models, and avoids the (error prone!) need to parse large unstructured text responses to extract your data.&lt;/p&gt;
&lt;p&gt;JSON mode in Workers AI is compatible with the OpenAI SDK&apos;s &lt;a href=&quot;https://platform.openai.com/docs/guides/structured-outputs&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;structured outputs&lt;span class=&quot;external-link&quot;&gt; ↗&lt;/span&gt;&lt;/a&gt; &lt;code&gt;response_format&lt;/code&gt; API, which can be used directly in a Worker:&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;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&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;// Define your JSON schema for a calendar event&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; CalendarEventSchema&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&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;object&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;	properties: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;		name: { type: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;string&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;		date: { type: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;string&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;		participants: { type: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;array&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, items: { type: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;string&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;	required: [&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;name&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;date&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;participants&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;export&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; default&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;	async&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; fetch&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;env&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: 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-21nrsd&quot;&gt;			// Optional: use AI Gateway to bring logs, evals &amp;#x26; caching to your AI requests&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;			// https://developers.cloudflare.com/ai-gateway/usage/providers/openai/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;			// baseUrl: &quot;https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/openai&quot;&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;gpt-4o-2024-08-06&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: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;				{ role: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;system&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;Extract the event information.&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;					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;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;					content: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;Alice and Bob are going to a science fair on Friday.&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-21nrsd&quot;&gt;			// Use the `response_format` option to request a structured JSON output&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;			response_format: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;				// Set json_schema and provide ra schema, or json_object and parse it yourself&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;json_schema&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;				schema: CalendarEventSchema, &lt;/span&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;// provide a schema&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-21nrsd&quot;&gt;		// This will be of type CalendarEventSchema&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; event&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&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.parsed;&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;		return&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; Response.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;json&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;			calendar_event: event,&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;};&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;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&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;interface&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; Env&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-1jdh33&quot;&gt;	OPENAI_API_KEY&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-dzsirb&quot;&gt; string&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-21nrsd&quot;&gt;// Define your JSON schema for a calendar event&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; CalendarEventSchema&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&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;object&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;	properties: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;		name: { type: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;string&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;		date: { type: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;string&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;		participants: { type: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;array&quot;&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, items: { type: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;string&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;	required: [&lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;name&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;date&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;participants&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;export&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; default&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;	async&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; fetch&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; Request&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;nb-shiki-1jdh33&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt; Env&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: 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-21nrsd&quot;&gt;			// Optional: use AI Gateway to bring logs, evals &amp;amp; caching to your AI requests&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;			// https://developers.cloudflare.com/ai-gateway/usage/providers/openai/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;			// baseUrl: &quot;https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/openai&quot;&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;gpt-4o-2024-08-06&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: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;				{ role: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;system&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;Extract the event information.&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;					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;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;					content: &lt;/span&gt;&lt;span class=&quot;nb-shiki-mdbnqw&quot;&gt;&quot;Alice and Bob are going to a science fair on Friday.&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-21nrsd&quot;&gt;			// Use the `response_format` option to request a structured JSON output&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt;			response_format: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;				// Set json_schema and provide ra schema, or json_object and parse it yourself&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;json_schema&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;				schema: CalendarEventSchema, &lt;/span&gt;&lt;span class=&quot;nb-shiki-21nrsd&quot;&gt;// provide a schema&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-21nrsd&quot;&gt;		// This will be of type CalendarEventSchema&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; event&lt;/span&gt;&lt;span class=&quot;nb-shiki-1itgoe&quot;&gt; =&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.parsed;&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;		return&lt;/span&gt;&lt;span class=&quot;nb-shiki-140thh&quot;&gt; Response.&lt;/span&gt;&lt;span class=&quot;nb-shiki-1t8gfj&quot;&gt;json&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;			calendar_event: event,&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;};&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;To learn more about JSON mode and structured outputs, visit the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/features/json-mode/&quot;&gt;Workers AI documentation&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Tue, 25 Feb 2025 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers AI - Workers AI larger context windows</title><link>https://developers.stormtrust.net/changelog/post/2025-02-24-context-windows/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-02-24-context-windows/</guid><description>&lt;p&gt;We&apos;ve updated the Workers AI text generation models to include context windows and limits definitions and changed our APIs to estimate and validate the number of tokens in the input prompt, not the number of characters.&lt;/p&gt;
&lt;p&gt;This update allows developers to use larger context windows when interacting with Workers AI models, which can lead to better and more accurate results.&lt;/p&gt;
&lt;p&gt;Our &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/models/&quot;&gt;catalog page&lt;/a&gt; provides more information about each model&apos;s supported context window.&lt;/p&gt;</description><pubDate>Mon, 24 Feb 2025 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item><item><title>Workers AI - Workers AI updated pricing</title><link>https://developers.stormtrust.net/changelog/post/2025-02-20-updated-pricing-docs/</link><guid isPermaLink="true">https://developers.stormtrust.net/changelog/post/2025-02-20-updated-pricing-docs/</guid><description>&lt;p&gt;We&apos;ve updated the Workers AI &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/platform/pricing/&quot;&gt;pricing&lt;/a&gt; to include the latest models and how model usage maps to Neurons.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Each model&apos;s core input format(s) (tokens, audio seconds, images, etc) now include mappings to Neurons, making it easier to understand how your included Neuron volume is consumed and how you are charged at scale&lt;/li&gt;
&lt;li&gt;Per-model pricing, instead of the previous bucket approach, allows us to be more flexible on how models are charged based on their size, performance and capabilities. As we optimize each model, we can then pass on savings for that model.&lt;/li&gt;
&lt;li&gt;You will still only pay for what you consume: Workers AI inference is serverless, and not billed by the hour.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Going forward, models will be launched with their associated Neuron costs, and we&apos;ll be updating the Workers AI dashboard and API to reflect consumption in both raw units and Neurons. Visit the &lt;a href=&quot;https://developers.stormtrust.net/workers-ai/platform/pricing/&quot;&gt;Workers AI pricing&lt;/a&gt; page to learn more about Workers AI pricing.&lt;/p&gt;</description><pubDate>Thu, 20 Feb 2025 00:00:00 GMT</pubDate><product>Workers AI</product><category>Workers AI</category></item></channel></rss>