{"uid":"cap_tcB6mwcrvlok0CQ1lggrw","slug":"nojunk-llm-chat-completions-d2072004","name":"NoJunk LLM Chat Completions","description":"NoJunk LLM chat: OpenAI-compatible chat completion on Llama 3.3 70B or Qwen 2.5 Coder 32B (up to 32000 characters in, 1024 tokens out, optional JSON mode).","url":"https://nojunk-llm.mick8511.workers.dev/v1/chat/completions?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"type":"string","description":"Optional: llama-3.3-70b or qwen2.5-coder-32b (default llama-3.3-70b; \"gpt-4o-mini\" is an alias of the default)"},"top_p":{"type":"number","description":"Optional: nucleus sampling, 0-1"},"stream":{"type":"boolean","description":"Must be false or omitted (streaming is not supported)"},"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"enum":["system","user","assistant"],"type":"string"},"content":{"type":"string"}}},"description":"Conversation so far, 1-200 messages, at most 32000 characters of content in total"},"max_tokens":{"type":"integer","description":"Optional: maximum completion tokens, 1-1024 (default 512)"},"temperature":{"type":"number","description":"Optional: 0-2 (default 0.7)"},"response_format":{"type":"object","description":"Optional: {\"type\": \"json_object\"} to force a JSON object reply"}}},"responseSchema":{"type":"json","example":{"id":"chatcmpl-9f1c2d3e-4b5a-4c6d-8e7f-0a1b2c3d4e5f","model":"llama-3.3-70b","usage":{"total_tokens":60,"prompt_tokens":31,"completion_tokens":29},"object":"chat.completion","choices":[{"index":0,"message":{"role":"assistant","content":"USDC is a US-dollar stablecoin issued by Circle, redeemable 1:1 for dollars and backed by cash and short-term Treasuries."},"finish_reason":"stop"}],"created":1760529600}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_nabZUFmUcVilDTNTGmu7r","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Pay-per-call OpenAI-compatible chat completions API using Llama 3.3 70B or Qwen 2.5 Coder 32B, billed per request in USDC with no API key required","exampleAgentPrompt":"Ask Llama 3.3 70B to explain how proof-of-stake consensus works in plain English, keeping the answer under 300 tokens, and pay per call in USDC — no API key needed.","exampleUseCases":[{"title":"Keyless LLM for autonomous agent","prompt":"I need you to call an LLM API that doesn't require an account or API key — just use the pay-per-call setup with USDC. Send this system prompt: 'You are a concise assistant.' and this user message: 'Summarize the key risks of DeFi lending in 3 bullet points.' Use Llama 3.3 70B and cap the output at 256 tokens."},{"title":"Structured JSON extraction from text","prompt":"Use the NoJunk LLM to extract the company name, founding year, and headquarters city from this text as a JSON object: 'Acme Corp was founded in 2010 and is headquartered in Austin, Texas.' Force a JSON response format and use Llama 3.3 70B."},{"title":"Code generation with Qwen Coder model","prompt":"I need to generate a Python function that parses a CSV file and returns rows as a list of dicts — use the Qwen 2.5 Coder 32B model on NoJunk LLM, set max tokens to 512, and pay per call in USDC without needing an API key."}],"resultDescription":"Returns an OpenAI-compatible chat.completion JSON object containing the assistant's reply in choices[0].message.content, the finish_reason (e.g. 'stop'), prompt/completion/total token counts in usage, the model name, a unique completion ID, and a created timestamp. Optionally structured as a JSON object if response_format was set.","failureModes":["Payment not processed or insufficient USDC balance — request rejected with 402 Payment Required","Streaming requested (stream: true) — not supported, returns error","Messages exceed 32,000 character limit — request rejected","max_tokens exceeds 1,024 — request rejected or clamped","Invalid model name not matching llama-3.3-70b, qwen2.5-coder-32b, or gpt-4o-mini alias — may default or error","Malformed messages array (missing role or content fields) — validation error","More than 200 messages in conversation — request rejected"],"whenToPreferThis":"Choose this endpoint when building AI agents or pipelines that need OpenAI-compatible LLM inference without managing API keys, accounts, or subscription plans — especially when operating in a crypto-native or x402-enabled environment where USDC micropayments per call are preferable to monthly billing. Ideal for autonomous agents that need to self-fund LLM calls, serverless pipelines without secret management, or developers who want no rate limits and true pay-for-what-you-use pricing. Prefer Qwen 2.5 Coder 32B for code generation tasks and Llama 3.3 70B for general reasoning and text tasks.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-16T12:35:05.911Z","isFirstParty":false,"canonicalSlug":"nojunk-llm-chat-completions-d2072004"}