Beta features are available to users before official release. Your testing and feedback are an enormous help, please leave any feedback or bug reports you have at support@logicloop.com. Note that beta features are subject to change.
LogicLoop's AI SQL capabilities are available via API if you wish to use AI to generate SQL in your own application. First, if you haven't already created a LogicLoop account you can do so here.
You can call our SQL generation endpoint in order to generate SQL based on a user request.
Method: POST
URL: https://app.logicloop.com/<YOUR_COMPANY_SLUG>/api/v1/ai/query_generate
Authorization: Key <YOUR_API_KEY>
Params:
prompt: A description of the data you're looking for
model: One of oa-v1, oa-v2, oa-v2-16k, oa-v3 or ant-v1. Defaults to oa-v1.
data_source_type: One of postgres, mysql, redshift, snowflake, big_query or oracle
data_schema: A list of dictionaries representing your data schema
Be sure to replace <YOUR_COMPANY_SLUG> which you can find by logging into your dashboard and looking at the URL:
You can find <YOUR API_KEY> by going to Settings > Users > click on your profile > copy the API Key.
You can use either the basic or advanced data schema format below depending on the level of granularity you are looking for.