One-shot LLM completion on Cloudflare Workers AI with a minimal interface
One-shot LLM completion on Cloudflare Workers AI with a minimal interface: give `prompt` (and optionally `system`, or OpenAI-style `messages`), get {text, model, finish_reason, usage}. Models: llama-3.1-8b (default), llama-3.2-3b, llama-3.2-1b, mistral-7b, granite-4.0-micro. max_tokens capped at 512, input up to 24000 chars, Llama Guard 3 safety check, 503 "capacity" when the daily budget is used up. Errors are never charged. All params optional: with none it answers a short sample question....
Paid test badge: not yet. The checks above are free: we call the tool without paying and read the payment request it sends back. The Verified badge needs paid calls whose answers match the promised output, and nobody can buy a badge.
Endpoint
POST https://quickbuild.quynguyenbac.workers.dev/api/chat
| Category | Everything else |
|---|---|
| Provider host | quickbuild.quynguyenbac.workers.dev |
| Networks | eip155:8453 |
| Payment schemes | exact |
| Self-reported calls, 30 days | 1 from 1 payers (the provider's figure, not ours) |
Our checks, last 30 days
| Day | Result | HTTP | Asked | Time |
|---|---|---|---|---|
| 2026-12-01 | valid payment request | 402 | $0.003 | 38 ms |
| 2026-11-30 | valid payment request | 402 | $0.003 | 39 ms |
Example input (from the provider)
{
"body": {
"prompt": "Write a one-line tagline for a pay-per-call API."
},
"bodyType": "json",
"method": "POST",
"type": "http"
}
Promised output schema (from the provider)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"properties": {
"max_tokens": {
"description": "Max output tokens (default/cap 512).",
"maximum": 512,
"minimum": 1,
"type": "integer"
},
"messages": {
"description": "Optional OpenAI-style history (POST JSON).",
"items": {
"properties": {
"content": {
"type": "string"
},
"role": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"model": {
"description": "Model alias (default llama-3.1-8b).",
"enum": [
"llama-3.1-8b",
"llama-3.2-3b",
"llama-3.2-1b",
"mistral-7b",
"granite-4.0-micro"
],
"type": "string"
},
"prompt": {
"description": "User message. Optional: defaults to a short sample question.",
"type": "string"
},
"system": {
"description": "Optional system instruction.",
"type": "string"
},
"temperature": {
"description": "Sampling temperature.",
"maximum": 2,
"minimum": 0,
"type": "number"
}
},
"required": [],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"properties": {
"finish_reason": {
"type": "string"
},
"model": {
"type": "string"
},
"modelId": {
"type": "string"
},
"text": {
"type": "string"
},
"usage": {
"properties": {
"completion_tokens": {
"type": "integer"
},
"prompt_tokens": {
"type": "integer"
},
"total_tokens": {
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}