{"uid":"cap_wMcLFZVMwOqpm9bTnTLkl","slug":"inference402-chat-small-llama-3-1-8b-a1f46c5d","name":"Inference402 Chat Small (Llama 3.1 8B)","description":"Pay-per-call AI inference for agents: chat (Llama 3.3 70B / 3.1 8B), structured JSON, summarize, translate (incl. Egyptian Arabic), extract, classify, sentiment, keywords, rewrite, embeddings, moderation, vision and speech-to-text. USDC on Base mainnet over x402. No API key, no account.","url":"https://inference402.worlddata402.workers.dev/v1/chat/small?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"enum":["system","user","assistant"],"type":"string"},"content":{"type":"string"}}},"maxItems":50,"minItems":1},"max_tokens":{"type":"integer","default":256,"maximum":512,"minimum":1},"temperature":{"type":"number","default":0.6,"maximum":2,"minimum":0}}},"responseSchema":{"type":"json","example":{"model":"@cf/meta/llama-3.1-8b-instruct-fp8","usage":{"prompt_tokens":20,"completion_tokens":40},"content":"1. Bean There ..."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Xc_lukLf9r0dKoFd-J1Oj","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Pay-per-call chat inference using Llama 3.1 8B via USDC micropayment on Base, no API key required","exampleAgentPrompt":"Ask the small Llama model to write a short two-paragraph summary of how photosynthesis works, keeping the answer under 200 tokens and using a neutral tone.","exampleUseCases":[{"title":"Agent pipeline cheap reasoning step","prompt":"Use the small Llama model to decide, given this product description, whether it belongs in the 'electronics' or 'home goods' category — keep it to one word answer and limit tokens to 10."},{"title":"Lightweight creative text generation","prompt":"Have the small Llama 8B model write a punchy three-sentence tagline for my new coffee brand called 'Morning Bloom', with a warm and energetic tone, max 80 tokens."},{"title":"Quick factual Q&A without account","prompt":"Ask the pay-per-call Llama model: 'What are the three main branches of the US government?' — I don't want to sign up anywhere, just pay per call with crypto, keep the answer under 150 tokens."}],"resultDescription":"Returns a JSON object with the generated text content, the model identifier (e.g. @cf/meta/llama-3.1-8b-instruct-fp8), and token usage stats including prompt_tokens and completion_tokens.","failureModes":["Payment not received or insufficient USDC — returns 402 Payment Required","Messages array empty or malformed — schema validation error","max_tokens exceeds 512 — rejected by schema","temperature out of 0–2 range — validation error","Network timeout on Cloudflare Worker — transient 5xx error","messages array exceeds 50 items — rejected by schema"],"whenToPreferThis":"Choose this endpoint when you need a cheap, fast, keyless LLM inference call via USDC micropayment on Base mainnet and a smaller model (8B) is sufficient for the task. Prefer it over the large sibling when latency and cost matter more than reasoning depth. Ideal for agent pipelines needing many low-cost inference steps without managing API credentials.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T12:39:20.008Z","isFirstParty":false,"canonicalSlug":"inference402-chat-small-llama-3-1-8b-a1f46c5d"}