Cloudflare Workers AI needs two values: your Account ID and an API token with Workers AI access.
Get the API key
- Sign in at Cloudflare Dashboard and copy the Account ID from Workers & Pages or the dashboard URL.
- Open My Profile, then API Tokens, choose Create Token, and use the Workers AI template or grant Workers AI read access.
- Create and copy the token. Keep both the token and Account ID available.
Use the key on Free AI API
Paste the Account ID and API token into their separate fields on a Cloudflare endpoint page, then run the model.
Use first-party @cf/ endpoints for the included Workers AI allowance. Partner models may use different billing or require terms acceptance.
Security: never publish the key. Free AI API forwards it for the current request and does not store it on the server.