{"uid":"cap_RUTwh6i3reDMvD4bIOKBO","slug":"openrelay-premium-chat-completions-ee37ab29","name":"OpenRelay Premium Chat Completions","description":"OpenRelay is a pay-per-request LLM inference relay. Autonomous AI agents call our OpenAI-compatible endpoints and pay in USDC via x402 — no API keys, no signup, no subscriptions. Backed by DeepSeek V4 Flash (400k ctx), Kimi K2.6 (240k ctx), and MiniMax M2.7 (180k ctx). Price: $0.10 per 1M tokens (input + max_tokens). USDC on Solana or Base. Facilitator: PayAI (gasless).","url":"https://openrelay.hggfffdfy687.workers.dev/v1/premium/completions","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"type":"string","description":"Model id. Call GET /v1/models for list. Default: deepseek-ai/DeepSeek-V4-Flash-0731."},"stream":{"type":"boolean","default":false},"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"enum":["system","user","assistant"]},"content":{"type":"string"}}}},"max_tokens":{"type":"integer","default":512,"maximum":16384,"minimum":1},"temperature":{"type":"number","default":1,"maximum":2,"minimum":0}}},"responseSchema":{"type":"json","example":{"id":"chatcmpl-openrelay-abc123","model":"deepseek-ai/DeepSeek-V4-Flash-0731","usage":{"total_tokens":15,"prompt_tokens":12,"completion_tokens":3},"object":"chat.completion","choices":[{"index":0,"message":{"role":"assistant","content":"Hello!"},"finish_reason":"stop"}],"created":1787532386}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0005","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.0005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_AG4niguZTgWZEq459uB87","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0005","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Pay-per-request OpenAI-compatible LLM inference relay supporting DeepSeek, Kimi, and MiniMax models, billed in USDC via x402 with no API keys or subscriptions.","exampleAgentPrompt":"Ask OpenRelay's premium endpoint to respond to this conversation using the DeepSeek-V4-Flash model — system prompt: 'You are a helpful assistant', user message: 'Summarize the concept of zero-knowledge proofs in three sentences', max 300 tokens, temperature 0.7.","exampleUseCases":[{"title":"Autonomous agent reasoning loop","prompt":"Run this multi-turn conversation through the DeepSeek V4 Flash model: system says 'You are a research assistant', then the user asks 'What are the main causes of the 2008 financial crisis?' — give me up to 800 tokens back, temperature 0.5."},{"title":"Crypto-native app content generation","prompt":"I'm building a dApp and need to generate marketing copy without setting up a subscription — send this to the Kimi K2.6 model: system 'You are a copywriter', user 'Write a punchy one-paragraph description of a DeFi yield optimizer', max 256 tokens."},{"title":"Long-context document summarization","prompt":"Use the MiniMax M2.7 model to summarize this 50,000-word legal document I'm pasting — fit it in under 1000 tokens output, temperature 0.3, and pay per request so I'm not locked into a plan."}],"resultDescription":"Returns an OpenAI-compatible chat.completion JSON object containing the assistant's reply text, token usage breakdown (prompt, completion, total), model ID used, a unique completion ID, finish reason (e.g. 'stop'), and creation timestamp.","failureModes":["Insufficient USDC balance or failed x402 payment returns 402 Payment Required","Invalid or unsupported model ID returns 400 Bad Request","max_tokens exceeds model's context limit returns 400 validation error","Malformed messages array (missing role or content) returns 400","Upstream model provider timeout may return 503 or 504","Temperature out of range (>2 or <0) returns 400 validation error"],"whenToPreferThis":"Choose this endpoint when an autonomous AI agent needs LLM inference without pre-registered API keys or subscriptions, and can pay per request in USDC on Solana or Base via x402. Ideal for crypto-native or agent-to-agent workflows where programmatic micropayments are preferred over OAuth or API key management. Prefer over standard OpenAI when you want pay-as-you-go stablecoin billing, access to DeepSeek V4 Flash (400k context), Kimi K2.6 (240k context), or MiniMax M2.7 (180k context) under a single OpenAI-compatible interface.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:34:58.699Z","isFirstParty":false}