{"uid":"cap_x3wUXQXuyE6kBWwrD6PW2","slug":"x402-ai-copilot-api-7cb5892a","name":"x402 AI Copilot API","description":"Paid AI API endpoints via x402 micropayments","url":"https://x402-ai-peach.vercel.app/api/copilot","method":"POST","headers":{},"bodySchema":{"type":"object","required":["messages"],"properties":{"stream":{"type":"boolean","description":"Stream response"},"messages":{"type":"array","description":"Chat messages array"},"max_tokens":{"type":"integer","description":"Max tokens"},"temperature":{"type":"number","description":"Temperature"}}},"responseSchema":{"type":"object","properties":{"id":{"type":"string","description":"Response ID"},"choices":{"type":"array","items":{"type":"object","properties":{"message":{"type":"object","properties":{"role":{"type":"string"},"content":{"type":"string"}}}}}}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.125","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.125/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.125","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.125","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Kp1SGYaKEyhbq-hOUR5b0","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.125","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Pay-per-call AI chat completions endpoint using x402 micropayments, compatible with OpenAI-style message arrays","exampleAgentPrompt":"Send these conversation messages to the x402 AI copilot and get a completion back — use up to 512 tokens and a temperature of 0.7: [{\"role\":\"user\",\"content\":\"What are the best practices for writing clean Python code?\"}]","exampleUseCases":[{"title":"Agent-to-agent AI task delegation","prompt":"Forward this conversation history to the x402 AI copilot and get a response for the user — the messages array has the full context, cap it at 256 tokens and keep temperature at 0.5."},{"title":"Serverless chatbot with pay-per-use billing","prompt":"I'm building a chatbot that should only pay when it actually gets a response — send this user's message thread to the x402 copilot API with streaming enabled and max 1024 tokens so I can pipe the output live."},{"title":"One-off AI completion without subscription","prompt":"I don't want to set up an OpenAI account — can you hit the x402 copilot endpoint with my question as a user message and get me an answer? Keep temperature at 1.0 for a creative response."}],"resultDescription":"An OpenAI-compatible JSON object containing a response ID and a choices array, where each choice holds a message with role and content fields representing the AI-generated reply to the input messages.","failureModes":["Payment failure — insufficient USDC balance or x402 payment not accepted, returning a 402 Payment Required error","Missing required 'messages' field — returns a validation error","Malformed messages array — incorrect role/content structure causes a 400 error","Token limit exceeded — max_tokens set too high for the model's context window","Streaming errors — connection drops mid-stream if network is unstable","Rate limiting or server overload on the Vercel deployment causing 503 errors"],"whenToPreferThis":"Choose this endpoint when you need pay-per-call AI chat completions without committing to a subscription or API key, especially in agent workflows that use the x402 micropayment protocol with USDC. It is ideal for serverless or agent-to-agent architectures where cost is tightly coupled to usage and you want OpenAI-compatible message formatting with crypto-native billing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:34:48.651Z","isFirstParty":false}