All API tools
Formatters
SQL Formatter API
GET
/v1/sql-formatter Free tier1 credit / callAuthentication
Send your API key as a bearer token. Create one free in the dashboard.
Authorization: Bearer $TOOLSXPO_KEYParameters
Passed as query-string parameters. Example values shown.
| Name | Example |
|---|---|
| sql | select 1 |
| indent | 2 |
| uppercase | true |
Example request
curl "https://api.toolsxpo.com/v1/sql-formatter?sql=select%201&indent=2&uppercase=true" \
-H "Authorization: Bearer $TOOLSXPO_KEY"Response
A standard JSON envelope: { ok, data, meta }. The result is in data (text); meta.credits reports what the call cost.