openapi: 3.1.0
info:
  title: v0 Platform API (beta)
  version: "1"
  description: Full stack vibe coding API
  termsOfService: https://vercel.com/legal/api-terms
externalDocs:
  description: Find more info here
  url: https://vercel.com/docs/v0/api
servers:
  - url: https://api.v0.dev/v1
tags:
  - name: chats
    description: Chats
paths:
  /chats:
    post:
      summary: Create Chat
      description: Creates a new chat using a user message, optional system context, and model configuration. Useful for prompting the model within the scope of a specific project.
      operationId: chats.create
      tags:
        - chats
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                  description: Creates a new chat using a user message, optional system context, and model configuration. Useful for prompting the model within the scope of a specific project.
                attachments:
                  description: A list of files or assets to be included in the conversation context. Useful when the chat or task requires referencing documents, images, or other resources.
                  type: array
                  items:
                    type: object
                    properties:
                      url:
                        type: string
                        description: The URL or data URI of the file or asset to include with the message.
                    required:
                      - url
                    additionalProperties: false
                system:
                  description: Provides system-level context or background for the chat. This is typically used to specify frameworks, tools, or development environments relevant to the task.
                  type: string
                chatPrivacy:
                  default: private
                  description: Determines the privacy setting of the chat. This can control whether the chat is visible only to the user, to team members, or is public.
                  type: string
                  enum:
                    - public
                    - private
                    - team-edit
                    - team
                    - unlisted
                projectId:
                  description: Associates the chat with a specific project in your workspace. Helps organize and group related chats under a common project context.
                  type: string
                modelConfiguration:
                  description: Settings that control how the model behaves in the chat.
                  type: object
                  properties:
                    modelId:
                      default: v0-pro
                      type: string
                      enum:
                        - v0-auto
                        - v0-mini
                        - v0-pro
                        - v0-max
                        - v0-max-fast
                      description: Model to use for the generation.
                    imageGenerations:
                      default: false
                      type: boolean
                      description: Enables image generations to generate up to 5 images per version.
                    thinking:
                      default: false
                      type: boolean
                      description: Enables thinking to generate a response in multiple steps.
                  additionalProperties: false
                responseMode:
                  default: sync
                  description: |-
                    Controls how the response is delivered.

                    - `"sync"`: The response is returned immediately with the HTTP request.
                    - `"async"`: Returns a message placeholder immediately; use getById to poll for completion status and final output.
                    - `"experimental_stream"`: Returns content parts as Server-Sent Events for real-time streaming.
                  type: string
                  enum:
                    - sync
                    - async
                    - experimental_stream
                designSystemId:
                  description: The ID of a design system to apply to this chat. Design systems provide consistent styling and components for generated UI.
                  type:
                    - string
                    - "null"
                mcpServerIds:
                  description: Array of MCP server IDs to enable for this chat. When provided, only the specified servers will be used. When omitted, falls back to the user's enabled MCP servers.
                  type: array
                  items:
                    type: string
                attachedSkillIds:
                  description: Array of skill IDs (from skills.sh) to attach to this chat. Skills provide domain-specific knowledge and instructions that guide the AI. Maximum 3 skills per chat.
                  type: array
                  items:
                    type: string
                metadata:
                  default: {}
                  description: Arbitrary key-value data to attach to the chat. Useful for storing additional data about the chat, such as external user IDs.
                  type: object
                  propertyNames:
                    type: string
                    minLength: 1
                    maxLength: 40
                  additionalProperties:
                    type: string
                    maxLength: 500
              required:
                - message
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ChatDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      security:
        - apiKey: []
    get:
      summary: Find Chats
      description: Retrieves a list of existing chats, with support for pagination and filtering by favorite status, Vercel project, or Git branch. Helps manage and navigate chat history.
      operationId: chats.find
      tags:
        - chats
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: list
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/ChatSummary"
                required:
                  - object
                  - data
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            default: 60
            description: Specifies the maximum number of chat records to return in a single response. Useful for paginating results when there are many chats.
            type: number
            maximum: 60
          description: Specifies the maximum number of chat records to return in a single response. Useful for paginating results when there are many chats.
        - name: offset
          in: query
          required: false
          schema:
            default: 0
            description: Determines the starting point for pagination. Used in conjunction with limit to retrieve a specific page of chat results.
            type: number
          description: Determines the starting point for pagination. Used in conjunction with limit to retrieve a specific page of chat results.
        - name: isFavorite
          in: query
          required: false
          schema:
            description: |-
              Filters chats by their "favorite" status. Accepts `"true"` or `"false"` (as strings, not booleans).

              - `"true"`: returns only chats marked as favorites.
              - `"false"`: returns only non-favorite chats.
            type: string
            enum:
              - "true"
              - "false"
          description: |-
            Filters chats by their "favorite" status. Accepts `"true"` or `"false"` (as strings, not booleans).

            - `"true"`: returns only chats marked as favorites.
            - `"false"`: returns only non-favorite chats.
        - name: vercelProjectId
          in: query
          required: false
          schema:
            description: Filters chats by the linked Vercel project ID. Only returns chats associated with the specified Vercel project.
            type: string
          description: Filters chats by the linked Vercel project ID. Only returns chats associated with the specified Vercel project.
        - name: branch
          in: query
          required: false
          schema:
            description: Filters chats by the Git branch name. Only returns chats that have an active Git connection with the specified branch as the head.
            type: string
          description: Filters chats by the Git branch name. Only returns chats that have an active Git connection with the specified branch as the head.
      security:
        - apiKey: []
  /chats/init:
    post:
      summary: Initialize Chat
      description: Initializes a new chat from source content such as files, repositories, registries, or zip archives. Enables context-rich conversations based on code or assets.
      operationId: chats.init
      tags:
        - chats
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    name:
                      description: A user-defined name for the chat. Helps identify or describe the purpose of the chat session in the UI or API responses.
                      type: string
                    chatPrivacy:
                      default: private
                      description: Controls the visibility of the chat. Defines whether the chat is private, shared with a team, or publicly accessible.
                      type: string
                      enum:
                        - public
                        - private
                        - team-edit
                        - team
                        - unlisted
                    projectId:
                      description: Associates the chat with a specific project. Useful for organizing and grouping chats in a workspace.
                      type: string
                    metadata:
                      default: {}
                      description: Arbitrary key-value data to attach to the chat. Useful for storing additional data about the chat, such as external user IDs.
                      type: object
                      propertyNames:
                        type: string
                        minLength: 1
                        maxLength: 40
                      additionalProperties:
                        type: string
                        maxLength: 500
                  additionalProperties: false
                - anyOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          const: files
                          description: Specifies the initialization method. For this endpoint, it defines the source of content being used to initialize the chat.
                        files:
                          type: array
                          items:
                            anyOf:
                              - type: object
                                properties:
                                  name:
                                    type: string
                                  url:
                                    type: string
                                  locked:
                                    description: Whether to lock this file to prevent AI from overwriting it during generation
                                    type: boolean
                                required:
                                  - name
                                  - url
                                additionalProperties: false
                              - type: object
                                properties:
                                  name:
                                    type: string
                                  content:
                                    type: string
                                  locked:
                                    description: Whether to lock this file to prevent AI from overwriting it during generation
                                    type: boolean
                                required:
                                  - name
                                  - content
                                additionalProperties: false
                          description: An array of inline file objects used to initialize the chat. Each object must contain a file `name` and its `content`.
                      required:
                        - type
                        - files
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          type: string
                          const: repo
                          description: Specifies the initialization method. For this endpoint, it defines the source of content being used to initialize the chat.
                        repo:
                          type: object
                          properties:
                            url:
                              type: string
                            branch:
                              type: string
                              maxLength: 250
                          required:
                            - url
                          additionalProperties: false
                          description: Specifies a repository source for initialization. Supports both public and private GitHub repositories. For private repositories, ensure your GitHub account is connected through Vercel.
                        lockAllFiles:
                          description: Whether to lock all files in the repository to prevent AI from overwriting them during generation
                          type: boolean
                      required:
                        - type
                        - repo
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          type: string
                          const: registry
                          description: Specifies the initialization method. For this endpoint, it defines the source of content being used to initialize the chat.
                        registry:
                          type: object
                          properties:
                            url:
                              type: string
                          required:
                            - url
                          additionalProperties: false
                          description: Allows initialization from a predefined component or code registry. Includes the registry source and identifier for the desired component/module.
                        lockAllFiles:
                          description: Whether to lock all files from the registry to prevent AI from overwriting them during generation
                          type: boolean
                      required:
                        - type
                        - registry
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          type: string
                          const: zip
                          description: Specifies the initialization method. For this endpoint, it defines the source of content being used to initialize the chat.
                        zip:
                          type: object
                          properties:
                            url:
                              type: string
                              format: uri
                          required:
                            - url
                          additionalProperties: false
                          description: Provides a zipped bundle of files as the input source. Typically includes a base64-encoded archive or a remote URL reference.
                        lockAllFiles:
                          description: Whether to lock all files from the zip archive to prevent AI from overwriting them during generation
                          type: boolean
                      required:
                        - type
                        - zip
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          type: string
                          const: template
                          description: Specifies the initialization method. For this endpoint, it defines the source of content being used to initialize the chat.
                        templateId:
                          type: string
                          description: The ID of the template to initialize the chat from. This should be a valid template ID from the v0 template system.
                      required:
                        - type
                        - templateId
                      additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ChatDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      security:
        - apiKey: []
  /chats/{chatId}:
    delete:
      summary: Delete Chat
      description: Deletes a specific chat based on the provided chatId. This operation is irreversible and permanently removes the chat and its contents.
      operationId: chats.delete
      tags:
        - chats
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  object:
                    type: string
                    const: chat
                  deleted:
                    type: boolean
                    const: true
                required:
                  - id
                  - object
                  - deleted
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: chatId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the chat to delete. This must be passed as a path parameter in the URL.
      security:
        - apiKey: []
    get:
      summary: Get Chat
      description: Retrieves the full details of a specific chat using its `chatId`. Includes messages, metadata, and associated configuration.
      operationId: chats.getById
      tags:
        - chats
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ChatDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: chatId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the chat to retrieve. Must be provided as a path parameter.
      security:
        - apiKey: []
    patch:
      summary: Update Chat
      description: Updates the metadata of an existing chat using its `chatId`. Supports changes to the chat name and privacy setting.
      operationId: chats.update
      tags:
        - chats
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: A new name to assign to the chat. Helps with identification and organization.
                  type: string
                privacy:
                  description: Sets the privacy level of the chat.
                  type: string
                  enum:
                    - public
                    - private
                    - team
                    - team-edit
                    - unlisted
                metadata:
                  description: Arbitrary key-value data to attach to the chat. Useful for storing additional data about the chat, such as external user IDs. Metadata added will be merged with existing attributes. Pass `null` as the value to delete a specific key, or pass `null` instead of an object to delete all existing metadata.
                  anyOf:
                    - type: object
                      propertyNames:
                        type: string
                        minLength: 1
                        maxLength: 40
                      additionalProperties:
                        anyOf:
                          - type: string
                            maxLength: 500
                          - type: "null"
                    - type: "null"
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ChatDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: chatId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the chat to update. Provided as a path parameter.
      security:
        - apiKey: []
  /chats/{chatId}/favorite:
    put:
      summary: Favorite Chat
      description: Marks or unmarks a chat as a favorite using its `chatId`. This helps with organizing and quickly accessing important chats.
      operationId: chats.favorite
      tags:
        - chats
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                isFavorite:
                  type: boolean
                  description: |-
                    Specifies whether the chat should be marked as a favorite.

                    - `"true"`: mark as favorite
                    - `"false"`: remove from favorites
              required:
                - isFavorite
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  object:
                    type: string
                    const: chat
                  favorited:
                    type: boolean
                required:
                  - id
                  - object
                  - favorited
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: chatId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the chat to update. Provided as a path parameter.
      security:
        - apiKey: []
  /chats/{chatId}/fork:
    post:
      summary: Fork Chat
      description: Creates a new chat fork (duplicate) from a specific version within an existing chat. Useful for branching off alternate directions without modifying the original conversation.
      operationId: chats.fork
      tags:
        - chats
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                versionId:
                  description: The identifier of the specific chat version to fork from. If omitted, the latest version will be used.
                  type: string
                  maxLength: 32
                privacy:
                  default: private
                  description: Determines the privacy setting of the forked chat. This can control whether the chat is visible only to the user, to team members, or is public.
                  type: string
                  enum:
                    - public
                    - private
                    - team
                    - team-edit
                    - unlisted
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ChatDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: chatId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the chat to fork. Provided as a path parameter.
      security:
        - apiKey: []
  /chats/{chatId}/project:
    get:
      summary: Get Project by Chat ID
      description: Retrieves the v0 project associated with a given chat. Useful for determining the context or scope of a chat session.
      operationId: projects.getByChatId
      tags:
        - projects
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProjectDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: chatId
          in: path
          required: true
          schema:
            type: string
          description: The ID of the chat to retrieve the associated project for.
      security:
        - apiKey: []
  /chats/{chatId}/messages:
    get:
      summary: Find Chat Messages
      description: Retrieves a list of all messages for a specific chat, ordered by creation date (newest first). Supports cursor-based pagination and includes message content, role, and type information.
      operationId: chats.findMessages
      tags:
        - chats
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: list
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/MessageSummary"
                  pagination:
                    type: object
                    properties:
                      hasMore:
                        type: boolean
                      nextCursor:
                        type: string
                      nextUrl:
                        type: string
                    required:
                      - hasMore
                    additionalProperties: false
                required:
                  - object
                  - data
                  - pagination
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: chatId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the chat to retrieve messages for. Provided as a path parameter.
        - name: limit
          in: query
          required: false
          schema:
            default: 20
            description: Specifies the maximum number of message records to return in a single response. Useful for paginating results when there are many messages.
            type: number
            minimum: 1
            maximum: 150
          description: Specifies the maximum number of message records to return in a single response. Useful for paginating results when there are many messages.
        - name: cursor
          in: query
          required: false
          schema:
            type: string
            description: Base64 encoded cursor containing pagination data
          description: Base64 encoded cursor containing pagination data
      security:
        - apiKey: []
    post:
      summary: Send Message
      description: Creates a new message in an existing chat. Triggers a model response using the provided prompt, with optional attachments and configuration settings.
      operationId: chats.sendMessage
      tags:
        - chats
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                  description: The prompt or instruction to send to the model as part of the chat.
                attachments:
                  default: []
                  description: A list of files or assets to include with the message.
                  type: array
                  items:
                    type: object
                    properties:
                      url:
                        type: string
                        description: The URL or data URI of the file or asset to include with the message.
                    required:
                      - url
                    additionalProperties: false
                system:
                  description: Provides system-level context or background for the chat. This is typically used to specify frameworks, tools, or development environments relevant to the task.
                  type: string
                modelConfiguration:
                  description: Overrides for the model behavior.
                  type: object
                  properties:
                    modelId:
                      default: v0-pro
                      type: string
                      enum:
                        - v0-auto
                        - v0-mini
                        - v0-pro
                        - v0-max
                        - v0-max-fast
                      description: Model to use for the generation.
                    imageGenerations:
                      default: false
                      type: boolean
                      description: Enables image generations to generate up to 5 images per version.
                    thinking:
                      default: false
                      type: boolean
                      description: Enables thinking to generate a response in multiple steps.
                  additionalProperties: false
                responseMode:
                  default: sync
                  description: |-
                    Controls how the response is delivered.

                    - `"sync"`: The response is returned immediately with the HTTP request.
                    - `"async"`: Returns a message placeholder immediately; use getById to poll for completion status and final output.
                    - `"experimental_stream"`: Returns content parts as Server-Sent Events for real-time streaming.
                  type: string
                  enum:
                    - sync
                    - async
                    - experimental_stream
                mcpServerIds:
                  description: Array of MCP server IDs to enable for this message. When provided, only the specified servers will be used. When omitted, falls back to the user's enabled MCP servers.
                  type: array
                  items:
                    type: string
                attachedSkillIds:
                  description: Array of skill IDs (from skills.sh) to attach to this message. Skills provide domain-specific knowledge and instructions that guide the AI. Maximum 3 skills per chat.
                  type: array
                  items:
                    type: string
                action:
                  description: An optional action to perform. Use `fix-with-v0` to trigger automatic error fixing — the message should contain the error logs or context to fix.
                  type: object
                  properties:
                    type:
                      type: string
                      const: fix-with-v0
                  required:
                    - type
                  additionalProperties: false
              required:
                - message
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ChatDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: chatId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the chat to send the message to. Provided as a path parameter.
      security:
        - apiKey: []
  /chats/{chatId}/messages/{messageId}:
    get:
      summary: Get Chat Message
      description: Retrieves detailed information about a specific message within a chat, including content, files, model configuration, and demo URLs.
      operationId: chats.getMessage
      tags:
        - chats
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: chatId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the chat containing the message. Provided as a path parameter.
        - name: messageId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the message to retrieve. Provided as a path parameter.
      security:
        - apiKey: []
  /chats/{chatId}/versions:
    get:
      summary: Find Chat Versions
      description: Retrieves a list of all versions (iterations) for a specific chat, ordered by creation date (newest first). Supports cursor-based pagination and includes version status and demo URLs.
      operationId: chats.findVersions
      tags:
        - chats
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: list
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/VersionSummary"
                  pagination:
                    type: object
                    properties:
                      hasMore:
                        type: boolean
                      nextCursor:
                        type: string
                      nextUrl:
                        type: string
                    required:
                      - hasMore
                    additionalProperties: false
                  meta:
                    type: object
                    properties:
                      totalCount:
                        type: number
                    required:
                      - totalCount
                    additionalProperties: false
                required:
                  - object
                  - data
                  - pagination
                  - meta
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: chatId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the chat to retrieve versions for. Provided as a path parameter.
        - name: limit
          in: query
          required: false
          schema:
            default: 20
            description: Specifies the maximum number of version records to return in a single response. Useful for paginating results when there are many versions.
            type: number
            minimum: 1
            maximum: 150
          description: Specifies the maximum number of version records to return in a single response. Useful for paginating results when there are many versions.
        - name: cursor
          in: query
          required: false
          schema:
            type: string
            description: Base64 encoded cursor containing pagination data
          description: Base64 encoded cursor containing pagination data
      security:
        - apiKey: []
  /chats/{chatId}/versions/{versionId}:
    get:
      summary: Get Chat Version
      description: Retrieves detailed information about a specific version of a chat, including all files with their content and lock status.
      operationId: chats.getVersion
      tags:
        - chats
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/VersionDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: chatId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the chat containing the version. Provided as a path parameter.
        - name: versionId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the version to retrieve. Provided as a path parameter.
        - name: includeDefaultFiles
          in: query
          required: false
          schema:
            description: When true, includes all default files (package.json, configuration files, etc.) that would be part of a ZIP download. When false or omitted, returns only the generated source files.
            type: string
            enum:
              - "true"
              - "false"
          description: When true, includes all default files (package.json, configuration files, etc.) that would be part of a ZIP download. When false or omitted, returns only the generated source files.
      security:
        - apiKey: []
    patch:
      summary: Update Chat Version Files
      description: Updates the source files of a specific chat version (block) manually. This allows editing generated files directly through the API.
      operationId: chats.updateVersion
      tags:
        - chats
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                files:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        description: The full file path including extension (e.g., "components/test.tsx")
                      content:
                        type: string
                        description: The new content for the file
                      locked:
                        description: Whether to lock or unlock the file to prevent AI from overwriting it during generation
                        type: boolean
                    required:
                      - name
                      - content
                    additionalProperties: false
                  description: Array of files to update with their new content
              required:
                - files
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/VersionDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: chatId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the chat containing the version to update. Provided as a path parameter.
        - name: versionId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the version (block) to update. Provided as a path parameter.
      security:
        - apiKey: []
  /chats/{chatId}/versions/{versionId}/download:
    get:
      summary: Download version files
      description: Download all files for a specific chat version as a zip or tarball archive. Use includeDefaultFiles=true to include all deployment files (package.json, configuration files, etc.) or false/omitted to return only the generated source files.
      operationId: chats.downloadVersion
      tags:
        - chats
      responses:
        "200":
          description: Success
          content:
            application/zip:
              schema:
                type: string
                format: binary
                description: ZIP archive containing the version files
            application/gzip:
              schema:
                type: string
                format: binary
                description: Gzipped tar archive containing the version files
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: chatId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the chat containing the version. Provided as a path parameter.
        - name: versionId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the version to download. Provided as a path parameter.
        - name: format
          in: query
          required: false
          schema:
            default: zip
            description: The archive format for the download. Choose "zip" for broad compatibility or "tarball" for Unix/Linux systems.
            type: string
            enum:
              - zip
              - tarball
          description: The archive format for the download. Choose "zip" for broad compatibility or "tarball" for Unix/Linux systems.
        - name: includeDefaultFiles
          in: query
          required: false
          schema:
            description: When true, includes all default files (package.json, configuration files, etc.) that would be part of a complete deployment. When false or omitted, returns only the generated source files.
            type: string
            enum:
              - "true"
              - "false"
          description: When true, includes all default files (package.json, configuration files, etc.) that would be part of a complete deployment. When false or omitted, returns only the generated source files.
      security:
        - apiKey: []
  /chats/{chatId}/versions/{versionId}/files/delete:
    post:
      summary: Delete Chat Version Files
      description: Deletes source files from a specific chat version (block). Files are removed from the version and a new source version is created.
      operationId: chats.deleteVersionFiles
      tags:
        - chats
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                filePaths:
                  type: array
                  items:
                    type: string
                  description: Array of file paths to delete (e.g., ["components/test.tsx", "lib/utils.ts"])
              required:
                - filePaths
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/VersionDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: chatId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the chat containing the version to delete files from.
        - name: versionId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the version (block) to delete files from.
      security:
        - apiKey: []
  /chats/{chatId}/messages/{messageId}/resume:
    post:
      summary: Resume Message
      description: Resumes processing of a previously interrupted or incomplete message in a chat. Useful for continuing generation when a message was paused or stopped.
      operationId: chats.resume
      tags:
        - chats
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: chatId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the chat containing the message to resume. Provided as a path parameter.
        - name: messageId
          in: path
          required: true
          schema:
            type: string
          description: The identifier of the specific message to resume. Provided as a path parameter.
      security:
        - apiKey: []
  /chats/{chatId}/messages/{messageId}/stop:
    post:
      summary: Stop Message
      description: Stops an in-flight message generation in a chat. Useful for cancelling a streaming response that is still being generated.
      operationId: chats.stop
      tags:
        - chats
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: true
                required:
                  - success
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: chatId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the chat containing the message to stop. Provided as a path parameter.
        - name: messageId
          in: path
          required: true
          schema:
            type: string
          description: The identifier of the specific message to stop. Provided as a path parameter.
      security:
        - apiKey: []
  /chats/{chatId}/tasks/resolve:
    post:
      summary: Resolve Task
      description: Resolves a pending task in a chat, continuing the conversation. The latest message in the active chat fork must be an assistant message currently blocked on a matching task (integration setup, plan approval, question answers, or permission grants).
      operationId: chats.resolveTask
      tags:
        - chats
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                task:
                  anyOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          const: confirmed-steps
                        connectedIntegrationNames:
                          default: []
                          description: Names of integrations that were successfully connected (e.g. "Neon", "Supabase"). Pass an empty array to skip.
                          type: array
                          items:
                            type: string
                            enum:
                              - Upstash for Redis
                              - Upstash Search
                              - Neon
                              - Supabase
                              - Amazon Aurora DSQL
                              - Amazon Aurora PostgreSQL
                              - Amazon DynamoDB
                              - firebase
                              - Groq
                              - Grok
                              - fal
                              - Deep Infra
                              - Stripe
                              - Clerk
                              - Convex
                              - Blob
                              - Edge Config
                              - Vercel AI Gateway
                              - Snowflake
                        connectedMcpPresetNames:
                          default: []
                          description: Names of MCP presets that were connected (e.g. "Linear", "Sentry"). Pass an empty array to skip.
                          type: array
                          items:
                            type: string
                            enum:
                              - Linear
                              - Notion
                              - Context7
                              - Sentry
                              - Zapier
                              - Glean
                              - Hex
                              - Sanity
                              - Granola
                              - PostHog
                              - Contentful
                              - Slack
                        appliedScripts:
                          default: []
                          description: Names of scripts that were applied.
                          type: array
                          items:
                            type: string
                            minLength: 1
                        addedEnvVars:
                          default: []
                          description: Names of environment variables that were added.
                          type: array
                          items:
                            type: string
                            minLength: 1
                      required:
                        - type
                      additionalProperties: false
                      description: Resolves an integration installation task. The agent asked the user to install integrations, MCP presets, or set environment variables. Send this after provisioning the integration on Vercel.
                    - type: object
                      properties:
                        type:
                          type: string
                          const: plan-exit-response
                        status:
                          type: string
                          enum:
                            - approved
                            - rejected
                            - request-changes
                          description: Whether the plan is approved, rejected, or needs changes.
                        content:
                          type: string
                          minLength: 1
                          description: Feedback or instructions for the agent.
                      required:
                        - type
                        - status
                        - content
                      additionalProperties: false
                      description: Resolves a plan review task. The agent proposed an implementation plan and is waiting for approval.
                    - type: object
                      properties:
                        type:
                          type: string
                          const: answered-questions
                        answers:
                          type: array
                          items:
                            type: object
                            properties:
                              questionId:
                                type: string
                                minLength: 1
                                description: The ID of the question being answered.
                              questionText:
                                type: string
                                minLength: 1
                                description: The text of the question being answered.
                              selectedLabels:
                                type: array
                                items:
                                  type: string
                                  minLength: 1
                                description: The labels of the selected options. For single-select questions, pass one item.
                              customText:
                                description: Free-form text input, used when the user selects "Other" or wants to add context.
                                type: string
                                minLength: 1
                            required:
                              - questionId
                              - questionText
                              - selectedLabels
                            additionalProperties: false
                          description: Answers to the questions the agent asked.
                      required:
                        - type
                        - answers
                      additionalProperties: false
                      description: Resolves a question task. The agent asked the user one or more multiple-choice questions.
                    - type: object
                      properties:
                        type:
                          type: string
                          const: confirmed-permissions
                        permissions:
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                                const: ALLOW_DYNAMIC_TOOL_STRICT
                              toolName:
                                type: string
                                minLength: 1
                                description: The name of the tool being permitted.
                              input:
                                description: The tool call input arguments. Pass the exact input from the stopped task.
                              taskNameActive:
                                description: Label shown while the tool is running (e.g. "Running migration").
                                anyOf:
                                  - type: string
                                    minLength: 1
                                  - type: "null"
                              taskNameComplete:
                                description: Label shown after the tool completes (e.g. "Migration complete").
                                anyOf:
                                  - type: string
                                    minLength: 1
                                  - type: "null"
                              userMessage:
                                description: Optional message from the user about this permission.
                                type: string
                                minLength: 1
                            required:
                              - type
                              - toolName
                              - input
                            additionalProperties: false
                          description: The permissions to grant. Pass the suggestedPermissions from the stopped task.
                        userMessage:
                          description: Optional message from the user about the permission grant.
                          type: string
                          minLength: 1
                      required:
                        - type
                        - permissions
                      additionalProperties: false
                      description: Resolves a permission request task. The agent wants to execute a tool (shell command, script, MCP call) and needs approval. Also used to resolve environment variable prompts.
                  description: The task resolution data. The latest message in the active chat fork must be an assistant message blocked on the matching task type.
                responseMode:
                  default: sync
                  description: |-
                    Controls how the response is delivered.

                    - `"sync"`: The response is returned immediately with the HTTP request.
                    - `"async"`: Returns a message placeholder immediately; use getById to poll for completion status and final output.
                    - `"experimental_stream"`: Returns content parts as Server-Sent Events for real-time streaming.
                  type: string
                  enum:
                    - sync
                    - async
                    - experimental_stream
                modelConfiguration:
                  description: Overrides for the model behavior.
                  type: object
                  properties:
                    modelId:
                      default: v0-pro
                      type: string
                      enum:
                        - v0-auto
                        - v0-mini
                        - v0-pro
                        - v0-max
                        - v0-max-fast
                      description: Model to use for the generation.
                    imageGenerations:
                      default: false
                      type: boolean
                      description: Enables image generations to generate up to 5 images per version.
                    thinking:
                      default: false
                      type: boolean
                      description: Enables thinking to generate a response in multiple steps.
                  additionalProperties: false
              required:
                - task
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ChatDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: chatId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the chat containing the pending task. Provided as a path parameter.
      security:
        - apiKey: []
  /deployments:
    get:
      summary: Find Deployments
      description: Find deployments by project and chat IDs. This will return a list of deployments for the given project and chat IDs.
      operationId: deployments.find
      tags:
        - deployments
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: list
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/DeploymentDetail"
                required:
                  - object
                  - data
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: projectId
          in: query
          required: false
          schema:
            description: The ID of the project to find deployments for
            type: string
          description: The ID of the project to find deployments for
        - name: chatId
          in: query
          required: true
          schema:
            type: string
            description: The ID of the chat to find deployments for
          description: The ID of the chat to find deployments for
        - name: versionId
          in: query
          required: true
          schema:
            type: string
            description: The ID of the version to find deployments for
          description: The ID of the version to find deployments for
      security:
        - apiKey: []
    post:
      summary: Create Deployment
      description: Create a new deployment for a specific chat and version. This will trigger a deployment to Vercel.
      operationId: deployments.create
      tags:
        - deployments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                projectId:
                  type: string
                chatId:
                  type: string
                versionId:
                  type: string
              required:
                - chatId
                - versionId
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeploymentDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      security:
        - apiKey: []
  /deployments/{deploymentId}:
    get:
      summary: Get Deployment
      description: Get a deployment by ID. This will return the details of the deployment, including the inspector URL, chat ID, project ID, version ID, API URL, and web URL.
      operationId: deployments.getById
      tags:
        - deployments
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeploymentDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: deploymentId
          in: path
          required: true
          schema:
            type: string
          description: Path parameter "deploymentId"
      security:
        - apiKey: []
    delete:
      summary: Delete Deployment
      description: Delete a deployment by ID. This will delete the deployment from Vercel.
      operationId: deployments.delete
      tags:
        - deployments
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  object:
                    type: string
                    const: deployment
                  deleted:
                    type: boolean
                    const: true
                required:
                  - id
                  - object
                  - deleted
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: deploymentId
          in: path
          required: true
          schema:
            type: string
          description: Path parameter "deploymentId"
      security:
        - apiKey: []
  /deployments/{deploymentId}/logs:
    get:
      summary: Find Deployment Logs
      description: Retrieves logs for a specific deployment. Supports filtering by timestamp to fetch only recent logs.
      operationId: deployments.findLogs
      tags:
        - deployments
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  logs:
                    type: array
                    items:
                      type: object
                      properties:
                        createdAt:
                          type: string
                          description: Log creation timestamp.
                        deploymentId:
                          type: string
                          description: Deployment ID.
                        id:
                          type: string
                          description: Log entry ID.
                        text:
                          type: string
                          description: Log message content.
                        type:
                          type: string
                          enum:
                            - stdout
                            - stderr
                          description: Output stream type.
                        level:
                          default: info
                          description: Log severity level.
                          type: string
                          enum:
                            - error
                            - warning
                            - info
                        object:
                          type: string
                          const: deployment_log
                          description: Object type identifier.
                      required:
                        - createdAt
                        - deploymentId
                        - id
                        - text
                        - type
                        - object
                      additionalProperties: false
                    description: Array of log entries.
                  nextSince:
                    description: Timestamp for pagination.
                    type: number
                  object:
                    type: string
                    const: list
                    description: Object type identifier.
                required:
                  - logs
                  - object
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: deploymentId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the deployment to retrieve logs for. Provided as a path parameter.
        - name: since
          in: query
          required: false
          schema:
            description: A UNIX timestamp (in seconds) used to filter logs. Returns only log entries generated after the specified time.
            type: number
          description: A UNIX timestamp (in seconds) used to filter logs. Returns only log entries generated after the specified time.
      security:
        - apiKey: []
  /deployments/{deploymentId}/errors:
    get:
      summary: Find Deployment Errors
      description: Retrieves a list of errors that occurred during a specific deployment. Useful for diagnosing and debugging deployment issues.
      operationId: deployments.findErrors
      tags:
        - deployments
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  fullErrorText:
                    type: string
                  errorType:
                    type: string
                  formattedError:
                    type: string
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: deploymentId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the deployment to inspect for errors. Provided as a path parameter.
      security:
        - apiKey: []
  /hooks:
    get:
      summary: Find Hooks
      description: Retrieves a list of existing hooks in your workspace. Useful for managing active webhooks tied to chat events or deployments.
      operationId: hooks.find
      tags:
        - hooks
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: list
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/HookSummary"
                required:
                  - object
                  - data
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      security:
        - apiKey: []
    post:
      summary: Create Hook
      description: Creates a new webhook that listens for specific events. Supports optional association with a chat.
      operationId: hooks.create
      tags:
        - hooks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: A human-readable name for the hook.
                events:
                  type: array
                  items:
                    type: string
                    enum:
                      - chat.created
                      - chat.updated
                      - chat.deleted
                      - message.created
                      - message.updated
                      - message.deleted
                      - message.finished
                  description: List of event types the hook should subscribe to.
                chatId:
                  description: The ID of a chat to scope the hook to.
                  type: string
                url:
                  type: string
                  format: uri
                  description: The target URL to receive the webhook payloads.
              required:
                - name
                - events
                - url
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HookDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      security:
        - apiKey: []
  /hooks/{hookId}:
    get:
      summary: Get Hook
      description: Retrieves the details of a specific webhook using its ID.
      operationId: hooks.getById
      tags:
        - hooks
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HookDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: hookId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the hook to retrieve.
      security:
        - apiKey: []
    patch:
      summary: Update Hook
      description: Updates the configuration of an existing webhook, including its name, event subscriptions, or target URL.
      operationId: hooks.update
      tags:
        - hooks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: A new name for the hook.
                  type: string
                events:
                  description: Updated list of event types to subscribe to.
                  type: array
                  items:
                    type: string
                    enum:
                      - chat.created
                      - chat.updated
                      - chat.deleted
                      - message.created
                      - message.updated
                      - message.deleted
                      - message.finished
                url:
                  description: A new URL to send webhook payloads to.
                  type: string
                  format: uri
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HookDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: hookId
          in: path
          required: true
          schema:
            type: string
          description: The ID of the webhook to update. Provided as a path parameter.
      security:
        - apiKey: []
    delete:
      summary: Delete Hook
      description: Deletes a webhook based on its ID. This action is irreversible.
      operationId: hooks.delete
      tags:
        - hooks
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  object:
                    type: string
                    const: hook
                  deleted:
                    type: boolean
                    const: true
                required:
                  - id
                  - object
                  - deleted
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: hookId
          in: path
          required: true
          schema:
            type: string
          description: The ID of the webhook to delete. Provided as a path parameter.
      security:
        - apiKey: []
  /integrations/vercel/projects:
    get:
      summary: Find Vercel Projects
      description: Retrieves a list of Vercel projects linked to your integration. Useful for associating chats, deployments, or hooks with specific Vercel projects.
      operationId: integrations.vercel.projects.find
      tags:
        - integrations
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: list
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/VercelProjectSummary"
                required:
                  - object
                  - data
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      security:
        - apiKey: []
    post:
      summary: Create Vercel Project
      description: Links a Vercel project to an existing v0 project. Enables Vercel-related features and deployment integration within the v0 workspace.
      operationId: integrations.vercel.projects.create
      tags:
        - integrations
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                projectId:
                  type: string
                  description: The ID of the v0 project to link to the new Vercel project.
                name:
                  type: string
                  description: The name to assign to the new Vercel project.
              required:
                - projectId
                - name
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/VercelProjectDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      security:
        - apiKey: []
  /projects:
    get:
      summary: Find Projects
      description: Returns a list of all v0 projects in your workspace. Useful for browsing or managing projects across different chats or use cases.
      operationId: projects.find
      tags:
        - projects
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: list
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/ProjectSummary"
                required:
                  - object
                  - data
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      security:
        - apiKey: []
    post:
      summary: Create Project
      description: Creates a new v0 project with an optional description, icon, environment variables, and instructions. Projects help organize chats and manage context.
      operationId: projects.create
      tags:
        - projects
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 255
                  description: The name of the project.
                description:
                  description: A brief summary of the project’s purpose.
                  type: string
                  maxLength: 1000
                icon:
                  default: icon-wand-sparkles
                  description: An icon identifier to visually represent the project.
                  type: string
                environmentVariables:
                  description: A list of key-value pairs used to define runtime variables for the project.
                  type: array
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                        maxLength: 255
                      value:
                        type: string
                        maxLength: 1000
                    required:
                      - key
                      - value
                    additionalProperties: false
                instructions:
                  description: Guidance or goals that provide context for the model when working within the project.
                  type: string
                  maxLength: 2000
                vercelProjectId:
                  description: The ID of an existing Vercel project to link to. If not provided, a new Vercel project will be created.
                  type: string
                privacy:
                  description: The privacy setting for the project. For user accounts, this is always "private". For team/enterprise accounts, this can be either "private" or "team".
                  type: string
                  enum:
                    - private
                    - team
              required:
                - name
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProjectDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      security:
        - apiKey: []
  /projects/{projectId}:
    get:
      summary: Get Project by ID
      description: Retrieves the details of a specific v0 project by its ID.
      operationId: projects.getById
      tags:
        - projects
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProjectDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the project to retrieve.
      security:
        - apiKey: []
    patch:
      summary: Update Project
      description: Updates the metadata of an existing project using its `projectId`. Supports changes to the project name and privacy setting.
      operationId: projects.update
      tags:
        - projects
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: A new name to assign to the project. Helps with identification and organization.
                  type: string
                description:
                  description: A new description to assign to the project. Helps with identification and organization.
                  type: string
                instructions:
                  description: Guidance or goals that provide context for the model when working within the project.
                  type: string
                privacy:
                  description: The privacy setting for the project. For user accounts, this must be "private". For team/enterprise accounts, this can be either "private" or "team".
                  type: string
                  enum:
                    - private
                    - team
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProjectDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the project to update. Provided as a path parameter.
      security:
        - apiKey: []
    delete:
      summary: Delete Project
      description: Deletes a specific project based on the provided projectId. This operation marks the project as deleted and is irreversible.
      operationId: projects.delete
      tags:
        - projects
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The unique identifier of the deleted project.
                  object:
                    type: string
                    const: project
                    description: Fixed value identifying this object as a project.
                  deleted:
                    type: boolean
                    const: true
                    description: Confirmation that the project has been deleted.
                required:
                  - id
                  - object
                  - deleted
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the project to delete. This must be passed as a path parameter in the URL.
        - name: deleteAllChats
          in: query
          required: false
          schema:
            default: "false"
            description: If true, deletes all the chats associated with the given project ID. Deleting is permanent. Defaults to false.
            type: string
            enum:
              - "true"
              - "false"
          description: If true, deletes all the chats associated with the given project ID. Deleting is permanent. Defaults to false.
      security:
        - apiKey: []
  /projects/{projectId}/assign:
    post:
      summary: Assign Project to Chat
      description: Links an existing v0 project to a specific chat. Helps group conversations under a shared project context.
      operationId: projects.assign
      tags:
        - projects
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                chatId:
                  type: string
                  description: The ID of the chat to assign the project to.
              required:
                - chatId
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: project
                  id:
                    type: string
                  assigned:
                    type: boolean
                    const: true
                required:
                  - object
                  - id
                  - assigned
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The ID of the project to assign.
      security:
        - apiKey: []
  /projects/{projectId}/env-vars:
    get:
      summary: Find Environment Variables
      description: Retrieves all environment variables for a given project.
      operationId: projects.findEnvVars
      tags:
        - projects
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: list
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/EnvironmentVariableSummarySchema"
                required:
                  - object
                  - data
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the project whose environment variables should be retrieved.
        - name: decrypted
          in: query
          required: false
          schema:
            description: Whether to return decrypted values. Defaults to false (encrypted).
            type: string
            enum:
              - "true"
              - "false"
          description: Whether to return decrypted values. Defaults to false (encrypted).
      security:
        - apiKey: []
    post:
      summary: Create Environment Variables
      description: Creates new environment variables for a given project. This endpoint will fail if any of the specified environment variable keys already exist, unless upsert is set to true.
      operationId: projects.createEnvVars
      tags:
        - projects
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                environmentVariables:
                  type: array
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                        minLength: 1
                        description: The name of the environment variable.
                      value:
                        type: string
                        description: The value of the environment variable.
                    required:
                      - key
                      - value
                    additionalProperties: false
                  description: An array of environment variables to create with key and value fields.
                upsert:
                  description: Whether to overwrite existing environment variables with the same keys. Defaults to false.
                  type: boolean
              required:
                - environmentVariables
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: list
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/EnvironmentVariableSummarySchema"
                required:
                  - object
                  - data
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the project where environment variables should be created.
        - name: decrypted
          in: query
          required: false
          schema:
            description: Whether to return decrypted values. Defaults to false (encrypted).
            type: string
            enum:
              - "true"
              - "false"
          description: Whether to return decrypted values. Defaults to false (encrypted).
      security:
        - apiKey: []
    patch:
      summary: Update Environment Variables
      description: Updates multiple environment variables for a given project. Only the value of each environment variable can be updated.
      operationId: projects.updateEnvVars
      tags:
        - projects
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                environmentVariables:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: The unique identifier of the environment variable to update.
                      value:
                        type: string
                        description: The new value of the environment variable.
                    required:
                      - id
                      - value
                    additionalProperties: false
                  description: An array of environment variables to update with id and value fields.
              required:
                - environmentVariables
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: list
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/EnvironmentVariableSummarySchema"
                required:
                  - object
                  - data
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the project whose environment variables should be updated.
        - name: decrypted
          in: query
          required: false
          schema:
            description: Whether to return decrypted values. Defaults to false (encrypted).
            type: string
            enum:
              - "true"
              - "false"
          description: Whether to return decrypted values. Defaults to false (encrypted).
      security:
        - apiKey: []
  /projects/{projectId}/env-vars/delete:
    post:
      summary: Delete Environment Variables
      description: Deletes multiple environment variables for a given project by their IDs.
      operationId: projects.deleteEnvVars
      tags:
        - projects
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                environmentVariableIds:
                  type: array
                  items:
                    type: string
                    description: The unique identifier of the environment variable to delete.
                  description: An array of environment variable IDs to delete.
              required:
                - environmentVariableIds
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: list
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        object:
                          type: string
                          const: environment_variable
                        deleted:
                          type: boolean
                          const: true
                      required:
                        - id
                        - object
                        - deleted
                      additionalProperties: false
                required:
                  - object
                  - data
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the project whose environment variables should be deleted.
      security:
        - apiKey: []
  /projects/{projectId}/env-vars/{environmentVariableId}:
    get:
      summary: Get Environment Variable
      description: Retrieves a specific environment variable for a given project by its ID, including its value.
      operationId: projects.getEnvVar
      tags:
        - projects
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: environment_variable
                  data:
                    $ref: "#/components/schemas/EnvironmentVariableDetailSchema"
                required:
                  - object
                  - data
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the project that owns the environment variable.
        - name: environmentVariableId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the environment variable to retrieve.
        - name: decrypted
          in: query
          required: false
          schema:
            description: Whether to return decrypted values. Defaults to false (encrypted).
            type: string
            enum:
              - "true"
              - "false"
          description: Whether to return decrypted values. Defaults to false (encrypted).
      security:
        - apiKey: []
  /rate-limits:
    get:
      summary: Find Rate Limit
      description: Retrieves rate limit information for a given scope. Useful for monitoring usage limits and avoiding throttling.
      operationId: rateLimits.find
      tags:
        - rateLimits
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  remaining:
                    type: number
                  reset:
                    type: number
                  limit:
                    type: number
                  dailyLimit:
                    description: Daily message limit information for free users.
                    type: object
                    properties:
                      limit:
                        type: number
                        description: The maximum number of daily messages allowed for free users.
                      remaining:
                        type: number
                        description: The number of messages the user has remaining for the day.
                      reset:
                        type: number
                        description: Unix timestamp (in milliseconds) when the daily limit resets.
                      isWithinGracePeriod:
                        type: boolean
                        description: Whether the user is within the 48-hour grace period for new users, during which usage tracking is disabled.
                    required:
                      - limit
                      - remaining
                      - reset
                      - isWithinGracePeriod
                    additionalProperties: false
                required:
                  - limit
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: scope
          in: query
          required: false
          schema:
            description: The context or namespace to check rate limits for (e.g., a project slug or feature area).
            type: string
          description: The context or namespace to check rate limits for (e.g., a project slug or feature area).
      security:
        - apiKey: []
  /user:
    get:
      summary: Get User
      description: Retrieves information about the authenticated user, including their ID, name, email, and account metadata.
      operationId: user.get
      tags:
        - user
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UserSummarySchema"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      security:
        - apiKey: []
  /user/billing:
    get:
      summary: Get Billing
      description: Fetches billing usage and quota information for the authenticated user. Can be scoped to a specific context (e.g. project or namespace).
      operationId: user.getBilling
      tags:
        - user
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      billingType:
                        type: string
                        const: token
                      data:
                        type: object
                        properties:
                          plan:
                            type: string
                          billingMode:
                            type: string
                            const: test
                          role:
                            type: string
                          billingCycle:
                            type: object
                            properties:
                              start:
                                type: number
                              end:
                                type: number
                            required:
                              - start
                              - end
                            additionalProperties: false
                          balance:
                            type: object
                            properties:
                              remaining:
                                type: number
                              total:
                                type: number
                            required:
                              - remaining
                              - total
                            additionalProperties: false
                          onDemand:
                            type: object
                            properties:
                              balance:
                                type: number
                              blocks:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    expirationDate:
                                      type: number
                                    effectiveDate:
                                      type: number
                                    originalBalance:
                                      type: number
                                    currentBalance:
                                      type: number
                                  required:
                                    - effectiveDate
                                    - originalBalance
                                    - currentBalance
                                  additionalProperties: false
                            required:
                              - balance
                            additionalProperties: false
                        required:
                          - plan
                          - role
                          - billingCycle
                          - balance
                          - onDemand
                        additionalProperties: false
                    required:
                      - billingType
                      - data
                    additionalProperties: false
                  - type: object
                    properties:
                      billingType:
                        type: string
                        const: legacy
                      data:
                        type: object
                        properties:
                          remaining:
                            type: number
                          reset:
                            type: number
                          limit:
                            type: number
                        required:
                          - limit
                        additionalProperties: false
                    required:
                      - billingType
                      - data
                    additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: scope
          in: query
          required: false
          schema:
            description: Filters billing data by a specific scope, such as a project ID or slug.
            type: string
          description: Filters billing data by a specific scope, such as a project ID or slug.
      security:
        - apiKey: []
  /user/plan:
    get:
      summary: Get Plan
      description: Returns the current subscription plan for the authenticated user, including tier details and feature limits.
      operationId: user.getPlan
      tags:
        - user
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: plan
                  plan:
                    type: string
                  billingCycle:
                    type: object
                    properties:
                      start:
                        type: number
                      end:
                        type: number
                    required:
                      - start
                      - end
                    additionalProperties: false
                  balance:
                    type: object
                    properties:
                      remaining:
                        type: number
                      total:
                        type: number
                    required:
                      - remaining
                      - total
                    additionalProperties: false
                required:
                  - object
                  - plan
                  - billingCycle
                  - balance
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      security:
        - apiKey: []
  /user/scopes:
    get:
      summary: Get User Scopes
      description: Retrieves all accessible scopes for the authenticated user, such as personal workspaces or shared teams.
      operationId: user.getScopes
      tags:
        - user
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: list
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/ScopeSummary"
                required:
                  - object
                  - data
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      security:
        - apiKey: []
  /chats/{chatId}/versions/{versionId}/restore:
    post:
      summary: Restore Block
      description: Restores a block to a specific version.
      operationId: chats.restore
      tags:
        - chats
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/VersionDetail"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: chatId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the chat containing the version to restore.
        - name: versionId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the version to restore.
      security:
        - apiKey: []
  /reports/usage:
    get:
      summary: Get Usage Report
      description: Retrieves detailed usage events for the authenticated user or team, including costs, event types, models used, and metadata. Shows the same data as displayed in the usage dashboard. Can be filtered by chatId to show usage for a specific chat, or by userId to show usage for a specific user.
      operationId: reports.getUsage
      tags:
        - reports
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: list
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        object:
                          type: string
                          const: usage_event
                        type:
                          type: string
                          enum:
                            - image_generation
                            - message
                            - manual_debit
                            - api_request
                            - inline-edit
                            - buy-template
                            - reverse_template_sale
                            - refund_template_purchase
                        promptCost:
                          type: string
                        completionCost:
                          type: string
                        totalCost:
                          type: string
                        chatId:
                          type: string
                        messageId:
                          type: string
                        userId:
                          description: Deprecated - use user object instead
                          type: string
                        user:
                          $ref: "#/components/schemas/UserSummarySchema"
                        createdAt:
                          type: string
                          format: date-time
                          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          description: The ISO timestamp representing when the usage event was created.
                      required:
                        - id
                        - object
                        - totalCost
                        - createdAt
                      additionalProperties: false
                  pagination:
                    type: object
                    properties:
                      hasMore:
                        type: boolean
                      nextCursor:
                        type: string
                      nextUrl:
                        type: string
                    required:
                      - hasMore
                    additionalProperties: false
                  meta:
                    type: object
                    properties:
                      totalCount:
                        type: number
                        description: Number of events in this response
                    required:
                      - totalCount
                    additionalProperties: false
                required:
                  - object
                  - data
                  - pagination
                  - meta
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: startDate
          in: query
          required: false
          schema:
            type: string
            format: date-time
            pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: Query parameter "startDate"
        - name: endDate
          in: query
          required: false
          schema:
            type: string
            format: date-time
            pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: Query parameter "endDate"
        - name: chatId
          in: query
          required: false
          schema:
            type: string
          description: Query parameter "chatId"
        - name: messageId
          in: query
          required: false
          schema:
            type: string
          description: Query parameter "messageId"
        - name: userId
          in: query
          required: false
          schema:
            type: string
          description: Query parameter "userId"
        - name: limit
          in: query
          required: false
          schema:
            default: 20
            type: number
            minimum: 1
            maximum: 150
          description: Query parameter "limit"
        - name: cursor
          in: query
          required: false
          schema:
            type: string
            description: Base64 encoded cursor containing pagination data
          description: Base64 encoded cursor containing pagination data
      security:
        - apiKey: []
  /reports/usage/ai:
    get:
      summary: Get AI Usage Report
      description: Retrieves v0 AI usage events for the authenticated user or active team scope.
      operationId: reports.getAIUsage
      tags:
        - reports
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: list
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        eventId:
                          type: string
                        modelId:
                          type: string
                        inputTokens:
                          type: number
                        outputTokens:
                          type: number
                        totalTokens:
                          type: number
                        cacheCreationInputTokens:
                          type: number
                        cacheReadInputTokens:
                          type: number
                        timestamp:
                          type: string
                        requestId:
                          type: string
                        useCase:
                          type: string
                        chatId:
                          type: string
                        messageId:
                          type: string
                        userId:
                          type: string
                        userEmail:
                          type: string
                      required:
                        - eventId
                        - modelId
                        - inputTokens
                        - outputTokens
                        - totalTokens
                        - cacheCreationInputTokens
                        - cacheReadInputTokens
                        - timestamp
                        - requestId
                        - useCase
                        - chatId
                        - messageId
                        - userId
                        - userEmail
                      additionalProperties: false
                  pagination:
                    type: object
                    properties:
                      nextCursor:
                        type:
                          - string
                          - "null"
                    required:
                      - nextCursor
                    additionalProperties: false
                  dateRange:
                    type: object
                    properties:
                      start:
                        type:
                          - string
                          - "null"
                      end:
                        type:
                          - string
                          - "null"
                    required:
                      - start
                      - end
                    additionalProperties: false
                required:
                  - object
                  - data
                  - pagination
                  - dateRange
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: start
          in: query
          required: false
          schema:
            description: Inclusive start datetime filter.
            type: string
            format: date-time
            pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
          description: Inclusive start datetime filter.
        - name: end
          in: query
          required: false
          schema:
            description: Exclusive end datetime filter.
            type: string
            format: date-time
            pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
          description: Exclusive end datetime filter.
        - name: cursor
          in: query
          required: false
          schema:
            description: Opaque cursor returned by a previous request for forward pagination.
            type: string
          description: Opaque cursor returned by a previous request for forward pagination.
        - name: limit
          in: query
          required: false
          schema:
            default: 1000
            description: Maximum number of rows to return.
            type: integer
            minimum: 1
            maximum: 5000
          description: Maximum number of rows to return.
      security:
        - apiKey: []
  /reports/user-activity:
    get:
      summary: Get User Activity Report
      description: Retrieves aggregated user activity data for team members, including chat counts, message counts, and activity timestamps. Only available for Enterprise teams with OWNER or BILLING role. Shows the same data as displayed in the Usage settings for Enterprise teams.
      operationId: reports.getUserActivity
      tags:
        - reports
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: list
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        object:
                          type: string
                          const: user_activity
                        user:
                          type: object
                          properties:
                            id:
                              type: string
                              description: A unique identifier for the user.
                            object:
                              type: string
                              const: user
                              description: Fixed value identifying this object as a user.
                            name:
                              description: Optional full name of the user.
                              type: string
                            email:
                              type: string
                              description: The user's email address.
                            avatar:
                              type: string
                              description: URL to the user's avatar image.
                            createdAt:
                              type: string
                              format: date-time
                              pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                              description: The ISO timestamp representing when the user was created.
                            updatedAt:
                              description: The ISO timestamp of the last update to the user.
                              type: string
                              format: date-time
                              pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                            teamV0Role:
                              anyOf:
                                - type: string
                                  enum:
                                    - V0Builder
                                    - V0Chatter
                                    - V0Viewer
                                - type: "null"
                              description: The user's v0 role
                          required:
                            - id
                            - object
                            - email
                            - avatar
                            - createdAt
                            - teamV0Role
                          additionalProperties: false
                        chatCount:
                          type: number
                          description: Total number of chats created by the user
                        messageCount:
                          type: number
                          description: Total number of messages sent by the user
                        activeDays:
                          type: number
                          description: Number of distinct days the user was active
                        firstActivity:
                          anyOf:
                            - type: string
                              format: date-time
                              pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                            - type: "null"
                          description: Timestamp of the user's first activity
                        lastActivity:
                          anyOf:
                            - type: string
                              format: date-time
                              pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                            - type: "null"
                          description: Timestamp of the user's last activity
                      required:
                        - id
                        - object
                        - user
                        - chatCount
                        - messageCount
                        - activeDays
                        - firstActivity
                        - lastActivity
                      additionalProperties: false
                  meta:
                    type: object
                    properties:
                      totalCount:
                        type: number
                      dateRange:
                        type: object
                        properties:
                          start:
                            anyOf:
                              - type: string
                                format: date-time
                                pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                              - type: "null"
                          end:
                            anyOf:
                              - type: string
                                format: date-time
                                pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                              - type: "null"
                        required:
                          - start
                          - end
                        additionalProperties: false
                    required:
                      - totalCount
                      - dateRange
                    additionalProperties: false
                required:
                  - object
                  - data
                  - meta
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: startDate
          in: query
          required: false
          schema:
            type: string
            format: date-time
            pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: Query parameter "startDate"
        - name: endDate
          in: query
          required: false
          schema:
            type: string
            format: date-time
            pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: Query parameter "endDate"
      security:
        - apiKey: []
  /mcp-servers:
    get:
      summary: List MCP Servers
      description: Retrieves all MCP servers configured for the authenticated user.
      operationId: mcpServers.find
      tags:
        - mcpServers
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: list
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        object:
                          type: string
                          const: mcp_server
                          description: The object type.
                        id:
                          type: string
                          description: The unique identifier for the MCP server.
                        name:
                          type: string
                          description: The display name of the MCP server.
                        url:
                          type: string
                          format: uri
                          description: The URL of the MCP server.
                        description:
                          description: An optional description of the MCP server.
                          type: string
                        enabled:
                          type: boolean
                          description: Whether the MCP server is enabled for use in chats.
                        auth:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - none
                                - bearer
                                - custom-headers
                                - oauth
                              description: The type of authentication configured.
                          required:
                            - type
                          additionalProperties: false
                          description: Authentication type for the MCP server. Sensitive values like tokens and headers are not returned.
                        scope:
                          type: string
                          enum:
                            - user
                            - team
                          description: The scope of the MCP server (user or team).
                        createdAt:
                          type: string
                          format: date-time
                          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          description: The ISO timestamp when the MCP server was created.
                        updatedAt:
                          description: The ISO timestamp when the MCP server was last updated.
                          type: string
                          format: date-time
                          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                      required:
                        - object
                        - id
                        - name
                        - url
                        - enabled
                        - auth
                        - scope
                        - createdAt
                      additionalProperties: false
                      description: Summary information about an MCP server.
                required:
                  - object
                  - data
                additionalProperties: false
                description: List of MCP servers for the authenticated user.
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      security:
        - apiKey: []
    post:
      summary: Create MCP Server
      description: Creates a new MCP server configuration for the authenticated user.
      operationId: mcpServers.create
      tags:
        - mcpServers
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                  description: The display name of the MCP server.
                url:
                  type: string
                  maxLength: 500
                  format: uri
                  description: The URL of the MCP server. Must be HTTPS in production.
                description:
                  description: An optional description of the MCP server.
                  type: string
                  maxLength: 500
                enabled:
                  default: true
                  description: Whether the MCP server is enabled. Defaults to true.
                  type: boolean
                auth:
                  default:
                    type: none
                  description: Authentication configuration. Defaults to no authentication.
                  anyOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          const: none
                          description: No authentication required.
                      required:
                        - type
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          type: string
                          const: bearer
                          description: Bearer token authentication.
                        token:
                          type: string
                          minLength: 1
                          maxLength: 1000
                          description: The bearer token for authentication.
                      required:
                        - type
                        - token
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          type: string
                          const: custom-headers
                          description: Custom headers authentication.
                        headers:
                          type: object
                          propertyNames:
                            type: string
                            maxLength: 100
                          additionalProperties:
                            type: string
                            maxLength: 500
                          description: Key-value pairs of custom headers to include in requests.
                      required:
                        - type
                        - headers
                      additionalProperties: false
                scope:
                  default: user
                  description: The scope of the MCP server. Defaults to user.
                  type: string
                  enum:
                    - user
                    - team
              required:
                - name
                - url
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: mcp_server
                    description: The object type.
                  id:
                    type: string
                    description: The unique identifier for the MCP server.
                  name:
                    type: string
                    description: The display name of the MCP server.
                  url:
                    type: string
                    format: uri
                    description: The URL of the MCP server.
                  description:
                    description: An optional description of the MCP server.
                    type: string
                  enabled:
                    type: boolean
                    description: Whether the MCP server is enabled for use in chats.
                  auth:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - none
                          - bearer
                          - custom-headers
                          - oauth
                        description: The type of authentication configured.
                    required:
                      - type
                    additionalProperties: false
                    description: Authentication type for the MCP server. Sensitive values like tokens and headers are not returned.
                  scope:
                    type: string
                    enum:
                      - user
                      - team
                    description: The scope of the MCP server (user or team).
                  createdAt:
                    type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                    description: The ISO timestamp when the MCP server was created.
                  updatedAt:
                    description: The ISO timestamp when the MCP server was last updated.
                    type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                required:
                  - object
                  - id
                  - name
                  - url
                  - enabled
                  - auth
                  - scope
                  - createdAt
                additionalProperties: false
                description: Summary information about an MCP server.
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      security:
        - apiKey: []
  /mcp-servers/{mcpServerId}:
    get:
      summary: Get MCP Server
      description: Retrieves the details of a specific MCP server by its ID.
      operationId: mcpServers.getById
      tags:
        - mcpServers
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: mcp_server
                    description: The object type.
                  id:
                    type: string
                    description: The unique identifier for the MCP server.
                  name:
                    type: string
                    description: The display name of the MCP server.
                  url:
                    type: string
                    format: uri
                    description: The URL of the MCP server.
                  description:
                    description: An optional description of the MCP server.
                    type: string
                  enabled:
                    type: boolean
                    description: Whether the MCP server is enabled for use in chats.
                  auth:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - none
                          - bearer
                          - custom-headers
                          - oauth
                        description: The type of authentication configured.
                    required:
                      - type
                    additionalProperties: false
                    description: Authentication type for the MCP server. Sensitive values like tokens and headers are not returned.
                  scope:
                    type: string
                    enum:
                      - user
                      - team
                    description: The scope of the MCP server (user or team).
                  createdAt:
                    type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                    description: The ISO timestamp when the MCP server was created.
                  updatedAt:
                    description: The ISO timestamp when the MCP server was last updated.
                    type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                required:
                  - object
                  - id
                  - name
                  - url
                  - enabled
                  - auth
                  - scope
                  - createdAt
                additionalProperties: false
                description: Summary information about an MCP server.
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: mcpServerId
          in: path
          required: true
          schema:
            type: string
          description: The ID of the MCP server to retrieve.
      security:
        - apiKey: []
    patch:
      summary: Update MCP Server
      description: Updates the configuration of an existing MCP server, including its name, URL, description, enabled status, and authentication settings.
      operationId: mcpServers.update
      tags:
        - mcpServers
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: The display name of the MCP server.
                  type: string
                  minLength: 1
                  maxLength: 100
                url:
                  description: The URL of the MCP server.
                  type: string
                  maxLength: 500
                  format: uri
                description:
                  description: An optional description of the MCP server.
                  type: string
                  maxLength: 500
                enabled:
                  description: Whether the MCP server is enabled.
                  type: boolean
                auth:
                  description: Authentication configuration.
                  anyOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          const: none
                          description: No authentication required.
                      required:
                        - type
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          type: string
                          const: bearer
                          description: Bearer token authentication.
                        token:
                          type: string
                          minLength: 1
                          maxLength: 1000
                          description: The bearer token for authentication.
                      required:
                        - type
                        - token
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          type: string
                          const: custom-headers
                          description: Custom headers authentication.
                        headers:
                          type: object
                          propertyNames:
                            type: string
                            maxLength: 100
                          additionalProperties:
                            type: string
                            maxLength: 500
                          description: Key-value pairs of custom headers to include in requests.
                      required:
                        - type
                        - headers
                      additionalProperties: false
                scope:
                  description: The scope of the MCP server.
                  type: string
                  enum:
                    - user
                    - team
              additionalProperties: false
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: mcp_server
                    description: The object type.
                  id:
                    type: string
                    description: The unique identifier for the MCP server.
                  name:
                    type: string
                    description: The display name of the MCP server.
                  url:
                    type: string
                    format: uri
                    description: The URL of the MCP server.
                  description:
                    description: An optional description of the MCP server.
                    type: string
                  enabled:
                    type: boolean
                    description: Whether the MCP server is enabled for use in chats.
                  auth:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - none
                          - bearer
                          - custom-headers
                          - oauth
                        description: The type of authentication configured.
                    required:
                      - type
                    additionalProperties: false
                    description: Authentication type for the MCP server. Sensitive values like tokens and headers are not returned.
                  scope:
                    type: string
                    enum:
                      - user
                      - team
                    description: The scope of the MCP server (user or team).
                  createdAt:
                    type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                    description: The ISO timestamp when the MCP server was created.
                  updatedAt:
                    description: The ISO timestamp when the MCP server was last updated.
                    type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                required:
                  - object
                  - id
                  - name
                  - url
                  - enabled
                  - auth
                  - scope
                  - createdAt
                additionalProperties: false
                description: Summary information about an MCP server.
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: mcpServerId
          in: path
          required: true
          schema:
            type: string
          description: The ID of the MCP server to update.
      security:
        - apiKey: []
    delete:
      summary: Delete MCP Server
      description: Deletes an MCP server based on its ID. This action is irreversible and will also remove any associated OAuth tokens.
      operationId: mcpServers.delete
      tags:
        - mcpServers
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: mcp_server
                  id:
                    type: string
                    description: The ID of the deleted MCP server.
                  deleted:
                    type: boolean
                    const: true
                    description: Indicates the server was deleted.
                required:
                  - object
                  - id
                  - deleted
                additionalProperties: false
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConflictError"
        "413":
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayloadTooLargeError"
        "422":
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnprocessableEntityError"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TooManyRequestsError"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InternalServerError"
      parameters:
        - name: mcpServerId
          in: path
          required: true
          schema:
            type: string
          description: The ID of the MCP server to delete.
      security:
        - apiKey: []
