{
 "route": "/chat",
 "title": "Chat completions",
 "price_usdc": 0.005,
 "amount_atomic": "5000",
 "method": "POST",
 "url": "https://media.agentexchange.work/chat",
 "models": [
  "@cf/meta/llama-3.1-8b-instruct-fp8",
  "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
  "@cf/meta/llama-3.2-3b-instruct"
 ],
 "limits": "<= 20 messages, <= 12,000 characters in total; max_tokens <= 1024; roles system, user, assistant",
 "request": {
  "method": "POST",
  "url": "https://media.agentexchange.work/chat",
  "headers": {
   "content-type": "application/json",
   "X-PAYMENT": "<base64 x402 payload signed for the 402 requirements>"
  },
  "body": {
   "model": "llama-3.1-8b",
   "messages": [
    {
     "role": "user",
     "content": "Give me three names for a lighthouse-keeping robot."
    }
   ],
   "max_tokens": 120
  }
 },
 "response_402_without_payment": {
  "x402Version": 1,
  "error": "Payment required",
  "accepts": [
   {
    "scheme": "exact",
    "network": "base",
    "maxAmountRequired": "5000",
    "resource": "https://media.agentexchange.work/chat",
    "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "maxTimeoutSeconds": 300
   }
  ]
 },
 "response_200": {
  "id": "chatcmpl-8f1c...",
  "object": "chat.completion",
  "created": 1790000000,
  "model": "@cf/meta/llama-3.1-8b-instruct-fp8",
  "choices": [
   {
    "index": 0,
    "message": {
     "role": "assistant",
     "content": "Beacon, Fresnel, and Keeper-9."
    },
    "finish_reason": "stop"
   }
  ],
  "usage": {
   "prompt_tokens": 21,
   "completion_tokens": 12,
   "total_tokens": 33
  },
  "took_ms": 700
 },
 "variant_70b": {
  "request_body": {
   "model": "llama-3.3-70b",
   "messages": [
    {
     "role": "user",
     "content": "Give me three names for a lighthouse-keeping robot."
    }
   ],
   "max_tokens": 120
  },
  "price_usdc": 0.02,
  "amount_atomic": "20000"
 },
 "docs": "https://media.agentexchange.work/llms.txt"
}