# QuickBuild LLM Chat API

> QuickBuild LLM Chat API is a paid API for AI agents from quickbuild.quynguyenbac.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-21).

Runs a user prompt through a small open-source LLM (Llama, Mistral, or Granite) and returns generated text, token usage, and finish reason — pay-per-call via x402.

## Facts

- Endpoint: GET https://quickbuild.quynguyenbac.workers.dev/api/chat?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/quickbuild-llm-chat-api-ffb19efe
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_196yi8PZJlh0cHkWG-nha

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability quickbuild-llm-chat-api-ffb19efe
```

Example prompt: Ask the llama-3.1-8b model: 'What are three creative names for a coffee shop that specializes in cold brew?' — keep the response under 200 tokens and use a temperature of 0.8.

## When to prefer this

Choose this endpoint when you need cheap, key-free LLM text generation billed per call in USDC with no signup, and the task fits within a 512-token output window using one of the supported small open-source models (Llama 3.x, Mistral 7B, or Granite 4.0 micro). It is ideal for agents that need occasional inference without managing API keys or subscriptions.

## Known failure modes

- Missing or empty 'prompt' parameter — returns a default sample response rather than an error
- Exceeding max_tokens cap of 512 — capped silently at 512
- Invalid model alias — likely returns an error or falls back to default
- Payment not sent (x402) — 402 response blocking the call
- Temperature out of range (0–2) — may return a validation error

## How this service works

Landing pages ($15), Google Sheets/Apps Script automation ($10), scrapers, scripts & Telegram bots (from $15), broken-link + sitemap audit reports ($10). See a working demo first, pay after.

## Output

A JSON object containing the generated text string, the model alias used, the full model ID, finish reason (e.g. 'stop'), and a usage breakdown with prompt_tokens, completion_tokens, and total_tokens.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "model": {
       "enum": [
        "llama-3.1-8b",
        "llama-3.2-3b",
        "llama-3.2-1b",
        "mistral-7b",
        "granite-4.0-micro"
       ],
       "type": "string",
       "description": "Model alias (default llama-3.1-8b)."
      },
      "prompt": {
       "type": "string",
       "description": "User message. Optional: defaults to a short sample question."
      },
      "system": {
       "type": "string",
       "description": "Optional system instruction."
      },
      "messages": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "role": {
          "type": "string"
         },
         "content": {
          "type": "string"
         }
        }
       },
       "description": "Optional OpenAI-style history (POST JSON)."
      },
      "max_tokens": {
       "type": "integer",
       "maximum": 512,
       "minimum": 1,
       "description": "Max output tokens (default/cap 512)."
      },
      "temperature": {
       "type": "number",
       "maximum": 2,
       "minimum": 0,
       "description": "Sampling temperature."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "text": {
       "type": "string"
      },
      "model": {
       "type": "string"
      },
      "usage": {
       "type": "object",
       "properties": {
        "total_tokens": {
         "type": "integer"
        },
        "prompt_tokens": {
         "type": "integer"
        },
        "completion_tokens": {
         "type": "integer"
        }
       }
      },
      "modelId": {
       "type": "string"
      },
      "finish_reason": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "text": "Pay per call. No keys. Just results.",
  "model": "llama-3.1-8b",
  "usage": {
   "total_tokens": 34,
   "prompt_tokens": 24,
   "completion_tokens": 10
  },
  "modelId": "@cf/meta/llama-3.1-8b-instruct-fp8-fast",
  "finish_reason": "stop"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/quickbuild-llm-chat-api-ffb19efe/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from quickbuild.quynguyenbac.workers.dev](https://www.zero.xyz/host/quickbuild.quynguyenbac.workers.dev/llms.txt)
