# Generation statuses

> The lifecycle of a generation, and what to do when one does not complete.

Source: https://advibly.com/docs/reference/generation-statuses



Every generation - image, video, talking actor, carousel, audio, composition -
moves through the same states.

```
pending → processing → completed | failed | rejected
```

| Status       | Meaning                         | Credits      |
| ------------ | ------------------------------- | ------------ |
| `pending`    | Queued, not started.            | Reserved     |
| `processing` | The model is working.           | Reserved     |
| `completed`  | Done. Results available.        | Spent        |
| `failed`     | The model or pipeline errored.  | **Refunded** |
| `rejected`   | Declined by content moderation. | **Refunded** |

## Handle the first response [#handle-the-first-response]

Generation tools wait briefly before returning:

| First response                                   | Action                                                                                         |
| ------------------------------------------------ | ---------------------------------------------------------------------------------------------- |
| `completed` with result URLs                     | Use the result. A status call adds no value.                                                   |
| `pending` or `processing` with a `generation_id` | Keep the id. Call `advibly_get_generation` only when a downstream step needs the finished URL. |
| `failed`                                         | Read the reason, change the unstable setting if failures repeat, and retry.                    |
| `rejected`                                       | Change the subject, framing, or prompt before trying again.                                    |

The in-chat widget continues polling pending work for display. When an agent
needs the result programmatically, `advibly_get_generation` waits by default
and accepts `wait` and `timeout_seconds`. The CLI follows jobs unless you pass
`--no-follow`.

<Callout type="warn">
  Do not treat a long `processing` as a failure and re-submit. You will be
  charged for both. Video generations legitimately take minutes, and heavy image
  settings occasionally take several.
</Callout>

## When something fails [#when-something-fails]

`failed` usually means a transient error on the model provider's side.
Re-submitting the same request is the right response, and costs nothing extra
because the first attempt was refunded.

If the same request fails repeatedly, the settings are the likely cause -
typically an unusual dimension or duration combination. Falling back to a
default model and size will tell you which.

The retry is complete only when the replacement reaches `completed`; a new
`generation_id` is not evidence that the problem is fixed.

## When something is rejected [#when-something-is-rejected]

`rejected` is content moderation. It is stricter than you would expect on some
ordinary commercial subjects - swimwear and skin-heavy product categories in
particular.

The usual fix is to stage the product without a person in the frame. See
[Troubleshooting](/reference/troubleshooting).
