> For the complete documentation index, see [llms.txt](https://docs.testvibe.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.testvibe.com/testvibe-api/api-reference/generation.md).

# Generation

Generation runs TestVibe's AI pipeline in a cloud sandbox: it explores the site, writes Playwright tests for the feature's Gherkin, and verifies they pass. It takes **minutes** and consumes **account credits** — it's the most expensive operation in the API.

| Operation                                                                                  | What it does                                      |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------- |
| [`generate_feature`](/testvibe-api/api-reference/generation/generate_feature.md)           | Dispatch a generation.                            |
| [`get_generation_status`](/testvibe-api/api-reference/generation/get_generation_status.md) | Lifecycle + live per-section progress.            |
| [`wait_for_generation`](/testvibe-api/api-reference/generation/wait_for_generation.md)     | Block until it finishes (MCP convenience).        |
| [`get_generation_log`](/testvibe-api/api-reference/generation/get_generation_log.md)       | The per-section transcript — your debugging tool. |
| [`cancel_generation`](/testvibe-api/api-reference/generation/cancel_generation.md)         | Stop an in-flight generation.                     |

The dispatch → poll pattern is described in [Long-running operations](/testvibe-api/api-reference/async-operations.md).


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.testvibe.com/testvibe-api/api-reference/generation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
