openapi: 3.1.0 info: title: v0 App agent chats API version: '0' description: Full stack vibe coding API termsOfService: https://vercel.com/legal/api-terms 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: 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. 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_AppApi' '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. - name: cursor in: query required: false schema: type: string description: Query parameter "cursor" - name: limit in: query required: false schema: type: number description: Query parameter "limit" 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}/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: 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. '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: [] delete: summary: Delete Message description: Deletes a specific message from a chat. operationId: chats.{chatId}.messages.{messageId}.delete tags: - chats responses: '200': description: Success content: application/json: schema: type: object properties: id: type: string object: type: string const: message 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 containing the message to delete. - name: messageId in: path required: true schema: type: string description: The unique identifier of the message to delete. 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: 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. 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}/iframe: get: summary: Get Version Iframe description: Get the iframe for a version operationId: chats.findIframe tags: - chats responses: '200': description: Success content: application/json: schema: type: object properties: id: type: string object: type: string const: iframe url: type: string vsCodeUrl: type: string vmEnabled: type: boolean vmParams: type: object properties: cid: type: string bid: type: string required: - cid - bid additionalProperties: false vmStatus: type: string enum: - empty - running - error - stopped - initializing vmSubstatus: type: string enum: - idle - syncing-files - installing-deps - starting-server vmGitReady: type: boolean syncError: type: string previewUnavailable: type: boolean required: - id - object - vmEnabled 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: Path parameter "chatId" - name: versionId in: path required: true schema: type: string description: Path parameter "versionId" security: - apiKey: [] /chats/{chatId}/versions/{versionId}/vm-logs: get: summary: Get Version VM Logs description: Get the VM server logs for a version operationId: chats.findVmLogs tags: - chats responses: '200': description: Success content: application/json: schema: type: object properties: logs: type: array items: type: object properties: id: type: string blockId: type: string method: type: string enum: - log - warn - error - info - debug message: type: string timestamp: type: string isServer: type: boolean required: - id - blockId - method - message - timestamp - isServer additionalProperties: false required: - logs 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: Path parameter "chatId" - name: versionId in: path required: true schema: type: string description: Path parameter "versionId" security: - apiKey: [] delete: summary: Clear Version VM Logs description: Clear the VM server logs for a version operationId: chats.vmLogs tags: - chats responses: '200': description: Success content: application/json: schema: type: object properties: success: type: boolean 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: Path parameter "chatId" - name: versionId in: path required: true schema: type: string description: Path parameter "versionId" 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}/diff-stats: get: summary: Get Version Diff Stats description: Retrieves line-level diff statistics (additions and removals) for each file changed in a specific version. operationId: chats.getVersionDiffStats tags: - chats responses: '200': description: Success content: application/json: schema: type: object properties: status: type: string enum: - ready - pending files: type: array items: type: object properties: path: type: string addedLines: type: number removedLines: type: number required: - path - addedLines - removedLines additionalProperties: false required: - status 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. - name: versionId in: path required: true schema: type: string description: The unique identifier of the version (block) to get diff stats for. security: - apiKey: [] /chats/{chatId}/versions/{versionId}/diff-patch: get: summary: Get Version Diff Patch description: Retrieves the unified diff patch for a file changed in a specific version. operationId: chats.getVersionDiffPatch tags: - chats responses: '200': description: Success content: application/json: schema: type: object properties: status: type: string enum: - ready - pending patch: type: string required: - status 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. - name: versionId in: path required: true schema: type: string description: The unique identifier of the version (block) to get diff patch for. - name: fileName in: query required: true schema: type: string description: The file path to get the diff patch for. description: The file path to get the diff patch for. 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}/metadata: get: summary: Get Chat Metadata description: Get the metadata for a chat operationId: chats.getMetadata tags: - chats responses: '200': description: Success content: application/json: schema: type: object properties: git: type: object properties: branch: type: string commit: type: string required: - branch - commit additionalProperties: false deployment: type: object properties: id: type: string required: - id additionalProperties: false 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: Path parameter "chatId" security: - apiKey: [] /chats/{chatId}/upload: post: summary: Upload File description: Upload a file to a chat operationId: chats.upload tags: - chats requestBody: required: true content: application/json: schema: type: object properties: file: {} required: - file additionalProperties: false responses: '200': description: Success content: application/json: schema: type: object properties: url: type: string required: - url 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: Path parameter "chatId" 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: 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. '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: [] /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: [] /chats/{chatId}/versions/{versionId}/recreate: post: summary: Recreate Version VM description: Recreate the VM sandbox for a version operationId: chats.recreate tags: - chats responses: '200': description: Success content: application/json: schema: type: object properties: success: type: boolean 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: Path parameter "chatId" - name: versionId in: path required: true schema: type: string description: Path parameter "versionId" security: - apiKey: [] /chats/{chatId}/version-picker: get: operationId: chats.findVersionPicker tags: - chats responses: '200': description: Success content: application/json: schema: type: object properties: versions: type: array items: type: object properties: blockId: type: string messageId: type: string required: - blockId - messageId additionalProperties: false required: - versions 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: Path parameter "chatId" security: - apiKey: [] /chats/{chatId}/git/activity: get: operationId: chats.{chatId}.git.activity.find tags: - chats responses: '200': description: Success content: application/json: schema: type: array items: type: object properties: variant: type: string enum: - create-chat - create-branch - pull-changes - merge-pr - create-pr - delete-branch - create-commit - create-repo - reset-branch - restore-commit - rename-branch activityEntity: type: string url: type: string timestamp: type: number required: - variant - activityEntity - timestamp 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: Path parameter "chatId" security: - apiKey: [] /chats/{chatId}/git/status: get: operationId: chats.{chatId}.git.status.find tags: - chats responses: '200': description: Success content: application/json: schema: anyOf: - type: object properties: ok: type: boolean const: true value: anyOf: - type: object properties: githubBranchStatus: anyOf: - type: object properties: status: type: string enum: - diverged - ahead - behind - identical behind: type: number commits: type: array items: type: object properties: sha: type: string message: type: string author: type: object properties: name: type: - string - 'null' email: type: - string - 'null' date: type: - string - 'null' login: type: - string - 'null' avatarUrl: type: - string - 'null' required: - name - email - date - login - avatarUrl additionalProperties: false committer: type: object properties: name: type: - string - 'null' date: type: - string - 'null' required: - name - date additionalProperties: false required: - sha - message - author - committer additionalProperties: false required: - status - behind - commits additionalProperties: false - type: 'null' localGitStatus: anyOf: - type: object properties: status: type: string enum: - diverged - ahead - behind - identical behind: type: number commits: type: array items: type: object properties: sha: type: string message: type: string author: type: object properties: name: type: - string - 'null' email: type: - string - 'null' date: type: - string - 'null' login: type: - string - 'null' avatarUrl: type: - string - 'null' required: - name - email - date - login - avatarUrl additionalProperties: false committer: type: object properties: name: type: - string - 'null' date: type: - string - 'null' required: - name - date additionalProperties: false required: - sha - message - author - committer additionalProperties: false required: - status - behind - commits additionalProperties: false - type: 'null' pr: anyOf: - type: object properties: state: type: string enum: - open - closed - merged mergeableState: anyOf: - type: string enum: - clean - dirty - unstable - blocked - behind - unknown - draft - type: 'null' id: type: number title: type: string updatedAt: type: string avatar: type: - string - 'null' head: type: string required: - state - mergeableState - id - title - updatedAt - avatar - head additionalProperties: false - type: 'null' cachedPRPreview: anyOf: - type: object properties: title: type: string description: type: string required: - title - description additionalProperties: false - type: 'null' required: - githubBranchStatus - localGitStatus - pr - cachedPRPreview additionalProperties: false - type: 'null' required: - ok - value additionalProperties: false - type: object properties: ok: type: boolean const: false error: type: object properties: error: type: string statusCode: type: number errorCode: type: string required: - error - statusCode - errorCode additionalProperties: false required: - ok - error 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: Path parameter "chatId" security: - apiKey: [] /chats/{chatId}/git/connection: get: operationId: chats.{chatId}.git.connection.find tags: - chats responses: '200': description: Success content: application/json: schema: anyOf: - anyOf: - type: object properties: ok: type: boolean const: true value: anyOf: - type: object properties: connected: type: boolean const: false migrating: type: boolean needsBranch: type: object properties: org: type: string repo: type: string baseBranch: type: string required: - org - repo - baseBranch additionalProperties: false required: - connected additionalProperties: false - type: object properties: connected: type: boolean const: true org: type: string repo: type: string base: type: string head: type: string pullRequestNumber: type: - number - 'null' pullRequestMergedAt: type: - string - 'null' required: - connected - org - repo - base - head - pullRequestNumber - pullRequestMergedAt additionalProperties: false required: - ok - value additionalProperties: false - type: object properties: ok: type: boolean const: false error: type: object properties: error: type: string statusCode: type: number errorCode: type: string required: - error - statusCode - errorCode additionalProperties: false required: - ok - error additionalProperties: false - anyOf: - type: object properties: ok: type: boolean const: true value: anyOf: - type: object properties: state: type: string const: noConnection required: - state additionalProperties: false - type: object properties: state: type: string const: needsBranch org: type: string repo: type: string baseBranch: type: string required: - state - org - repo - baseBranch additionalProperties: false - type: object properties: state: type: string const: migrating required: - state additionalProperties: false - type: object properties: state: type: string const: repoDeleted org: type: string repo: type: string isVMChat: type: boolean required: - state - org - repo - isVMChat additionalProperties: false - type: object properties: state: type: string const: projectDeleted org: type: string repo: type: string isVMChat: type: boolean required: - state - org - repo - isVMChat additionalProperties: false - type: object properties: state: type: string const: repoUnlinked org: type: string repo: type: string vercelProjectName: type: string isVMChat: type: boolean required: - state - org - repo - vercelProjectName - isVMChat additionalProperties: false - type: object properties: state: type: string const: gitHubDown required: - state additionalProperties: false - type: object properties: state: type: string const: connected org: type: string repo: type: string base: type: string head: type: string pullRequestNumber: type: - number - 'null' pullRequestMergedAt: type: - string - 'null' required: - state - org - repo - base - head - pullRequestNumber - pullRequestMergedAt additionalProperties: false required: - ok - value additionalProperties: false - type: object properties: ok: type: boolean const: false error: type: object properties: error: type: string statusCode: type: number errorCode: type: string required: - error - statusCode - errorCode additionalProperties: false required: - ok - error 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: Path parameter "chatId" security: - apiKey: [] /chats/{chatId}/git/pull-request: post: operationId: chats.{chatId}.git.pullRequest.create tags: - chats responses: '200': description: Success content: application/json: schema: anyOf: - type: object properties: ok: type: boolean const: true value: type: object properties: state: type: string enum: - open - closed - merged mergeableState: anyOf: - type: string enum: - clean - dirty - unstable - blocked - behind - unknown - draft - type: 'null' id: type: number title: type: string updatedAt: type: string avatar: type: - string - 'null' head: type: string htmlUrl: type: string required: - state - mergeableState - id - title - updatedAt - avatar - head - htmlUrl additionalProperties: false required: - ok - value additionalProperties: false - type: object properties: ok: type: boolean const: false error: type: object properties: error: type: string statusCode: type: number errorCode: type: string required: - error - statusCode - errorCode additionalProperties: false required: - ok - error 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: Path parameter "chatId" security: - apiKey: [] /chats/{chatId}/git/merge-pull-request: post: operationId: chats.{chatId}.git.mergePullRequest.create tags: - chats responses: '200': description: Success content: application/json: schema: anyOf: - type: object properties: ok: type: boolean const: true value: {} required: - ok - value additionalProperties: false - type: object properties: ok: type: boolean const: false error: type: object properties: error: type: string statusCode: type: number errorCode: type: string required: - error - statusCode - errorCode additionalProperties: false required: - ok - error 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: Path parameter "chatId" security: - apiKey: [] /chats/{chatId}/git/pull-changes: post: operationId: chats.{chatId}.git.pullChanges.create tags: - chats responses: '200': description: Success content: application/json: schema: type: object properties: success: type: boolean newAssistantMessageId: type: string latestSha: type: string commitMessage: type: string 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 chat ID to pull changes into. security: - apiKey: [] /chats/{chatId}/git/deployment: get: operationId: chats.{chatId}.git.deployment.find tags: - chats responses: '200': description: Success content: application/json: schema: anyOf: - type: object properties: ok: type: boolean const: true value: type: object properties: deployment: type: object properties: uid: type: string name: type: string target: type: - string - 'null' readyState: type: string enum: - QUEUED - BUILDING - ERROR - INITIALIZING - READY - CANCELED - NOTREADY createdAt: type: number buildingAt: type: number inspectorUrl: type: string source: type: string enum: - api-trigger-git-deploy - cli - clone/repo - git - import - import/repo - redeploy - v0-web url: type: string required: - uid - name - target - readyState - createdAt - inspectorUrl - source - url additionalProperties: false required: - deployment additionalProperties: false required: - ok - value additionalProperties: false - type: object properties: ok: type: boolean const: false error: type: object properties: error: type: string statusCode: type: number errorCode: type: string required: - error - statusCode - errorCode additionalProperties: false required: - ok - error 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: Path parameter "chatId" - name: sha in: query required: true schema: type: string description: Query parameter "sha" security: - apiKey: [] /chats/{chatId}/agent/logs: post: operationId: chats.{chatId}.agent.logs.create tags: - chats requestBody: required: true content: application/json: schema: type: object properties: userMessageId: type: string logs: type: string required: - userMessageId - logs additionalProperties: false responses: '200': description: Success content: application/json: schema: anyOf: - type: object properties: success: type: boolean const: true required: - success additionalProperties: false - type: object properties: success: type: boolean const: false error: type: string required: - success - error 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: Path parameter "chatId" security: - apiKey: [] /chats/{chatId}/deployments: get: summary: Find Deployments description: Find deployments by chat ID. This will return a list of deployments for the given chat. Uses the vercelProjectId from the chat. operationId: chats.findDeployments tags: - chats 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 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. 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 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: chatId in: path required: true schema: type: string 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. Uses the vercelProjectId from the chat. operationId: chats.deployments tags: - chats requestBody: required: true content: application/json: schema: type: object properties: versionId: type: string description: The ID of the version to deploy required: - versionId additionalProperties: false responses: '200': description: Success content: application/json: schema: 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. 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 '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 create a deployment for security: - apiKey: [] /chats/{chatId}/env-vars: get: summary: Find Environment Variables description: Retrieves all environment variables for a given chat. Uses the vercelProjectId from the chat. operationId: chats.findEnvVars 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/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: chatId in: path required: true schema: type: string description: The ID of the chat 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 chat. Uses the vercelProjectId from the chat. operationId: chats.envVars tags: - chats 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: chatId in: path required: true schema: type: string description: The ID of the chat 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: [] /chats/{chatId}/env-vars/delete: post: summary: Delete Environment Variables description: Deletes multiple environment variables for a given chat by their IDs. Uses the vercelProjectId from the chat. operationId: chats.{chatId}.envVars.delete.create tags: - chats 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: chatId in: path required: true schema: type: string description: The ID of the chat whose environment variables should be deleted. security: - apiKey: [] /chats/{chatId}/vercel-project: post: summary: Create Vercel Project description: Creates a new Vercel project and links it to the specified chat. operationId: chats.vercelProject tags: - chats requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: The name of the Vercel project to create. required: - name additionalProperties: false responses: '200': description: Success content: application/json: schema: type: object properties: id: type: string name: type: string accountId: type: string required: - id - name - accountId 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 ID of the chat to create a Vercel project for. security: - apiKey: [] /chats/{chatId}/vercel: get: operationId: chats.findVercel tags: - chats responses: '200': description: Success content: application/json: schema: type: object properties: id: type: string description: The Vercel project ID. accountId: type: string description: The account ID of the Vercel project. name: type: string description: The name of the Vercel project. framework: description: The framework detected for the project. type: - string - 'null' updatedAt: type: number description: Timestamp when the project was last updated. productionDeployment: description: The production deployment of the project. type: object properties: id: type: string description: The deployment ID. readyState: type: string enum: - QUEUED - BUILDING - ERROR - INITIALIZING - READY - CANCELED - NOTREADY description: The ready state of the deployment. createdAt: type: number description: Timestamp when the deployment was created. url: type: string description: The deployment URL. screenshotUrl: description: The light mode screenshot URL of the deployment. type: - string - 'null' darkScreenshotUrl: description: The dark mode screenshot URL of the deployment. type: - string - 'null' required: - id - readyState - createdAt - url additionalProperties: false domain: type: string description: The domain of the project. aliases: description: The aliases of the project. type: array items: type: string customDomains: description: Custom project-level domains. type: array items: type: object properties: name: type: string verified: type: boolean required: - name - verified additionalProperties: false required: - id - accountId - name - updatedAt - domain 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: Path parameter "chatId" security: - apiKey: [] components: schemas: 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. 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. 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 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 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 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 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 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 ChatDetail_AppApi: 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: 'Deprecated: Use the `privacy` field instead. A chat is shareable when privacy is public or unlisted.' deprecated: true 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 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 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. screenshotUrl: type: string description: URL to retrieve a screenshot of 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: description: The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change. anyOf: - type: object properties: type: type: string const: parts version: type: number parts: type: array items: {} required: - type - version - parts additionalProperties: false description: Parts-based message content with structured parts array. Used for user messages. - type: object properties: type: type: string const: message-binary-format value: 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 - anyOf: - type: object properties: title: type: string additionalProperties: false - type: 'null' description: Metadata section containing title and other properties required: - type - value additionalProperties: false description: Binary format message content with nested arrays 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 - system - tool 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 - 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 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 cursor: type: - string - 'null' required: - id - object - shareable - privacy - createdAt - favorite - authorId - webUrl - apiUrl - url - messages - permissions - cursor additionalProperties: false description: Detailed representation of a chat, including its messages, files, versions, and model configuration. 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. 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 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. screenshotUrl: type: string description: URL to retrieve a screenshot of this version. required: - id - object - status - createdAt - files additionalProperties: false description: Detailed version data including file contents. 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 securitySchemes: apiKey: type: apiKey in: header name: Authorization description: Your v0 API key. Get one at https://v0.app/chat/settings/keys externalDocs: description: Find more info here url: https://vercel.com/docs/v0/api