{"openapi": "3.1.0", "info": {"title": "omnipay chat (MPP + x402)", "version": "p8.5", "description": "Pay-per-call LLM chat completions and cited briefs. Pay with MPP (Tempo USDC.e) or x402 (Base USDC). Charged only after the result is produced.", "contact": {"url": "https://pay.omnidev.tech"}}, "servers": [{"url": "https://pay.omnidev.tech"}], "x-service-info": {"categories": ["ai"], "docs": {"homepage": "https://pay.omnidev.tech/llms.txt", "apiReference": "https://pay.omnidev.tech/openapi.json", "llms": "https://pay.omnidev.tech/llms.txt"}}, "paths": {"/v1/chat/nano": {"post": {"operationId": "chat_nano", "summary": "Chat completion (nano): <= 1000 in / 256 out tokens", "description": "OpenAI-compatible chat completion, auto-routed to the cheapest healthy upstream. Pay per call with MPP (Tempo charge). The buyer is charged only after the completion is produced.", "x-payment-info": {"offers": [{"amount": "1000", "currency": "0x20C000000000000000000000b9537d11c60E8b50", "intent": "charge", "method": "tempo", "description": "chat-nano: one chat completion (USD 0.001)"}], "protocols": ["mpp", "x402"], "price": {"mode": "fixed", "currency": "USD", "amount": "0.001"}, "x-network": "tempo-mainnet", "x-chainId": 4217, "x-recipient": "0x1993330e3cC36B4a68B5790EFBcfE296b02efeDB", "x-modes": ["pull"], "x-settle": "after_serve"}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"messages": {"type": "array", "items": {"type": "object", "properties": {"role": {"type": "string", "enum": ["system", "user", "assistant"]}, "content": {"type": "string"}}, "required": ["role", "content"]}}, "prompt": {"type": "string", "description": "shorthand for a single user message"}, "max_tokens": {"type": "integer", "minimum": 1, "maximum": 256}, "model": {"type": "string", "default": "auto", "enum": ["auto", "llama-3.1-8b-instruct", "mistralai/mistral-nemo", "meta-llama/llama-3.1-8b-instruct"]}}}}}}, "responses": {"200": {"description": "chat.completion object (choices[0].message.content)", "content": {"application/json": {"schema": {"type": "object", "properties": {"ok": {"type": "boolean"}, "settled": {"type": "boolean"}, "facilitator_tx": {"type": "string"}, "explorer": {"type": "string"}, "result": {"type": "object", "properties": {"id": {"type": "string"}, "object": {"type": "string"}, "model": {"type": "string"}, "choices": {"type": "array", "items": {"type": "object", "properties": {"index": {"type": "integer"}, "message": {"type": "object", "properties": {"role": {"type": "string"}, "content": {"type": "string"}}}, "finish_reason": {"type": "string"}}}}, "usage": {"type": "object"}}}}, "required": ["ok", "result"]}}}}, "402": {"description": "Payment required: WWW-Authenticate: Payment (MPP)"}, "409": {"description": "credential replayed / settle state unknown (do not pay again)"}, "503": {"description": "selling paused (cap or margin guard); no charge"}}}}, "/v1/chat/small": {"post": {"operationId": "chat_small", "summary": "Chat completion (small): <= 8000 in / 1024 out tokens", "description": "OpenAI-compatible chat completion, auto-routed to the cheapest healthy upstream. Pay per call with MPP (Tempo charge). The buyer is charged only after the completion is produced.", "x-payment-info": {"offers": [{"amount": "2000", "currency": "0x20C000000000000000000000b9537d11c60E8b50", "intent": "charge", "method": "tempo", "description": "chat-small: one chat completion (USD 0.002)"}], "protocols": ["mpp", "x402"], "price": {"mode": "fixed", "currency": "USD", "amount": "0.002"}, "x-network": "tempo-mainnet", "x-chainId": 4217, "x-recipient": "0x1993330e3cC36B4a68B5790EFBcfE296b02efeDB", "x-modes": ["pull"], "x-settle": "after_serve"}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"messages": {"type": "array", "items": {"type": "object", "properties": {"role": {"type": "string", "enum": ["system", "user", "assistant"]}, "content": {"type": "string"}}, "required": ["role", "content"]}}, "prompt": {"type": "string", "description": "shorthand for a single user message"}, "max_tokens": {"type": "integer", "minimum": 1, "maximum": 1024}, "model": {"type": "string", "default": "auto", "enum": ["auto", "llama-3.1-8b-instruct", "mistralai/mistral-nemo", "openai/gpt-oss-20b"]}}}}}}, "responses": {"200": {"description": "chat.completion object (choices[0].message.content)", "content": {"application/json": {"schema": {"type": "object", "properties": {"ok": {"type": "boolean"}, "settled": {"type": "boolean"}, "facilitator_tx": {"type": "string"}, "explorer": {"type": "string"}, "result": {"type": "object", "properties": {"id": {"type": "string"}, "object": {"type": "string"}, "model": {"type": "string"}, "choices": {"type": "array", "items": {"type": "object", "properties": {"index": {"type": "integer"}, "message": {"type": "object", "properties": {"role": {"type": "string"}, "content": {"type": "string"}}}, "finish_reason": {"type": "string"}}}}, "usage": {"type": "object"}}}}, "required": ["ok", "result"]}}}}, "402": {"description": "Payment required: WWW-Authenticate: Payment (MPP)"}, "409": {"description": "credential replayed / settle state unknown (do not pay again)"}, "503": {"description": "selling paused (cap or margin guard); no charge"}}}}, "/v1/brief": {"post": {"operationId": "brief", "summary": "Cited research brief from your quotes", "description": "Short brief grounded ONLY in the quotes you send, cited [n]. Empty or missing quotes are rejected with 400 and you are not charged. Charged only after the brief is produced.", "x-payment-info": {"offers": [{"amount": "2000", "currency": "0x20C000000000000000000000b9537d11c60E8b50", "intent": "charge", "method": "tempo", "description": "brief: one cited brief (USD 0.002)"}], "protocols": ["mpp", "x402"], "price": {"mode": "fixed", "currency": "USD", "amount": "0.002"}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["query", "citations"], "properties": {"query": {"type": "string", "minLength": 3, "maxLength": 2000}, "citations": {"type": "array", "minItems": 1, "maxItems": 12, "items": {"type": "object", "required": ["url", "quote"], "properties": {"url": {"type": "string", "format": "uri"}, "quote": {"type": "string", "minLength": 8, "maxLength": 1500}}}}, "max_tokens": {"type": "integer", "minimum": 1, "maximum": 600}}}}}}, "responses": {"200": {"description": "brief", "content": {"application/json": {"schema": {"type": "object", "properties": {"ok": {"type": "boolean"}, "result": {"type": "object", "properties": {"brief": {"type": "string"}, "cited": {"type": "array", "items": {"type": "integer"}}, "citations": {"type": "array", "items": {"type": "object"}}}}}, "required": ["ok", "result"]}}}}, "400": {"description": "invalid input (e.g. empty quote); not charged"}, "402": {"description": "Payment required: WWW-Authenticate: Payment (MPP) and PAYMENT-REQUIRED (x402 v2)"}}}}}}