{"uid":"cap_PgCiA8w357zsixe0GTV4U","slug":"tanship-payai-console-ai-sql-endpoint-87ff5aca","name":"Tanship PayAI Console — AI SQL Endpoint","description":"Payment-gated AI and browser automation API using the x402 protocol. All /v1/* endpoints require USDC payment on Base (eip155:8453) via x402 v2 exact scheme.","url":"https://x402.tanship.dev/v1/ai/sql","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":{"properties":{}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.15","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.15/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.15","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.15","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pRfRrhxULysZ-0-Aen2Tq","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.15","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Executes natural language or structured SQL queries against a payment-gated AI SQL interface using the x402 micropayment protocol on Base","exampleAgentPrompt":"Run this SQL query for me using Tanship's AI SQL endpoint — find all users who signed up in the last 30 days and group them by country, then return the results.","exampleUseCases":[{"title":"Natural language to SQL data retrieval","prompt":"I need to query our sales database — find the top 10 products by revenue for Q1 2024 and group the results by category. Can you run that SQL for me through the AI SQL endpoint?"},{"title":"Ad hoc analytics query execution","prompt":"Run a SQL query that calculates the average order value per customer segment from our orders table and returns the results sorted by segment name."},{"title":"Pay-per-query data exploration","prompt":"I want to explore our user activity data — execute a SQL query to count daily active users over the past 7 days and return the day-by-day breakdown."}],"resultDescription":"Returns structured query results from the AI SQL execution, including rows and columns matching the SQL query provided, delivered as a JSON response after the x402 USDC micropayment on Base is confirmed.","failureModes":["Payment not provided or insufficient USDC amount — returns 402 Payment Required","Invalid SQL syntax — returns error with query parsing details","Malformed request body — returns 400 Bad Request if required fields missing","Network or blockchain confirmation delays causing timeout","Unsupported bodyType value causing request rejection"],"whenToPreferThis":"Choose this endpoint when you need pay-per-use SQL query execution without a subscription, want to integrate micropayment-gated database queries into an AI agent workflow, or require on-demand SQL analytics with USDC payments on Base via the x402 protocol. Ideal for agents that need lightweight, cost-controlled data queries billed per call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:49:04.465Z","isFirstParty":false}