{"uid":"cap_cWPt2J3EX0lHiT-KY9z5e","slug":"openrelay-llm-inference-4f8c7170","name":"OpenRelay LLM Inference","description":"OpenAI-compatible chat completion. Pay per request in USDC via x402: no signup, no API keys. Price scales with prompt size and max_tokens.","url":"https://api.laminarity.uk/v1/chat/completions?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"enum":["MiniMaxAI/MiniMax-M2.7","deepseek-ai/DeepSeek-V4-Flash-0731","zai-org/GLM-5.3-Flash","jev"],"type":"string","default":"MiniMaxAI/MiniMax-M2.7","description":"Model id from GET /v1/models."},"stream":{"type":"boolean","default":false},"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"enum":["system","user","assistant"],"type":"string"},"content":{"type":"string"}}}},"max_tokens":{"type":"integer","minimum":1,"description":"Upper bound on completion tokens; lower values cost less."},"temperature":{"type":"number","maximum":2,"minimum":0}}},"responseSchema":{"type":"json","example":{"id":"chatcmpl-example","model":"zai-org/GLM-5.3-Flash","usage":{"total_tokens":12,"prompt_tokens":9,"completion_tokens":3},"object":"chat.completion","choices":[{"index":0,"message":{"role":"assistant","content":"Hello!"},"finish_reason":"stop"}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001229","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.001229/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001229","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001229","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm__UP27BSQxdsSMzuTvIrSc","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001229","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Pay-per-request OpenAI-compatible chat completions endpoint supporting multiple LLM models, billed in USDC via x402 micropayments","exampleAgentPrompt":"Using the OpenRelay inference API with the DeepSeek-V4-Flash-0731 model, send this conversation — system: 'You are a helpful assistant', user: 'Summarize the concept of quantum entanglement in two sentences' — and keep the response under 200 tokens.","exampleUseCases":[{"title":"Agent reasoning on a tight budget","prompt":"Call the OpenRelay API using the zai-org/GLM-5.3-Flash model to answer the user question 'What are three risks of investing in small-cap stocks?' — cap the response at 150 tokens to keep costs low."},{"title":"Customer support bot response generation","prompt":"Use OpenRelay with the MiniMax-M2.7 model to generate a polite customer service reply to this message: 'My order hasn't arrived after 10 days, what should I do?' — limit it to 300 tokens."},{"title":"Code explanation for a developer tool","prompt":"Send this to OpenRelay using DeepSeek-V4-Flash-0731 — system prompt: 'You are an expert programmer', user message: 'Explain what this Python list comprehension does: [x*2 for x in range(10) if x % 2 == 0]' — max 250 tokens."}],"resultDescription":"Returns an OpenAI-compatible chat.completion JSON object containing the assistant's reply text, the model used, token usage breakdown (prompt, completion, total), finish reason, and a unique completion ID.","failureModes":["Payment failure if USDC balance is insufficient via x402 — returns 402 Payment Required","Invalid model ID not in enum — returns 400 Bad Request","Messages array missing required role or content fields — returns 400 validation error","Temperature out of range (>2 or <0) — returns 400 Bad Request","max_tokens set too low causing truncated or empty completion — finish_reason: length","Model temporarily unavailable — may return 503 Service Unavailable"],"whenToPreferThis":"Choose this endpoint when you need OpenAI-compatible chat completions on a pay-per-request basis without a monthly subscription, particularly when operating an AI agent that uses x402 USDC micropayments for cost isolation. Prefer it when you want access to GLM, MiniMax, or DeepSeek models through a single standardized interface without managing separate API keys for each provider.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T06:31:13.526Z","isFirstParty":false,"canonicalSlug":"openrelay-llm-inference-4f8c7170"}