> For the complete documentation index, see [llms.txt](https://documents.cxgenie.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documents.cxgenie.ai/bots/workflow/workflow-components-1/ai-api.md).

# AI API

This section is exclusively for developers, so the information here is only meant to provide a general overview of the features available at CX Genie.

**Application**\
The AI Call feature is used to obtain a result through an API call to OpenAI. This result can then be used as a variable within a workflow or sent directly to the customer.

* By clicking on the "AI API" component, you will add a white block to your whiteboard
* This block has 2 purple dots. You can connect with any blocks you want.&#x20;
* If you need to use them, don't hesitate to contact our team for more detailed guidance.

<figure><img src="https://3928771814-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcrYvzbvjeUPqcy0srNQ9%2Fuploads%2F4GVQhcemcgFF00Ss2xhF%2Fimage.png?alt=media&amp;token=2fd3edf7-aaa9-48db-aa3c-20b7ea8ff8dc" alt=""><figcaption></figcaption></figure>

* There will be an edit block appearing once you click on the block

<figure><img src="https://3928771814-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcrYvzbvjeUPqcy0srNQ9%2Fuploads%2FaP8RttfKr7CUmAirxJLV%2Fimage_2025-03-05_162422153.png?alt=media&amp;token=ba1bda4b-f905-4c8b-bcaa-65ce55ebf0a9" alt="" width="375"><figcaption></figcaption></figure>

* **OpenAI Key**: The OpenAI API key is provided by the customer to authenticate requests.
* **Select Model**: Choose the specific OpenAI model to be used for the API call.
* **Prompt**: The input text (or prompt) that will be sent to OpenAI during the API call.
* **Select Action with the Result after Calling from API**: Choose what to do with the result returned from the API call:
  * **Save as Variable**: Store the result as a variable to be used later in other workflow blocks that utilize variables.

<mark style="color:red;">**= Please remember to click the "Save changes" button before leaving.**</mark>
