Can we attach documents in Gemini API?

Can we attach documents like, (.txt, .pdf) in the gemini API?

Yes, you can experiment with it at aistudio.google.com and then add documents to your actual API script using this tutorial in the documentation: Prompting with Media.

2 Likes

Thank you. Will look into this. Have a great day!