Skip to content
AnswerWell geo Documentation

Research · 7 min read · Answerwell

AI Model Playground, Inference API, and Text Generation Selection

How to preview, test, and pick text and multimodal models on a serverless inference platform: playground, notebooks, limits, and deprecations.

This page summarises Cloudflare Workers AI documentation on exploring the model catalog, trying models without heavy setup, running inference from code, and narrowing down a text generation model when many options share the same API shape.

Workers AI lets you run machine learning models on Cloudflare’s network from a Workers binding, Pages, or a REST client. Cloudflare describes the operational model as global inference with pay-per-use pricing:

Run inference on Cloudflare’s global network via a Workers binding, with pay-per-use pricing. Learn more about Workers AI.

Global inference - Run models at the Cloudflare location nearest to the user, reducing round-trip latency

Pay-per-use pricing - No GPU reservations or idle costs; pay only for tokens processed

— Cloudflare, Build and run AI applications

The Workers AI Models catalog is the authoritative list of what you can call by model ID. If a ID is wrong or retired, inference fails with guidance to pick another model:

Model not available

is deprecated, removed, or not found. Choose an available model from the catalog below.

— Cloudflare, Workers AI Models

Workers AI LLM Playground: preview a model in the browser

Section titled “Workers AI LLM Playground: preview a model in the browser”

Model pages repeatedly point to the same no-setup path for “which model should I try first?” Each catalog entry (for example apertus-v1.5-8b) states:

Try out this model with Workers AI LLM Playground. It does not require any setup or authentication and is an instant way to preview and test a model directly in the browser.

— Cloudflare, apertus-v1.5-8b

Use the playground when you want latency and tone for a single model before you wire API tokens or Workers bindings. It is a smoke test, not a substitute for load testing under your prompts and rate limits.

Jupyter notebooks: compare many models with one API

Section titled “Jupyter notebooks: compare many models with one API”

For side-by-side exploration, Cloudflare publishes notebook-based tutorials:

Goal Resource
Broad catalog (text, vision, translation, classification, summarization) Explore Workers AI Models Using a Jupyter Notebook
Text generation focus and selection Choose the Right Text Generation Model
Code-oriented models Explore Code Generation Using DeepSeek Coder Models

On the general exploration notebook, Cloudflare frames the platform as one REST surface regardless of where your code runs:

Workers AI allows you to run machine learning models, on the Cloudflare network, from your own code – whether that be from Workers, Pages, or anywhere via REST API.

— Cloudflare, Explore Workers AI Models Using a Jupyter Notebook

The same tutorial walks through task families—text generation (messages), image-to-text (image + prompt), translation (source_lang / target_lang), classification, and summarization—using the Python SDK pattern client.workers.ai.run(model_id, account_id=..., ...). That variety explains why model choice starts with task type, not parameter count alone.

Text generation: one interface, many model IDs

Section titled “Text generation: one interface, many model IDs”

The text-generation selection guide stresses that the calling shape does not change when you swap models:

The good news is that on the Workers AI Text Generation interface is always the same, no matter which model you choose.

— Cloudflare, Choose the Right Text Generation Model

Practically, you benchmark candidates with the same prompts and measure quality, latency, and cost per task—not by learning a new SDK per vendor model.

Code generation models on the same REST path

Section titled “Code generation models on the same REST path”

The DeepSeek Coder tutorial shows comment-to-code and debug-assist flows against https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run/{model} with messages (and optional system role). Models called out there include @hf/thebloke/deepseek-coder-6.7b-base-awq and @hf/thebloke/deepseek-coder-6.7b-instruct-awq. Instruct variants suit explanation and repair; base-style IDs suit completing code from a descriptive comment—see Explore Code Generation Using DeepSeek Coder Models for full examples.

AI Gateway Auto Router: when you do not pick a fixed model

Section titled “AI Gateway Auto Router: when you do not pick a fixed model”

If your application should not hard-code one model ID, AI Gateway Auto Router selects from Cloudflare’s pool:

