# Tanship PayAI Console — Database Query API (x402)

> Tanship PayAI Console — Database Query API (x402) is a paid API for AI agents from x402.tanship.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-17).

Executes a database query via a payment-gated HTTP POST endpoint requiring USDC micropayment on Base via x402 protocol

## Facts

- Endpoint: POST https://x402.tanship.dev/v1/db/query?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tanship-payai-console-database-query-api-x402-3b0a06df
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kXhXfL1Ak-YDpa3bihtB4

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-database-query-api-x402-3b0a06df -d '<json body>'
```

Example prompt: Run a database query against the Tanship PayAI database — submit my JSON query body as a POST and pay the $0.005 USDC fee automatically via x402 on Base.

## When to prefer this

Choose this endpoint when you need pay-per-query access to the Tanship database and your agent supports the x402 micropayment protocol with USDC on Base. It is ideal for AI agents that need to retrieve structured data on demand without a subscription, paying only $0.005 per query. Prefer this over subscription APIs when query volume is low or unpredictable.

## Known failure modes

- Payment not provided or insufficient USDC — 402 Payment Required response
- Invalid x402 payment scheme or wrong network (not Base eip155:8453) — payment rejected
- Malformed JSON body or missing required 'input' field — 400 Bad Request
- Query references non-existent table or malformed query syntax — database error response
- Network timeout or upstream DB unavailability — 503 or timeout error
- Insufficient USDC balance in agent wallet — payment failure

## 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 the result set of the database query as a JSON response, delivered after successful x402 USDC payment verification on Base (eip155:8453). The exact schema of results depends on the query submitted.

## 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-database-query-api-x402-3b0a06df/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)
