x402

SQL Generate (x402)

Generate SQL queries from natural language descriptions. Provide table schema for best results. Supports PostgreSQL, MySQL, SQLite, MSSQL.

get/x402/v2/sql-generate

Request

  • Base URL: https://api.strale.io
  • URL: https://api.strale.io/x402/v2/sql-generate
  • Auth: none required

Query parameters

dialectstring

postgres/mysql/sqlite/mssql

table_schemastring
natural_language_querystring required

Response

Success

sqlstring
explanationstring
estimated_complexitystring

Example response

{
  "sql": "SELECT * FROM users WHERE active = true;",
  "dialect": "postgres",
  "joins_used": [],
  "explanation": "This query retrieves all active users from the users table, selecting all columns (id, name, email, active, created_at) for users where the active flag is set to true.",
  "tables_referenced": [
    "users"
  ],
  "estimated_complexity": "simple"
}

Changes

No recorded changes to this operation across all 1 revision of this API.