Try Bifrost Enterprise free for 14 days.
Request access
Back to Blog

Cloudflare Workers AI Is Now a Built-In Provider in Bifrost

Madhu Shantan

Oct 16, 2026 · 3 min read

Cloudflare Workers AI Is Now a Built-In Provider in Bifrost

Cloudflare Workers AI is now available as a first class provider directly in Bifrost. Add your Cloudflare credentials, choose a Workers AI model, and send requests through the same payload you use for your other providers.

Setup starts with selecting Cloudflare in the dashboard. Configure an account ID on each key, then use Workers AI for chat, embeddings, or native Clef decisions.

The integration connects Bifrost to Workers AI, Cloudflare’s model inference service.

What you can use today

The built-in provider supports these operations:

CapabilityThrough Bifrost
Chat completionsSend messages and receive a complete response or stream tokens.
Responses APIUse Bifrost’s Responses interface, including streaming, through translation to Chat Completions.
EmbeddingsGenerate vectors with Workers AI embedding models.
Clef decisionsCall native decision models through /v1/decisions.

Regarding Responses support: Bifrost converts the request to Chat Completions, calls Workers AI, and converts the result back. The same translation applies to streaming. Plan around the capabilities of the selected chat model; this does not imply support for every Responses-specific feature.

Connect your Cloudflare account

Start with a Cloudflare account ID and an API token that can access Workers AI. Cloudflare’s REST API setup guide walks through creating the token. If you create one manually, it needs both Workers AI — Read and Workers AI — Edit permissions.

Once done, navigate to the Bifrost Gateway dashboard and:

  1. Go to Models → Model Providers, click Add New Provider, and select Cloudflare.
  2. Click Add Key and give it a recognizable name.
  3. Enter your API token, or an environment reference such as env.CLOUDFLARE_API_TOKEN.
  4. Fill in Account ID (Required). Environment references such as env.CLOUDFLARE_ACCOUNT_ID work here too.
  5. Keep Allowed Models set to All Models, or choose a specific allowlist, then save the provider configuration.

The account ID belongs to the key. You can add keys for multiple Cloudflare accounts under the same provider, and each request uses the account attached to the key Bifrost selects. Make sure each token has access to its corresponding account.

Send your first chat request

With Bifrost running locally on port 8080, try a short chat request:

The cloudflare/ prefix selects the provider; the rest is the full Workers AI model ID. This example uses Llama 4 Scout from Cloudflare’s model catalog. Add "stream": true to the JSON body to stream the response, and use curl -N to display chunks as they arrive.

The example assumes a local gateway without required authentication. If your gateway requires a Bifrost virtual key, include it in the x-bf-vk header. The Cloudflare token stays in the provider configuration.

Use it in your existing gateway workflows

Once configured, Cloudflare is available to the gateway workflows you already operate. Add Workers AI models to routing rules, configure compatible fallback targets, and apply virtual-key access controls, budgets, and rate limits. Use Bifrost’s logs to inspect requests and troubleshoot provider errors, according to your logging settings.

Embeddings fit the same pattern. Select a Workers AI embedding model through /v1/embeddings, or configure Cloudflare as the embedding provider for Bifrost’s semantic cache.

For classification and scoring, use a Clef model such as cloudflare/clef-flash through /v1/decisions. Clef can also act as the decision classifier in the Complexity Router, choosing a complexity tier before a routing rule selects the model that answers the request.

Get started

Start with the Cloudflare provider guide for setup details and supported operations.

Already using a custom provider named cloudflare? Open it in Model Providers to migrate a Workers AI configuration to the built-in provider; the name is now reserved.