> ## Documentation Index
> Fetch the complete documentation index at: https://docs.threetone.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloudflare Workers AI

> Prepare a Cloudflare Workers AI Chat Completions candidate and test it through the supported custom-model connection probe.

Cloudflare Workers AI exposes a public Chat Completions API. Use this page to prepare a candidate endpoint for Threetone's dashboard connection probe. Provider API availability does not establish a supported Threetone runtime integration.

<Note>
  Custom-model publication is currently rejected with `custom_llm_execution_unavailable`. A successful connection test does not publish an agent or start a conversation.
</Note>

## Prepare the candidate

| Threetone field | Candidate value |
| - | - |
| Server URL | `https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/ai/v1`, with your account ID substituted. |
| Model ID | The exact Workers AI identifier for a chat-capable model available to your account. |
| API Key | A workspace secret or Secret environment reference holding the authorized Cloudflare API token. |

Cloudflare documents the account-specific base URL and bearer-token authentication in its [API compatibility reference](https://developers.cloudflare.com/workers-ai/configuration/open-ai-compatibility/). Use a text-generation model, not an embedding model. Do not paste the full `/chat/completions` endpoint into Server URL; Threetone appends that path.

## Run a controlled probe

<Steps>
  <Step title="Confirm account access">
    Check the account ID, model access, and token permissions with the account owner. Keep the token in approved secret storage. Do not place it in an agent prompt or a public example.
  </Step>

  <Step title="Enter the custom configuration">
    Open the agent's LLM selection, choose **Custom LLM**, and fill the fields above. Follow the [custom-model workflow](/agents-platform/advanced/custom-models/overview). Secret environment references resolve against production during the probe, so verify that value before testing.
  </Step>

  <Step title="Test and inspect">
    **Test connection** makes a real provider request and can consume provider usage. The probe requests a streaming text response with `stream_options.include_usage: true`. Verify that the selected endpoint accepts this request and produces assistant text; ordinary JSON or a tool-only stream does not pass.
  </Step>
</Steps>

For failures, distinguish an incorrect account path, insufficient token access, unavailable model, and incompatible streaming response. Keep safe error details without the token. Review [endpoint compatibility](/agents-platform/advanced/custom-models/compatible-endpoints) before changing the endpoint shape.

Preserve a reviewed candidate as a complete server draft and read it back. Use [the managed model catalog](/overview/models) when selecting currently documented managed options.

## Frequently asked questions

<AccordionGroup>
  <Accordion title="Can I use a Workers binding as Server URL?" id="cloudflare-faq-binding">No. The probe calls a public HTTPS API base URL. A Workers binding is a different execution interface.</Accordion>
  <Accordion title="Does Cloudflare Responses API support make it usable by this probe?" id="cloudflare-faq-responses">No. The current Threetone probe accepts Chat Completions only. Provider support for another API does not change that boundary.</Accordion>
</AccordionGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.