{"uid":"cap_Md968JdlX627AvW6Zis6r","slug":"chat-completions-openai-api-llmrt-companion-e718aaec","name":"Chat Completions OpenAI API (llmrt-companion)","description":"OpenAI-compatible chat completions: POST a standard {model, messages, max_tokens} body and get back the choices array plus usage. Same engine as /chat-completion-402, no signup and no API key.","url":"https://llmrt-companion.manhliemcn4euwlu.workers.dev/v1/chat/completions?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"type":"string","example":"llmrt-chat"},"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string"},"content":{"type":"string"}}}},"max_tokens":{"type":"number","example":256}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.000958","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.000973/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.000973","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.000973","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_6NBQJe5-l-B0PHA2Yi59p","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.000973","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Accepts an OpenAI-compatible chat completion request (model, messages, max_tokens) and returns a choices array with generated text plus token usage stats.","exampleAgentPrompt":"Using the llmrt-chat model, send this conversation to the chat completions API and get a response — messages are: system: 'You are a helpful assistant', user: 'What is the capital of France?' — limit the reply to 128 tokens.","exampleUseCases":[{"title":"Chatbot reply generation","prompt":"I have a conversation history with a system prompt and three user/assistant turns — send it to the llmrt-chat completions endpoint and give me the next assistant reply, keeping it under 200 tokens."},{"title":"Single-shot question answering","prompt":"Ask the llmrt-chat model: 'Summarize the pros and cons of solar energy in three bullet points' — just one user message, max 150 tokens."},{"title":"Automated agent sub-task reasoning","prompt":"My pipeline needs an LLM call: system prompt is 'You are a JSON extractor', user message is 'Extract the company name and revenue from: Acme Corp reported $4.2M in Q3.' — use llmrt-chat and return up to 100 tokens."}],"resultDescription":"Returns an OpenAI-style response object containing a choices array (each with a message.role and message.content string, plus a finish_reason) and a usage object showing prompt_tokens, completion_tokens, and total_tokens consumed.","failureModes":["Invalid or missing messages array returns a 400 validation error","Exceeding max_tokens or model context window may truncate output or return an error","Unsupported model name results in a model-not-found error","Payment failure (x402) blocks the request before inference begins","Network timeout on the Cloudflare worker returns a 5xx gateway error"],"whenToPreferThis":"Choose this endpoint when you need an OpenAI-compatible chat completion API with no signup, no API key, and pay-per-call micropayment billing via x402. It is ideal for agents or pipelines already using the OpenAI message format that want a drop-in hosted inference endpoint at low per-call cost without committing to a subscription.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-03T06:34:51.342Z","isFirstParty":false,"canonicalSlug":"chat-completions-openai-api-llmrt-companion-e718aaec"}