{"uid":"cap_fK7u6AQvJIti-0Jw1KHK2","slug":"surplus-intelligence-open-market-ai-inference-completions-ef55f787","name":"Surplus Intelligence Open Market AI Inference Completions","description":"Buy the cheapest inference. Sell your credits. The open order book for AI models. Up to 90% off GPT-5.5, Claude Opus 4.8, and more.","url":"https://www.surplusintelligence.ai/api/inference/v1/completions","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":{"required":["model","messages"],"properties":{"model":{"type":"string","description":"Surplus Intelligence model id. Call /v1/models for available models."},"stream":{"type":"boolean"},"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"enum":["system","developer","user","assistant","tool"],"type":"string"},"content":{}},"additionalProperties":true},"minItems":1,"description":"OpenAI-compatible chat messages."},"max_tokens":{"type":"integer","minimum":1,"description":"Maximum output tokens."},"temperature":{"type":"number","maximum":2,"minimum":0}},"additionalProperties":true},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["id","object","choices"],"properties":{"id":{"type":"string"},"usage":{"type":"object"},"object":{"type":"string"},"choices":{"type":"array"}}}}}}},"responseSchema":{"type":"json","example":{"id":"chatcmpl_surplus_example","usage":{"total_tokens":18,"prompt_tokens":12,"completion_tokens":6},"object":"chat.completion","choices":[{"index":0,"message":{"role":"assistant","content":"Hello from Surplus Intelligence."},"finish_reason":"stop"}]}},"example":{"request":{"model":"llama-3.3-70b","prompt":"Explain the concept of arbitrage in two sentences","stream":false,"max_tokens":100},"response":{"id":"f499976c-244f-4f3a-af8f-562e848ce96d","model":"llama-3.3-70b-instruct","usage":{"queue_time":0.053876962,"total_time":0.337155745,"prompt_time":0.003741543,"total_tokens":132,"prompt_tokens":45,"completion_time":0.333414202,"completion_tokens":87},"object":"text_completion","choices":[{"text":"Arbitrage refers to the practice of taking advantage of a price difference between two or more markets by buying an asset at a lower price in one market and simultaneously selling it at a higher price in another market, thereby earning a risk-free profit. This concept exploits market inefficiencies, allowing individuals or companies to capitalize on temporary discrepancies in prices, and it plays a crucial role in maintaining market equilibrium by encouraging price convergence across different markets.","index":0,"logprobs":null,"finish_reason":"stop"}],"created":1781630252}},"exampleRequest":{"model":"llama-3.3-70b","prompt":"Explain the concept of arbitrage in two sentences","stream":false,"max_tokens":100},"tags":["x402"],"displayCostAmount":"0.003315","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.003315/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003315","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003315","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_IJ04xXXAVLRqqBHxlvGAU","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003315","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Runs LLM chat completions via an open order book marketplace that routes to the cheapest available AI model provider, offering up to 90% off list prices.","exampleAgentPrompt":"Use Surplus Intelligence to send this message to llama-3.3-70b: 'Explain the concept of arbitrage in two sentences' — keep it under 100 tokens and don't stream.","exampleUseCases":[{"title":"Cost-optimized customer support at scale","prompt":"Route our support chatbot through Surplus Intelligence to handle customer inquiries using whatever model is cheapest right now — we need to keep per-message costs under a penny for thousands of daily conversations."},{"title":"Batch processing research documents cheaply","prompt":"I need to summarize a thousand research papers this week. Use Surplus Intelligence to find the absolute lowest-cost model available and process them all with USDC micropayments instead of a subscription."},{"title":"Real-time content generation for feed","prompt":"Set up Surplus Intelligence to generate product descriptions for our marketplace in real-time — just hit the cheapest inference provider available each time rather than committing to one expensive API."}],"resultDescription":"Returns a JSON object in OpenAI-compatible chat.completion format, including the assistant's reply message, finish reason (e.g. 'stop'), and token usage breakdown (prompt tokens, completion tokens, total tokens), plus a completion ID.","failureModes":["Model not available or delisted from order book — 404 or model-not-found error","Insufficient USDC balance or x402 payment failure — 402 Payment Required","Malformed messages array or missing required fields — 400 Bad Request","max_tokens exceeded context window for chosen model — 400 or truncation","Rate limiting or order book congestion — 429 Too Many Requests","Model provider outage causing inference failure — 503 Service Unavailable"],"whenToPreferThis":"Choose this endpoint when cost is the primary concern and you want the cheapest available inference across multiple model providers at the time of the call. Ideal for high-volume, price-sensitive workloads using popular open or proprietary models (Llama, GPT, Claude) where slight provider variation is acceptable. Best suited for agents that use x402 micropayment flows and want per-call billing without subscriptions.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:40:06.378Z","isFirstParty":false}