Cloudflare Workers AI
Run AI models on Cloudflare's global edge network.
Configuration
| Field | Required | Example |
|---|---|---|
| Application Name | Yes | my-cloudflare-app |
| Model Name | Yes | @cf/meta/llama-3-8b-instruct |
| Account ID | Yes | Your Cloudflare Account ID |
| API Token | Yes | Your Cloudflare API Token |
Getting Your Credentials
Account ID:
- Log in to Cloudflare Dashboard
- Select your account
- Find Account ID in the right sidebar
API Token:
- Go to My Profile → API Tokens
- Click Create Token
- Use the Workers AI template or create custom
- Copy and securely store the token
Model Naming Format
Cloudflare models use the format @cf/provider/model-name:
| Model | Description |
|---|---|
@cf/openai/gpt-oss-120b | OpenAI open model with Code Interpreter |
@cf/openai/gpt-oss-20b | OpenAI smaller open model |
@cf/meta/llama-4-scout-17b-16e-instruct | Llama 4 Scout multimodal |
@cf/meta/llama-3.3-70b-instruct-fp8-fast | Llama 3.3 70B optimized |
@cf/qwen/qwq-32b | Qwen reasoning model |
@cf/google/gemma-3 | Multimodal, 128K context, 140+ languages |
@cf/black-forest-labs/flux-2-dev | FLUX.2 image generation |
Note: Cloudflare partnered with OpenAI as a Day 0 partner for their open models with Code Interpreter support.
For the complete list of available models, visit the Cloudflare Workers AI Models.
Advanced Parameters
| Parameter | Type | Description |
|---|---|---|
max_tokens | integer | Maximum tokens |
temperature | float | Randomness |
top_p | float | Nucleus sampling |
seed | integer | For reproducibility |
Setup Steps
- Navigate to AI Applications → New Application
- Select Model Providers tab
- Click Cloudflare Workers AI
- Enter your Application Name
- Enter your Account ID
- Enter your API Token
- Select your desired Model Name
- Configure Advanced Settings (optional)
- Click Test Response to verify (optional)
- Review and submit