What is Datafala
Datafala is a text-to-SQL API: your system sends a question in natural language ("how much did I sell of product X in the last 6 months?") and gets back a validated SQL query, with named parameters, ready to run on your database.
1. The person asks in your system "how much did I sell of product X in the last 6 months?"
2. Your backend calls Datafala POST /v1/ask
3. Datafala returns { sql, params, explanation, request_id }
4. Your backend runs it on your DB with a read-only user
5. Your system shows the result and, if you want, sends 👍/👎 to POST /v1/feedback
What the API does
- Stores, per customer, the description of your database (the DDL of the tables), descriptions of tables and columns, business rules, glossary and question → SQL examples. All of this is registered in the panel.
- Generates the SQL using the LLM and the customer's own key (OpenAI, Anthropic, Gemini, DeepSeek and others). The token cost stays with you, and no platform key is used.
- Passes every generated SQL through the SQL Guard, which only accepts a single
SELECTover the registered tables and columns, with allowed functions and aLIMITapplied. See Security. - Returns
sql,params, the tables used and a short explanation in the requested language.
What the API does not do
The API never connects to your database
Datafala does not receive your database credentials, does not run SQL and does not see your data. It only knows the schema you registered. Your system runs the query, always with a read-only user.
- It does not control which rows each end user can see. If your system has several companies or row-level permissions, apply that filter in the database (see Run the SQL).
- It does not store query results, because it never sees them.
Supported databases
| Database | dialect value | Drivers |
|---|---|---|
| PostgreSQL | postgres | psycopg 3, psycopg2, node-postgres (pg) |
| MySQL / MariaDB | mysql | PyMySQL, mysqlclient, mysql2 |
| Firebird 2.5+ | firebird | FDB (Python, Firebird 2.5+), firebird-driver (Python, Firebird 3+), FireDAC (Delphi), Jaybird (Java), node-firebird (Node.js) |
The dialect is chosen when you register the DDL in the panel and applies to every question for that schema.
For Firebird 2.5, use FDB; firebird-driver requires Firebird 3 or newer.
Addresses
| What | URL |
|---|---|
| API | https://app.datafala.com.br |
| Customer panel | app.datafala.com.br/login |
| Contact | contato@tisolutio.com.br |
Next step: Getting started.