> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://documentation.celestory.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# ✨ Make Request to Gemini using Voltask

To use Gemini, Google's AI, with Voltask, you need to use Google AI's API and the [httpRequest block](https://documentation.celestory.io/en/article/httprequest-ll2irf/?bust=1746266986168).

*An API (Application Programming Interface) is a set of functionalities made available to a client/user via a library (methods of a programming language) or a web service.*
# API Key

To set up Google's API, you first need to obtain an API key that will identify who is using what (in this case, Gemini). Here is the link to the API key management page: https://aistudio.google.com/app/apikey

After creating a key, simply place the following line in Voltask's **httpRequest** block under the *URL* section: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key={{APIkey}}
*It's important to replace "{{APIkey}}" with the API key obtained earlier, or use other blocks to achieve the same result (in this case, the line is already formatted to be used in the **format** block).*
# Model

In the previously presented line, you can also specify the Gemini model used. It is designated as: *"models/gemini-2.0-flash"*.
Other models can be found on this [link](https://ai.google.dev/gemini-api/docs/models?hl=en). On this page, there are dropdown menus presenting various information such as accepted data types, token limits, and most importantly, the model code. The text associated should be placed in the HTTP request URL.
# Request

To form the request to Gemini, it must be specified in the *body* section of the **httpRequest** block. The request should take the form of a JSON object, structured as follows: {"contents": [{"parts": [{"text": "{{request}}"}]}]}
*Again, it's important to replace "{{request}}" with the actual request. The JSON object is currently formatted to be placed in a **format** block.*

*JSON (JavaScript Object Notation) is a textual data format used for data transmission. A JSON object is a string (text) that contains the data to be transmitted. These objects are enclosed in braces, and associate a key with a value (text, list, number, boolean value, or another JSON object), separated by colons (for example: {"fruits": ["apple", "banana"], "number": 2, "likes": true})*
# Appendix

Celestory project example: https://creator.celestory.io/project/9-Yahs-DF