{"uid":"cap_bMH7Jy9MamzyuB4ycIWM9","slug":"gateway-d402-xyz-d402-llm-inference-gateway-24f1fd8c","name":"d402 LLM Inference Gateway","description":"Paid d402 capability alias for llm.inference@1. Workers can wrap local Ollama/LM Studio/llama.cpp/vLLM or consumer/free-tier OpenAI-compatible APIs and sell completions through d402 without exposing provider keys.","url":"https://gateway.d402.xyz/v1/llm/inference","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"type":"string","description":"Requested model, honored only if the seller profile allows it."},"prompt":{"type":"string","description":"Convenience single user prompt; messages wins if provided."},"profile":{"type":"string","description":"Optional seller profile alias from D402_LLM_PROVIDERS_JSON."},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"content":{"type":"string"}}}},"provider":{"type":"string","description":"Seller-offered provider/profile name, for example nvidia, ollama, groq-free. The buyer does not provide credentials."},"maxTokens":{"type":"number"},"timeoutMs":{"type":"number","maximum":45000,"minimum":1},"temperature":{"type":"number"}},"additionalProperties":true},"responseSchema":{"type":"object","required":["taskId","status"],"properties":{"error":{"type":["string","null"]},"links":{"type":"object","properties":{"task":{"type":"string"},"result":{"type":"string"},"receipt":{"type":"string"}}},"result":{"type":"object","required":["provider","model","text","promptHash","responseHash","serviceName","serviceVersion"],"properties":{"raw":{"type":"object"},"text":{"type":"string"},"model":{"type":"string"},"usage":{"type":["object","null"]},"choices":{"type":"array"},"message":{"type":"object"},"provider":{"type":"string"},"createdAt":{"type":"string"},"promptHash":{"type":"string"},"serviceName":{"type":"string"},"responseHash":{"type":"string"},"runnerVersion":{"type":"string"},"serviceVersion":{"type":"string"}}},"status":{"enum":["accepted","rejected","running","error"],"type":"string"},"taskId":{"type":"string"},"settlement":{"type":["object","null"],"additionalProperties":true},"x402Settlement":{"type":["object","null"],"additionalProperties":true},"validationReceipt":{"type":["object","null"],"additionalProperties":true}}},"example":null,"exampleRequest":null,"tags":[],"displayCostAmount":"0.01","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":"down","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_gB6ewLXhZ1JiZhZf9m4gr","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":"gateway.d402.xyz","brandSlug":"gateway-d402-xyz-x402","brandBaseUrl":"https://gateway.d402.xyz","brandDocsUrl":null,"whatItDoes":"Runs LLM text completions through worker-owned providers (Ollama, vLLM, OpenAI-compatible) via the d402 payment network for $0.01 USDC per call.","exampleAgentPrompt":"Using the d402 LLM gateway with the ollama provider, send the prompt 'Explain quantum entanglement in simple terms' to llama3 with a temperature of 0.7 and max 300 tokens.","exampleUseCases":null,"resultDescription":"Returns a taskId and status, plus a result object containing the generated text completion, model name, provider name, prompt and response hashes for auditability, token usage stats, and optionally raw choices array. Also includes settlement and validation receipt metadata from the d402 payment network.","failureModes":["No workers available for requested provider/model — returns status=error with error message","Payment not settled or insufficient USDC — request rejected before inference runs","Timeout exceeded (max 45000ms) — returns status=error","Model not allowed by seller profile — may return error or fall back to default model","Provider credentials expired on worker side — worker returns error passed through as status=error","Invalid messages format — request rejected with validation error"],"whenToPreferThis":"Choose this endpoint when you need LLM text completions without managing API keys or subscriptions, want to pay per-call in USDC via the d402 micropayment network, need access to local or open-source model providers (Ollama, llama.cpp, vLLM), or want auditable inference with prompt/response hashes for verification. Prefer over direct OpenAI/Anthropic APIs when decentralization, worker-owned compute, or crypto-native payment settlement is required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T17:27:35.553Z","isFirstParty":false}