---
title: "SQL Optimize (x402)"
method: GET
path: "/x402/v2/sql-optimize"
tags: ["x402"]
---

# SQL Optimize (x402)

`GET /x402/v2/sql-optimize`

## Request

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

Analyze and optimize a SQL query for performance. Returns rewritten query, index recommendations, and explanation of improvements.

## Query parameters

- `sql` string, required
- `dialect` string
- `table_schema` string

## Response `200`

Success

- object
  - `improvements` unknown[]
    - unknown
  - `optimized_sql` string
  - `estimated_improvement` string
  - `index_recommendations` unknown[]
    - unknown

## Other responses

- `402`: Payment required (x402 — pay with USDC on Base)

---

[API](https://skmtc.dev/strale/apis/strale-api-2.md) · [All operations](https://skmtc.dev/strale/apis/strale-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/strale/apis/strale-api-2/revisions/a5293878cfc6?raw)
