{"uid":"cap_N1-6awQ5kfEJIQgJ52kpM","slug":"spraay-gateway-ai-chat-completions-4ad59efc","name":"Spraay Gateway AI Chat Completions","description":"AI chat completions via 200+ models.","url":"https://gateway.spraay.app/api/v1/chat/completions","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_LZwe62wD-wHs9KA2Ey1t2","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Send a chat message to any of 200+ AI models via an OpenAI-compatible endpoint, paying per call with USDC.","exampleAgentPrompt":"Using the Spraay gateway to Bittensor's 200+ models, send this conversation to the model 'mistralai/mistral-7b-instruct': system message 'You are a helpful assistant' and user message 'Explain quantum entanglement in simple terms.'","exampleUseCases":[{"title":"Compare responses across multiple models","prompt":"I want to test how different AI models answer the same question. Using the Spraay gateway, send this prompt to three different models — 'meta-llama/llama-3-8b-instruct', 'mistralai/mistral-7b-instruct', and 'google/gemma-7b-it': system message 'You are a concise technical writer' and user message 'Explain the difference between TCP and UDP in two sentences.' Show me all three responses so I can compare them."},{"title":"Route customer query to Bittensor model","prompt":"A customer just submitted a support ticket asking why their crypto transaction is pending. Use the Spraay gateway to send it to the 'mistralai/mixtral-8x7b-instruct' model with a system message of 'You are a helpful crypto support agent' and the user message 'My USDC transfer has been pending for 2 hours — what could be causing this?' and return the reply to the customer."},{"title":"Generate code with pay-per-call LLM","prompt":"I need a Python function written without committing to a subscription service. Via the Spraay gateway, send a request to 'deepseek-ai/deepseek-coder-6.7b-instruct' with system message 'You are an expert Python developer' and user message 'Write a function that takes a list of dictionaries and returns them sorted by a given key, with error handling if the key doesn't exist.' Pay per call with USDC and give me the result."}],"resultDescription":"Returns an OpenAI-compatible chat completion object containing the model's generated reply, finish reason, token usage stats, and the assistant message content.","failureModes":["Invalid or unsupported model identifier returns an error","Malformed messages array causes a 400 bad request","Insufficient USDC balance or failed x402 payment causes authorization failure","Model temporarily unavailable on Bittensor network causes timeout or 503","Empty messages array returns a validation error"],"whenToPreferThis":"Choose this endpoint when you need access to a wide variety of AI models (200+) beyond standard OpenAI offerings, especially Bittensor-hosted models, via a familiar OpenAI-compatible interface with per-call USDC micropayments — ideal for agents operating in crypto-native environments or needing model diversity without subscriptions.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:31:58.194Z","isFirstParty":false}