Skip to content
Docs

Create a Cloudflare API token for Workers AI

This guide is part of the Publicus connection catalog. Once you have the credentials, connect the service and Publicus stores them for you.

Distilled from Cloudflare’s Workers AI REST API and Create API token pages, retrieved 2026-10-13.

Cloudflare serves the Clef decision models on Workers AI: they answer typed questions about a piece of content with a probability for every answer, and write no text. Requests are charged per input token; Clef models do not charge for output tokens.

  1. Sign in to the Cloudflare dashboard and go to the Workers AI page.
  2. Select Use REST API.
  3. Select Create a Workers AI API Token, review the prefilled information, and select Create API Token.
  4. Select Copy API Token. Cloudflare shows the token’s secret only once.
  5. On the same panel, copy the Account ID under Get Account ID. Workers AI requests name the account in their URL.
  6. Paste the token into the connection.

If you create a token yourself under My Profile > API Tokens instead of using the Workers AI template, give it both the Workers AI - Read and Workers AI - Edit permissions.

The connection checks the token with Cloudflare’s token-verify endpoint, which reports whether the token is valid and active. It runs no model.

Open Connections under Credentials, choose Cloudflare, and pick Cloudflare API token. Publicus asks for exactly the fields listed above and keeps them in your workspace’s secret storage.

See also: Cloudflare in the catalog.

This guide is maintained by Publicus and published under CC BY 4.0.