# Tanship PayAI Console — x402 Database Execution API

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

Executes database queries or commands via a payment-gated HTTP endpoint using the x402 protocol with USDC micropayment on Base

## Facts

- Endpoint: POST https://x402.tanship.dev/v1/db/exec?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tanship-payai-console-x402-database-execution-api-3ca98004
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UDlpPyRnO7tjL_XFHrdOf

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

Example prompt: Run this SQL query against the Tanship PayAI database endpoint — SELECT * FROM orders WHERE status = 'pending' — and give me the results. It costs $0.01 USDC per call via x402 on Base.

## When to prefer this

Choose this endpoint when you need pay-per-use database execution access with no subscription commitment, specifically when operating within the x402 micropayment protocol ecosystem on Base (USDC). Ideal for AI agents that need occasional database reads or writes at $0.01 per call, or when building workflows that must stay within a strict cost-per-operation budget using on-chain payments.

## Known failure modes

- Payment not included or insufficient USDC — returns HTTP 402 Payment Required
- Malformed input body (missing required fields like type, method, bodyType, body) — returns 400 Bad Request
- Invalid SQL or unsupported database command — returns error message in response body
- Network or server unavailability — returns 5xx error
- Incorrect body type enum value (must be json, form-data, or text) — validation 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 of the database operation — typically a JSON payload containing query results (rows, records), affected row counts, or execution status, depending on the type of command 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-x402-database-execution-api-3ca98004/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)
