W

Workers · LLM Chat

by Workers

POSTBase

$0.002

per call · USD Coin on Base

LLM chat completion per call — no account, no API key, no token math. Three flat-priced tiers: fast $0.002 (DeepSeek v4 Flash), smart $0.02 (GPT-5.4 mini), reasoning $0.03 (DeepSeek v4 Pro). Send OpenAI-style messages, get the assistant reply with finish_reason and token usage. Input capped per tier (16k-32k chars); the 402 quotes the exact tier price up front. Model or source unavailable means a 503 and you pay nothing. USDC on Base.

Endpoint

POST https://agentdata-api.sander-van-aard.workers.dev/llm/chat

1

Calls / 30d

1

Unique payers / 30d

Aug 30

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://agentdata-api.sander-van-aard.workers.dev/llm/chat", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "max_tokens": 256,
    "messages": [
      {
        "content": "Summarize x402 in one sentence.",
        "role": "user"
      }
    ],
    "model": "fast"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://agentdata-api.sander-van-aard.workers.dev/llm/chat" \
  -H "Content-Type: application/json" \
  -d '{"max_tokens":256,"messages":[{"content":"Summarize x402 in one sentence.","role":"user"}],"model":"fast"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "content": "x402 is an HTTP-native payment protocol that lets clients pay per request in stablecoins.",
  "finish_reason": "stop",
  "generated_at": "2026-07-30T08:00:00.000Z",
  "model": "deepseek/deepseek-v4-flash",
  "tier": "fast",
  "usage": {
    "completion_tokens": 21,
    "prompt_tokens": 18
  }
}

Payment details

Pay to0xb0ae6a9bd7a573ddda58db6c28622417e8ca2099
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of AI & Inference and the homepage with a featured placement.

Get featured →

More from Workers & similar services