> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reelevant.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Post contentsgenerated backgrounds regenerate

> Queue a background for regeneration, optionally with a
custom prompt: the record goes back to pending under a fresh
`variant`, so the rerun derives a new asset (new fingerprint, new
seed) rather than reading the one it replaces. The old combination
object keeps serving until the copy overwrites it.



## OpenAPI

````yaml https://openapi.production.reelevant.io/v1/render/contents-api post /contents/generated-backgrounds/{id}/regenerate
openapi: 3.0.0
info:
  title: contents-api
  version: 6d27c8e313f26ddbcdb748da2b0b3ea042a7199e
  description: |-
    # Errors
    | Error code | Message | HTTP status code | Payload |
    | :--- | :--- | :--- | :--- |
    | number | string | 404 |  |
servers:
  - url: https://api.reelevant.com/v2/
    description: production
security: []
paths:
  /contents/generated-backgrounds/{id}/regenerate:
    post:
      tags:
        - GeneratedBackground
      description: |-
        Queue a background for regeneration, optionally with a
        custom prompt: the record goes back to pending under a fresh
        `variant`, so the rerun derives a new asset (new fingerprint, new
        seed) rather than reading the one it replaces. The old combination
        object keeps serving until the copy overwrites it.
      operationId: Regenerate
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                prompt:
                  type: string
                  description: |-
                    Generate this combination from this prompt instead of
                    the enumerated one
                  minLength: 1
              additionalProperties: false
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - success
                    required:
                      - status
                    additionalProperties: false
                  - $ref: >-
                      #/components/schemas/InternalResponse_Intersection_SerializedContentResource_Omit
      security:
        - password_auth: []
components:
  schemas:
    InternalResponse_Intersection_SerializedContentResource_Omit:
      type: object
      properties:
        program:
          type: string
        version:
          type: string
        datetime:
          type: string
        status:
          type: string
        code:
          type: number
        message:
          type: string
        data:
          allOf:
            - $ref: '#/components/schemas/SerializedContentResource'
            - $ref: >-
                #/components/schemas/ContentGeneratedBackgroundResource_Without_CompanyId_ResourceGroupIds_ToJSON
      required:
        - program
        - version
        - datetime
        - status
        - message
        - data
      additionalProperties: false
    SerializedContentResource:
      allOf:
        - $ref: >-
            #/components/schemas/ContentResource_Without_CompanyId_ResourceGroupIds_ToJSON
        - type: object
          properties:
            id:
              type: string
            companyId:
              type: string
            resourceGroupIds:
              type: array
              items:
                type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
          required:
            - id
            - companyId
            - resourceGroupIds
            - createdAt
            - updatedAt
    ContentGeneratedBackgroundResource_Without_CompanyId_ResourceGroupIds_ToJSON:
      type: object
      properties:
        type:
          type: string
          enum:
            - generated-background
        componentId:
          type: string
        identifier:
          type: string
        contentId:
          $ref: '#/components/schemas/ObjectId'
        versionIds:
          type: array
          items:
            $ref: '#/components/schemas/ObjectId'
          description: >-
            Every version whose enumeration produced this combination:

            a republish resolving to the same prompt shares the record rather
            than

            re-queueing it. A record with none left is an orphan to delete.
        key:
          type: string
          description: >-
            sha256 of the component id and the canonical JSON of the

            leaf dependency inputs: two combinations of the same background are
            two

            records, the same one recomputed is an update.
        inputs:
          type: object
          properties: {}
          additionalProperties:
            type: string
          description: |-
            Leaf dependency ids to the enumerated value this record
            covers (what a render passes as `dependenciesData`).
        prompt:
          type: string
        model:
          type: string
        status:
          $ref: '#/components/schemas/GeneratedBackgroundStatus'
        promptOverride:
          type: string
          description: |-
            The prompt the next generation runs instead of the
            enumerated one (`regenerate` with a custom prompt).
        variant:
          type: string
          description: |-
            Distinguishes a regeneration's asset from the one it
            replaces: part of the generation fingerprint, so a regenerate never
            reads the very asset it is replacing back from the store.
        version:
          type: string
        location:
          type: string
        error:
          type: string
        attempts:
          type: number
        leaseUntil:
          type: string
          format: date-time
          description: |-
            While `running`, the time after which another worker may
            claim the record back.
      required:
        - type
        - componentId
        - contentId
        - versionIds
        - key
        - inputs
        - prompt
        - model
        - status
        - attempts
      additionalProperties: false
    ContentResource_Without_CompanyId_ResourceGroupIds_ToJSON:
      type: object
      properties: {}
      additionalProperties: false
    ObjectId:
      type: string
    GeneratedBackgroundStatus:
      type: string
      enum:
        - pending
        - running
        - done
        - failed
        - rejected
  securitySchemes:
    password_auth:
      type: oauth2
      flows:
        password:
          tokenUrl: https://api.reelevant.com/v2/auth/token
          refreshUrl: https://api.reelevant.com/v2/auth/token
          scopes: {}

````