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

# Toggle Generation Public

Change whether a generation is publicly visible or private.

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication
</ParamField>

### Path Parameters

<ParamField path="generation_id" type="string" required>
  Unique generation identifier
</ParamField>

### Body

<ParamField body="is_public" type="boolean" required>
  Set to true to make public, false to make private
</ParamField>

### Response

<ResponseField name="id" type="string">
  Generation unique identifier
</ResponseField>

<ResponseField name="is_public" type="boolean">
  Updated public visibility status
</ResponseField>

<ResponseField name="message" type="string">
  Confirmation message
</ResponseField>


## OpenAPI

````yaml PATCH /api/v1/generation/generations-v2/{generation_id}/public
openapi: 3.1.0
info:
  title: Dev Kit for AI API
  description: 'API for Dev Kit for AI: Developer Toolkit for AI-Powered Web Applications'
  version: 1.6.1
servers:
  - url: https://api.devkit4ai.com
    description: Dev Kit for AI Production Server
  - url: https://api.vibecoding.ad
    description: Vibe Coding Production Server
security: []
paths:
  /api/v1/generation/generations-v2/{generation_id}/public:
    patch:
      tags:
        - AI Generation API
      summary: Toggle Generation Public V2
      operationId: >-
        toggle_generation_public_v2_api_v1_generation_generations_v2__generation_id__public_patch
      parameters:
        - name: generation_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Generation Id
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/Body_toggle_generation_public_v2_api_v1_generation_generations_v2__generation_id__public_patch
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    Body_toggle_generation_public_v2_api_v1_generation_generations_v2__generation_id__public_patch:
      properties:
        is_public:
          type: boolean
          title: Is Public
      type: object
      required:
        - is_public
      title: >-
        Body_toggle_generation_public_v2_api_v1_generation_generations_v2__generation_id__public_patch
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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:
    HTTPBearer:
      type: http
      scheme: bearer

````