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

# Regenerate a suggestion with reviewer instructions

> Repropose one suggestion using its cited evidence and the reviewer's
instruction.

The revised suggestion remains pending so it can be reviewed, accepted,
dismissed, or regenerated again. If another decision is made while regeneration
is in progress, that decision takes precedence.



## OpenAPI

````yaml https://api.hyperspell.com/openapi.json post /context-documents/reviews/{review_id}/suggestions/{suggestion_id}/regenerate
openapi: 3.1.0
info:
  title: Hyperspell API
  summary: >-
    Hyperspell is the memory layer for AI apps and agents. Through the API, you
    can add memories, connect data sources to index them in real-time, and
    search memories with our natural language query engine.
  termsOfService: https://hyperspell.com/blog/tos
  contact:
    name: Hyperspell
    url: https://hyperspell.com/
    email: hello@hyperspell.com
  version: 0.32.1
servers:
  - url: https://api.hyperspell.com
    description: Production
security: []
paths:
  /context-documents/reviews/{review_id}/suggestions/{suggestion_id}/regenerate:
    post:
      tags:
        - Context Documents
      summary: Regenerate a suggestion with reviewer instructions
      description: >-
        Repropose one suggestion using its cited evidence and the reviewer's

        instruction.


        The revised suggestion remains pending so it can be reviewed, accepted,

        dismissed, or regenerated again. If another decision is made while
        regeneration

        is in progress, that decision takes precedence.
      operationId: >-
        regenerate_suggestion_context_documents_reviews__review_id__suggestions__suggestion_id__regenerate_post
      parameters:
        - name: review_id
          in: path
          required: true
          schema:
            type: integer
            title: Review Id
        - name: suggestion_id
          in: path
          required: true
          schema:
            type: integer
            title: Suggestion Id
        - name: X-As-User
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Optionally set this header to act as a specific user when using an
              API Key, equivalent to first exchanging the API Key for a User
              Token
            title: X-As-User
          description: >-
            Optionally set this header to act as a specific user when using an
            API Key, equivalent to first exchanging the API Key for a User Token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegenerateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuggestionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKey: []
components:
  schemas:
    RegenerateRequest:
      properties:
        steer:
          type: string
          maxLength: 10000
          minLength: 1
          title: Steer
          description: Instructions for revising this suggestion.
      type: object
      required:
        - steer
      title: RegenerateRequest
    SuggestionResponse:
      properties:
        id:
          type: integer
          title: Id
        review_id:
          type: integer
          title: Review Id
        kind:
          type: string
          title: Kind
        original_excerpt:
          type: string
          title: Original Excerpt
        replacement_excerpt:
          type: string
          title: Replacement Excerpt
        ai_replacement_excerpt:
          anyOf:
            - type: string
            - type: 'null'
          title: Ai Replacement Excerpt
        proposed_change:
          type: string
          title: Proposed Change
        rationale:
          type: string
          title: Rationale
        sources:
          items:
            $ref: '#/components/schemas/SuggestionSource'
          type: array
          title: Sources
        confidence:
          type: string
          title: Confidence
        status:
          type: string
          title: Status
        applied:
          type: boolean
          title: Applied
        decided_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Decided By
        decided_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Decided At
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - review_id
        - kind
        - original_excerpt
        - replacement_excerpt
        - proposed_change
        - rationale
        - sources
        - confidence
        - status
        - applied
        - decided_by
        - decided_at
        - created_at
      title: SuggestionResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SuggestionSource:
      properties:
        type:
          type: string
          title: Type
        title:
          type: string
          title: Title
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        chunk_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Chunk Id
        excerpt:
          type: string
          title: Excerpt
          default: ''
      type: object
      required:
        - type
        - title
      title: SuggestionSource
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKey:
      type: http
      description: >-
        API Key or JWT User Token. If using an API Key, set the X-As-User header
        to act as a specific user. A JWT User Token is always scoped to a
        specific user.
      scheme: bearer
      bearerFormat: Bearer <token>

````