🥇 Cloudflare Workers AI · Mistral Small 3.1 (free allocation)
Every Cloudflare account, including free ones, gets a daily Workers AI allocation at no cost. Bouncer's requests are tiny (a prompt plus up to 40 file paths), so normal use fits comfortably inside it.
1. Find your account ID
Open the Cloudflare dashboard. Your Account ID is in the URL (dash.cloudflare.com/<account-id>/…) and on the Workers & Pages overview. It is 32 hex characters.
If you use Wrangler, npx wrangler whoami also prints it.
2. Create an API token with Workers AI access only
- Go to dash.cloudflare.com/profile/api-tokens and choose Create Token.
- Pick the Workers AI template. It grants
Workers AI: ReadandWorkers AI: Edit, and nothing else. - Limit it to your account, choose Continue to summary, then Create Token, and copy the token.
3. Connect it (one line)
bouncer config --preset cloudflare-gold --account-id <ACCOUNT_ID> --key <API_TOKEN>
bouncer config --timeout 3000 # the preset already sets thisTo keep the token out of your shell history, set environment variables and leave out the flags:
export CLOUDFLARE_ACCOUNT_ID=<ACCOUNT_ID>
export CLOUDFLARE_API_TOKEN=<API_TOKEN>
bouncer config --preset cloudflare-goldPreset details
| Endpoint | https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/ai/v1/chat/completions |
| Model | @cf/mistralai/mistral-small-3.1-24b-instruct |
| Level | 🥇 3, confidence gate 0.80 |
| Sent per prompt | prompt text + up to 40 file paths (never file contents) |
The default is the most reliable model we measured, not the fastest: it answered 20 of 20 labelled prompts inside the 3 s budget. Switch with --model, for example bouncer config --model @cf/meta/llama-4-scout-17b-16e-instruct. The full benchmark (14 models) is on ⭐ Recommended models.
Troubleshooting
failed (HTTP 401/403): the token is wrong, or it has no Workers AI permission for this account.failed (HTTP 429)or failures late in the day: you've used up the free daily allocation. Bouncer stays on Level 1 until it resets.- Remove it:
bouncer config --clear.