Skip to main content

Sql

Natural language to SQL — query + explanation + notes

$0.05
per call
POST /sql AI Processing

Try It

This tool requires an API key. Get one from $1 to try it.

curl Example

curl -X POST https://api.aipaygen.com/sql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "description": "string",
  "dialect": "postgresql",
  "schema": "optional"
}'

Python Example

import requests

resp = requests.post(
    "https://api.aipaygen.com/sql",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
    "description": "string",
    "dialect": "postgresql",
    "schema": "optional"
}
)
print(resp.json())

Response Format

{
  "result": "<Sql output>",
  "_meta": {
    "endpoint": "/sql",
    "model": "claude-sonnet-4-20250514",
    "cost_usd": 0.05
  }
}

Related Tools

Code
$0.05
Explain
$0.02
Extract
$0.02

Get API Key — From $1

$0.25 trial credits free. ~40 AI calls. No subscription.

Get Started

Or install via MCP: pip install aipaygen-mcp