Auto Router selects from a pool of models managed by Cloudflare. The pool may change over time.

— Cloudflare, Auto Router

Trade-off: you gain simplified routing and potential quality/latency tuning from the pool, but you must accept pool changes without pinning a single checkpoint in your code.

Model lifecycle: deprecation, limits, and third-party terms

Section titled “Model lifecycle: deprecation, limits, and third-party terms”

The Workers AI changelog documents removals. For example, @cf/meta/llama-2-7b-chat-int8 was deprecated with a fixed cutoff; Cloudflare listed replacements and noted automatic fallback if you did not migrate:

We will be deprecating @cf/meta/llama-2-7b-chat-int8 on 2024-06-30.

Replace the model ID in your code with a new model of your choice:

@cf/meta/llama-3-8b-instruct is the newest model in the Llama family (and is currently free for a limited time on Workers AI).

@cf/meta/llama-3-8b-instruct-awq is the new Llama 3 in a similar precision to your currently selected model. This model is also currently free for a limited time.

If you do not switch to a different model by June 30th, we will automatically start returning inference from @cf/meta/llama-3-8b-instruct-awq.

— Cloudflare, Workers AI changelog

Treat model IDs as operational dependencies: pin intentionally, watch the changelog, and re-run evaluations after swaps.

Text generation on the platform is capped unless a specific model requires a paid Workers plan:

300 requests per minute, unless the model requires the Workers Paid plan

— Cloudflare, Workers AI limits

Load tests that exceed free-tier throughput need plan alignment and throttling in your app.

Cloudflare does not train the third-party weights you invoke:

Cloudflare does not create or train the third-party AI models made available through Workers AI. Those models may be subject to open source, acceptable use policies, or other license terms between you and the model provider. Review the license terms applicable to each model.

— Cloudflare, Data usage

Individual model pages (for example clairic) add an AS IS availability disclaimer—models may be withdrawn without compensation. Read per-model terms before production reliance.

Prompting: LoRA models and template expectations

Section titled “Prompting: LoRA models and template expectations”

For text generation, Prompting notes that LLMs are often trained with specific templates, and Workers AI supports scoped versus unscoped prompt styles. Cloudflare explicitly recommends:

We recommend using unscoped prompts for inference with LoRA.

— Cloudflare, Prompting

If you use LoRA-tuned IDs (many entries in the catalog end in -lora), start with unscoped prompts and compare output before investing in custom templates.

Optional UIs and SDKs beyond the playground

Section titled “Optional UIs and SDKs beyond the playground”
  • Hugging Face Chat UI — open-source chat front end; supported models are those whose IDs begin with @hf.
  • Vercel AI SDK — links Workers AI models into the AI SDK provider pattern; see that page for the provider reference and cross-links to the model catalog.

These do not change inference semantics; they only change how you send messages to the same model IDs.

  • Skipping the catalog — Calling a removed ID returns “not available”; always confirm the ID on Workers AI Models.
  • Assuming playground behavior equals production — Playground access needs no authentication; bound Workers and REST calls use account limits, auth, and billing.
  • Choosing by size alone — The notebooks show vision, translation, and classification APIs with different payloads; pick by task fit first.
  • Ignoring deprecation windows — Relying on automatic substitution can change latency, cost, and output quality without a code deploy.
  • Wrong prompt mode for LoRA — Using heavily scoped templates against LoRA models when unscoped prompts are recommended.
  1. Open Workers AI Models, confirm your target model ID is listed, and note any deprecation notices linked from Workers AI changelog.
  2. From that model’s page (for example deepseek-r1-distill-qwen-32b), use Launch the LLM Playground and run representative prompts.
  3. Re-run the same prompts through the Explore Workers AI Models Using a Jupyter Notebook flow or your Worker binding so authenticated inference matches playground behavior.
  4. Compare throughput against Workers AI limits for text generation (300 requests per minute unless the model requires a paid plan).
  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page does not match the linked Cloudflare documentation, email yimasynthetic@gmail.com with the page URL and the exact statement you believe is wrong or unclear.