{"uid":"cap_WVhBf5hmefClTRpHiNvdq","slug":"fastapi-online-chat-completion-4eac4a6e","name":"fastapi.online Chat Completion","description":"Self-hosted AI API gateway. Expensive endpoints require an x402 micropayment (USDC on Base) before executing.","url":"https://api.fastapi.online/chat","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["messages"],"properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"enum":["system","user","assistant"],"type":"string"},"content":{"type":"string"}}}},"temperature":{"type":"number"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"model":"llama3.1:8b","usage":{"prompt_tokens":9,"completion_tokens":8},"message":{"role":"assistant","content":"Hi! How can I help?"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0015","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":"$0.0015/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0015","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0015","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_D8aTVdUoHkNriPOlpiIx-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0015","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Send a list of messages to a self-hosted LLM and receive a chat completion response, billed per call via crypto with no signup required.","exampleAgentPrompt":"Send this message thread to the AI and get a response: system says 'You are a helpful assistant', user says 'Explain quantum entanglement in two sentences' — use temperature 0.7 and pay per call with USDC, no account needed.","exampleUseCases":[{"title":"Anonymous LLM Q&A for research bot","prompt":"Ask the AI to explain the difference between supervised and unsupervised machine learning in plain English — I don't want to sign up for anything, just pay per call with crypto."},{"title":"Multi-turn customer support draft","prompt":"I have a conversation thread where the user complained about a late delivery. Send it to the chat API with a system prompt saying 'You are a polite customer support agent' and temperature 0.3, and get a draft reply."},{"title":"Automated content summarization pipeline","prompt":"For each article I feed in, send the text as a user message to the LLM with the instruction 'Summarize this in 3 bullet points' and return the AI's response — I'll pay per call with USDC."}],"resultDescription":"Returns a JSON object containing the assistant's reply message (with role and content fields), the model name used, and usage statistics including prompt token count and completion token count.","failureModes":["Payment not provided or insufficient USDC — HTTP 402 returned requiring payment","Missing required 'messages' field — validation error returned","Invalid model name — may return error or fall back to default model","Temperature out of expected range — may cause unexpected behavior","Network timeout if inference takes too long for large prompts","Malformed messages array — schema validation error"],"whenToPreferThis":"Choose this endpoint when you need pay-per-call LLM chat completions with no account or subscription required, accepting crypto (USDC) micro-payments. Ideal for agents that need anonymous or frictionless AI inference, or when you want to avoid monthly API key commitments. Less suitable if you need guaranteed uptime SLAs, specific well-known hosted model names (GPT-4, Claude), or extensive usage dashboards.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T19:27:01.139Z","isFirstParty":false}