components:
  schemas:
    ChatDetail:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the chat.
        object:
          type: string
          const: chat
          description: Fixed value identifying this object as a chat.
        shareable:
          type: boolean
          description: Indicates whether the chat can be shared via public link.
        privacy:
          type: string
          enum:
            - public
            - private
            - team
            - team-edit
            - unlisted
          description: Defines the visibility of the chat—private, team-only, or public.
        name:
          description: An optional name assigned to the chat by the user.
          type: string
        title:
          type: string
          description: Deprecated title field preserved for backward compatibility.
          deprecated: true
        createdAt:
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: The ISO timestamp representing when the chat was created.
        updatedAt:
          description: The ISO timestamp of the last update to the chat.
          type: string
        favorite:
          type: boolean
          description: Indicates whether the chat is marked as a favorite.
        authorId:
          type: string
          description: The ID of the user who created the chat.
        projectId:
          description: Optional ID of the v0 project associated with this chat.
          type: string
        vercelProjectId:
          description: Optional ID of the linked Vercel project, if connected.
          type: string
        webUrl:
          type: string
          description: Web URL to view this chat in the browser.
        apiUrl:
          type: string
          description: API URL to access this chat via the API.
        latestVersion:
          description: Full details of the most recent generated version, if available.
          type: object
          properties:
            id:
              type: string
              description: A unique identifier for the version.
            object:
              type: string
              const: version
              description: Fixed value identifying this object as a version.
            status:
              type: string
              enum:
                - pending
                - completed
                - failed
              description: The current status of the version generation process.
            demoUrl:
              description: Optional URL for previewing the generated output.
              type: string
            screenshotUrl:
              type: string
              description: URL to retrieve a screenshot of this version.
            createdAt:
              type: string
              format: date-time
              pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              description: The date and time when the version was created, in ISO 8601 format.
            updatedAt:
              description: The date and time when the version was last updated, in ISO 8601 format.
              type: string
              format: date-time
              pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            files:
              type: array
              items:
                type: object
                properties:
                  object:
                    type: string
                    const: file
                    description: Fixed value identifying this object as a file.
                  name:
                    type: string
                    description: The name of the file, including its extension.
                  content:
                    type: string
                    description: The full contents of the file as a raw string.
                  locked:
                    type: boolean
                    description: Whether the file is locked to prevent AI from overwriting it during new version generation.
                required:
                  - object
                  - name
                  - content
                  - locked
                additionalProperties: false
                description: Detailed representation of a file, including its content and lock status.
              description: A list of files that were generated or included in this version.
          required:
            - id
            - object
            - status
            - createdAt
            - files
          additionalProperties: false
        url:
          type: string
          description: The canonical URL to access this chat.
          deprecated: true
        messages:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: A unique identifier for the message.
              object:
                type: string
                const: message
                description: Fixed value identifying this object as a message.
              content:
                type: string
                description: The main text content of the message.
              experimental_content:
                description: The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change.
                type: array
                items:
                  anyOf:
                    - type: array
                      prefixItems:
                        - type: number
                          const: 0
                        - type: array
                          items: {}
                      description: AST content section containing parsed markdown/MDX nodes
                    - type: array
                      prefixItems:
                        - type: number
                          const: 1
                        - type: object
                          properties:
                            toJSONSchema:
                              type: string
                            def:
                              type: string
                            type:
                              type: string
                            check:
                              type: string
                            with:
                              type: string
                            clone:
                              type: string
                            brand:
                              type: string
                            register:
                              type: string
                            parse:
                              type: string
                            safeParse:
                              type: string
                            parseAsync:
                              type: string
                            safeParseAsync:
                              type: string
                            spa:
                              type: string
                            encode:
                              type: string
                            decode:
                              type: string
                            encodeAsync:
                              type: string
                            decodeAsync:
                              type: string
                            safeEncode:
                              type: string
                            safeDecode:
                              type: string
                            safeEncodeAsync:
                              type: string
                            safeDecodeAsync:
                              type: string
                            refine:
                              type: string
                            superRefine:
                              type: string
                            overwrite:
                              type: string
                            optional:
                              type: string
                            exactOptional:
                              type: string
                            nullable:
                              type: string
                            nullish:
                              type: string
                            nonoptional:
                              type: string
                            array:
                              type: string
                            or:
                              type: string
                            and:
                              type: string
                            transform:
                              type: string
                            default:
                              type: string
                            prefault:
                              type: string
                            catch:
                              type: string
                            pipe:
                              type: string
                            readonly:
                              type: string
                            describe:
                              type: string
                            meta:
                              type: string
                            isOptional:
                              type: string
                            isNullable:
                              type: string
                            apply:
                              type: string
                            keyof:
                              type: string
                            catchall:
                              type: string
                            passthrough:
                              type: string
                            loose:
                              type: string
                            strict:
                              type: string
                            strip:
                              type: string
                            extend:
                              type: string
                            safeExtend:
                              type: string
                            merge:
                              type: string
                            pick:
                              type: string
                            omit:
                              type: string
                            partial:
                              type: string
                            required:
                              type: string
                          required:
                            - toJSONSchema
                            - def
                            - type
                            - check
                            - with
                            - clone
                            - brand
                            - register
                            - parse
                            - safeParse
                            - parseAsync
                            - safeParseAsync
                            - spa
                            - encode
                            - decode
                            - encodeAsync
                            - decodeAsync
                            - safeEncode
                            - safeDecode
                            - safeEncodeAsync
                            - safeDecodeAsync
                            - refine
                            - superRefine
                            - overwrite
                            - optional
                            - exactOptional
                            - nullable
                            - nullish
                            - nonoptional
                            - array
                            - or
                            - and
                            - transform
                            - default
                            - prefault
                            - catch
                            - pipe
                            - readonly
                            - describe
                            - meta
                            - isOptional
                            - isNullable
                            - apply
                            - keyof
                            - catchall
                            - passthrough
                            - loose
                            - strict
                            - strip
                            - extend
                            - safeExtend
                            - merge
                            - pick
                            - omit
                            - partial
                            - required
                          additionalProperties: false
                      description: Metadata section containing title and other properties
              createdAt:
                type: string
                description: The ISO timestamp representing when the message was created.
              updatedAt:
                description: The ISO timestamp representing when the message was last updated.
                type: string
                format: date-time
                pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              type:
                type: string
                enum:
                  - message
                  - forked-block
                  - forked-chat
                  - open-in-v0
                  - refinement
                  - added-environment-variables
                  - added-integration
                  - deleted-file
                  - moved-file
                  - renamed-file
                  - edited-file
                  - replace-src
                  - reverted-block
                  - fix-with-v0
                  - auto-fix-with-v0
                  - sync-git
                  - pull-changes
                  - fix-cve
                  - answered-questions
                  - cloned-repo
                  - manual-commit
                  - design-mode
                description: Indicates the format or category of the message, such as plain text or code.
              role:
                type: string
                enum:
                  - user
                  - assistant
                description: Specifies whether the message was sent by the user or the assistant.
              finishReason:
                description: The reason why the message generation finished.
                type: string
                enum:
                  - stop
                  - length
                  - content-filter
                  - tool-calls
                  - error
                  - other
              apiUrl:
                type: string
                description: API URL to access this message via the API.
              authorId:
                description: The ID of the user who sent the message.
                type:
                  - string
                  - "null"
              parentId:
                description: The ID of the parent message.
                type:
                  - string
                  - "null"
              attachments:
                type: array
                items:
                  type: object
                  properties:
                    url:
                      type: string
                      description: The URL where the attachment file can be accessed.
                    name:
                      description: The original filename of the attachment.
                      type: string
                    contentType:
                      description: The MIME type of the attachment file (e.g., image/png, application/pdf).
                      type: string
                    size:
                      type: number
                      description: The size of the attachment file in bytes.
                    content:
                      description: The base64-encoded content of the attachment file, if available.
                      type: string
                    type:
                      description: Optional v0-specific attachment type for enhanced processing.
                      type: string
                      enum:
                        - screenshot
                        - figma
                        - zip
                  required:
                    - url
                    - size
                  additionalProperties: false
            required:
              - id
              - object
              - content
              - createdAt
              - type
              - role
              - apiUrl
              - authorId
            additionalProperties: false
            description: Summary of a single message within a chat, including role, content, type, timestamp, and API URL.
          description: All messages exchanged in the chat, including user and assistant entries.
        files:
          description: Optional array of files associated with the chat context.
          type: array
          items:
            type: object
            properties:
              lang:
                type: string
                description: Programming language used in the file (e.g., JavaScript, Python).
              meta:
                type: object
                propertyNames:
                  type: string
                additionalProperties:
                  type: string
                description: A key-value map of metadata associated with the file (e.g., path, type).
              source:
                type: string
                description: The origin or identifier of the file source (e.g., path or upload label).
            required:
              - lang
              - meta
              - source
            additionalProperties: false
        demo:
          type: string
          description: Deprecated demo URL used for previewing the chat result.
          deprecated: true
        text:
          type: string
          description: The main user prompt or instruction that started the chat.
        modelConfiguration:
          type: object
          properties:
            modelId:
              default: v0-pro
              description: Model to use for the generation.
              type: string
              enum:
                - v0-auto
                - v0-opus-4.7
                - v0-mini
                - v0-pro
                - v0-max
                - v0-max-fast
            imageGenerations:
              default: false
              type: boolean
              description: Enables image generations to generate up to 5 images per version.
            thinking:
              default: false
              type: boolean
              description: Enables thinking to generate a response in multiple steps.
          additionalProperties: false
          description: The configuration used to generate responses in this chat.
        permissions:
          type: object
          properties:
            write:
              type: boolean
              description: If true, the user has write access to the chat.
          required:
            - write
          additionalProperties: false
        metadata:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: string
          description: Arbitrary key-value data associated with this chat.
      required:
        - id
        - object
        - shareable
        - privacy
        - createdAt
        - favorite
        - authorId
        - webUrl
        - apiUrl
        - url
        - messages
        - text
        - permissions
        - metadata
      additionalProperties: false
      description: Detailed representation of a chat, including its messages, files, versions, and model configuration.
    ChatSummary:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the chat.
        object:
          type: string
          const: chat
          description: Fixed value identifying this object as a chat.
        shareable:
          type: boolean
          description: Indicates whether the chat can be shared via public link.
        privacy:
          type: string
          enum:
            - public
            - private
            - team
            - team-edit
            - unlisted
          description: Defines the visibility of the chat—private, team-only, or public.
        name:
          description: An optional name assigned to the chat by the user.
          type: string
        title:
          type: string
          description: Deprecated title field preserved for backward compatibility.
          deprecated: true
        createdAt:
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: The ISO timestamp representing when the chat was created.
        updatedAt:
          description: The ISO timestamp of the last update to the chat.
          type: string
        favorite:
          type: boolean
          description: Indicates whether the chat is marked as a favorite.
        authorId:
          type: string
          description: The ID of the user who created the chat.
        projectId:
          description: Optional ID of the v0 project associated with this chat.
          type: string
        vercelProjectId:
          description: Optional ID of the linked Vercel project, if connected.
          type: string
        webUrl:
          type: string
          description: Web URL to view this chat in the browser.
        apiUrl:
          type: string
          description: API URL to access this chat via the API.
        latestVersion:
          description: The most recent generated version of the chat, if available.
          type: object
          properties:
            id:
              type: string
              description: A unique identifier for the version.
            object:
              type: string
              const: version
              description: Fixed value identifying this object as a version.
            status:
              type: string
              enum:
                - pending
                - completed
                - failed
              description: The current status of the version generation process.
            demoUrl:
              description: Optional URL for previewing the generated output.
              type: string
            screenshotUrl:
              type: string
              description: URL to retrieve a screenshot of this version.
            createdAt:
              type: string
              format: date-time
              pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              description: The date and time when the version was created, in ISO 8601 format.
            updatedAt:
              description: The date and time when the version was last updated, in ISO 8601 format.
              type: string
              format: date-time
              pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          required:
            - id
            - object
            - status
            - createdAt
          additionalProperties: false
      required:
        - id
        - object
        - shareable
        - privacy
        - createdAt
        - favorite
        - authorId
        - webUrl
        - apiUrl
      additionalProperties: false
      description: Summary of a chat, including metadata like privacy, author, latest version, and URLs.
    DeploymentDetail:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the deployment.
        object:
          type: string
          const: deployment
          description: Fixed value identifying this object as a deployment.
        inspectorUrl:
          type: string
          description: URL to the deployment inspector.
        chatId:
          type: string
          description: The ID of the chat that this deployment is scoped to.
        projectId:
          description: The ID of the project that this deployment is scoped to.
          type: string
        versionId:
          type: string
          description: The ID of the version that this deployment is scoped to.
        apiUrl:
          type: string
          format: uri
          description: The API endpoint URL for accessing this deployment programmatically.
        webUrl:
          type: string
          format: uri
          description: The web URL where the deployment can be viewed or managed.
      required:
        - id
        - object
        - inspectorUrl
        - chatId
        - versionId
        - apiUrl
        - webUrl
      additionalProperties: false
    DeploymentSummary:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the deployment.
        object:
          type: string
          const: deployment
          description: Fixed value identifying this object as a deployment.
        inspectorUrl:
          type: string
          description: URL to the deployment inspector.
        chatId:
          type: string
          description: The ID of the chat that this deployment is scoped to.
        projectId:
          description: The ID of the project that this deployment is scoped to.
          type: string
        versionId:
          type: string
          description: The ID of the version that this deployment is scoped to.
        apiUrl:
          type: string
          format: uri
          description: The API endpoint URL for accessing this deployment programmatically.
        webUrl:
          type: string
          format: uri
          description: The web URL where the deployment can be viewed or managed.
      required:
        - id
        - object
        - inspectorUrl
        - chatId
        - versionId
        - apiUrl
        - webUrl
      additionalProperties: false
    EnvironmentVariableDetailSchema:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the environment variable.
        object:
          type: string
          const: environment_variable
          description: The object type.
        key:
          type: string
          description: The name of the environment variable.
        value:
          type: string
          description: The value of the environment variable.
        decrypted:
          type: boolean
          description: Whether the value is decrypted or encrypted.
        createdAt:
          type: number
          description: The timestamp when the environment variable was created.
        updatedAt:
          description: The timestamp when the environment variable was last updated.
          type: number
      required:
        - id
        - object
        - key
        - value
        - decrypted
        - createdAt
      additionalProperties: false
      description: Detailed information for an environment variable including its value.
    EnvironmentVariableSummarySchema:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the environment variable.
        object:
          type: string
          const: environment_variable
          description: The object type.
        key:
          type: string
          description: The name of the environment variable.
        value:
          type: string
          description: The value of the environment variable.
        decrypted:
          type: boolean
          description: Whether the value is decrypted or encrypted.
        createdAt:
          type: number
          description: The timestamp when the environment variable was created.
        updatedAt:
          description: The timestamp when the environment variable was last updated.
          type: number
      required:
        - id
        - object
        - key
        - value
        - decrypted
        - createdAt
      additionalProperties: false
      description: Summary information for an environment variable.
    EnvironmentVariablesListSchema:
      type: object
      properties:
        object:
          type: string
          const: list
          description: Fixed value identifying this as a list response.
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: A unique identifier for the environment variable.
              object:
                type: string
                const: environment_variable
                description: The object type.
              key:
                type: string
                description: The name of the environment variable.
              value:
                type: string
                description: The value of the environment variable.
              decrypted:
                type: boolean
                description: Whether the value is decrypted or encrypted.
              createdAt:
                type: number
                description: The timestamp when the environment variable was created.
              updatedAt:
                description: The timestamp when the environment variable was last updated.
                type: number
            required:
              - id
              - object
              - key
              - value
              - decrypted
              - createdAt
            additionalProperties: false
            description: Detailed information for an environment variable including its value.
          description: Array of environment variable details.
      required:
        - object
        - data
      additionalProperties: false
      description: List response containing environment variables.
    FileDetail:
      type: object
      properties:
        object:
          type: string
          const: file
          description: Fixed value identifying this object as a file.
        name:
          type: string
          description: The name of the file, including its extension.
        content:
          type: string
          description: The full contents of the file as a raw string.
        locked:
          type: boolean
          description: Whether the file is locked to prevent AI from overwriting it during new version generation.
      required:
        - object
        - name
        - content
        - locked
      additionalProperties: false
      description: Detailed representation of a file, including its content and lock status.
    FileSummary:
      type: object
      properties:
        object:
          type: string
          const: file
          description: Fixed value identifying this object as a file.
        name:
          type: string
          description: The name of the file, including its extension.
      required:
        - object
        - name
      additionalProperties: false
      description: Basic metadata about a file, such as its type and name.
    HookDetail:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the webhook.
        object:
          type: string
          const: hook
          description: Fixed value identifying this object as a webhook.
        name:
          type: string
          description: A user-defined name to label the webhook.
        events:
          type: array
          items:
            type: string
            enum:
              - chat.created
              - chat.updated
              - chat.deleted
              - message.created
              - message.updated
              - message.deleted
              - message.finished
          description: List of event types this webhook is subscribed to.
        chatId:
          description: Optional ID of the chat that this webhook is scoped to.
          type: string
        url:
          type: string
          description: Target URL that receives event payloads for this webhook.
      required:
        - id
        - object
        - name
        - events
        - url
      additionalProperties: false
      description: Full configuration details for a webhook, including its scope and subscription.
    HookEventDetail:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the webhook event log entry.
        object:
          type: string
          const: hook_event
          description: Fixed value identifying this object as a webhook event.
        event:
          type: string
          enum:
            - chat.created
            - chat.updated
            - chat.deleted
            - message.created
            - message.updated
            - message.deleted
            - message.finished
          description: The type of event that triggered the webhook.
        status:
          default: pending
          description: The delivery status of the webhook (e.g., delivered, failed).
          type: string
          enum:
            - pending
            - success
            - error
        createdAt:
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: Timestamp of when the webhook event was triggered.
      required:
        - id
        - object
        - event
        - createdAt
      additionalProperties: false
      description: Detailed record of a webhook event, including its type, status, and timestamp.
    HookSummary:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the webhook.
        object:
          type: string
          const: hook
          description: Fixed value identifying this object as a webhook.
        name:
          type: string
          description: A user-defined name to label the webhook.
      required:
        - id
        - object
        - name
      additionalProperties: false
      description: Summary of a webhook, including its ID and display name.
    IntegrationConnectionDetailSchema:
      type: object
      properties:
        object:
          type: string
          const: integration_connection
          description: The object type.
        id:
          type: string
          description: "The unique ID of the integration connection (format: {projectId}_{integrationId})."
        connected:
          type: boolean
          description: Whether the integration is connected to the project.
        integration:
          type: object
          properties:
            id:
              type: string
              description: The ID of the integration.
            object:
              type: string
              const: integration
              description: The object type.
            slug:
              type: string
              description: The slug of the integration.
            name:
              type: string
              description: The name of the integration.
          required:
            - id
            - object
            - slug
            - name
          additionalProperties: false
          description: Information about the connected integration.
        metadata:
          description: Additional metadata about the integration connection.
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      required:
        - object
        - id
        - connected
        - integration
      additionalProperties: false
      description: Detailed information about an integration connection to a project.
    IntegrationConnectionListSchema:
      type: object
      properties:
        object:
          type: string
          const: list
          description: Fixed value identifying this as a list response.
        data:
          type: array
          items:
            type: object
            properties:
              object:
                type: string
                const: integration_connection
                description: The object type.
              id:
                type: string
                description: "The unique ID of the integration connection (format: {projectId}_{integrationId})."
              connected:
                type: boolean
                description: Whether the integration is connected to the project.
              integration:
                type: object
                properties:
                  id:
                    type: string
                    description: The ID of the integration.
                  object:
                    type: string
                    const: integration
                    description: The object type.
                  slug:
                    type: string
                    description: The slug of the integration.
                  name:
                    type: string
                    description: The name of the integration.
                required:
                  - id
                  - object
                  - slug
                  - name
                additionalProperties: false
                description: Information about the connected integration.
            required:
              - object
              - id
              - connected
              - integration
            additionalProperties: false
            description: Summary information about an integration connection to a project.
          description: Array of integration connection summaries.
      required:
        - object
        - data
      additionalProperties: false
      description: List response containing integration connections.
    IntegrationConnectionSummarySchema:
      type: object
      properties:
        object:
          type: string
          const: integration_connection
          description: The object type.
        id:
          type: string
          description: "The unique ID of the integration connection (format: {projectId}_{integrationId})."
        connected:
          type: boolean
          description: Whether the integration is connected to the project.
        integration:
          type: object
          properties:
            id:
              type: string
              description: The ID of the integration.
            object:
              type: string
              const: integration
              description: The object type.
            slug:
              type: string
              description: The slug of the integration.
            name:
              type: string
              description: The name of the integration.
          required:
            - id
            - object
            - slug
            - name
          additionalProperties: false
          description: Information about the connected integration.
      required:
        - object
        - id
        - connected
        - integration
      additionalProperties: false
      description: Summary information about an integration connection to a project.
    IntegrationDetailSchema:
      type: object
      properties:
        id:
          type: string
          description: The ID of the integration.
        object:
          type: string
          const: integration
          description: The object type.
        slug:
          type: string
          description: The slug of the integration.
        name:
          type: string
          description: The name of the integration.
        description:
          type: string
          description: A short description of the integration.
        iconUrl:
          type: string
          description: URL to the integration icon.
      required:
        - id
        - object
        - slug
        - name
        - description
        - iconUrl
      additionalProperties: false
      description: Detailed information about an integration.
    IntegrationListSchema:
      type: object
      properties:
        object:
          type: string
          const: list
          description: Fixed value identifying this as a list response.
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: The ID of the integration.
              object:
                type: string
                const: integration
                description: The object type.
              slug:
                type: string
                description: The slug of the integration.
              name:
                type: string
                description: The name of the integration.
              description:
                type: string
                description: A short description of the integration.
              iconUrl:
                type: string
                description: URL to the integration icon.
            required:
              - id
              - object
              - slug
              - name
              - description
              - iconUrl
            additionalProperties: false
            description: Detailed information about an integration.
          description: Array of integration details.
      required:
        - object
        - data
      additionalProperties: false
      description: List of available integrations.
    IntegrationSummarySchema:
      type: object
      properties:
        id:
          type: string
          description: The ID of the integration.
        object:
          type: string
          const: integration
          description: The object type.
        slug:
          type: string
          description: The slug of the integration.
        name:
          type: string
          description: The name of the integration.
      required:
        - id
        - object
        - slug
        - name
      additionalProperties: false
      description: Basic information about an integration.
    MessageDetail:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the message.
        object:
          type: string
          const: message
          description: Fixed value identifying this object as a message.
        content:
          type: string
          description: The main text content of the message.
        experimental_content:
          description: The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change.
          type: array
          items:
            anyOf:
              - type: array
                prefixItems:
                  - type: number
                    const: 0
                  - type: array
                    items: {}
                description: AST content section containing parsed markdown/MDX nodes
              - type: array
                prefixItems:
                  - type: number
                    const: 1
                  - type: object
                    properties:
                      toJSONSchema:
                        type: string
                      def:
                        type: string
                      type:
                        type: string
                      check:
                        type: string
                      with:
                        type: string
                      clone:
                        type: string
                      brand:
                        type: string
                      register:
                        type: string
                      parse:
                        type: string
                      safeParse:
                        type: string
                      parseAsync:
                        type: string
                      safeParseAsync:
                        type: string
                      spa:
                        type: string
                      encode:
                        type: string
                      decode:
                        type: string
                      encodeAsync:
                        type: string
                      decodeAsync:
                        type: string
                      safeEncode:
                        type: string
                      safeDecode:
                        type: string
                      safeEncodeAsync:
                        type: string
                      safeDecodeAsync:
                        type: string
                      refine:
                        type: string
                      superRefine:
                        type: string
                      overwrite:
                        type: string
                      optional:
                        type: string
                      exactOptional:
                        type: string
                      nullable:
                        type: string
                      nullish:
                        type: string
                      nonoptional:
                        type: string
                      array:
                        type: string
                      or:
                        type: string
                      and:
                        type: string
                      transform:
                        type: string
                      default:
                        type: string
                      prefault:
                        type: string
                      catch:
                        type: string
                      pipe:
                        type: string
                      readonly:
                        type: string
                      describe:
                        type: string
                      meta:
                        type: string
                      isOptional:
                        type: string
                      isNullable:
                        type: string
                      apply:
                        type: string
                      keyof:
                        type: string
                      catchall:
                        type: string
                      passthrough:
                        type: string
                      loose:
                        type: string
                      strict:
                        type: string
                      strip:
                        type: string
                      extend:
                        type: string
                      safeExtend:
                        type: string
                      merge:
                        type: string
                      pick:
                        type: string
                      omit:
                        type: string
                      partial:
                        type: string
                      required:
                        type: string
                    required:
                      - toJSONSchema
                      - def
                      - type
                      - check
                      - with
                      - clone
                      - brand
                      - register
                      - parse
                      - safeParse
                      - parseAsync
                      - safeParseAsync
                      - spa
                      - encode
                      - decode
                      - encodeAsync
                      - decodeAsync
                      - safeEncode
                      - safeDecode
                      - safeEncodeAsync
                      - safeDecodeAsync
                      - refine
                      - superRefine
                      - overwrite
                      - optional
                      - exactOptional
                      - nullable
                      - nullish
                      - nonoptional
                      - array
                      - or
                      - and
                      - transform
                      - default
                      - prefault
                      - catch
                      - pipe
                      - readonly
                      - describe
                      - meta
                      - isOptional
                      - isNullable
                      - apply
                      - keyof
                      - catchall
                      - passthrough
                      - loose
                      - strict
                      - strip
                      - extend
                      - safeExtend
                      - merge
                      - pick
                      - omit
                      - partial
                      - required
                    additionalProperties: false
                description: Metadata section containing title and other properties
        createdAt:
          type: string
          description: The ISO timestamp representing when the message was created.
        updatedAt:
          description: The ISO timestamp representing when the message was last updated.
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        type:
          type: string
          enum:
            - message
            - forked-block
            - forked-chat
            - open-in-v0
            - refinement
            - added-environment-variables
            - added-integration
            - deleted-file
            - moved-file
            - renamed-file
            - edited-file
            - replace-src
            - reverted-block
            - fix-with-v0
            - auto-fix-with-v0
            - sync-git
            - pull-changes
            - fix-cve
            - answered-questions
            - cloned-repo
            - manual-commit
            - design-mode
          description: Indicates the format or category of the message, such as plain text or code.
        role:
          type: string
          enum:
            - user
            - assistant
          description: Specifies whether the message was sent by the user or the assistant.
        finishReason:
          description: The reason why the message generation finished.
          type: string
          enum:
            - stop
            - length
            - content-filter
            - tool-calls
            - error
            - other
        apiUrl:
          type: string
          description: API URL to access this message via the API.
        authorId:
          description: The ID of the user who sent the message.
          type:
            - string
            - "null"
        parentId:
          description: The ID of the parent message.
          type:
            - string
            - "null"
        attachments:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
                description: The URL where the attachment file can be accessed.
              name:
                description: The original filename of the attachment.
                type: string
              contentType:
                description: The MIME type of the attachment file (e.g., image/png, application/pdf).
                type: string
              size:
                type: number
                description: The size of the attachment file in bytes.
              content:
                description: The base64-encoded content of the attachment file, if available.
                type: string
              type:
                description: Optional v0-specific attachment type for enhanced processing.
                type: string
                enum:
                  - screenshot
                  - figma
                  - zip
            required:
              - url
              - size
            additionalProperties: false
        chatId:
          type: string
          description: The ID of the chat to which this message belongs.
      required:
        - id
        - object
        - content
        - createdAt
        - type
        - role
        - apiUrl
        - authorId
        - chatId
      additionalProperties: false
      description: Detailed message object extending MessageSummary with chat metadata.
    MessageSummary:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the message.
        object:
          type: string
          const: message
          description: Fixed value identifying this object as a message.
        content:
          type: string
          description: The main text content of the message.
        experimental_content:
          description: The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change.
          type: array
          items:
            anyOf:
              - type: array
                prefixItems:
                  - type: number
                    const: 0
                  - type: array
                    items: {}
                description: AST content section containing parsed markdown/MDX nodes
              - type: array
                prefixItems:
                  - type: number
                    const: 1
                  - type: object
                    properties:
                      toJSONSchema:
                        type: string
                      def:
                        type: string
                      type:
                        type: string
                      check:
                        type: string
                      with:
                        type: string
                      clone:
                        type: string
                      brand:
                        type: string
                      register:
                        type: string
                      parse:
                        type: string
                      safeParse:
                        type: string
                      parseAsync:
                        type: string
                      safeParseAsync:
                        type: string
                      spa:
                        type: string
                      encode:
                        type: string
                      decode:
                        type: string
                      encodeAsync:
                        type: string
                      decodeAsync:
                        type: string
                      safeEncode:
                        type: string
                      safeDecode:
                        type: string
                      safeEncodeAsync:
                        type: string
                      safeDecodeAsync:
                        type: string
                      refine:
                        type: string
                      superRefine:
                        type: string
                      overwrite:
                        type: string
                      optional:
                        type: string
                      exactOptional:
                        type: string
                      nullable:
                        type: string
                      nullish:
                        type: string
                      nonoptional:
                        type: string
                      array:
                        type: string
                      or:
                        type: string
                      and:
                        type: string
                      transform:
                        type: string
                      default:
                        type: string
                      prefault:
                        type: string
                      catch:
                        type: string
                      pipe:
                        type: string
                      readonly:
                        type: string
                      describe:
                        type: string
                      meta:
                        type: string
                      isOptional:
                        type: string
                      isNullable:
                        type: string
                      apply:
                        type: string
                      keyof:
                        type: string
                      catchall:
                        type: string
                      passthrough:
                        type: string
                      loose:
                        type: string
                      strict:
                        type: string
                      strip:
                        type: string
                      extend:
                        type: string
                      safeExtend:
                        type: string
                      merge:
                        type: string
                      pick:
                        type: string
                      omit:
                        type: string
                      partial:
                        type: string
                      required:
                        type: string
                    required:
                      - toJSONSchema
                      - def
                      - type
                      - check
                      - with
                      - clone
                      - brand
                      - register
                      - parse
                      - safeParse
                      - parseAsync
                      - safeParseAsync
                      - spa
                      - encode
                      - decode
                      - encodeAsync
                      - decodeAsync
                      - safeEncode
                      - safeDecode
                      - safeEncodeAsync
                      - safeDecodeAsync
                      - refine
                      - superRefine
                      - overwrite
                      - optional
                      - exactOptional
                      - nullable
                      - nullish
                      - nonoptional
                      - array
                      - or
                      - and
                      - transform
                      - default
                      - prefault
                      - catch
                      - pipe
                      - readonly
                      - describe
                      - meta
                      - isOptional
                      - isNullable
                      - apply
                      - keyof
                      - catchall
                      - passthrough
                      - loose
                      - strict
                      - strip
                      - extend
                      - safeExtend
                      - merge
                      - pick
                      - omit
                      - partial
                      - required
                    additionalProperties: false
                description: Metadata section containing title and other properties
        createdAt:
          type: string
          description: The ISO timestamp representing when the message was created.
        updatedAt:
          description: The ISO timestamp representing when the message was last updated.
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        type:
          type: string
          enum:
            - message
            - forked-block
            - forked-chat
            - open-in-v0
            - refinement
            - added-environment-variables
            - added-integration
            - deleted-file
            - moved-file
            - renamed-file
            - edited-file
            - replace-src
            - reverted-block
            - fix-with-v0
            - auto-fix-with-v0
            - sync-git
            - pull-changes
            - fix-cve
            - answered-questions
            - cloned-repo
            - manual-commit
            - design-mode
          description: Indicates the format or category of the message, such as plain text or code.
        role:
          type: string
          enum:
            - user
            - assistant
          description: Specifies whether the message was sent by the user or the assistant.
        finishReason:
          description: The reason why the message generation finished.
          type: string
          enum:
            - stop
            - length
            - content-filter
            - tool-calls
            - error
            - other
        apiUrl:
          type: string
          description: API URL to access this message via the API.
        authorId:
          description: The ID of the user who sent the message.
          type:
            - string
            - "null"
        parentId:
          description: The ID of the parent message.
          type:
            - string
            - "null"
        attachments:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
                description: The URL where the attachment file can be accessed.
              name:
                description: The original filename of the attachment.
                type: string
              contentType:
                description: The MIME type of the attachment file (e.g., image/png, application/pdf).
                type: string
              size:
                type: number
                description: The size of the attachment file in bytes.
              content:
                description: The base64-encoded content of the attachment file, if available.
                type: string
              type:
                description: Optional v0-specific attachment type for enhanced processing.
                type: string
                enum:
                  - screenshot
                  - figma
                  - zip
            required:
              - url
              - size
            additionalProperties: false
      required:
        - id
        - object
        - content
        - createdAt
        - type
        - role
        - apiUrl
        - authorId
      additionalProperties: false
      description: Summary of a single message within a chat, including role, content, type, timestamp, and API URL.
    MessageSummaryList:
      type: object
      properties:
        object:
          type: string
          const: list
          description: Fixed value identifying this as a list response.
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: A unique identifier for the message.
              object:
                type: string
                const: message
                description: Fixed value identifying this object as a message.
              content:
                type: string
                description: The main text content of the message.
              experimental_content:
                description: The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change.
                type: array
                items:
                  anyOf:
                    - type: array
                      prefixItems:
                        - type: number
                          const: 0
                        - type: array
                          items: {}
                      description: AST content section containing parsed markdown/MDX nodes
                    - type: array
                      prefixItems:
                        - type: number
                          const: 1
                        - type: object
                          properties:
                            toJSONSchema:
                              type: string
                            def:
                              type: string
                            type:
                              type: string
                            check:
                              type: string
                            with:
                              type: string
                            clone:
                              type: string
                            brand:
                              type: string
                            register:
                              type: string
                            parse:
                              type: string
                            safeParse:
                              type: string
                            parseAsync:
                              type: string
                            safeParseAsync:
                              type: string
                            spa:
                              type: string
                            encode:
                              type: string
                            decode:
                              type: string
                            encodeAsync:
                              type: string
                            decodeAsync:
                              type: string
                            safeEncode:
                              type: string
                            safeDecode:
                              type: string
                            safeEncodeAsync:
                              type: string
                            safeDecodeAsync:
                              type: string
                            refine:
                              type: string
                            superRefine:
                              type: string
                            overwrite:
                              type: string
                            optional:
                              type: string
                            exactOptional:
                              type: string
                            nullable:
                              type: string
                            nullish:
                              type: string
                            nonoptional:
                              type: string
                            array:
                              type: string
                            or:
                              type: string
                            and:
                              type: string
                            transform:
                              type: string
                            default:
                              type: string
                            prefault:
                              type: string
                            catch:
                              type: string
                            pipe:
                              type: string
                            readonly:
                              type: string
                            describe:
                              type: string
                            meta:
                              type: string
                            isOptional:
                              type: string
                            isNullable:
                              type: string
                            apply:
                              type: string
                            keyof:
                              type: string
                            catchall:
                              type: string
                            passthrough:
                              type: string
                            loose:
                              type: string
                            strict:
                              type: string
                            strip:
                              type: string
                            extend:
                              type: string
                            safeExtend:
                              type: string
                            merge:
                              type: string
                            pick:
                              type: string
                            omit:
                              type: string
                            partial:
                              type: string
                            required:
                              type: string
                          required:
                            - toJSONSchema
                            - def
                            - type
                            - check
                            - with
                            - clone
                            - brand
                            - register
                            - parse
                            - safeParse
                            - parseAsync
                            - safeParseAsync
                            - spa
                            - encode
                            - decode
                            - encodeAsync
                            - decodeAsync
                            - safeEncode
                            - safeDecode
                            - safeEncodeAsync
                            - safeDecodeAsync
                            - refine
                            - superRefine
                            - overwrite
                            - optional
                            - exactOptional
                            - nullable
                            - nullish
                            - nonoptional
                            - array
                            - or
                            - and
                            - transform
                            - default
                            - prefault
                            - catch
                            - pipe
                            - readonly
                            - describe
                            - meta
                            - isOptional
                            - isNullable
                            - apply
                            - keyof
                            - catchall
                            - passthrough
                            - loose
                            - strict
                            - strip
                            - extend
                            - safeExtend
                            - merge
                            - pick
                            - omit
                            - partial
                            - required
                          additionalProperties: false
                      description: Metadata section containing title and other properties
              createdAt:
                type: string
                description: The ISO timestamp representing when the message was created.
              updatedAt:
                description: The ISO timestamp representing when the message was last updated.
                type: string
                format: date-time
                pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              type:
                type: string
                enum:
                  - message
                  - forked-block
                  - forked-chat
                  - open-in-v0
                  - refinement
                  - added-environment-variables
                  - added-integration
                  - deleted-file
                  - moved-file
                  - renamed-file
                  - edited-file
                  - replace-src
                  - reverted-block
                  - fix-with-v0
                  - auto-fix-with-v0
                  - sync-git
                  - pull-changes
                  - fix-cve
                  - answered-questions
                  - cloned-repo
                  - manual-commit
                  - design-mode
                description: Indicates the format or category of the message, such as plain text or code.
              role:
                type: string
                enum:
                  - user
                  - assistant
                description: Specifies whether the message was sent by the user or the assistant.
              finishReason:
                description: The reason why the message generation finished.
                type: string
                enum:
                  - stop
                  - length
                  - content-filter
                  - tool-calls
                  - error
                  - other
              apiUrl:
                type: string
                description: API URL to access this message via the API.
              authorId:
                description: The ID of the user who sent the message.
                type:
                  - string
                  - "null"
              parentId:
                description: The ID of the parent message.
                type:
                  - string
                  - "null"
              attachments:
                type: array
                items:
                  type: object
                  properties:
                    url:
                      type: string
                      description: The URL where the attachment file can be accessed.
                    name:
                      description: The original filename of the attachment.
                      type: string
                    contentType:
                      description: The MIME type of the attachment file (e.g., image/png, application/pdf).
                      type: string
                    size:
                      type: number
                      description: The size of the attachment file in bytes.
                    content:
                      description: The base64-encoded content of the attachment file, if available.
                      type: string
                    type:
                      description: Optional v0-specific attachment type for enhanced processing.
                      type: string
                      enum:
                        - screenshot
                        - figma
                        - zip
                  required:
                    - url
                    - size
                  additionalProperties: false
            required:
              - id
              - object
              - content
              - createdAt
              - type
              - role
              - apiUrl
              - authorId
            additionalProperties: false
            description: Summary of a single message within a chat, including role, content, type, timestamp, and API URL.
          description: Array of message summaries in this page of results.
        pagination:
          type: object
          properties:
            hasMore:
              type: boolean
              description: Indicates if there are more results available beyond this page.
            nextCursor:
              description: Cursor for fetching the next page of results.
              type: string
            nextUrl:
              description: API URL for retrieving the next page of results.
              type: string
          required:
            - hasMore
          additionalProperties: false
          description: Pagination metadata for navigating through multiple pages of results.
      required:
        - object
        - data
        - pagination
      additionalProperties: false
      description: List response containing multiple message summaries with cursor-based pagination.
    NotificationPreferenceSchema:
      type: object
      properties:
        liveActivity:
          type: boolean
          description: Whether the user wants to receive live activities.
        pushNotifications:
          type: boolean
          description: Whether the user wants to receive push notifications.
      required:
        - liveActivity
        - pushNotifications
      additionalProperties: false
      description: User preference for notification delivery methods.
    ProductDetailSchema:
      type: object
      properties:
        object:
          type: string
          const: product
          description: The object type.
        id:
          type: string
          description: The unique ID of the product.
        slug:
          type: string
          description: The URL-friendly slug of the product.
        name:
          type: string
          description: The name of the product.
        description:
          type: string
          description: A short description of the product.
        iconUrl:
          type: string
          description: URL to the product icon.
        iconBackgroundColor:
          description: Background color for the product icon.
          type: string
      required:
        - object
        - id
        - slug
        - name
        - description
        - iconUrl
      additionalProperties: false
      description: Detailed information about a marketplace or store product.
    ProductListSchema:
      type: object
      properties:
        object:
          type: string
          const: list
          description: Fixed value identifying this as a list response.
        data:
          type: array
          items:
            type: object
            properties:
              object:
                type: string
                const: product
                description: The object type.
              id:
                type: string
                description: The unique ID of the product.
              slug:
                type: string
                description: The URL-friendly slug of the product.
              name:
                type: string
                description: The name of the product.
              description:
                type: string
                description: A short description of the product.
              iconUrl:
                type: string
                description: URL to the product icon.
            required:
              - object
              - id
              - slug
              - name
              - description
              - iconUrl
            additionalProperties: false
            description: Summary information about a marketplace or store product.
          description: Array of product summaries.
      required:
        - object
        - data
      additionalProperties: false
      description: List of available marketplace and store products.
    ProductSummarySchema:
      type: object
      properties:
        object:
          type: string
          const: product
          description: The object type.
        id:
          type: string
          description: The unique ID of the product.
        slug:
          type: string
          description: The URL-friendly slug of the product.
        name:
          type: string
          description: The name of the product.
        description:
          type: string
          description: A short description of the product.
        iconUrl:
          type: string
          description: URL to the product icon.
      required:
        - object
        - id
        - slug
        - name
        - description
        - iconUrl
      additionalProperties: false
      description: Summary information about a marketplace or store product.
    ProjectDetail:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the project.
        object:
          type: string
          const: project
          description: Fixed value identifying this object as a project.
        name:
          type: string
          description: The name of the project as defined by the user.
        privacy:
          type: string
          enum:
            - private
            - team
          description: The privacy setting for the project - either private or team.
        vercelProjectId:
          description: Optional ID of the linked Vercel project, if connected.
          type: string
        createdAt:
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: The ISO timestamp representing when the project was created.
        updatedAt:
          description: The ISO timestamp of the most recent update, if available.
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        apiUrl:
          type: string
          format: uri
          description: The API endpoint URL for accessing this project programmatically.
        webUrl:
          type: string
          format: uri
          description: The web URL where the project can be viewed or managed.
        description:
          description: The description of the project.
          type: string
        instructions:
          description: The instructions for the project.
          type: string
        chats:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: A unique identifier for the chat.
              object:
                type: string
                const: chat
                description: Fixed value identifying this object as a chat.
              shareable:
                type: boolean
                description: Indicates whether the chat can be shared via public link.
              privacy:
                type: string
                enum:
                  - public
                  - private
                  - team
                  - team-edit
                  - unlisted
                description: Defines the visibility of the chat—private, team-only, or public.
              name:
                description: An optional name assigned to the chat by the user.
                type: string
              title:
                type: string
                description: Deprecated title field preserved for backward compatibility.
                deprecated: true
              createdAt:
                type: string
                format: date-time
                pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                description: The ISO timestamp representing when the chat was created.
              updatedAt:
                description: The ISO timestamp of the last update to the chat.
                type: string
              favorite:
                type: boolean
                description: Indicates whether the chat is marked as a favorite.
              authorId:
                type: string
                description: The ID of the user who created the chat.
              projectId:
                description: Optional ID of the v0 project associated with this chat.
                type: string
              vercelProjectId:
                description: Optional ID of the linked Vercel project, if connected.
                type: string
              webUrl:
                type: string
                description: Web URL to view this chat in the browser.
              apiUrl:
                type: string
                description: API URL to access this chat via the API.
              latestVersion:
                description: The most recent generated version of the chat, if available.
                type: object
                properties:
                  id:
                    type: string
                    description: A unique identifier for the version.
                  object:
                    type: string
                    const: version
                    description: Fixed value identifying this object as a version.
                  status:
                    type: string
                    enum:
                      - pending
                      - completed
                      - failed
                    description: The current status of the version generation process.
                  demoUrl:
                    description: Optional URL for previewing the generated output.
                    type: string
                  screenshotUrl:
                    type: string
                    description: URL to retrieve a screenshot of this version.
                  createdAt:
                    type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                    description: The date and time when the version was created, in ISO 8601 format.
                  updatedAt:
                    description: The date and time when the version was last updated, in ISO 8601 format.
                    type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                required:
                  - id
                  - object
                  - status
                  - createdAt
                additionalProperties: false
            required:
              - id
              - object
              - shareable
              - privacy
              - createdAt
              - favorite
              - authorId
              - webUrl
              - apiUrl
            additionalProperties: false
            description: Summary of a chat, including metadata like privacy, author, latest version, and URLs.
          description: List of all chats that are associated with this project.
      required:
        - id
        - object
        - name
        - privacy
        - createdAt
        - apiUrl
        - webUrl
        - chats
      additionalProperties: false
      description: Full representation of a project, including its associated chats.
    ProjectSummary:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the project.
        object:
          type: string
          const: project
          description: Fixed value identifying this object as a project.
        name:
          type: string
          description: The name of the project as defined by the user.
        privacy:
          type: string
          enum:
            - private
            - team
          description: The privacy setting for the project - either private or team.
        vercelProjectId:
          description: Optional ID of the linked Vercel project, if connected.
          type: string
        createdAt:
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: The ISO timestamp representing when the project was created.
        updatedAt:
          description: The ISO timestamp of the most recent update, if available.
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        apiUrl:
          type: string
          format: uri
          description: The API endpoint URL for accessing this project programmatically.
        webUrl:
          type: string
          format: uri
          description: The web URL where the project can be viewed or managed.
      required:
        - id
        - object
        - name
        - privacy
        - createdAt
        - apiUrl
        - webUrl
      additionalProperties: false
      description: Summary of a project, including metadata, timestamps, and optional Vercel linkage.
    ScopeSummary:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the scope (e.g., user or team workspace).
        object:
          type: string
          const: scope
          description: Fixed value identifying this object as a scope.
        name:
          description: An optional human-readable name for the scope.
          type: string
      required:
        - id
        - object
      additionalProperties: false
      description: Basic information about a workspace or identity context for projects and chats.
    SearchResultItem:
      type: object
      properties:
        id:
          type: string
          description: The unique ID of the item returned in the search result.
        object:
          description: Type of item returned, either 'chat' or 'project'.
          type: string
          enum:
            - chat
            - project
        name:
          type: string
          description: The display name of the item.
        createdAt:
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: The ISO timestamp representing when the item was created.
        updatedAt:
          description: The ISO timestamp of the last update to the item.
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        apiUrl:
          type: string
          description: API endpoint for accessing the item programmatically.
        webUrl:
          type: string
          description: Web URL for viewing the item in the interface.
      required:
        - id
        - object
        - name
        - createdAt
        - apiUrl
        - webUrl
      additionalProperties: false
      description: Generic result returned from a search query, representing either a chat or a project.
    UserDetailSchema:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the user.
        object:
          type: string
          const: user
          description: Fixed value identifying this object as a user.
        name:
          description: Optional full name of the user.
          type: string
        email:
          type: string
          description: The user's email address.
        avatar:
          type: string
          description: URL to the user's avatar image.
        createdAt:
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: The ISO timestamp representing when the user was created.
        updatedAt:
          description: The ISO timestamp of the last update to the user.
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
      required:
        - id
        - object
        - email
        - avatar
        - createdAt
      additionalProperties: false
    UserPreferencesPostResponseSchema:
      type: object
      properties:
        object:
          type: string
          const: user_preferences
          description: Object type identifier.
        preferences:
          anyOf:
            - type: object
              properties:
                notifications:
                  type: object
                  properties:
                    liveActivity:
                      type: boolean
                      description: Whether the user wants to receive live activities.
                    pushNotifications:
                      type: boolean
                      description: Whether the user wants to receive push notifications.
                  required:
                    - liveActivity
                    - pushNotifications
                  additionalProperties: false
                  description: The user's preferred method for receiving notifications.
              required:
                - notifications
              additionalProperties: false
              description: User preferences configuration including notification settings.
            - type: "null"
          description: The updated preferences if successful, or null if failed.
      required:
        - object
        - preferences
      additionalProperties: false
      description: Response schema for updating user preferences.
    UserPreferencesResponseSchema:
      type: object
      properties:
        object:
          type: string
          const: user_preferences
          description: Object type identifier.
        preferences:
          anyOf:
            - type: object
              properties:
                notifications:
                  type: object
                  properties:
                    liveActivity:
                      type: boolean
                      description: Whether the user wants to receive live activities.
                    pushNotifications:
                      type: boolean
                      description: Whether the user wants to receive push notifications.
                  required:
                    - liveActivity
                    - pushNotifications
                  additionalProperties: false
                  description: The user's preferred method for receiving notifications.
              required:
                - notifications
              additionalProperties: false
              description: User preferences configuration including notification settings.
            - type: "null"
          description: The user's current preferences, or null if errored.
      required:
        - object
        - preferences
      additionalProperties: false
      description: Response schema for retrieving user preferences.
    UserPreferencesSchema:
      type: object
      properties:
        notifications:
          type: object
          properties:
            liveActivity:
              type: boolean
              description: Whether the user wants to receive live activities.
            pushNotifications:
              type: boolean
              description: Whether the user wants to receive push notifications.
          required:
            - liveActivity
            - pushNotifications
          additionalProperties: false
          description: The user's preferred method for receiving notifications.
      required:
        - notifications
      additionalProperties: false
      description: User preferences configuration including notification settings.
    UserSummarySchema:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the user.
        object:
          type: string
          const: user
          description: Fixed value identifying this object as a user.
        name:
          description: Optional full name of the user.
          type: string
        email:
          type: string
          description: The user's email address.
        avatar:
          type: string
          description: URL to the user's avatar image.
        createdAt:
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: The ISO timestamp representing when the user was created.
        updatedAt:
          description: The ISO timestamp of the last update to the user.
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
      required:
        - id
        - object
        - email
        - avatar
        - createdAt
      additionalProperties: false
      description: Details of the authenticated user, including profile and contact information.
    VercelProjectDetail:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the linked Vercel project.
        object:
          type: string
          const: vercel_project
          description: Fixed value identifying this object as a Vercel project.
        name:
          type: string
          description: The name of the Vercel project.
      required:
        - id
        - object
        - name
      additionalProperties: false
    VercelProjectSummary:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the linked Vercel project.
        object:
          type: string
          const: vercel_project
          description: Fixed value identifying this object as a Vercel project.
        name:
          type: string
          description: The name of the Vercel project.
      required:
        - id
        - object
        - name
      additionalProperties: false
      description: Basic metadata about a Vercel project connected to a v0 project.
    VersionDetail:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the version.
        object:
          type: string
          const: version
          description: Fixed value identifying this object as a version.
        status:
          type: string
          enum:
            - pending
            - completed
            - failed
          description: The current status of the version generation process.
        demoUrl:
          description: Optional URL for previewing the generated output.
          type: string
        screenshotUrl:
          type: string
          description: URL to retrieve a screenshot of this version.
        createdAt:
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: The date and time when the version was created, in ISO 8601 format.
        updatedAt:
          description: The date and time when the version was last updated, in ISO 8601 format.
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        files:
          type: array
          items:
            type: object
            properties:
              object:
                type: string
                const: file
                description: Fixed value identifying this object as a file.
              name:
                type: string
                description: The name of the file, including its extension.
              content:
                type: string
                description: The full contents of the file as a raw string.
              locked:
                type: boolean
                description: Whether the file is locked to prevent AI from overwriting it during new version generation.
            required:
              - object
              - name
              - content
              - locked
            additionalProperties: false
            description: Detailed representation of a file, including its content and lock status.
          description: A list of files that were generated or included in this version.
      required:
        - id
        - object
        - status
        - createdAt
        - files
      additionalProperties: false
      description: Detailed version data including file contents.
    VersionSummary:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the version.
        object:
          type: string
          const: version
          description: Fixed value identifying this object as a version.
        status:
          type: string
          enum:
            - pending
            - completed
            - failed
          description: The current status of the version generation process.
        demoUrl:
          description: Optional URL for previewing the generated output.
          type: string
        screenshotUrl:
          type: string
          description: URL to retrieve a screenshot of this version.
        createdAt:
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: The date and time when the version was created, in ISO 8601 format.
        updatedAt:
          description: The date and time when the version was last updated, in ISO 8601 format.
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
      required:
        - id
        - object
        - status
        - createdAt
      additionalProperties: false
      description: Summary of a generated version of a chat, including its status and optional demo link.
    VersionSummaryList:
      type: object
      properties:
        object:
          type: string
          const: list
          description: Fixed value identifying this as a list response.
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: A unique identifier for the version.
              object:
                type: string
                const: version
                description: Fixed value identifying this object as a version.
              status:
                type: string
                enum:
                  - pending
                  - completed
                  - failed
                description: The current status of the version generation process.
              demoUrl:
                description: Optional URL for previewing the generated output.
                type: string
              screenshotUrl:
                type: string
                description: URL to retrieve a screenshot of this version.
              createdAt:
                type: string
                format: date-time
                pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                description: The date and time when the version was created, in ISO 8601 format.
              updatedAt:
                description: The date and time when the version was last updated, in ISO 8601 format.
                type: string
                format: date-time
                pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            required:
              - id
              - object
              - status
              - createdAt
            additionalProperties: false
            description: Summary of a generated version of a chat, including its status and optional demo link.
          description: Array of version summaries in this page of results.
        pagination:
          type: object
          properties:
            hasMore:
              type: boolean
              description: Indicates if there are more results available beyond this page.
            nextCursor:
              description: Cursor for fetching the next page of results.
              type: string
            nextUrl:
              description: API URL for retrieving the next page of results.
              type: string
          required:
            - hasMore
          additionalProperties: false
          description: Pagination metadata for navigating through multiple pages of results.
      required:
        - object
        - data
        - pagination
      additionalProperties: false
      description: List response containing multiple version summaries with cursor-based pagination.
    UnauthorizedError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
              const: unauthorized_error
          required:
            - message
            - type
          additionalProperties: false
      required:
        - error
      additionalProperties: false
    ForbiddenError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
              const: forbidden_error
          required:
            - message
            - type
          additionalProperties: false
      required:
        - error
      additionalProperties: false
    NotFoundError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
              const: not_found_error
          required:
            - message
            - type
          additionalProperties: false
      required:
        - error
      additionalProperties: false
    ConflictError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
              const: conflict_error
          required:
            - message
            - type
          additionalProperties: false
      required:
        - error
      additionalProperties: false
    PayloadTooLargeError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
              const: payload_too_large_error
          required:
            - message
            - type
          additionalProperties: false
      required:
        - error
      additionalProperties: false
    UnprocessableEntityError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
              const: unprocessable_entity_error
          required:
            - message
            - type
          additionalProperties: false
      required:
        - error
      additionalProperties: false
    TooManyRequestsError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
              const: too_many_requests_error
          required:
            - message
            - type
          additionalProperties: false
      required:
        - error
      additionalProperties: false
    InternalServerError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
              const: internal_server_error
          required:
            - message
            - type
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: Your v0 API key. Get one at https://v0.app/chat/settings/keys
