{"uid":"cap_oJ-JO08I-j7oon31eP7gJ","slug":"losbeto-openai-compatible-llm-chat-completions-x402-2791cb05","name":"Losbeto OpenAI-Compatible LLM Chat Completions (x402)","description":"OpenAI-compatible LLM gateway at $0.005/call — change base_url, pay in USDC. Plus pay-per-call market data: multi-oracle price consensus, sentiment, forex, equities, commodities, Brazil macro (BCB/B3) and crypto. No API keys, no accounts. USDC on Base, Solana and Algorand via x402.","url":"https://markets.losbeto.xyz/v1/chat/completions?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","properties":{"method":{"type":"string","description":"POST"},"bodyParams":{"type":"object","required":["messages"],"properties":{"model":{"type":"string","default":"losbeto-fast","description":"Model alias; any string accepted (failover chain picks the live provider)."},"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"enum":["system","user","assistant"],"type":"string"},"content":{"type":"string"}}},"description":"OpenAI chat messages, oldest first."},"max_tokens":{"type":"integer","default":1024,"description":"Completion cap, 16-2048."},"temperature":{"type":"number","default":0.4,"description":"Sampling temperature, 0.0-1.5."}},"additionalProperties":false}}},"output":{"type":"object","properties":{"example":{"type":"object","description":"OpenAI-compatible chat completions over x402: POST the standard {model, messages, max_tokens} body and receive a standard chat.completion response — any OpenAI SDK works by changing only base_url. Payment is the x402 challenge (USDC on Base, Solana or Algorand), so an agent needs no provider account, no credit card, no API key. Failover chain behind the door: Groq first for speed, Gemini and paid tiers as backup. v1: no streaming, tools or vision — declared in every error..."}}}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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_Is708J1UxI-2aaYYzrIsB","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Sends a chat prompt to an OpenAI-compatible LLM gateway and receives a completion response, billed per-call at $0.005 USDC via the x402 protocol — no API keys or accounts required.","exampleAgentPrompt":"Ask the Losbeto LLM gateway to summarize this paragraph for me — use up to 512 tokens and a temperature of 0.3, and pay the $0.005 USDC fee automatically: 'Artificial intelligence is rapidly transforming industries by automating tasks that once required human expertise.'","exampleUseCases":[{"title":"Keyless LLM for autonomous agent","prompt":"My agent needs to call an LLM to draft a short reply to a customer complaint without needing an API key or account — use Losbeto's pay-per-call gateway, set max_tokens to 256 and temperature to 0.5, and pay the USDC fee on Base."},{"title":"Budget-controlled text summarization","prompt":"Summarize this 500-word article into 3 bullet points using the Losbeto chat API — keep it under 200 tokens and use a low temperature of 0.2 so it stays factual."},{"title":"On-chain agent reasoning step","prompt":"I'm building a DeFi agent that needs to reason about market conditions — have it call the Losbeto LLM with a system prompt explaining it's a crypto analyst and a user message asking 'should I rebalance my portfolio given BTC is up 8% today?', with max_tokens 512."}],"resultDescription":"An OpenAI-compatible chat.completion JSON object containing the assistant's message content, model used, and token usage counts. The response mirrors the standard OpenAI /v1/chat/completions format so any OpenAI SDK can parse it directly.","failureModes":["Payment not received or invalid x402 USDC transaction — returns 402 Payment Required","Messages array missing or malformed — returns 400 Bad Request","All backend providers (Groq, Gemini) unavailable — returns 503 or error in response body","Streaming, function/tool calls, or vision inputs requested — returns an explicit unsupported-feature error","max_tokens outside 16-2048 range — may be clamped or rejected","Temperature outside 0.0-1.5 range — may be clamped or return validation error"],"whenToPreferThis":"Choose this endpoint when an AI agent needs keyless, accountless LLM inference billed in USDC stablecoins via x402 micropayments — ideal for autonomous agents on Base, Solana, or Algorand that cannot hold traditional API credentials. Prefer it over direct OpenAI/Groq APIs when the agent must pay programmatically per call without pre-provisioned keys, or when operating in a crypto-native agentic stack. Not suitable when streaming, tool use, or vision/image input is required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T00:44:10.108Z","isFirstParty":false,"canonicalSlug":"losbeto-openai-compatible-llm-chat-completions-x402-2791cb05"}