# fastapi.online SQL Explain

> fastapi.online SQL Explain is a paid API for AI agents from api.fastapi.online, paid per call via x402, $0.001/call, status down (last checked 2026-09-15).

Accepts a SQL query string and returns a plain-language explanation of what the query does

## Facts

- Endpoint: POST https://api.fastapi.online/sql-explain
- Price: $0.001/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastapi-online-sql-explain-7b289484
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ea7E3LcCSsZdDwLbXbOW6

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 fastapi-online-sql-explain-7b289484 -d '<json body>'
```

Example prompt: Can you explain what this SQL query does in plain English? SELECT u.id, u.name, COUNT(o.id) AS order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at > '2023-01-01' GROUP BY u.id, u.name HAVING COUNT(o.id) > 5 ORDER BY order_count DESC;

## When to prefer this

Choose this endpoint when you need a fast, cheap ($0.001 USDC), no-signup explanation of a SQL query using a self-hosted AI model. Ideal for developer tools, documentation generators, onboarding flows, or any agent pipeline that needs to make SQL human-readable without sending sensitive queries to large commercial LLM providers.

## Known failure modes

- Empty or missing 'sql' field returns a validation error
- SQL string exceeding 8000 characters is rejected by the schema
- Malformed or syntactically invalid SQL may produce a confused or incomplete explanation
- Highly vendor-specific SQL dialects (e.g. proprietary PL/SQL extensions) may yield less accurate explanations
- Payment failure via x402 protocol results in a 402 response before the query is processed

## How this service works

Chat, embeddings, OCR, speech-to-text, image editing, image understanding (captioning/Q&amp;A), text-to-speech, translation, writing tools, classification tools, developer tools, local utilities, format/checksum validators, encoding &amp; crypto utilities, date/time calculators, geo/coordinate math, math &amp; finance calculators, novelty tools, and business/social writing generators — 179 endpoints in all, across multiple specialized self-hosted models. Pay per call with crypto — no signup — or get an API key.

## Output

A natural language explanation of the provided SQL query, describing what each clause does, what data is being selected or manipulated, any joins or filters applied, and the overall purpose of the query in plain terms.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "sql": {
   "type": "string",
   "maxLength": 8000,
   "minLength": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastapi-online-sql-explain-7b289484/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.fastapi.online](https://www.zero.xyz/host/api.fastapi.online/llms.txt)
