> For the complete documentation index, see [llms.txt](https://developer.all-images.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.all-images.ai/integration-guide/image-generation/lifecycle-of-image-generation.md).

# Lifecycle of Image generation

Image generation follows a life cycle defined by its status:&#x20;

<table><thead><tr><th width="156">Status</th><th width="224" align="center">Status value</th><th>Description</th></tr></thead><tbody><tr><td>Create</td><td align="center"><code>0</code></td><td>The generation has been created and will automatically change to the next status "Pending"</td></tr><tr><td>Pending</td><td align="center"><code>1</code></td><td>The generation has been taken into account and is awaiting processing.</td></tr><tr><td>Processing</td><td align="center"><code>2</code></td><td>The generation is being processed</td></tr><tr><td>Done</td><td align="center"><code>3</code></td><td>Generation is complete, and images are available.</td></tr><tr><td>Error</td><td align="center"><code>4</code></td><td>An error occurred during generation. This may be due to the image description not being accepted. You can <a href="/pages/ob9zO9XiAxdOav5njrnn#update-image-generation">modify the generation</a> and <a href="/pages/ob9zO9XiAxdOav5njrnn#retry-image-generation">try again</a>.</td></tr></tbody></table>

Status is indicated in the ImageGeneration object.


---

# 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, and the optional `goal` query parameter:

```
GET https://developer.all-images.ai/integration-guide/image-generation/lifecycle-of-image-generation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
