# Image generation

For image generation, webhook is sent for the following status changes: `create`,`active`, `completed`, `failed`

The webhook contains [generic data](/integration-guide/webhooks.md#generic-data-in-webhook) and the[ Image generation object](/all-images.ai-api/api-reference/images-generation.md#get-image-generation). The `type`property depends on the status change :&#x20;

```json
{
   "id": string,
   "api_version": number,
   "created": number,
   "type": string,
   "data": { // Image Generation
      "id": "string",
      "name": "string",
      "prompt": "string",
      "status": 0,
      "params": [
        {
          "name": "sujetMode",
          "value": "string"
        }
      ],
      "images": [
        {
          "id": "string",
          "url": "string",
          "validate": true,
          "free": true,
          "titles": {}
        }
      ],
      "nbImages": 0,
      "tags": [
        "string"
      ],
      "metaData": {},
      "createdAt": "2023-10-30T14:10:34.002Z"
    }
}
```

| New status                    | Value of "Type" property |
| ----------------------------- | ------------------------ |
| `create`                      | print.created            |
| `active`                      | print.active             |
| *when one im*age is generated | print.progress           |
| `failed`                      | print.failed             |
| `completed`                   | print.completed          |


---

# Agent Instructions: 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://developer.all-images.ai/integration-guide/webhooks/image-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.
