How to Integrate 'Generate SQL with Gemini' into an Application via API?

Hello everyone,

I’ve found the “Generate SQL with Gemini” feature incredibly useful and am interested in integrating it into our application. Does anyone know if this can be achieved through an API, and if so, how?

Thanks in advance for your insights!

Hi @Achal_Pandey

You can create database functions, and function schemas are defined and made accessible to the model, initiating a conversation instead of returning a text response. For more information, you can refer to this link.

Thanks

You can provide the database schema as context to the model and then ask it about it. The model needs to understand the nature of your database first, then it is capable to provide valuable feedback and usable information.