> For the complete documentation index, see [llms.txt](https://docs.zerve.ai/zerve-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zerve.ai/zerve-docs/notebooks/blocks/genai.md).

# GenAI

Send a prompt to an AI model from a block, using variables from your project.

A **GenAI** block sends a prompt to an AI model and saves the response, so you can use a model as one step in a workflow. For example, you can summarize the results of an analysis, classify text, or extract fields from documents.

## Settings

| Setting           | What it does                                                                                         |
| ----------------- | ---------------------------------------------------------------------------------------------------- |
| **Model**         | The model to use. The list shows each model's name, provider and output type, such as text or image. |
| **Max tokens**    | The longest response the model can write                                                             |
| **Temperature**   | How varied the responses are. Lower values give more consistent results.                             |
| **System prompt** | Instructions the model follows for every prompt in the block                                         |

The models available depend on your organization's [model settings](/zerve-docs/administration/model-settings.md).

## Using variables in prompts

Prompts can include variables from the blocks connected before the GenAI block, so the model works with your data. For example, a Python block can calculate summary statistics, and the GenAI block can turn them into a written summary.

## GenAI blocks and the agent

A GenAI block runs a single prompt as part of your workflow. For work that needs planning, code and multiple steps, use the [agent](/zerve-docs/agents-in-the-workspace/agent-modes.md) instead.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zerve.ai/zerve-docs/notebooks/blocks/genai.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
