@cf/google/gemma-4-26b-a4b-it — Free API

Created by Google ⭐ Score: 66
cloudflare-workers-ai/cf-google-gemma-4-26b-a4b-it
🛠️ Function Calling JSON Mode chat

What is @cf/google/gemma-4-26b-a4b-it?

Gemma 4 26B is Google's latest open model, running on Cloudflare Workers AI with a 256K context window and a 26B-parameter architecture using 4 active experts (MoE). It brings Google's latest advances in small-model efficiency to the edge, making it suitable for long-form text tasks, summarization, and instruction-following workloads. The 256K context window is particularly useful for processing full-length documents or long conversation histories. Operates on Cloudflare's shared 10,000 Neurons/day free allocation; API access uses Cloudflare's native format, not the OpenAI SDK.

Model ID
cf-google-gemma-4-26b-a4b-it
Base URL
https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run

@cf/google/gemma-4-26b-a4b-it API Code Example

Paste your API key and run. See the config generator for Claude Code, Cursor, and more tools.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run",
    api_key="YOUR_API_KEY"
)

response = client.chat.completions.create(
    model="cf-google-gemma-4-26b-a4b-it",
    messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
import OpenAI from "openai";

const openai = new OpenAI({
  baseURL: "https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run",
  apiKey: "YOUR_API_KEY",
});

const completion = await openai.chat.completions.create({
  model: "cf-google-gemma-4-26b-a4b-it",
  messages: [{ role: "user", content: "Hello!" }],
});

console.log(completion.choices[0].message.content);
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "cf-google-gemma-4-26b-a4b-it",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Other Free Models from Cloudflare Workers AI

More About Cloudflare Workers AI

How to get an API key, rate limits, platform limitations, and tool configuration — everything you need to set up Cloudflare Workers AI as a free LLM API backend.

View Cloudflare Workers AI full guide →