# pagos.andreax.dev Natural Language to SQL Generator

> pagos.andreax.dev Natural Language to SQL Generator is a paid API for AI agents from pagos.andreax.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Converts a natural language request into a SQL query using an LLM backend

## Facts

- Endpoint: GET https://pagos.andreax.dev/api/taller/peaje/sql
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pagos-andreax-dev-natural-language-to-sql-generator-a20d0b22
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DorbJFtIuAEkLuG-1F8gy

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 pagos-andreax-dev-natural-language-to-sql-generator-a20d0b22
```

Example prompt: Write me a SQL query that gets the total sales per region for the last 30 days, grouped by product category and sorted by revenue descending.

## When to prefer this

Choose this endpoint when you need to quickly generate SQL from a plain English description without requiring the user to know SQL syntax. Ideal for data analyst agents, BI automation pipelines, or any workflow where non-technical users need to query relational databases. Prefer this over generic LLM endpoints when you want a low-cost, purpose-built SQL generation tool with a simple GET interface.

## Known failure modes

- Ambiguous natural language input may produce incorrect or incomplete SQL — rephrase with more specific column and table names
- Very domain-specific schemas not described in the prompt may yield generic or placeholder SQL
- LLM backend errors may return a 500 or empty response
- Missing required 'input' query parameter returns a validation error
- Overly complex multi-step queries may be partially rendered or simplified

## How this service works

Genera SQL desde lenguaje natural. Para agentes/analistas de datos. input=petición.

## Output

Returns a SQL query string generated from the natural language input, ready to be executed against a relational database. The response reflects the intent described in plain language, including clauses like SELECT, WHERE, GROUP BY, ORDER BY as appropriate.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "input"
     ],
     "properties": {
      "input": {
       "type": "string",
       "description": "petición en lenguaje natural"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pagos-andreax-dev-natural-language-to-sql-generator-a20d0b22/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pagos.andreax.dev](https://www.zero.xyz/host/pagos.andreax.dev/llms.txt)
