$ man sql-from-prompt
/sql-from-prompt
NAME
sql-from-prompt — turns natural language into sql for postgres, mysql, sqlite, bigquery, snowflake, mssql, duckdb, or ansi
SYNOPSIS
POST https://x402.agentutility.ai/sql-from-prompt
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.DESCRIPTION
Turns natural language into SQL for Postgres, MySQL, SQLite, BigQuery, Snowflake, MSSQL, DuckDB, or ANSI. Optional schema input; returns SQL plus explanation, tables_referenced, is_destructive, and warnings. Use it as a text to SQL converter, NL to SQL tool, or AI SQL generator.
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| prompt | string | Natural-language description of the query to generate. Max 5,000 chars. | required |
| schema | string | Optional. Schema description (tables/columns) to ground the generated SQL. Max 30,000 chars. | optional |
| dialect | string | Optional. Target SQL dialect: postgres (default), mysql, sqlite, bigquery, snowflake, mssql, duckdb, or ansi. enum: postgres · mysql · sqlite · bigquery · snowflake · mssql · duckdb · ansi | optional |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| sql | string | Generated SQL query string in the requested dialect, ready to run against your database. |
| dialect | string | SQL dialect the query was generated for (echoes the input or defaults if none was supplied). |
| explanation | string | Plain-English summary of what the SQL does and how it answers the prompt. |
| tables_referenced | array | Array of table names the generated SQL reads from or writes to. |
| is_destructive | boolean | True if the SQL contains DELETE, DROP, TRUNCATE, UPDATE, or other mutating statements. |
| warnings | array | Array of caveats like missing schema info, ambiguous columns, or potentially expensive scans. |
| model | string | Identifier of the LLM that generated the SQL (e.g. claude-sonnet-4-6). |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.agentutility.ai/sql-from-prompt \
-H 'Content-Type: application/json' \
-d '{ }'first response =
402 Payment Required with payment requirements; sign + retry with X-PAYMENT.EXAMPLE 2 · mcp
# Install the MCP package for this endpoint's cluster npx -y @agentutility/mcp-<cluster> # Required: EVM private key with USDC on Base export X402_PRIVATE_KEY=0x... # Then call the sql-from-prompt tool from your MCP-aware agent.
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
- tags
- sqldeveloperaiquerydatabase
- env
- VENICE_API_KEY
- methods
- POST
- cluster
- wordmint
- price
- $0.02 USDC per call
ADJACENT — other endpoints in wordmint
| endpoint | description | price |
|---|---|---|
| alt-text-generator | Turns a public image URL into ready-to-use text: concise alt text for screen readers, a natural-language description, OCR text pulled fro… | $0.02 |
| classify | Sort text into categories you define on the spot, no training run required. | $0.02 |
| classify-text | Sorts a piece of text into categories you define on the fly, no training or fixed label set required. | $0.02 |
| describe-image | Describes images with a vision LLM across five modes: describe, alt_text (accessibility, <=125 chars), OCR (extract visible text), tags (… | $0.02 |
| detect-pii | Detects PII in text: emails, phones, SSNs, credit cards, addresses, names, IPs, and API tokens. | $0.02 |
| email-draft | Writes emails with AI: subject, body, salutation, and sign-off. | $0.02 |
| extract | Pull structured entities out of raw text instead of hand-parsing it yourself. | $0.02 |
| image-describe | Get a vision model's read on an image: a description, alt text, extracted text, tags, or a caption. | $0.02 |
SEE ALSO