Cloudflare Docs
Workers AI
Visit Workers AI on GitHub
Set theme to dark (⇧+D)

Bindings

Workers

You must create a binding for your Worker to connect to Workers AI. Bindings allow your Workers to access resources or services, like Workers AI, on the Cloudflare developer platform. You create bindings by updating your wrangler.toml file.

To bind Workers AI to your Worker, add the following to the end of your wrangler.toml file:

wrangler.toml
[ai]
binding = "AI" # i.e. available in your Worker on env.AI

Pages