{"uid":"cap_JogpWGChep1EjhBFeTCqJ","slug":"fold-x402-llm-inference-bbf4246b","name":"fold · x402 LLM Inference","description":"Machine-readable market intelligence for onchain agents, served over x402.","url":"https://x402.fold.computer/llm","method":"POST","headers":{},"bodySchema":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","description":"OpenRouter model id, e.g. openai/gpt-5.5, anthropic/claude-opus-4.8. See GET /llm/models for all 339."},"messages":{"type":"array","description":"OpenAI-format chat messages"},"max_tokens":{"type":"number"},"temperature":{"type":"number"}}},"responseSchema":{"type":"object","required":["status","data"],"properties":{"data":{"type":"object","description":"OpenAI-format completion + x402 cost info"},"status":{"type":"string"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"2","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":"down","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$2/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"2","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"2","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_21JALJIYoG4Ql8IfQVmCx","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"2","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Pay-per-call LLM completions via OpenRouter models, billed in USDC over x402 protocol","exampleAgentPrompt":"Use the fold x402 LLM endpoint with the anthropic/claude-opus-4-5 model to answer this question: 'What are the top 3 DeFi protocols by TVL right now?' — keep it under 300 tokens.","exampleUseCases":null,"resultDescription":"An OpenAI-format chat completion object (choices, usage, finish_reason) alongside x402 cost metadata showing how much USDC was charged for the request.","failureModes":["Payment insufficient or missing — 402 response requiring x402 payment header","Invalid model ID — returns error if model string doesn't match an available OpenRouter model","Malformed messages array — 400 if messages don't follow OpenAI chat format","Model rate limit or unavailability — upstream OpenRouter error propagated","Insufficient USDC balance — payment processor rejects transaction"],"whenToPreferThis":"Choose this endpoint when your agent needs to call an LLM and pay per-request in USDC via the x402 protocol — especially useful for onchain or crypto-native agents that don't want recurring subscriptions. Prefer this over direct OpenAI/Anthropic APIs when you need crypto-native micropayment billing or want access to 300+ OpenRouter models through a single x402-compatible endpoint.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T11:27:49.218Z","isFirstParty":false}