---
title: "Run a failed generation again"
method: POST
path: "/marketing/generations/{id}/retry"
tags: ["marketing"]
---

# Run a failed generation again

`POST /marketing/generations/{id}/retry`

## Request

- Base URL: `https://api.gogoscreen.com/api/v1`
- URL: `https://api.gogoscreen.com/api/v1/marketing/generations/{id}/retry`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Ask a failed generation to run again. Only some failures are worth retrying, such as a temporary outage, and `retryable` on the generation says which; anything else is 409 `generation_not_retryable`. Words the AI already wrote for this generation are reused, not written again, so a retry after the words were written resumes where it stopped. Answers 202 with a `Location`; poll `marketing.generations.get` until `state` is terminal.

## Path parameters

- `id` string, uuid, required

## Headers

- `Idempotency-Key` string, required

## Response `200`

The work was already known — the service recognised this key on its own record and queued nothing new. Answered when the 24-hour idempotency claim has expired but the work has not.

- object
  - `created` boolean, required
  - `generation` object, required
    - `assisted` boolean, required
    - `errorCode` string, nullable, required
    - `id` string, required
    - `projectId` string, nullable, required
    - `retryable` boolean, required
    - `revisionId` string, nullable, required
    - `stage` string, nullable, required
    - `stageUpdatedAt` string, date-time, nullable, required
    - `state` 'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled', required
    - `status` string, required
  - `resource` object, required

## Other responses

- `202`: The work was queued. Poll the resource at `Location`. A retry with the same Idempotency-Key answers this again, with the same body and the same `Location`, plus `Idempotent-Replayed: true`.
- `400`: `validation_failed` — That request is not valid. · `idempotency_key_required` — This operation needs an Idempotency-Key header: a string of up to 128 characters, unique to this request, so a retry cannot do the work twice. · `unsupported_duration` — That design does not offer that length. `details.durations` lists what it does. · `brand_logo_source_mismatch` — That logo choice does not match the source it names.
- `401`: `unauthorized` — Authentication is required.
- `402`: `insufficient_seconds` — You do not have enough video time left. Buy more time to keep going.
- `403`: `forbidden_scope` — This credential does not carry the scope this operation needs.
- `404`: `not_found` — No such resource. · `source_not_found` — No such source. · `generation_not_found` — No such generation. · `project_not_found` — No such project. · `source_version_not_found` — No such version of that website source.
- `409`: `idempotency_conflict` — That idempotency key was already used with a different request. · `idempotency_in_progress` — That idempotency key is still being processed. · `conflict` — That request conflicts with the current state. · `generation_busy` — Another generation is already running for that source. · `generation_not_retryable` — That generation cannot be run again. · `generation_idempotency_conflict` — That idempotency key was already used with a different generation. · `brand_kit_required` — Save a brand kit first. · `brand_logo_not_retained` — The logo that choice needs is no longer held. · `source_owner_unavailable` — That account cannot start new work. · `source_version_mismatch` — That version belongs to a different website source. · `source_kind_mismatch` — That project was not made from this kind of source.
- `410`: `source_version_expired` — That version of the website source has been cleaned up. Scan the site again. · `source_expired` — That source is past its retention window. · `source_deleted` — That source has been deleted.
- `422`: `campaign_copy_overflow` — Some of those words do not fit the frames they are for. `details.fields` names them. · `campaign_visuals_insufficient` — That design needs more pictures than the source has. `details` says how many and which scenes. · `campaign_logo_aspect_unsupported` — That logo's shape is not one the designs can place. · `campaign_unsupported_claim` — One of those statements is not supported by anything the website says. · `invalid_campaign_narration` — That narration request is not valid.
- `429`: `rate_limited` — Too many requests. Try again shortly.
- `500`: `internal_error` — Something went wrong. Try again.

---

[API](https://skmtc.dev/gogoscreen/apis/gogoscreen-api.md) · [All operations](https://skmtc.dev/gogoscreen/apis/gogoscreen-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gogoscreen/apis/gogoscreen-api/revisions/2fd812319d75?raw)
