Text to SQL API

Ship text to SQL and natural language query generation through an API

TTSQL gives developers a text to SQL API for internal tools, customer-facing analytics, and AI agents that need governed access to structured data.

Revenue
validated
prompt

Show revenue by plan for the last 30 days

generated SQL PostgreSQL
1SELECT plan_name, SUM(amount) AS revenue
2FROM invoices
3WHERE paid_at >= CURRENT_DATE - INTERVAL '30 days'
4GROUP BY plan_name
5ORDER BY revenue DESC;

Overview

Use the API to turn prompts into SQL, attach project context, enforce access controls, and embed natural language to SQL into product experiences.

Project-aware requests

Pass schema context, rules, and auth so generated queries stay relevant to each tenant or use case.

Built for app teams

Use API keys and versioned endpoints that fit modern product development.

Great for agents and assistants

Power AI agents that need to translate business intent into safe SQL without opening unrestricted database access.

Query examples

Prompts mapped to concrete SQL.

Revenue
validated
prompt

Show revenue by plan for the last 30 days

generated SQL PostgreSQL
1SELECT plan_name, SUM(amount) AS revenue
2FROM invoices
3WHERE paid_at >= CURRENT_DATE - INTERVAL '30 days'
4GROUP BY plan_name
5ORDER BY revenue DESC;

Use cases

Where teams use TTSQL.

Add a text to SQL API behind a product analytics search bar.

Power AI agents that answer questions using customer or operational data.

Create internal tools where teams ask questions and receive validated SQL back.

FAQ

Answers before you connect a database.

01 Who needs a text to SQL API?

Software teams that want to add natural-language query generation to products, internal tools, AI assistants, or automation workflows.

02 Can the API enforce project-specific rules?

Yes. TTSQL supports project context, access controls, and supporting knowledge so each API call reflects the right schema and governance rules.

Enterprise

Bring natural-language SQL into a governed workspace.

Use TTSQL for teams that need SSO, policy controls, auditability, dedicated support, and deployment flexibility.