# Tanship PayAI Console — AI SQL Endpoint

> Tanship PayAI Console — AI SQL Endpoint is a paid API for AI agents from x402.tanship.dev, paid per call via x402, $0.15/call, status unknown (last checked 2026-09-14).

Executes natural language or structured SQL queries against a payment-gated AI SQL interface using the x402 micropayment protocol on Base

## Facts

- Endpoint: POST https://x402.tanship.dev/v1/ai/sql
- Price: $0.15/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tanship-payai-console-ai-sql-endpoint-87ff5aca
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PgCiA8w357zsixe0GTV4U

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability tanship-payai-console-ai-sql-endpoint-87ff5aca -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tanship-payai-console-ai-sql-endpoint-87ff5aca/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.tanship.dev](https://www.zero.xyz/host/x402.tanship.dev/llms.txt)
