{"openapi":"3.1.0","info":{"title":"v0 App API","version":"0","description":"Full stack vibe coding API","termsOfService":"https://vercel.com/legal/api-terms"},"externalDocs":{"description":"Find more info here","url":"https://vercel.com/docs/v0/api"},"servers":[{"url":"https://api.v0.dev/v1"}],"tags":[{"name":"chats","description":"Chats"}],"paths":{"/chats":{"post":{"summary":"Create Chat","description":"Creates a new chat using a user message, optional system context, and model configuration. Useful for prompting the model within the scope of a specific project.","operationId":"chats.create","tags":["chats"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Creates a new chat using a user message, optional system context, and model configuration. Useful for prompting the model within the scope of a specific project."},"attachments":{"description":"A list of files or assets to be included in the conversation context. Useful when the chat or task requires referencing documents, images, or other resources.","type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"The URL or data URI of the file or asset to include with the message."}},"required":["url"],"additionalProperties":false}},"system":{"description":"Provides system-level context or background for the chat. This is typically used to specify frameworks, tools, or development environments relevant to the task.","type":"string"},"chatPrivacy":{"default":"private","description":"Determines the privacy setting of the chat. This can control whether the chat is visible only to the user, to team members, or is public.","type":"string","enum":["public","private","team-edit","team","unlisted"]},"projectId":{"description":"Associates the chat with a specific project in your workspace. Helps organize and group related chats under a common project context.","type":"string"},"modelConfiguration":{"description":"Settings that control how the model behaves in the chat.","type":"object","properties":{"modelId":{"default":"v0-pro","type":"string","enum":["v0-auto","v0-mini","v0-pro","v0-max","v0-max-fast"],"description":"Model to use for the generation."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."},"thinking":{"default":false,"type":"boolean","description":"Enables thinking to generate a response in multiple steps."}},"additionalProperties":false},"responseMode":{"default":"sync","description":"Controls how the response is delivered.\n\n- `\"sync\"`: The response is returned immediately with the HTTP request.\n- `\"async\"`: Returns a message placeholder immediately; use getById to poll for completion status and final output.\n- `\"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).\n\n- `\"true\"`: returns only chats marked as favorites.\n- `\"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).\n\n- `\"true\"`: returns only chats marked as favorites.\n- `\"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.\n\n- `\"true\"`: mark as favorite\n- `\"false\"`: remove from favorites"}},"required":["isFavorite"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"chat"},"favorited":{"type":"boolean"}},"required":["id","object","favorited"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the chat to update. Provided as a path parameter."}],"security":[{"apiKey":[]}]}},"/chats/{chatId}/fork":{"post":{"summary":"Fork Chat","description":"Creates a new chat fork (duplicate) from a specific version within an existing chat. Useful for branching off alternate directions without modifying the original conversation.","operationId":"chats.fork","tags":["chats"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"description":"The identifier of the specific chat version to fork from. If omitted, the latest version will be used.","type":"string","maxLength":32},"privacy":{"default":"private","description":"Determines the privacy setting of the forked chat. This can control whether the chat is visible only to the user, to team members, or is public.","type":"string","enum":["public","private","team","team-edit","unlisted"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatDetail"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the chat to fork. Provided as a path parameter."}],"security":[{"apiKey":[]}]}},"/chats/{chatId}/project":{"get":{"summary":"Get Project by Chat ID","description":"Retrieves the v0 project associated with a given chat. Useful for determining the context or scope of a chat session.","operationId":"projects.getByChatId","tags":["projects"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the project."},"object":{"type":"string","const":"project","description":"Fixed value identifying this object as a project."},"name":{"type":"string","description":"The name of the project as defined by the user."},"privacy":{"type":"string","enum":["private","team"],"description":"The privacy setting for the project - either private or team."},"vercelProjectId":{"description":"Optional ID of the linked Vercel project, if connected.","type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The ISO timestamp representing when the project was created."},"updatedAt":{"description":"The ISO timestamp of the most recent update, if available.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"apiUrl":{"type":"string","format":"uri","description":"The API endpoint URL for accessing this project programmatically."},"webUrl":{"type":"string","format":"uri","description":"The web URL where the project can be viewed or managed."},"description":{"description":"The description of the project.","type":"string"},"instructions":{"description":"The instructions for the project.","type":"string"},"chats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the chat."},"object":{"type":"string","const":"chat","description":"Fixed value identifying this object as a chat."},"shareable":{"type":"boolean","description":"Indicates whether the chat can be shared via public link."},"privacy":{"type":"string","enum":["public","private","team","team-edit","unlisted"],"description":"Defines the visibility of the chat—private, team-only, or public."},"name":{"description":"An optional name assigned to the chat by the user.","type":"string"},"title":{"type":"string","description":"Deprecated title field preserved for backward compatibility.","deprecated":true},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The ISO timestamp representing when the chat was created."},"updatedAt":{"description":"The ISO timestamp of the last update to the chat.","type":"string"},"favorite":{"type":"boolean","description":"Indicates whether the chat is marked as a favorite."},"authorId":{"type":"string","description":"The ID of the user who created the chat."},"projectId":{"description":"Optional ID of the v0 project associated with this chat.","type":"string"},"vercelProjectId":{"description":"Optional ID of the linked Vercel project, if connected.","type":"string"},"webUrl":{"type":"string","description":"Web URL to view this chat in the browser."},"apiUrl":{"type":"string","description":"API URL to access this chat via the API."},"latestVersion":{"description":"The most recent generated version of the chat, if available.","type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the version."},"object":{"type":"string","const":"version","description":"Fixed value identifying this object as a version."},"status":{"type":"string","enum":["pending","completed","failed"],"description":"The current status of the version generation process."},"demoUrl":{"description":"Optional URL for previewing the generated output.","type":"string"},"screenshotUrl":{"type":"string","description":"URL to retrieve a screenshot of this version."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The date and time when the version was created, in ISO 8601 format."},"updatedAt":{"description":"The date and time when the version was last updated, in ISO 8601 format.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","object","status","createdAt"],"additionalProperties":false}},"required":["id","object","shareable","privacy","createdAt","favorite","authorId","webUrl","apiUrl"],"additionalProperties":false,"description":"Summary of a chat, including metadata like privacy, author, latest version, and URLs."},"description":"List of all chats that are associated with this project."}},"required":["id","object","name","privacy","createdAt","apiUrl","webUrl","chats"],"additionalProperties":false,"description":"Full representation of a project, including its associated chats."}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"},"description":"The ID of the chat to retrieve the associated project for."}],"security":[{"apiKey":[]}]}},"/chats/{chatId}/messages":{"get":{"summary":"Find Chat Messages","description":"Retrieves a list of all messages for a specific chat, ordered by creation date (newest first). Supports cursor-based pagination and includes message content, role, and type information.","operationId":"chats.findMessages","tags":["chats"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MessageSummary"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean"},"nextCursor":{"type":"string"},"nextUrl":{"type":"string"}},"required":["hasMore"],"additionalProperties":false}},"required":["object","data","pagination"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the chat to retrieve messages for. Provided as a path parameter."},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Specifies the maximum number of message records to return in a single response. Useful for paginating results when there are many messages.","type":"number","minimum":1,"maximum":150},"description":"Specifies the maximum number of message records to return in a single response. Useful for paginating results when there are many messages."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"Base64 encoded cursor containing pagination data"},"description":"Base64 encoded cursor containing pagination data"}],"security":[{"apiKey":[]}]},"post":{"summary":"Send Message","description":"Creates a new message in an existing chat. Triggers a model response using the provided prompt, with optional attachments and configuration settings.","operationId":"chats.sendMessage","tags":["chats"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"The prompt or instruction to send to the model as part of the chat."},"attachments":{"default":[],"description":"A list of files or assets to include with the message.","type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"The URL or data URI of the file or asset to include with the message."}},"required":["url"],"additionalProperties":false}},"system":{"description":"Provides system-level context or background for the chat. This is typically used to specify frameworks, tools, or development environments relevant to the task.","type":"string"},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","type":"string","enum":["v0-auto","v0-mini","v0-pro","v0-max","v0-max-fast"],"description":"Model to use for the generation."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."},"thinking":{"default":false,"type":"boolean","description":"Enables thinking to generate a response in multiple steps."}},"additionalProperties":false},"responseMode":{"default":"sync","description":"Controls how the response is delivered.\n\n- `\"sync\"`: The response is returned immediately with the HTTP request.\n- `\"async\"`: Returns a message placeholder immediately; use getById to poll for completion status and final output.\n- `\"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.\n\n- `\"sync\"`: The response is returned immediately with the HTTP request.\n- `\"async\"`: Returns a message placeholder immediately; use getById to poll for completion status and final output.\n- `\"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":[]}]}},"/chat-screenshots":{"get":{"operationId":"chatScreenshots.find","tags":["chatScreenshots"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"screenshotsByChatId":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"blockId":{"type":"string"},"screenshot":{"type":"string"}},"required":["blockId","screenshot"],"additionalProperties":false}}},"required":["screenshotsByChatId"],"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":20,"type":"number","maximum":20},"description":"Query parameter \"limit\""},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"number"},"description":"Query parameter \"offset\""},{"name":"device","in":"query","required":false,"schema":{"type":"string","enum":["iphone_16_pro","iphone_16_pro_max","v0_mobile_home_thumbnail"]},"description":"Query parameter \"device\""}],"security":[{"apiKey":[]}]}},"/deployments":{"get":{"summary":"Find Deployments","description":"Find deployments by project and chat IDs. This will return a list of deployments for the given project and chat IDs.","operationId":"deployments.find","tags":["deployments"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the deployment."},"object":{"type":"string","const":"deployment","description":"Fixed value identifying this object as a deployment."},"inspectorUrl":{"type":"string","description":"URL to the deployment inspector."},"chatId":{"type":"string","description":"The ID of the chat that this deployment is scoped to."},"projectId":{"description":"The ID of the project that this deployment is scoped to.","type":"string"},"versionId":{"type":"string","description":"The ID of the version that this deployment is scoped to."},"apiUrl":{"type":"string","format":"uri","description":"The API endpoint URL for accessing this deployment programmatically."},"webUrl":{"type":"string","format":"uri","description":"The web URL where the deployment can be viewed or managed."}},"required":["id","object","inspectorUrl","chatId","versionId","apiUrl","webUrl"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"projectId","in":"query","required":false,"schema":{"description":"The ID of the project to find deployments for","type":"string"},"description":"The ID of the project to find deployments for"},{"name":"chatId","in":"query","required":true,"schema":{"type":"string","description":"The ID of the chat to find deployments for"},"description":"The ID of the chat to find deployments for"},{"name":"versionId","in":"query","required":true,"schema":{"type":"string","description":"The ID of the version to find deployments for"},"description":"The ID of the version to find deployments for"}],"security":[{"apiKey":[]}]},"post":{"summary":"Create Deployment","description":"Create a new deployment for a specific chat and version. This will trigger a deployment to Vercel.","operationId":"deployments.create","tags":["deployments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"},"chatId":{"type":"string"},"versionId":{"type":"string"}},"required":["chatId","versionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the deployment."},"object":{"type":"string","const":"deployment","description":"Fixed value identifying this object as a deployment."},"inspectorUrl":{"type":"string","description":"URL to the deployment inspector."},"chatId":{"type":"string","description":"The ID of the chat that this deployment is scoped to."},"projectId":{"description":"The ID of the project that this deployment is scoped to.","type":"string"},"versionId":{"type":"string","description":"The ID of the version that this deployment is scoped to."},"apiUrl":{"type":"string","format":"uri","description":"The API endpoint URL for accessing this deployment programmatically."},"webUrl":{"type":"string","format":"uri","description":"The web URL where the deployment can be viewed or managed."}},"required":["id","object","inspectorUrl","chatId","versionId","apiUrl","webUrl"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]}},"/deployments/{deploymentId}":{"get":{"summary":"Get Deployment","description":"Get a deployment by ID. This will return the details of the deployment, including the inspector URL, chat ID, project ID, version ID, API URL, and web URL.","operationId":"deployments.getById","tags":["deployments"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the deployment."},"object":{"type":"string","const":"deployment","description":"Fixed value identifying this object as a deployment."},"inspectorUrl":{"type":"string","description":"URL to the deployment inspector."},"chatId":{"type":"string","description":"The ID of the chat that this deployment is scoped to."},"projectId":{"description":"The ID of the project that this deployment is scoped to.","type":"string"},"versionId":{"type":"string","description":"The ID of the version that this deployment is scoped to."},"apiUrl":{"type":"string","format":"uri","description":"The API endpoint URL for accessing this deployment programmatically."},"webUrl":{"type":"string","format":"uri","description":"The web URL where the deployment can be viewed or managed."}},"required":["id","object","inspectorUrl","chatId","versionId","apiUrl","webUrl"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter \"deploymentId\""}],"security":[{"apiKey":[]}]},"delete":{"summary":"Delete Deployment","description":"Delete a deployment by ID. This will delete the deployment from Vercel.","operationId":"deployments.delete","tags":["deployments"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"deployment"},"deleted":{"type":"boolean","const":true}},"required":["id","object","deleted"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter \"deploymentId\""}],"security":[{"apiKey":[]}]}},"/deployments/{deploymentId}/logs":{"get":{"summary":"Find Deployment Logs","description":"Retrieves logs for a specific deployment. Supports filtering by timestamp to fetch only recent logs.","operationId":"deployments.findLogs","tags":["deployments"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"logs":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","description":"Log creation timestamp."},"deploymentId":{"type":"string","description":"Deployment ID."},"id":{"type":"string","description":"Log entry ID."},"text":{"type":"string","description":"Log message content."},"type":{"type":"string","enum":["stdout","stderr"],"description":"Output stream type."},"level":{"default":"info","description":"Log severity level.","type":"string","enum":["error","warning","info"]},"object":{"type":"string","const":"deployment_log","description":"Object type identifier."}},"required":["createdAt","deploymentId","id","text","type","object"],"additionalProperties":false},"description":"Array of log entries."},"nextSince":{"description":"Timestamp for pagination.","type":"number"},"object":{"type":"string","const":"list","description":"Object type identifier."}},"required":["logs","object"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the deployment to retrieve logs for. Provided as a path parameter."},{"name":"since","in":"query","required":false,"schema":{"description":"A UNIX timestamp (in seconds) used to filter logs. Returns only log entries generated after the specified time.","type":"number"},"description":"A UNIX timestamp (in seconds) used to filter logs. Returns only log entries generated after the specified time."}],"security":[{"apiKey":[]}]}},"/deployments/{deploymentId}/errors":{"get":{"summary":"Find Deployment Errors","description":"Retrieves a list of errors that occurred during a specific deployment. Useful for diagnosing and debugging deployment issues.","operationId":"deployments.findErrors","tags":["deployments"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"fullErrorText":{"type":"string"},"errorType":{"type":"string"},"formattedError":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"deploymentId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the deployment to inspect for errors. Provided as a path parameter."}],"security":[{"apiKey":[]}]}},"/hooks":{"get":{"summary":"Find Hooks","description":"Retrieves a list of existing hooks in your workspace. Useful for managing active webhooks tied to chat events or deployments.","operationId":"hooks.find","tags":["hooks"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/HookSummary"}}},"required":["object","data"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]},"post":{"summary":"Create Hook","description":"Creates a new webhook that listens for specific events. Supports optional association with a chat.","operationId":"hooks.create","tags":["hooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"A human-readable name for the hook."},"events":{"type":"array","items":{"type":"string","enum":["chat.created","chat.updated","chat.deleted","message.created","message.updated","message.deleted","message.finished"]},"description":"List of event types the hook should subscribe to."},"chatId":{"description":"The ID of a chat to scope the hook to.","type":"string"},"url":{"type":"string","format":"uri","description":"The target URL to receive the webhook payloads."}},"required":["name","events","url"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HookDetail"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]}},"/hooks/{hookId}":{"get":{"summary":"Get Hook","description":"Retrieves the details of a specific webhook using its ID.","operationId":"hooks.getById","tags":["hooks"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HookDetail"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"hookId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the hook to retrieve."}],"security":[{"apiKey":[]}]},"patch":{"summary":"Update Hook","description":"Updates the configuration of an existing webhook, including its name, event subscriptions, or target URL.","operationId":"hooks.update","tags":["hooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"A new name for the hook.","type":"string"},"events":{"description":"Updated list of event types to subscribe to.","type":"array","items":{"type":"string","enum":["chat.created","chat.updated","chat.deleted","message.created","message.updated","message.deleted","message.finished"]}},"url":{"description":"A new URL to send webhook payloads to.","type":"string","format":"uri"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HookDetail"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"hookId","in":"path","required":true,"schema":{"type":"string"},"description":"The ID of the webhook to update. Provided as a path parameter."}],"security":[{"apiKey":[]}]},"delete":{"summary":"Delete Hook","description":"Deletes a webhook based on its ID. This action is irreversible.","operationId":"hooks.delete","tags":["hooks"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"hook"},"deleted":{"type":"boolean","const":true}},"required":["id","object","deleted"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"hookId","in":"path","required":true,"schema":{"type":"string"},"description":"The ID of the webhook to delete. Provided as a path parameter."}],"security":[{"apiKey":[]}]}},"/integrations":{"get":{"summary":"List Available Integrations","description":"Retrieves all available integrations from the marketplace that can be created and connected.","operationId":"integrations.find","tags":["integrations"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationListSchema"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]},"post":{"summary":"Create Integration","description":"Creates a new integration or returns installation URL for marketplace integrations. For storage integrations (blob), creates the store directly. For marketplace integrations, creates an integration link and returns a URL for the user to complete installation.","operationId":"integrations.create","tags":["integrations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"blob","description":"Create a blob storage integration."},"name":{"type":"string","minLength":1,"description":"Name for the blob storage integration."},"vercelProjectId":{"type":"string","minLength":1,"description":"Vercel project ID to connect the blob storage to."},"access":{"default":"private","description":"Access level for the blob store. \"private\" means a token is required to read blobs (for sensitive data). \"public\" means blobs are publicly accessible via URL (for assets like images).","type":"string","enum":["public","private"]}},"required":["type","name","vercelProjectId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"marketplace","description":"Create a marketplace integration."},"productId":{"type":"string","minLength":1,"description":"The product ID from the marketplace (e.g., \"iap_xxxxx\" for products, or slug for integrations)."},"vercelProjectId":{"type":"string","minLength":1,"description":"Vercel project ID to connect the integration to (required for marketplace integrations)."}},"required":["type","productId","vercelProjectId"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The ID of the integration."},"object":{"type":"string","const":"integration","description":"The object type."},"slug":{"type":"string","description":"The slug of the integration."},"name":{"type":"string","description":"The name of the integration."},"description":{"type":"string","description":"A short description of the integration."},"iconUrl":{"type":"string","description":"URL to the integration icon."},"storeId":{"type":"string","description":"The ID of the created store/integration."},"type":{"type":"string","const":"storage","description":"Indicates this is a storage integration that was created directly."}},"required":["id","object","slug","name","description","iconUrl","storeId","type"],"additionalProperties":false},{"type":"object","properties":{"integrationId":{"type":"string","description":"The ID of the integration."},"installationUrl":{"type":"string","format":"uri","description":"URL where the user should go to complete the integration installation."},"token":{"type":"string","description":"Token for tracking the installation process."},"expiresAt":{"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":"When the installation link expires."},"type":{"type":"string","const":"marketplace","description":"Indicates this requires user installation via Vercel marketplace."}},"required":["integrationId","installationUrl","token","expiresAt","type"],"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]}},"/products":{"get":{"summary":"List Available Products","description":"Retrieves all available marketplace products that can be used with v0.","operationId":"products.find","tags":["products"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductListSchema"}}}},"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":[]}]}},"/integrations/vercel/projects":{"get":{"summary":"Find Vercel Projects","description":"Retrieves a list of Vercel projects linked to your integration. Useful for associating chats, deployments, or hooks with specific Vercel projects.","operationId":"integrations.vercel.projects.find","tags":["integrations"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/VercelProjectSummary"}}},"required":["object","data"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]},"post":{"summary":"Create Vercel Project","description":"Links a Vercel project to an existing v0 project. Enables Vercel-related features and deployment integration within the v0 workspace.","operationId":"integrations.vercel.projects.create","tags":["integrations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","description":"The ID of the v0 project to link to the new Vercel project."},"name":{"type":"string","description":"The name to assign to the new Vercel project."}},"required":["projectId","name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VercelProjectDetail"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]}},"/projects":{"get":{"summary":"Find Projects","description":"Returns a list of all v0 projects in your workspace. Useful for browsing or managing projects across different chats or use cases.","operationId":"projects.find","tags":["projects"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProjectSummary"}}},"required":["object","data"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]},"post":{"summary":"Create Project","description":"Creates a new v0 project with an optional description, icon, environment variables, and instructions. Projects help organize chats and manage context.","operationId":"projects.create","tags":["projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"The name of the project."},"description":{"description":"A brief summary of the project’s purpose.","type":"string","maxLength":1000},"icon":{"default":"icon-wand-sparkles","description":"An icon identifier to visually represent the project.","type":"string"},"environmentVariables":{"description":"A list of key-value pairs used to define runtime variables for the project.","type":"array","items":{"type":"object","properties":{"key":{"type":"string","maxLength":255},"value":{"type":"string","maxLength":1000}},"required":["key","value"],"additionalProperties":false}},"instructions":{"description":"Guidance or goals that provide context for the model when working within the project.","type":"string","maxLength":2000},"vercelProjectId":{"description":"The ID of an existing Vercel project to link to. If not provided, a new Vercel project will be created.","type":"string"},"privacy":{"description":"The privacy setting for the project. For user accounts, this is always \"private\". For team/enterprise accounts, this can be either \"private\" or \"team\".","type":"string","enum":["private","team"]}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the project."},"object":{"type":"string","const":"project","description":"Fixed value identifying this object as a project."},"name":{"type":"string","description":"The name of the project as defined by the user."},"privacy":{"type":"string","enum":["private","team"],"description":"The privacy setting for the project - either private or team."},"vercelProjectId":{"description":"Optional ID of the linked Vercel project, if connected.","type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The ISO timestamp representing when the project was created."},"updatedAt":{"description":"The ISO timestamp of the most recent update, if available.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"apiUrl":{"type":"string","format":"uri","description":"The API endpoint URL for accessing this project programmatically."},"webUrl":{"type":"string","format":"uri","description":"The web URL where the project can be viewed or managed."},"description":{"description":"The description of the project.","type":"string"},"instructions":{"description":"The instructions for the project.","type":"string"},"chats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the chat."},"object":{"type":"string","const":"chat","description":"Fixed value identifying this object as a chat."},"shareable":{"type":"boolean","description":"Indicates whether the chat can be shared via public link."},"privacy":{"type":"string","enum":["public","private","team","team-edit","unlisted"],"description":"Defines the visibility of the chat—private, team-only, or public."},"name":{"description":"An optional name assigned to the chat by the user.","type":"string"},"title":{"type":"string","description":"Deprecated title field preserved for backward compatibility.","deprecated":true},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The ISO timestamp representing when the chat was created."},"updatedAt":{"description":"The ISO timestamp of the last update to the chat.","type":"string"},"favorite":{"type":"boolean","description":"Indicates whether the chat is marked as a favorite."},"authorId":{"type":"string","description":"The ID of the user who created the chat."},"projectId":{"description":"Optional ID of the v0 project associated with this chat.","type":"string"},"vercelProjectId":{"description":"Optional ID of the linked Vercel project, if connected.","type":"string"},"webUrl":{"type":"string","description":"Web URL to view this chat in the browser."},"apiUrl":{"type":"string","description":"API URL to access this chat via the API."},"latestVersion":{"description":"The most recent generated version of the chat, if available.","type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the version."},"object":{"type":"string","const":"version","description":"Fixed value identifying this object as a version."},"status":{"type":"string","enum":["pending","completed","failed"],"description":"The current status of the version generation process."},"demoUrl":{"description":"Optional URL for previewing the generated output.","type":"string"},"screenshotUrl":{"type":"string","description":"URL to retrieve a screenshot of this version."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The date and time when the version was created, in ISO 8601 format."},"updatedAt":{"description":"The date and time when the version was last updated, in ISO 8601 format.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","object","status","createdAt"],"additionalProperties":false}},"required":["id","object","shareable","privacy","createdAt","favorite","authorId","webUrl","apiUrl"],"additionalProperties":false,"description":"Summary of a chat, including metadata like privacy, author, latest version, and URLs."},"description":"List of all chats that are associated with this project."}},"required":["id","object","name","privacy","createdAt","apiUrl","webUrl","chats"],"additionalProperties":false,"description":"Full representation of a project, including its associated chats."}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]}},"/projects/{projectId}":{"get":{"summary":"Get Project by ID","description":"Retrieves the details of a specific v0 project by its ID.","operationId":"projects.getById","tags":["projects"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the project."},"object":{"type":"string","const":"project","description":"Fixed value identifying this object as a project."},"name":{"type":"string","description":"The name of the project as defined by the user."},"privacy":{"type":"string","enum":["private","team"],"description":"The privacy setting for the project - either private or team."},"vercelProjectId":{"description":"Optional ID of the linked Vercel project, if connected.","type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The ISO timestamp representing when the project was created."},"updatedAt":{"description":"The ISO timestamp of the most recent update, if available.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"apiUrl":{"type":"string","format":"uri","description":"The API endpoint URL for accessing this project programmatically."},"webUrl":{"type":"string","format":"uri","description":"The web URL where the project can be viewed or managed."},"description":{"description":"The description of the project.","type":"string"},"instructions":{"description":"The instructions for the project.","type":"string"},"chats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the chat."},"object":{"type":"string","const":"chat","description":"Fixed value identifying this object as a chat."},"shareable":{"type":"boolean","description":"Indicates whether the chat can be shared via public link."},"privacy":{"type":"string","enum":["public","private","team","team-edit","unlisted"],"description":"Defines the visibility of the chat—private, team-only, or public."},"name":{"description":"An optional name assigned to the chat by the user.","type":"string"},"title":{"type":"string","description":"Deprecated title field preserved for backward compatibility.","deprecated":true},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The ISO timestamp representing when the chat was created."},"updatedAt":{"description":"The ISO timestamp of the last update to the chat.","type":"string"},"favorite":{"type":"boolean","description":"Indicates whether the chat is marked as a favorite."},"authorId":{"type":"string","description":"The ID of the user who created the chat."},"projectId":{"description":"Optional ID of the v0 project associated with this chat.","type":"string"},"vercelProjectId":{"description":"Optional ID of the linked Vercel project, if connected.","type":"string"},"webUrl":{"type":"string","description":"Web URL to view this chat in the browser."},"apiUrl":{"type":"string","description":"API URL to access this chat via the API."},"latestVersion":{"description":"The most recent generated version of the chat, if available.","type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the version."},"object":{"type":"string","const":"version","description":"Fixed value identifying this object as a version."},"status":{"type":"string","enum":["pending","completed","failed"],"description":"The current status of the version generation process."},"demoUrl":{"description":"Optional URL for previewing the generated output.","type":"string"},"screenshotUrl":{"type":"string","description":"URL to retrieve a screenshot of this version."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The date and time when the version was created, in ISO 8601 format."},"updatedAt":{"description":"The date and time when the version was last updated, in ISO 8601 format.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","object","status","createdAt"],"additionalProperties":false}},"required":["id","object","shareable","privacy","createdAt","favorite","authorId","webUrl","apiUrl"],"additionalProperties":false,"description":"Summary of a chat, including metadata like privacy, author, latest version, and URLs."},"description":"List of all chats that are associated with this project."}},"required":["id","object","name","privacy","createdAt","apiUrl","webUrl","chats"],"additionalProperties":false,"description":"Full representation of a project, including its associated chats."}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project to retrieve."}],"security":[{"apiKey":[]}]},"patch":{"summary":"Update Project","description":"Updates the metadata of an existing project using its `projectId`. Supports changes to the project name and privacy setting.","operationId":"projects.update","tags":["projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"A new name to assign to the project. Helps with identification and organization.","type":"string"},"description":{"description":"A new description to assign to the project. Helps with identification and organization.","type":"string"},"instructions":{"description":"Guidance or goals that provide context for the model when working within the project.","type":"string"},"privacy":{"description":"The privacy setting for the project. For user accounts, this must be \"private\". For team/enterprise accounts, this can be either \"private\" or \"team\".","type":"string","enum":["private","team"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the project."},"object":{"type":"string","const":"project","description":"Fixed value identifying this object as a project."},"name":{"type":"string","description":"The name of the project as defined by the user."},"privacy":{"type":"string","enum":["private","team"],"description":"The privacy setting for the project - either private or team."},"vercelProjectId":{"description":"Optional ID of the linked Vercel project, if connected.","type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The ISO timestamp representing when the project was created."},"updatedAt":{"description":"The ISO timestamp of the most recent update, if available.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"apiUrl":{"type":"string","format":"uri","description":"The API endpoint URL for accessing this project programmatically."},"webUrl":{"type":"string","format":"uri","description":"The web URL where the project can be viewed or managed."},"description":{"description":"The description of the project.","type":"string"},"instructions":{"description":"The instructions for the project.","type":"string"},"chats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the chat."},"object":{"type":"string","const":"chat","description":"Fixed value identifying this object as a chat."},"shareable":{"type":"boolean","description":"Indicates whether the chat can be shared via public link."},"privacy":{"type":"string","enum":["public","private","team","team-edit","unlisted"],"description":"Defines the visibility of the chat—private, team-only, or public."},"name":{"description":"An optional name assigned to the chat by the user.","type":"string"},"title":{"type":"string","description":"Deprecated title field preserved for backward compatibility.","deprecated":true},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The ISO timestamp representing when the chat was created."},"updatedAt":{"description":"The ISO timestamp of the last update to the chat.","type":"string"},"favorite":{"type":"boolean","description":"Indicates whether the chat is marked as a favorite."},"authorId":{"type":"string","description":"The ID of the user who created the chat."},"projectId":{"description":"Optional ID of the v0 project associated with this chat.","type":"string"},"vercelProjectId":{"description":"Optional ID of the linked Vercel project, if connected.","type":"string"},"webUrl":{"type":"string","description":"Web URL to view this chat in the browser."},"apiUrl":{"type":"string","description":"API URL to access this chat via the API."},"latestVersion":{"description":"The most recent generated version of the chat, if available.","type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the version."},"object":{"type":"string","const":"version","description":"Fixed value identifying this object as a version."},"status":{"type":"string","enum":["pending","completed","failed"],"description":"The current status of the version generation process."},"demoUrl":{"description":"Optional URL for previewing the generated output.","type":"string"},"screenshotUrl":{"type":"string","description":"URL to retrieve a screenshot of this version."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The date and time when the version was created, in ISO 8601 format."},"updatedAt":{"description":"The date and time when the version was last updated, in ISO 8601 format.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","object","status","createdAt"],"additionalProperties":false}},"required":["id","object","shareable","privacy","createdAt","favorite","authorId","webUrl","apiUrl"],"additionalProperties":false,"description":"Summary of a chat, including metadata like privacy, author, latest version, and URLs."},"description":"List of all chats that are associated with this project."}},"required":["id","object","name","privacy","createdAt","apiUrl","webUrl","chats"],"additionalProperties":false,"description":"Full representation of a project, including its associated chats."}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project to update. Provided as a path parameter."}],"security":[{"apiKey":[]}]},"delete":{"summary":"Delete Project","description":"Deletes a specific project based on the provided projectId. This operation marks the project as deleted and is irreversible.","operationId":"projects.delete","tags":["projects"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the deleted project."},"object":{"type":"string","const":"project","description":"Fixed value identifying this object as a project."},"deleted":{"type":"boolean","const":true,"description":"Confirmation that the project has been deleted."}},"required":["id","object","deleted"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project to delete. This must be passed as a path parameter in the URL."},{"name":"deleteAllChats","in":"query","required":false,"schema":{"default":"false","description":"If true, deletes all the chats associated with the given project ID. Deleting is permanent. Defaults to false.","type":"string","enum":["true","false"]},"description":"If true, deletes all the chats associated with the given project ID. Deleting is permanent. Defaults to false."}],"security":[{"apiKey":[]}]}},"/projects/{projectId}/assign":{"post":{"summary":"Assign Project to Chat","description":"Links an existing v0 project to a specific chat. Helps group conversations under a shared project context.","operationId":"projects.assign","tags":["projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatId":{"type":"string","description":"The ID of the chat to assign the project to."}},"required":["chatId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"project"},"id":{"type":"string"},"assigned":{"type":"boolean","const":true}},"required":["object","id","assigned"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"},"description":"The ID of the project to assign."}],"security":[{"apiKey":[]}]}},"/projects/{projectId}/env-vars":{"get":{"summary":"Find Environment Variables","description":"Retrieves all environment variables for a given project.","operationId":"projects.findEnvVars","tags":["projects"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentVariableSummarySchema"}}},"required":["object","data"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project whose environment variables should be retrieved."},{"name":"decrypted","in":"query","required":false,"schema":{"description":"Whether to return decrypted values. Defaults to false (encrypted).","type":"string","enum":["true","false"]},"description":"Whether to return decrypted values. Defaults to false (encrypted)."}],"security":[{"apiKey":[]}]},"post":{"summary":"Create Environment Variables","description":"Creates new environment variables for a given project. This endpoint will fail if any of the specified environment variable keys already exist, unless upsert is set to true.","operationId":"projects.createEnvVars","tags":["projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"environmentVariables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"The name of the environment variable."},"value":{"type":"string","description":"The value of the environment variable."}},"required":["key","value"],"additionalProperties":false},"description":"An array of environment variables to create with key and value fields."},"upsert":{"description":"Whether to overwrite existing environment variables with the same keys. Defaults to false.","type":"boolean"}},"required":["environmentVariables"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentVariableSummarySchema"}}},"required":["object","data"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project where environment variables should be created."},{"name":"decrypted","in":"query","required":false,"schema":{"description":"Whether to return decrypted values. Defaults to false (encrypted).","type":"string","enum":["true","false"]},"description":"Whether to return decrypted values. Defaults to false (encrypted)."}],"security":[{"apiKey":[]}]},"patch":{"summary":"Update Environment Variables","description":"Updates multiple environment variables for a given project. Only the value of each environment variable can be updated.","operationId":"projects.updateEnvVars","tags":["projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"environmentVariables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the environment variable to update."},"value":{"type":"string","description":"The new value of the environment variable."}},"required":["id","value"],"additionalProperties":false},"description":"An array of environment variables to update with id and value fields."}},"required":["environmentVariables"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentVariableSummarySchema"}}},"required":["object","data"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project whose environment variables should be updated."},{"name":"decrypted","in":"query","required":false,"schema":{"description":"Whether to return decrypted values. Defaults to false (encrypted).","type":"string","enum":["true","false"]},"description":"Whether to return decrypted values. Defaults to false (encrypted)."}],"security":[{"apiKey":[]}]}},"/projects/{projectId}/env-vars/delete":{"post":{"summary":"Delete Environment Variables","description":"Deletes multiple environment variables for a given project by their IDs.","operationId":"projects.deleteEnvVars","tags":["projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"environmentVariableIds":{"type":"array","items":{"type":"string","description":"The unique identifier of the environment variable to delete."},"description":"An array of environment variable IDs to delete."}},"required":["environmentVariableIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"environment_variable"},"deleted":{"type":"boolean","const":true}},"required":["id","object","deleted"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project whose environment variables should be deleted."}],"security":[{"apiKey":[]}]}},"/projects/{projectId}/env-vars/{environmentVariableId}":{"get":{"summary":"Get Environment Variable","description":"Retrieves a specific environment variable for a given project by its ID, including its value.","operationId":"projects.getEnvVar","tags":["projects"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"environment_variable"},"data":{"$ref":"#/components/schemas/EnvironmentVariableDetailSchema"}},"required":["object","data"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project that owns the environment variable."},{"name":"environmentVariableId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the environment variable to retrieve."},{"name":"decrypted","in":"query","required":false,"schema":{"description":"Whether to return decrypted values. Defaults to false (encrypted).","type":"string","enum":["true","false"]},"description":"Whether to return decrypted values. Defaults to false (encrypted)."}],"security":[{"apiKey":[]}]}},"/projects/{vercelProjectId}/integrations":{"get":{"summary":"List Vercel Project Integrations","description":"Retrieves all integrations linked to a specific Vercel project, showing their connection status and metadata.","operationId":"projects.listIntegrations","tags":["projects"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConnectionListSchema"}}}},"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":"vercelProjectId","in":"path","required":true,"schema":{"type":"string"},"description":"The Vercel project ID to list integrations for."}],"security":[{"apiKey":[]}]}},"/projects/{vercelProjectId}/integrations/{integrationId}":{"post":{"summary":"Connect Vercel Project to Integration","description":"Creates a persistent connection between a Vercel project and an integration, enabling integration features and functionality within the project context.","operationId":"projects.connectIntegration","tags":["projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"envVarPrefix":{"description":"Optional environment variable prefix for the integration.","type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConnectionDetailSchema"}}}},"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":"vercelProjectId","in":"path","required":true,"schema":{"type":"string"},"description":"The Vercel project ID to link to the integration."},{"name":"integrationId","in":"path","required":true,"schema":{"type":"string"},"description":"The ID of the integration to link to the project."}],"security":[{"apiKey":[]}]}},"/rate-limits":{"get":{"summary":"Find Rate Limit","description":"Retrieves rate limit information for a given scope. Useful for monitoring usage limits and avoiding throttling.","operationId":"rateLimits.find","tags":["rateLimits"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"remaining":{"type":"number"},"reset":{"type":"number"},"limit":{"type":"number"},"dailyLimit":{"description":"Daily message limit information for free users.","type":"object","properties":{"limit":{"type":"number","description":"The maximum number of daily messages allowed for free users."},"remaining":{"type":"number","description":"The number of messages the user has remaining for the day."},"reset":{"type":"number","description":"Unix timestamp (in milliseconds) when the daily limit resets."},"isWithinGracePeriod":{"type":"boolean","description":"Whether the user is within the 48-hour grace period for new users, during which usage tracking is disabled."}},"required":["limit","remaining","reset","isWithinGracePeriod"],"additionalProperties":false}},"required":["limit"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"scope","in":"query","required":false,"schema":{"description":"The context or namespace to check rate limits for (e.g., a project slug or feature area).","type":"string"},"description":"The context or namespace to check rate limits for (e.g., a project slug or feature area)."}],"security":[{"apiKey":[]}]}},"/user":{"get":{"summary":"Get User","description":"Retrieves information about the authenticated user, including their ID, name, email, and account metadata.","operationId":"user.get","tags":["user"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSummarySchema"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]}},"/user/billing":{"get":{"summary":"Get Billing","description":"Fetches billing usage and quota information for the authenticated user. Can be scoped to a specific context (e.g. project or namespace).","operationId":"user.getBilling","tags":["user"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"billingType":{"type":"string","const":"token"},"data":{"type":"object","properties":{"plan":{"type":"string"},"billingMode":{"type":"string","const":"test"},"role":{"type":"string"},"billingCycle":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"}},"required":["start","end"],"additionalProperties":false},"balance":{"type":"object","properties":{"remaining":{"type":"number"},"total":{"type":"number"}},"required":["remaining","total"],"additionalProperties":false},"onDemand":{"type":"object","properties":{"balance":{"type":"number"},"blocks":{"type":"array","items":{"type":"object","properties":{"expirationDate":{"type":"number"},"effectiveDate":{"type":"number"},"originalBalance":{"type":"number"},"currentBalance":{"type":"number"}},"required":["effectiveDate","originalBalance","currentBalance"],"additionalProperties":false}}},"required":["balance"],"additionalProperties":false}},"required":["plan","role","billingCycle","balance","onDemand"],"additionalProperties":false}},"required":["billingType","data"],"additionalProperties":false},{"type":"object","properties":{"billingType":{"type":"string","const":"legacy"},"data":{"type":"object","properties":{"remaining":{"type":"number"},"reset":{"type":"number"},"limit":{"type":"number"}},"required":["limit"],"additionalProperties":false}},"required":["billingType","data"],"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"scope","in":"query","required":false,"schema":{"description":"Filters billing data by a specific scope, such as a project ID or slug.","type":"string"},"description":"Filters billing data by a specific scope, such as a project ID or slug."}],"security":[{"apiKey":[]}]}},"/user/plan":{"get":{"summary":"Get Plan","description":"Returns the current subscription plan for the authenticated user, including tier details and feature limits.","operationId":"user.getPlan","tags":["user"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"plan"},"plan":{"type":"string"},"billingCycle":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"}},"required":["start","end"],"additionalProperties":false},"balance":{"type":"object","properties":{"remaining":{"type":"number"},"total":{"type":"number"}},"required":["remaining","total"],"additionalProperties":false}},"required":["object","plan","billingCycle","balance"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]}},"/user/scopes":{"get":{"summary":"Get User Scopes","description":"Retrieves all accessible scopes for the authenticated user, such as personal workspaces or shared teams.","operationId":"user.getScopes","tags":["user"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ScopeSummary"}}},"required":["object","data"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]}},"/user/activity":{"get":{"summary":"Get User Activity","description":"Retrieves the user's activity data showing message counts per day. Returns either the specified year or the last 52 weeks if no year is provided.","operationId":"user.getActivity","tags":["user"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"activity"},"data":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"Date in YYYY-MM-DD format"},"count":{"type":"number","description":"Number of messages sent on this date"}},"required":["date","count"],"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":"year","in":"query","required":false,"schema":{"description":"Optional year to filter activity data (e.g., \"2024\"). If not provided, returns the last 52 weeks of activity.","type":"string","pattern":"^\\d{4}$"},"description":"Optional year to filter activity data (e.g., \"2024\"). If not provided, returns the last 52 weeks of activity."}],"security":[{"apiKey":[]}]}},"/user/activity-years":{"get":{"summary":"Get User Activity Years","description":"Retrieves the years where the user has activity (sent messages). Returns an array of years in descending order (newest first).","operationId":"user.getActivityYears","tags":["user"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"activity_years"},"data":{"type":"array","items":{"type":"string","description":"Year as a 4-digit string (e.g., \"2024\")"}}},"required":["object","data"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]}},"/plans":{"get":{"operationId":"plans.find","tags":["plans"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"user"},"data":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["success","error"],"additionalProperties":false},{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"planSlug":{"type":"string","enum":["v0-level0","v0-free","v0-level3","v0-ultra","v0-team","v0-business","v0-enterprise"]},"planName":{"type":"string"},"realPlan":{"type":"string","enum":["v0-level0","v0-free","v0-level3","v0-ultra","v0-team","v0-business","v0-enterprise"]},"planPeriod":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"required":["start"],"additionalProperties":false},"account":{"type":"object","properties":{"createdAt":{"type":"number"},"mode":{"type":"string","const":"test"},"stripeCustomerId":{"type":["string","null"]},"orbCustomerId":{"type":["string","null"]},"awsMarketplace":{"type":"object","properties":{"v0":{"type":"object","properties":{"customerId":{"type":"string"},"productCode":{"type":"string"}},"required":["customerId","productCode"],"additionalProperties":false},"vercel":{"type":"object","properties":{"customerId":{"type":"string"},"productCode":{"type":"string"}},"required":["customerId","productCode"],"additionalProperties":false}},"additionalProperties":false}},"required":["createdAt","stripeCustomerId","orbCustomerId"],"additionalProperties":false},"billingPeriod":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"required":["start","end"],"additionalProperties":false},"payment":{"type":"object","properties":{"status":{"type":"string","enum":["paid","pending","past_due"]},"openInvoices":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"dueAt":{"type":"number"}},"required":["url","dueAt"],"additionalProperties":false}},"isTrialing":{"type":"boolean"},"instruments":{"type":"array","items":{"type":"object","properties":{"details":{"type":"object","properties":{"type":{"type":"string"},"last4":{"type":"string"},"brand":{"type":"string"},"id":{"type":"string"},"exp":{"type":"object","properties":{"month":{"type":"number"},"year":{"type":"number"}},"additionalProperties":false},"email":{"type":"string"}},"required":["type","last4","brand","id"],"additionalProperties":false}},"required":["details"],"additionalProperties":false}}},"required":["status","openInvoices"],"additionalProperties":false},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{},{"type":"null"}]}},"products":{"type":"object","properties":{"teamSeats":{"type":"object","properties":{"quantity":{"type":"number"}},"required":["quantity"],"additionalProperties":false},"seatsCredit":{"type":"object","properties":{"quantity":{"type":"number"}},"required":["quantity"],"additionalProperties":false}},"additionalProperties":false}},"required":["planSlug","planName","realPlan","planPeriod","account","billingPeriod","metadata","products"],"additionalProperties":false}},"required":["success","data"],"additionalProperties":false}]}},"required":["type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"team"},"data":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["success","error"],"additionalProperties":false},{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"planSlug":{"type":"string","enum":["v0-level0","v0-free","v0-level3","v0-ultra","v0-team","v0-business","v0-enterprise"]},"planName":{"type":"string"},"realPlan":{"type":"string","enum":["v0-level0","v0-free","v0-level3","v0-ultra","v0-team","v0-business","v0-enterprise"]},"planPeriod":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"required":["start"],"additionalProperties":false},"account":{"type":"object","properties":{"createdAt":{"type":"number"},"mode":{"type":"string","const":"test"},"stripeCustomerId":{"type":["string","null"]},"orbCustomerId":{"type":["string","null"]},"awsMarketplace":{"type":"object","properties":{"v0":{"type":"object","properties":{"customerId":{"type":"string"},"productCode":{"type":"string"}},"required":["customerId","productCode"],"additionalProperties":false},"vercel":{"type":"object","properties":{"customerId":{"type":"string"},"productCode":{"type":"string"}},"required":["customerId","productCode"],"additionalProperties":false}},"additionalProperties":false}},"required":["createdAt","stripeCustomerId","orbCustomerId"],"additionalProperties":false},"billingPeriod":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"required":["start","end"],"additionalProperties":false},"payment":{"type":"object","properties":{"status":{"type":"string","enum":["paid","pending","past_due"]},"openInvoices":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"dueAt":{"type":"number"}},"required":["url","dueAt"],"additionalProperties":false}},"isTrialing":{"type":"boolean"},"instruments":{"type":"array","items":{"type":"object","properties":{"details":{"type":"object","properties":{"type":{"type":"string"},"last4":{"type":"string"},"brand":{"type":"string"},"id":{"type":"string"},"exp":{"type":"object","properties":{"month":{"type":"number"},"year":{"type":"number"}},"additionalProperties":false},"email":{"type":"string"}},"required":["type","last4","brand","id"],"additionalProperties":false}},"required":["details"],"additionalProperties":false}}},"required":["status","openInvoices"],"additionalProperties":false},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{},{"type":"null"}]}},"products":{"type":"object","properties":{"teamSeats":{"type":"object","properties":{"quantity":{"type":"number"}},"required":["quantity"],"additionalProperties":false},"seatsCredit":{"type":"object","properties":{"quantity":{"type":"number"}},"required":["quantity"],"additionalProperties":false}},"additionalProperties":false}},"required":["planSlug","planName","realPlan","planPeriod","account","billingPeriod","metadata","products"],"additionalProperties":false}},"required":["success","data"],"additionalProperties":false}]},"teamId":{"type":"string"}},"required":["type","data","teamId"],"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"}}}}},"security":[{"apiKey":[]}]}},"/magic-link":{"post":{"operationId":"magicLink.create","tags":["magicLink"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"redirect":{"type":"string"}},"required":["redirect"],"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"}}}}},"security":[{"apiKey":[]}]}},"/notifications/device-token":{"post":{"operationId":"notifications.deviceToken.create","tags":["notifications"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceId":{"type":"string"},"token":{"type":"string"},"tokenType":{"default":"push","type":"string","enum":["push","push_to_start"]},"bundleId":{"type":"string"},"platform":{"default":"ios","type":"string","enum":["ios","android"]}},"required":["deviceId","token"],"additionalProperties":false}}}},"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"}}}}},"security":[{"apiKey":[]}]}},"/notifications/device-token/{deviceId}":{"delete":{"operationId":"notifications.deviceToken.{deviceId}.delete","tags":["notifications"],"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":"deviceId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter \"deviceId\""},{"name":"cleanAll","in":"query","required":false,"schema":{"default":"false","type":"string","enum":["true","false"]},"description":"Query parameter \"cleanAll\""},{"name":"bundleId","in":"query","required":false,"schema":{"type":"string"},"description":"Query parameter \"bundleId\""}],"security":[{"apiKey":[]}]}},"/notifications/live-activity-update-token":{"post":{"operationId":"notifications.liveActivityUpdateToken.create","tags":["notifications"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"id":{"type":"string"}},"required":["token","id"],"additionalProperties":false}}}},"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"}}}}},"security":[{"apiKey":[]}]}},"/user/preferences":{"get":{"operationId":"user.preferences.find","tags":["user"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPreferencesResponseSchema"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]},"post":{"operationId":"user.preferences.create","tags":["user"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"notifications":{"type":"object","properties":{"liveActivity":{"type":"boolean","description":"Whether the user wants to receive live activities."},"pushNotifications":{"type":"boolean","description":"Whether the user wants to receive push notifications."}},"required":["liveActivity","pushNotifications"],"additionalProperties":false,"description":"The user's preferred method for receiving notifications."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPreferencesPostResponseSchema"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]}},"/user/billing/redeem-usage-code":{"post":{"summary":"Redeem a usage code","description":"Redeems a usage code and credits the active scope using Copper as the source of truth.","operationId":"user.billing.redeemUsageCode.create","tags":["user"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1}},"required":["code"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"credits":{"type":"string"}},"required":["success","message","credits"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]}},"/search":{"get":{"summary":"Search Chats and Projects","description":"Search across chats and projects with optional query string and type filtering","operationId":"search.find","tags":["search"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/SearchResultItem"}},"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":"query","in":"query","required":false,"schema":{"type":"string","minLength":1,"description":"Search query to filter chats and projects"},"description":"Search query to filter chats and projects"},{"name":"type","in":"query","required":false,"schema":{"description":"Filter results by type. Can be repeated (type=chat&type=project) or a single type","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"Filter results by type. Can be repeated (type=chat&type=project) or a single type"},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"number","minimum":1,"maximum":150},"description":"Query parameter \"limit\""},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"Base64 encoded cursor containing pagination data"},"description":"Base64 encoded cursor containing pagination data"}],"security":[{"apiKey":[]}]}},"/send-feedback":{"post":{"summary":"Send Feedback","description":"Accepts user feedback with sentiment analysis","operationId":"feedback.send","tags":["feedback"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"feedback":{"type":"string","description":"User feedback content"},"sentiment":{"type":"string","enum":["good","bad","neutral"],"description":"Sentiment of the feedback"},"href":{"type":"string","description":"The href/location where the feedback was submitted"}},"required":["feedback","sentiment","href"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]}},"/chats/{chatId}/versions/{versionId}/restore":{"post":{"summary":"Restore Block","description":"Restores a block to a specific version.","operationId":"chats.restore","tags":["chats"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionDetail"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the chat containing the version to restore."},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the version to restore."}],"security":[{"apiKey":[]}]}},"/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":[]}]}},"/agent/runtime-errors":{"post":{"summary":"Send Agent Runtime Error","description":"Sends and stores agent runtime errors for a specific block","operationId":"agent.runtime-errors.send","tags":["agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"blockId":{"type":"string","description":"The block ID to associate the runtime error with"},"fullErrorMessage":{"type":"string","description":"The full error message to store"}},"required":["blockId","fullErrorMessage"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]}},"/integrations/wizard":{"post":{"summary":"Update Data From Wizard","description":"Update the wizard data for a specific block.","operationId":"integrations.wizard.create","tags":["integrations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"setEnvironmentVariables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1,"maxLength":65536},"targets":{"type":"array","items":{"type":"string","enum":["production","preview","development"]}}},"required":["key","value"],"additionalProperties":false}},"runActions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["supabase-chat-url"]}},"required":["action"],"additionalProperties":false}},"connectIntegrations":{"type":"array","items":{"type":"object","properties":{"integrationId":{"type":"string"},"name":{"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"]},"existingInstanceId":{"type":"string"},"importExisting":{"type":"boolean"},"acceptedLinks":{"type":"object","properties":{"eulaLink":{"type":"boolean"},"privacyLink":{"type":"boolean"}},"required":["eulaLink","privacyLink"],"additionalProperties":false},"useMarketplaceFlow":{"type":"boolean"},"targets":{"type":"array","items":{"type":"string","enum":["production","preview","development"]}},"allowEnvOverride":{"type":"boolean"},"access":{"type":"string","enum":["public","private"]},"region":{"type":"string"}},"required":["integrationId","name"],"additionalProperties":false}},"disableAutoPrompt":{"type":"boolean"},"setBannerDismissed":{"type":"object","properties":{"fingerprint":{"type":"string"},"dismissed":{"type":"boolean"}},"required":["fingerprint","dismissed"],"additionalProperties":false},"blockId":{"type":"string"},"autoCreateV0Project":{"type":"boolean"}},"required":["blockId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","const":"success"},"disabledAutoPrompt":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","const":"success"}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"error"},"message":{"type":"string"}},"required":["status","message"],"additionalProperties":false}]},"setBannerDismissedResult":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","const":"success"}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"error"},"message":{"type":"string"}},"required":["status","message"],"additionalProperties":false}]},"ranActions":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"status":{"type":"string","const":"success"}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"error"},"message":{"type":"string"}},"required":["status","message"],"additionalProperties":false}]},{"type":"object","properties":{"action":{"type":"string","enum":["supabase-chat-url"]}},"required":["action"],"additionalProperties":false}]}},"setEnvironmentVariables":{"allOf":[{"anyOf":[{"type":"object","properties":{"status":{"type":"string","const":"success"}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"error"},"message":{"type":"string"}},"required":["status","message"],"additionalProperties":false}]},{"type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}}},"required":["keys"],"additionalProperties":false}]},"connectedIntegrations":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"status":{"type":"string","const":"success"},"redirectUrl":{"type":"string","format":"uri"},"acceptPolicies":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"addendumLink":{"type":"object","properties":{"url":{"type":"string"},"text":{"type":"string"}},"required":["url","text"],"additionalProperties":false},"eulaLink":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"text":{"type":"string"}},"required":["url","text"],"additionalProperties":false},{"type":"null"}]},"privacyLink":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"text":{"type":"string"}},"required":["url","text"],"additionalProperties":false},{"type":"null"}]},"footerMD":{"type":"string"},"actionButtonText":{"type":"string"}},"required":["title","description","addendumLink","eulaLink","privacyLink","footerMD","actionButtonText"],"additionalProperties":false},"isPending":{"type":"boolean"}},"required":["status","isPending"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"error"},"message":{"type":"string"}},"required":["status","message"],"additionalProperties":false}]},{"type":"object","properties":{"integrationId":{"type":"string"},"integrationName":{"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"]}},"required":["integrationId","integrationName"],"additionalProperties":false}]}},"createdV0Project":{"anyOf":[{"type":"object","properties":{"projectId":{"type":"string"},"name":{"type":"string"},"settings":{"type":"object","properties":{"color":{"type":["string","null"]},"icon":{"type":["string","null"]}},"required":["color","icon"],"additionalProperties":false},"vercelProjectId":{"type":"string"},"isCreator":{"type":"boolean"}},"required":["projectId","name","settings","vercelProjectId","isCreator"],"additionalProperties":false},{"type":"null"}]},"createdVercelProjectId":{"type":["string","null"]}},"required":["status","disabledAutoPrompt","setBannerDismissedResult","ranActions","setEnvironmentVariables","connectedIntegrations","createdV0Project","createdVercelProjectId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"error"},"message":{"type":"string"},"forbidden":{"type":"boolean"}},"required":["status","message"],"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]},"get":{"summary":"Compute Wizard","description":"Compute and retrieve the latest wizard data for a specific block.","operationId":"integrations.wizard.find","tags":["integrations"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","const":"success"},"data":{"type":"object","properties":{"environmentVariables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"keyCreationUrl":{"type":"string","format":"uri"}},"required":["key"],"additionalProperties":false}},"integrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"isConnected":{"type":"boolean"},"name":{"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"]},"pendingRedirect":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"type":"number"}},"required":["url","expiresAt"],"additionalProperties":false},"lightIconUrl":{"type":"string"},"darkIconUrl":{"type":"string"},"description":{"type":"string"},"connectedInstanceName":{"type":["string","null"]},"category":{"type":"string"},"isBeta":{"type":"boolean"},"slug":{"type":"string"},"tooltip":{"type":["string","null"]},"resourceId":{"type":["string","null"]},"existingInstances":{"type":"array","items":{"type":"object","properties":{"isConnected":{"type":"boolean"},"name":{"type":"string"},"id":{"type":"string"},"externalResourceId":{"type":["string","null"]},"manageUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"targets":{"type":"array","items":{"type":"string","enum":["production","preview","development"]}},"connectedTargets":{"type":"array","items":{"type":"string","enum":["production","preview","development"]}}},"required":["isConnected","name","id","externalResourceId","manageUrl"],"additionalProperties":false}},"manageUrls":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"}},"required":["title","url"],"additionalProperties":false}},{"type":"null"}]},"claimFlow":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri"},"learnMoreUrl":{"type":"string"},"description":{"type":"string"},"integrationConfigurationId":{"type":"string"},"resourceId":{"type":"string"}},"required":["url","learnMoreUrl","description","integrationConfigurationId","resourceId"],"additionalProperties":false},{"type":"null"}]},"supportsMcp":{"type":"boolean"},"supportsImport":{"type":"boolean"},"rbac":{"type":"object","properties":{"create":{"type":"boolean"},"update":{"type":"boolean"}},"required":["create","update"],"additionalProperties":false},"mcpPermission":{"anyOf":[{"type":"object","properties":{"currentPermission":{"type":"string","enum":["disabled","manual","auto"]}},"required":["currentPermission"],"additionalProperties":false},{"type":"null"}]},"providerResourceDashboardUrl":{"type":["string","null"]},"metadata":{"type":"object","properties":{"supabase":{"type":"object","properties":{"status":{"type":"string","enum":["paused","active"]},"supabaseProjectUrl":{"type":"string","format":"uri"}},"required":["status","supabaseProjectUrl"],"additionalProperties":false}},"additionalProperties":false},"policies":{"type":"object","properties":{"eulaUrl":{"type":["string","null"]},"privacyPolicyUrl":{"type":["string","null"]},"vercelIntegrationMarketplaceEuaUrl":{"type":"string"}},"required":["eulaUrl","privacyPolicyUrl","vercelIntegrationMarketplaceEuaUrl"],"additionalProperties":false}},"required":["id","isConnected","name","lightIconUrl","darkIconUrl","description","connectedInstanceName","category","isBeta","slug","tooltip","resourceId","existingInstances","manageUrls","claimFlow","supportsMcp","supportsImport","rbac","mcpPermission","providerResourceDashboardUrl","metadata"],"additionalProperties":false}},"scripts":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string"}},"required":["fileName"],"additionalProperties":false}},"actions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["supabase-chat-url"]},"title":{"type":"string"},"info":{"type":"string"}},"required":["action","title"],"additionalProperties":false}},"canShowWizard":{"type":"boolean"},"fingerprint":{"type":["string","null"]},"shouldPrompt":{"type":"boolean"},"bannerDismissed":{"type":"boolean"}},"required":["environmentVariables","integrations","scripts","actions","canShowWizard","fingerprint","shouldPrompt","bannerDismissed"],"additionalProperties":false}},"required":["status","data"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"error"},"message":{"type":"string"},"forbidden":{"type":"boolean"}},"required":["status","message"],"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":"versionId","in":"query","required":true,"schema":{"type":"string","description":"The unique identifier of the version to compute the wizard data for."},"description":"The unique identifier of the version to compute the wizard data for."}],"security":[{"apiKey":[]}]}},"/integrations/project":{"post":{"summary":"Connect Integrations For Project","description":"Connect integrations for a specific project.","operationId":"integrations.project.create","tags":["integrations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"connectIntegrations":{"type":"array","items":{"type":"object","properties":{"integrationId":{"type":"string"},"name":{"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"]},"existingInstanceId":{"type":"string"},"importExisting":{"type":"boolean"},"acceptedLinks":{"type":"object","properties":{"eulaLink":{"type":"boolean"},"privacyLink":{"type":"boolean"}},"required":["eulaLink","privacyLink"],"additionalProperties":false},"useMarketplaceFlow":{"type":"boolean"},"targets":{"type":"array","items":{"type":"string","enum":["production","preview","development"]}},"allowEnvOverride":{"type":"boolean"},"access":{"type":"string","enum":["public","private"]},"region":{"type":"string"}},"required":["integrationId","name"],"additionalProperties":false}},"setEnvironmentVariables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1,"maxLength":65536},"targets":{"type":"array","items":{"type":"string","enum":["production","preview","development"]}}},"required":["key","value"],"additionalProperties":false}},"updateEnvironmentVariables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string","minLength":1},"value":{"type":"string","minLength":1,"maxLength":65536},"targets":{"type":"array","items":{"type":"string","enum":["production","preview","development"]}},"comment":{"type":"string"}},"required":["id"],"additionalProperties":false}},"deleteEnvironmentVariableIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"chatId":{"type":"string"},"v0ProjectId":{},"vercelProjectId":{"type":"string"}},"required":["chatId"],"additionalProperties":false},{"type":"object","properties":{"v0ProjectId":{"type":"string"},"chatId":{},"vercelProjectId":{"type":"string"}},"required":["v0ProjectId"],"additionalProperties":false},{"type":"object","properties":{"vercelProjectId":{"type":"string"},"chatId":{},"v0ProjectId":{}},"required":["vercelProjectId"],"additionalProperties":false}]}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"createdV0Project":{"anyOf":[{"type":"object","properties":{"projectId":{"type":"string"},"name":{"type":"string"},"settings":{"type":"object","properties":{"color":{"type":["string","null"]},"icon":{"type":["string","null"]}},"required":["color","icon"],"additionalProperties":false},"vercelProjectId":{"type":"string"},"isCreator":{"type":"boolean"}},"required":["projectId","name","settings","vercelProjectId","isCreator"],"additionalProperties":false},{"type":"null"}]},"createdVercelProjectId":{"type":["string","null"]},"connectedIntegrations":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"status":{"type":"string","const":"success"},"redirectUrl":{"type":"string","format":"uri"},"acceptPolicies":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"addendumLink":{"type":"object","properties":{"url":{"type":"string"},"text":{"type":"string"}},"required":["url","text"],"additionalProperties":false},"eulaLink":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"text":{"type":"string"}},"required":["url","text"],"additionalProperties":false},{"type":"null"}]},"privacyLink":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"text":{"type":"string"}},"required":["url","text"],"additionalProperties":false},{"type":"null"}]},"footerMD":{"type":"string"},"actionButtonText":{"type":"string"}},"required":["title","description","addendumLink","eulaLink","privacyLink","footerMD","actionButtonText"],"additionalProperties":false},"isPending":{"type":"boolean"}},"required":["status","isPending"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"error"},"message":{"type":"string"}},"required":["status","message"],"additionalProperties":false}]},{"type":"object","properties":{"integrationId":{"type":"string"},"integrationName":{"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"]}},"required":["integrationId","integrationName"],"additionalProperties":false}]}},"setEnvironmentVariables":{"allOf":[{"anyOf":[{"type":"object","properties":{"status":{"type":"string","const":"success"}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"error"},"message":{"type":"string"}},"required":["status","message"],"additionalProperties":false}]},{"type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}}},"required":["keys"],"additionalProperties":false}]},"updatedEnvironmentVariables":{"allOf":[{"anyOf":[{"type":"object","properties":{"status":{"type":"string","const":"success"}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"error"},"message":{"type":"string"}},"required":["status","message"],"additionalProperties":false}]},{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"required":["ids"],"additionalProperties":false}]},"deletedEnvironmentVariables":{"allOf":[{"anyOf":[{"type":"object","properties":{"status":{"type":"string","const":"success"}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"error"},"message":{"type":"string"}},"required":["status","message"],"additionalProperties":false}]},{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"required":["ids"],"additionalProperties":false}]},"status":{"type":"string","const":"success"}},"required":["createdV0Project","createdVercelProjectId","connectedIntegrations","setEnvironmentVariables","updatedEnvironmentVariables","deletedEnvironmentVariables","status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"error"},"message":{"type":"string"},"forbidden":{"type":"boolean"}},"required":["status","message"],"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]},"get":{"summary":"Integrations Data For Project","description":"Compute and retrieve the latest integrations data for a specific v0 Project.","operationId":"integrations.project.find","tags":["integrations"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","const":"success"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"isConnected":{"type":"boolean"},"name":{"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"]},"pendingRedirect":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"type":"number"}},"required":["url","expiresAt"],"additionalProperties":false},"lightIconUrl":{"type":"string"},"darkIconUrl":{"type":"string"},"description":{"type":"string"},"connectedInstanceName":{"type":["string","null"]},"category":{"type":"string"},"isBeta":{"type":"boolean"},"slug":{"type":"string"},"tooltip":{"type":["string","null"]},"resourceId":{"type":["string","null"]},"existingInstances":{"type":"array","items":{"type":"object","properties":{"isConnected":{"type":"boolean"},"name":{"type":"string"},"id":{"type":"string"},"externalResourceId":{"type":["string","null"]},"manageUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"targets":{"type":"array","items":{"type":"string","enum":["production","preview","development"]}},"connectedTargets":{"type":"array","items":{"type":"string","enum":["production","preview","development"]}}},"required":["isConnected","name","id","externalResourceId","manageUrl"],"additionalProperties":false}},"manageUrls":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"}},"required":["title","url"],"additionalProperties":false}},{"type":"null"}]},"claimFlow":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri"},"learnMoreUrl":{"type":"string"},"description":{"type":"string"},"integrationConfigurationId":{"type":"string"},"resourceId":{"type":"string"}},"required":["url","learnMoreUrl","description","integrationConfigurationId","resourceId"],"additionalProperties":false},{"type":"null"}]},"supportsMcp":{"type":"boolean"},"supportsImport":{"type":"boolean"},"rbac":{"type":"object","properties":{"create":{"type":"boolean"},"update":{"type":"boolean"}},"required":["create","update"],"additionalProperties":false},"mcpPermission":{"anyOf":[{"type":"object","properties":{"currentPermission":{"type":"string","enum":["disabled","manual","auto"]}},"required":["currentPermission"],"additionalProperties":false},{"type":"null"}]},"providerResourceDashboardUrl":{"type":["string","null"]},"metadata":{"type":"object","properties":{"supabase":{"type":"object","properties":{"status":{"type":"string","enum":["paused","active"]},"supabaseProjectUrl":{"type":"string","format":"uri"}},"required":["status","supabaseProjectUrl"],"additionalProperties":false}},"additionalProperties":false},"policies":{"type":"object","properties":{"eulaUrl":{"type":["string","null"]},"privacyPolicyUrl":{"type":["string","null"]},"vercelIntegrationMarketplaceEuaUrl":{"type":"string"}},"required":["eulaUrl","privacyPolicyUrl","vercelIntegrationMarketplaceEuaUrl"],"additionalProperties":false}},"required":["id","isConnected","name","lightIconUrl","darkIconUrl","description","connectedInstanceName","category","isBeta","slug","tooltip","resourceId","existingInstances","manageUrls","claimFlow","supportsMcp","supportsImport","rbac","mcpPermission","providerResourceDashboardUrl","metadata"],"additionalProperties":false}}},"required":["status","data"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"error"},"message":{"type":"string"},"forbidden":{"type":"boolean"}},"required":["status","message"],"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":"query","required":false,"schema":{"description":"The chat ID. If undefined, the v0ProjectId must be provided.","type":"string"},"description":"The chat ID. If undefined, the v0ProjectId must be provided."},{"name":"v0ProjectId","in":"query","required":false,"schema":{"description":"The v0 Project ID. If undefined, the chatId must be provided.","type":"string"},"description":"The v0 Project ID. If undefined, the chatId must be provided."}],"security":[{"apiKey":[]}]}},"/reports/usage":{"get":{"summary":"Get Usage Report","description":"Retrieves detailed usage events for the authenticated user or team, including costs, event types, models used, and metadata. Shows the same data as displayed in the usage dashboard. Can be filtered by chatId to show usage for a specific chat, or by userId to show usage for a specific user.","operationId":"reports.getUsage","tags":["reports"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"usage_event"},"type":{"type":"string","enum":["image_generation","message","manual_debit","api_request","inline-edit","buy-template","reverse_template_sale","refund_template_purchase"]},"promptCost":{"type":"string"},"completionCost":{"type":"string"},"totalCost":{"type":"string"},"chatId":{"type":"string"},"messageId":{"type":"string"},"userId":{"description":"Deprecated - use user object instead","type":"string"},"user":{"$ref":"#/components/schemas/UserSummarySchema"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The ISO timestamp representing when the usage event was created."}},"required":["id","object","totalCost","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean"},"nextCursor":{"type":"string"},"nextUrl":{"type":"string"}},"required":["hasMore"],"additionalProperties":false},"meta":{"type":"object","properties":{"totalCount":{"type":"number","description":"Number of events in this response"}},"required":["totalCount"],"additionalProperties":false}},"required":["object","data","pagination","meta"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Query parameter \"startDate\""},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Query parameter \"endDate\""},{"name":"chatId","in":"query","required":false,"schema":{"type":"string"},"description":"Query parameter \"chatId\""},{"name":"messageId","in":"query","required":false,"schema":{"type":"string"},"description":"Query parameter \"messageId\""},{"name":"userId","in":"query","required":false,"schema":{"type":"string"},"description":"Query parameter \"userId\""},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"number","minimum":1,"maximum":150},"description":"Query parameter \"limit\""},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"Base64 encoded cursor containing pagination data"},"description":"Base64 encoded cursor containing pagination data"}],"security":[{"apiKey":[]}]}},"/reports/user-activity":{"get":{"summary":"Get User Activity Report","description":"Retrieves aggregated user activity data for team members, including chat counts, message counts, and activity timestamps. Only available for Enterprise teams with OWNER or BILLING role. Shows the same data as displayed in the Usage settings for Enterprise teams.","operationId":"reports.getUserActivity","tags":["reports"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"user_activity"},"user":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the user."},"object":{"type":"string","const":"user","description":"Fixed value identifying this object as a user."},"name":{"description":"Optional full name of the user.","type":"string"},"email":{"type":"string","description":"The user's email address."},"avatar":{"type":"string","description":"URL to the user's avatar image."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The ISO timestamp representing when the user was created."},"updatedAt":{"description":"The ISO timestamp of the last update to the user.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"teamV0Role":{"anyOf":[{"type":"string","enum":["V0Builder","V0Chatter","V0Viewer"]},{"type":"null"}],"description":"The user's v0 role"}},"required":["id","object","email","avatar","createdAt","teamV0Role"],"additionalProperties":false},"chatCount":{"type":"number","description":"Total number of chats created by the user"},"messageCount":{"type":"number","description":"Total number of messages sent by the user"},"activeDays":{"type":"number","description":"Number of distinct days the user was active"},"firstActivity":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"Timestamp of the user's first activity"},"lastActivity":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}],"description":"Timestamp of the user's last activity"}},"required":["id","object","user","chatCount","messageCount","activeDays","firstActivity","lastActivity"],"additionalProperties":false}},"meta":{"type":"object","properties":{"totalCount":{"type":"number"},"dateRange":{"type":"object","properties":{"start":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"end":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["start","end"],"additionalProperties":false}},"required":["totalCount","dateRange"],"additionalProperties":false}},"required":["object","data","meta"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Query parameter \"startDate\""},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Query parameter \"endDate\""}],"security":[{"apiKey":[]}]}},"/iap/credit":{"post":{"summary":"Mobile IAP credit","description":"Credits an on‑demand ledger based on a verified in‑app purchase. Uses Copper as the source of truth.","operationId":"iap.credit.create","tags":["iap"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"transactionId":{"type":"string","description":"Apple StoreKit 2 transaction identifier"},"jws":{"type":"string","description":"Apple StoreKit 2 transaction JWS"}},"required":["transactionId","jws"],"additionalProperties":false},{"type":"object","properties":{"signedPayload":{"type":"string","description":"The payload in JSON Web Signature (JWS) format, signed by the App Store."}},"required":["signedPayload"],"additionalProperties":false}]}}}},"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"}}}}},"security":[{"apiKey":[]}]}},"/mcp-servers":{"get":{"summary":"List MCP Servers","description":"Returns a list of connected MCP servers for the current user. Use this to check if an MCP preset is already connected.","operationId":"mcpServers.list","tags":["mcpServers"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"mcpServerId":{"type":"string","description":"Unique identifier for the MCP server"},"name":{"type":"string","description":"Display name of the MCP server"},"url":{"type":"string","description":"URL of the MCP server"},"description":{"description":"Description of the MCP server","type":"string"},"enabled":{"type":"boolean","description":"Whether the MCP server is enabled"}},"required":["mcpServerId","name","url","enabled"],"additionalProperties":false}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]}},"/mcp-servers/{mcpServerId}":{"get":{"summary":"Get MCP Server","description":"Retrieves the details of a specific MCP server by its ID.","operationId":"mcpServers.getById","tags":["mcpServers"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"mcp_server","description":"The object type."},"id":{"type":"string","description":"The unique identifier for the MCP server."},"name":{"type":"string","description":"The display name of the MCP server."},"url":{"type":"string","format":"uri","description":"The URL of the MCP server."},"description":{"description":"An optional description of the MCP server.","type":"string"},"enabled":{"type":"boolean","description":"Whether the MCP server is enabled for use in chats."},"auth":{"type":"object","properties":{"type":{"type":"string","enum":["none","bearer","custom-headers","oauth"],"description":"The type of authentication configured."}},"required":["type"],"additionalProperties":false,"description":"Authentication type for the MCP server. Sensitive values like tokens and headers are not returned."},"scope":{"type":"string","enum":["user","team"],"description":"The scope of the MCP server (user or team)."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The ISO timestamp when the MCP server was created."},"updatedAt":{"description":"The ISO timestamp when the MCP server was last updated.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["object","id","name","url","enabled","auth","scope","createdAt"],"additionalProperties":false,"description":"Summary information about an MCP server."}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"mcpServerId","in":"path","required":true,"schema":{"type":"string"},"description":"The ID of the MCP server to retrieve."}],"security":[{"apiKey":[]}]},"patch":{"summary":"Update MCP Server","description":"Updates the configuration of an existing MCP server, including its name, URL, description, enabled status, and authentication settings.","operationId":"mcpServers.update","tags":["mcpServers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"The display name of the MCP server.","type":"string","minLength":1,"maxLength":100},"url":{"description":"The URL of the MCP server.","type":"string","maxLength":500,"format":"uri"},"description":{"description":"An optional description of the MCP server.","type":"string","maxLength":500},"enabled":{"description":"Whether the MCP server is enabled.","type":"boolean"},"auth":{"description":"Authentication configuration.","anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"none","description":"No authentication required."}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"bearer","description":"Bearer token authentication."},"token":{"type":"string","minLength":1,"maxLength":1000,"description":"The bearer token for authentication."}},"required":["type","token"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"custom-headers","description":"Custom headers authentication."},"headers":{"type":"object","propertyNames":{"type":"string","maxLength":100},"additionalProperties":{"type":"string","maxLength":500},"description":"Key-value pairs of custom headers to include in requests."}},"required":["type","headers"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"oauth","description":"OAuth 2.1 authentication."},"config":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri","description":"The OAuth authorization endpoint URL."},"tokenUrl":{"type":"string","format":"uri","description":"The OAuth token endpoint URL."},"registrationUrl":{"description":"The optional dynamic client registration endpoint URL.","type":"string","format":"uri"},"clientId":{"type":"string","minLength":1,"description":"The OAuth client ID."},"clientSecret":{"description":"The optional OAuth client secret. This value is stored securely and is never returned by the API.","type":"string"},"scopes":{"default":[],"description":"OAuth scopes to request during authorization.","type":"array","items":{"type":"string"}},"usePKCE":{"default":true,"description":"Whether to use PKCE for the authorization code flow.","type":"boolean"},"issuer":{"description":"The optional issuer identifier for mix-up protection.","type":"string"},"resource":{"description":"The optional RFC 8707 resource indicator. For MCP servers, this is usually the MCP server URL.","type":"string"},"clientIdMetadataDocumentSupported":{"description":"Whether the authorization server supports Client ID Metadata Documents.","type":"boolean"}},"required":["authorizationUrl","tokenUrl","clientId"],"additionalProperties":false,"description":"OAuth configuration for the MCP server."}},"required":["type","config"],"additionalProperties":false}]},"scope":{"description":"The scope of the MCP server.","type":"string","enum":["user","team"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"mcp_server","description":"The object type."},"id":{"type":"string","description":"The unique identifier for the MCP server."},"name":{"type":"string","description":"The display name of the MCP server."},"url":{"type":"string","format":"uri","description":"The URL of the MCP server."},"description":{"description":"An optional description of the MCP server.","type":"string"},"enabled":{"type":"boolean","description":"Whether the MCP server is enabled for use in chats."},"auth":{"type":"object","properties":{"type":{"type":"string","enum":["none","bearer","custom-headers","oauth"],"description":"The type of authentication configured."}},"required":["type"],"additionalProperties":false,"description":"Authentication type for the MCP server. Sensitive values like tokens and headers are not returned."},"scope":{"type":"string","enum":["user","team"],"description":"The scope of the MCP server (user or team)."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The ISO timestamp when the MCP server was created."},"updatedAt":{"description":"The ISO timestamp when the MCP server was last updated.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["object","id","name","url","enabled","auth","scope","createdAt"],"additionalProperties":false,"description":"Summary information about an MCP server."}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"mcpServerId","in":"path","required":true,"schema":{"type":"string"},"description":"The ID of the MCP server to update."}],"security":[{"apiKey":[]}]},"delete":{"summary":"Delete MCP Server","description":"Deletes an MCP server based on its ID. This action is irreversible and will also remove any associated OAuth tokens.","operationId":"mcpServers.delete","tags":["mcpServers"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"mcp_server"},"id":{"type":"string","description":"The ID of the deleted MCP server."},"deleted":{"type":"boolean","const":true,"description":"Indicates the server was deleted."}},"required":["object","id","deleted"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"mcpServerId","in":"path","required":true,"schema":{"type":"string"},"description":"The ID of the MCP server to delete."}],"security":[{"apiKey":[]}]}},"/mcp-servers/{mcpServerId}/oauth/authorize":{"post":{"summary":"Create MCP Server OAuth Authorization URL","description":"Creates an OAuth authorization URL for an OAuth MCP server. Redirect the user to the returned URL, and the Platform API OAuth callback will store the resulting tokens before redirecting to your returnUrl.","operationId":"mcpServers.createOAuthAuthorizationUrl","tags":["mcpServers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"returnUrl":{"type":"string","format":"uri","description":"An absolute URL in your application where v0 redirects after OAuth completes. HTTPS is required in production."}},"required":["returnUrl"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"mcp_server_oauth_authorization","description":"The object type."},"mcpServerId":{"type":"string","description":"The MCP server being authorized."},"url":{"type":"string","format":"uri","description":"The provider authorization URL to redirect the user to."},"state":{"type":"string","description":"The OAuth state value. This expires after 5 minutes."},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The ISO timestamp when the authorization URL expires."}},"required":["object","mcpServerId","url","state","expiresAt"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"parameters":[{"name":"mcpServerId","in":"path","required":true,"schema":{"type":"string"},"description":"The ID of the OAuth MCP server to authorize."}],"security":[{"apiKey":[]}]}},"/terms":{"get":{"operationId":"terms.find","tags":["terms"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["never_set","valid","stale"]},"title":{"type":"string"},"shouldShowModal":{"type":"boolean"},"is2026ToSUpdate":{"type":"boolean"}},"required":["status","title","shouldShowModal","is2026ToSUpdate"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]}},"/terms/accept":{"post":{"operationId":"terms.accept.create","tags":["terms"],"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"}}}}},"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":[]}]}},"/native-version":{"get":{"operationId":"nativeVersion.find","tags":["nativeVersion"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"needsToUpgrade":{"type":"boolean","const":true},"upgradeUrl":{"type":"string"},"buttonLabel":{"type":"string"},"distribution":{"type":"string","enum":["testflight","app-store","play-store"]},"title":{"type":"string"},"description":{"type":"string"}},"required":["needsToUpgrade","upgradeUrl","buttonLabel","distribution","title","description"],"additionalProperties":false},{"type":"object","properties":{"needsToUpgrade":{"type":"boolean","const":false}},"required":["needsToUpgrade"],"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":"version","in":"query","required":true,"schema":{"type":"string"},"description":"Query parameter \"version\""},{"name":"buildNumber","in":"query","required":false,"schema":{"type":"number"},"description":"Query parameter \"buildNumber\""},{"name":"distribution","in":"query","required":true,"schema":{"type":"string","enum":["testflight","app-store","play-store"]},"description":"Query parameter \"distribution\""}],"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":[]}]}},"/prompt-templates":{"get":{"summary":"Find Prompt Templates","description":"Returns a list of prompt templates that can be used to quickly start new chats. These are pre-defined prompts that help users get started with common use cases.","operationId":"promptTemplates.find","tags":["promptTemplates"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"messageId":{"type":"string","description":"Unique identifier for the template message"},"chatTitle":{"type":"string","description":"Display title for the template"},"name":{"type":"string","description":"Internal name identifier for the template"},"prompt":{"type":"string","description":"The full prompt text to use when selected"},"shortDescription":{"type":"string","description":"A short description of the template"},"mobileAsset":{"description":"Mobile assets for the template","anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"sfSymbol"},"name":{"type":"string"},"weight":{"type":"string"}},"required":["type","name","weight"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"url":{"type":"string"}},"required":["type","url"],"additionalProperties":false}]}},"required":["messageId","chatTitle","name","prompt","shortDescription"],"additionalProperties":false}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}},"security":[{"apiKey":[]}]}},"/git/{org}/repos":{"get":{"operationId":"git.findRepos","tags":["git"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"value":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the repository."},"updatedAt":{"type":"string","description":"ISO timestamp of last update."},"url":{"type":"string","description":"The URL of the repository."}},"required":["name","updatedAt","url"],"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":"org","in":"path","required":true,"schema":{"type":"string"},"description":"The namespace ID (organization or user)."},{"name":"search","in":"query","required":false,"schema":{"description":"Search query to filter repositories.","type":"string"},"description":"Search query to filter repositories."}],"security":[{"apiKey":[]}]}},"/git/{org}/{repo}":{"get":{"operationId":"git.{org}.{repo}.find","tags":["git"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"value":{"type":"object","properties":{"hasWritePermission":{"type":"boolean","description":"Whether the user has write permission to the repository."},"defaultBranch":{"type":"string","description":"The default branch of the repository."},"repoId":{"type":"number","description":"The GitHub repository ID."},"size":{"type":"number","description":"The size of the repository in KB."},"language":{"description":"The primary language of the repository.","type":["string","null"]},"description":{"description":"The repository description.","type":["string","null"]},"topics":{"type":"array","items":{"type":"string"},"description":"Repository topics/tags."}},"required":["hasWritePermission","defaultBranch","repoId","size","language","description","topics"],"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":"org","in":"path","required":true,"schema":{"type":"string"},"description":"The namespace (organization or user)."},{"name":"repo","in":"path","required":true,"schema":{"type":"string"},"description":"The repository name."}],"security":[{"apiKey":[]}]}},"/git/{org}/{repo}/branches":{"get":{"operationId":"git.findBranches","tags":["git"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"value":{"type":"array","items":{"type":"string"},"description":"List of branch names in the repository."}},"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":"org","in":"path","required":true,"schema":{"type":"string"},"description":"The namespace (organization or user)."},{"name":"repo","in":"path","required":true,"schema":{"type":"string"},"description":"The repository name."},{"name":"search","in":"query","required":false,"schema":{"description":"Search query to filter branches.","type":"string"},"description":"Search query to filter branches."}],"security":[{"apiKey":[]}]}},"/git/{org}/{repo}/projects":{"get":{"operationId":"git.findProjects","tags":["git"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"value":{"type":"array","items":{"type":"object","properties":{"name":{"description":"The name from package.json.","type":"string"},"framework":{"type":"string","enum":["next","nuxt","vite","svelte","astro","services","other"],"description":"The detected framework."},"path":{"type":"string","description":"The path to the project directory."},"size":{"description":"The size of the package.json in bytes.","type":"number"},"dependencies":{"description":"List of dependencies.","type":"array","items":{"type":"string"}}},"required":["framework","path"],"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":"org","in":"path","required":true,"schema":{"type":"string"},"description":"The namespace (organization or user)."},{"name":"repo","in":"path","required":true,"schema":{"type":"string"},"description":"The repository name."},{"name":"branch","in":"query","required":false,"schema":{"description":"The branch to detect projects from.","type":"string"},"description":"The branch to detect projects from."}],"security":[{"apiKey":[]}]}},"/git/projects":{"get":{"operationId":"git.projects.find","tags":["git"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"value":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The Vercel project ID."},"name":{"type":"string","description":"The name of the Vercel project."},"accountId":{"type":"string","description":"The account ID that owns the project."},"createdAt":{"type":"number","description":"Timestamp when the project was created."},"updatedAt":{"type":"number","description":"Timestamp when the project was last updated."},"framework":{"description":"The framework detected for the project.","type":["string","null"]},"latestDeployments":{"description":"Recent deployments for the project.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The deployment ID."},"createdAt":{"type":"number","description":"Timestamp when the deployment was created."},"url":{"type":"string","description":"The deployment URL."},"alias":{"type":"array","items":{"type":"string"},"description":"Aliases for this deployment."}},"required":["id","createdAt","url","alias"],"additionalProperties":false}}},"required":["id","name","accountId","createdAt","updatedAt"],"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":"namespace","in":"query","required":true,"schema":{"type":"string","description":"The namespace (organization or user)."},"description":"The namespace (organization or user)."},{"name":"repo","in":"query","required":true,"schema":{"type":"string","description":"The repository name."},"description":"The repository name."}],"security":[{"apiKey":[]}]}},"/git/namespaces":{"get":{"operationId":"git.namespaces.find","tags":["git"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"value":{"type":"object","properties":{"userNamespace":{"description":"User's personal GitHub namespace.","type":"object","properties":{"id":{"description":"The namespace ID.","type":["string","number"]},"installationId":{"description":"GitHub App installation ID.","type":"number"},"isAccessRestricted":{"description":"Whether access is restricted.","type":"boolean"},"name":{"description":"Display name of the namespace.","type":"string"},"ownerType":{"type":"string","enum":["team","user"],"description":"Whether this is a team or user namespace."},"provider":{"type":"string","description":"Git provider (e.g., \"github\")."},"requireReauth":{"description":"Whether reauthentication is required.","type":"boolean"},"slug":{"type":"string","description":"The namespace slug/username."}},"required":["id","ownerType","provider","slug"],"additionalProperties":false},"orgNamespaces":{"type":"array","items":{"type":"object","properties":{"id":{"description":"The namespace ID.","type":["string","number"]},"installationId":{"description":"GitHub App installation ID.","type":"number"},"isAccessRestricted":{"description":"Whether access is restricted.","type":"boolean"},"name":{"description":"Display name of the namespace.","type":"string"},"ownerType":{"type":"string","enum":["team","user"],"description":"Whether this is a team or user namespace."},"provider":{"type":"string","description":"Git provider (e.g., \"github\")."},"requireReauth":{"description":"Whether reauthentication is required.","type":"boolean"},"slug":{"type":"string","description":"The namespace slug/username."}},"required":["id","ownerType","provider","slug"],"additionalProperties":false},"description":"Organization namespaces the user has access to."},"verifiedGitHubUser":{"description":"Verified GitHub user information (only set if user.verified is true).","type":"object","properties":{"createdAt":{"description":"Unix timestamp of creation.","type":"number"},"email":{"description":"User email address.","type":["string","null"]},"login":{"description":"GitHub username.","type":"string"},"name":{"description":"Display name.","type":["string","null"]},"updatedAt":{"description":"Unix timestamp of last update.","type":"number"},"userId":{"description":"GitHub user ID.","type":"number"},"verified":{"description":"Whether the user is verified.","type":"boolean"}},"additionalProperties":false},"user":{"description":"GitHub user information.","type":"object","properties":{"createdAt":{"description":"Unix timestamp of creation.","type":"number"},"email":{"description":"User email address.","type":["string","null"]},"login":{"description":"GitHub username.","type":"string"},"name":{"description":"Display name.","type":["string","null"]},"updatedAt":{"description":"Unix timestamp of last update.","type":"number"},"userId":{"description":"GitHub user ID.","type":"number"},"verified":{"description":"Whether the user is verified.","type":"boolean"}},"additionalProperties":false}},"required":["orgNamespaces"],"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"}}}}},"security":[{"apiKey":[]}]}},"/git/start-chat":{"post":{"operationId":"git.startChat.create","tags":["git"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"string","description":"The namespace (organization or user)."},"repo":{"type":"string","description":"The repository name."},"baseBranch":{"type":"string","description":"The base branch to start from."},"rootDirectory":{"description":"The root directory of the project within the repository.","type":"string"},"vercelProjectId":{"description":"The Vercel project ID to link to.","type":"string"},"newProjectName":{"description":"Name for a new project to create.","type":"string"},"source":{"type":"string","enum":["url","search","duplicate"],"description":"The source of the chat creation request."},"isE2ETest":{"description":"Whether this is an e2e test request.","type":"boolean"}},"required":["namespace","repo","baseBranch","source"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"value":{"type":"object","properties":{"chatId":{"type":"string","description":"The ID of the newly created chat."},"blockId":{"type":"string","description":"The ID of the initial code block."},"requiredEnvsAndIntegrations":{"type":"object","properties":{"hasRequirements":{"type":"boolean","description":"Whether the project has required environment variables or integrations."},"environmentVariables":{"type":"array","items":{"type":"string"},"description":"List of required environment variable names."},"integrations":{"type":"array","items":{"type":"string"},"description":"List of required integration names."}},"required":["hasRequirements","environmentVariables","integrations"],"additionalProperties":false}},"required":["chatId","blockId","requiredEnvsAndIntegrations"],"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"}}}}},"security":[{"apiKey":[]}]}},"/blank-project/start-chat":{"post":{"operationId":"blankProject.startChat.create","tags":["blankProject"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatName":{"type":"string","description":"The name for the blank project."},"forceVMRendering":{"description":"Force VM rendering mode for this chat.","type":"boolean"}},"required":["chatName"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"value":{"type":"object","properties":{"chatId":{"type":"string","description":"The ID of the newly created chat."},"blockId":{"type":"string","description":"The ID of the initial code block."}},"required":["chatId","blockId"],"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"}}}}},"security":[{"apiKey":[]}]}},"/git/connect":{"post":{"operationId":"git.connect.create","tags":["git"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatId":{"type":"string","description":"The chat ID to connect the repository to."},"owner":{"type":"string","description":"The Git namespace slug (organization or username)."},"repoName":{"type":"string","description":"The desired repository name."},"blockId":{"description":"Optional block ID to associate with the repository.","type":"string"}},"required":["chatId","owner","repoName"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"value":{"type":"object","properties":{"remoteURL":{"type":"string","description":"The GitHub repository remote URL."},"repoName":{"type":"string","description":"The final repository name (may be deduped)."},"linkedProject":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"accountId":{"type":"string"},"link":{"type":"object","properties":{"type":{"type":"string"},"org":{"type":"string"},"repo":{"type":"string"},"productionBranch":{"type":"string"}},"required":["type","org","repo"],"additionalProperties":false}},"required":["id","name"],"additionalProperties":false,"description":"The Vercel project linked to the repository."}},"required":["remoteURL","repoName","linkedProject"],"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"},"existingRepo":{"type":"object","properties":{"org":{"type":"string"},"repo":{"type":"string"},"remoteURL":{"type":"string"}},"required":["org","repo","remoteURL"],"additionalProperties":false}},"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"}}}}},"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":{"ChatDetail":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the chat."},"object":{"type":"string","const":"chat","description":"Fixed value identifying this object as a chat."},"shareable":{"type":"boolean","description":"Indicates whether the chat can be shared via public link."},"privacy":{"type":"string","enum":["public","private","team","team-edit","unlisted"],"description":"Defines the visibility of the chat—private, team-only, or public."},"name":{"description":"An optional name assigned to the chat by the user.","type":"string"},"title":{"type":"string","description":"Deprecated title field preserved for backward compatibility.","deprecated":true},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The ISO timestamp representing when the chat was created."},"updatedAt":{"description":"The ISO timestamp of the last update to the chat.","type":"string"},"favorite":{"type":"boolean","description":"Indicates whether the chat is marked as a favorite."},"authorId":{"type":"string","description":"The ID of the user who created the chat."},"projectId":{"description":"Optional ID of the v0 project associated with this chat.","type":"string"},"vercelProjectId":{"description":"Optional ID of the linked Vercel project, if connected.","type":"string"},"webUrl":{"type":"string","description":"Web URL to view this chat in the browser."},"apiUrl":{"type":"string","description":"API URL to access this chat via the API."},"latestVersion":{"description":"Full details of the most recent generated version, if available.","type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the version."},"object":{"type":"string","const":"version","description":"Fixed value identifying this object as a version."},"status":{"type":"string","enum":["pending","completed","failed"],"description":"The current status of the version generation process."},"demoUrl":{"description":"Optional URL for previewing the generated output.","type":"string"},"screenshotUrl":{"type":"string","description":"URL to retrieve a screenshot of this version."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The date and time when the version was created, in ISO 8601 format."},"updatedAt":{"description":"The date and time when the version was last updated, in ISO 8601 format.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"files":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","const":"file","description":"Fixed value identifying this object as a file."},"name":{"type":"string","description":"The name of the file, including its extension."},"content":{"type":"string","description":"The full contents of the file as a raw string."},"locked":{"type":"boolean","description":"Whether the file is locked to prevent AI from overwriting it during new version generation."}},"required":["object","name","content","locked"],"additionalProperties":false,"description":"Detailed representation of a file, including its content and lock status."},"description":"A list of files that were generated or included in this version."}},"required":["id","object","status","createdAt","files"],"additionalProperties":false},"url":{"type":"string","description":"The canonical URL to access this chat.","deprecated":true},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the message."},"object":{"type":"string","const":"message","description":"Fixed value identifying this object as a message."},"content":{"type":"string","description":"The main text content of the message."},"experimental_content":{"description":"The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change.","type":"array","items":{"anyOf":[{"type":"array","prefixItems":[{"type":"number","const":0},{"type":"array","items":{}}],"description":"AST content section containing parsed markdown/MDX nodes"},{"type":"array","prefixItems":[{"type":"number","const":1},{"type":"object","properties":{"toJSONSchema":{"type":"string"},"def":{"type":"string"},"type":{"type":"string"},"check":{"type":"string"},"with":{"type":"string"},"clone":{"type":"string"},"brand":{"type":"string"},"register":{"type":"string"},"parse":{"type":"string"},"safeParse":{"type":"string"},"parseAsync":{"type":"string"},"safeParseAsync":{"type":"string"},"spa":{"type":"string"},"encode":{"type":"string"},"decode":{"type":"string"},"encodeAsync":{"type":"string"},"decodeAsync":{"type":"string"},"safeEncode":{"type":"string"},"safeDecode":{"type":"string"},"safeEncodeAsync":{"type":"string"},"safeDecodeAsync":{"type":"string"},"refine":{"type":"string"},"superRefine":{"type":"string"},"overwrite":{"type":"string"},"optional":{"type":"string"},"exactOptional":{"type":"string"},"nullable":{"type":"string"},"nullish":{"type":"string"},"nonoptional":{"type":"string"},"array":{"type":"string"},"or":{"type":"string"},"and":{"type":"string"},"transform":{"type":"string"},"default":{"type":"string"},"prefault":{"type":"string"},"catch":{"type":"string"},"pipe":{"type":"string"},"readonly":{"type":"string"},"describe":{"type":"string"},"meta":{"type":"string"},"isOptional":{"type":"string"},"isNullable":{"type":"string"},"apply":{"type":"string"},"keyof":{"type":"string"},"catchall":{"type":"string"},"passthrough":{"type":"string"},"loose":{"type":"string"},"strict":{"type":"string"},"strip":{"type":"string"},"extend":{"type":"string"},"safeExtend":{"type":"string"},"merge":{"type":"string"},"pick":{"type":"string"},"omit":{"type":"string"},"partial":{"type":"string"},"required":{"type":"string"}},"required":["toJSONSchema","def","type","check","with","clone","brand","register","parse","safeParse","parseAsync","safeParseAsync","spa","encode","decode","encodeAsync","decodeAsync","safeEncode","safeDecode","safeEncodeAsync","safeDecodeAsync","refine","superRefine","overwrite","optional","exactOptional","nullable","nullish","nonoptional","array","or","and","transform","default","prefault","catch","pipe","readonly","describe","meta","isOptional","isNullable","apply","keyof","catchall","passthrough","loose","strict","strip","extend","safeExtend","merge","pick","omit","partial","required"],"additionalProperties":false}],"description":"Metadata section containing title and other properties"}]}},"createdAt":{"type":"string","description":"The ISO timestamp representing when the message was created."},"updatedAt":{"description":"The ISO timestamp representing when the message was last updated.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"type":{"type":"string","enum":["message","forked-block","forked-chat","open-in-v0","refinement","added-environment-variables","added-integration","deleted-file","moved-file","renamed-file","edited-file","replace-src","reverted-block","fix-with-v0","auto-fix-with-v0","sync-git","pull-changes","fix-cve","answered-questions","cloned-repo","manual-commit","design-mode"],"description":"Indicates the format or category of the message, such as plain text or code."},"role":{"type":"string","enum":["user","assistant"],"description":"Specifies whether the message was sent by the user or the assistant."},"finishReason":{"description":"The reason why the message generation finished.","type":"string","enum":["stop","length","content-filter","tool-calls","error","other"]},"apiUrl":{"type":"string","description":"API URL to access this message via the API."},"authorId":{"description":"The ID of the user who sent the message.","type":["string","null"]},"parentId":{"description":"The ID of the parent message.","type":["string","null"]},"attachments":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"The URL where the attachment file can be accessed."},"name":{"description":"The original filename of the attachment.","type":"string"},"contentType":{"description":"The MIME type of the attachment file (e.g., image/png, application/pdf).","type":"string"},"size":{"type":"number","description":"The size of the attachment file in bytes."},"content":{"description":"The base64-encoded content of the attachment file, if available.","type":"string"},"type":{"description":"Optional v0-specific attachment type for enhanced processing.","type":"string","enum":["screenshot","figma","zip"]}},"required":["url","size"],"additionalProperties":false}}},"required":["id","object","content","createdAt","type","role","apiUrl","authorId"],"additionalProperties":false,"description":"Summary of a single message within a chat, including role, content, type, timestamp, and API URL."},"description":"All messages exchanged in the chat, including user and assistant entries."},"files":{"description":"Optional array of files associated with the chat context.","type":"array","items":{"type":"object","properties":{"lang":{"type":"string","description":"Programming language used in the file (e.g., JavaScript, Python)."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"A key-value map of metadata associated with the file (e.g., path, type)."},"source":{"type":"string","description":"The origin or identifier of the file source (e.g., path or upload label)."}},"required":["lang","meta","source"],"additionalProperties":false}},"demo":{"type":"string","description":"Deprecated demo URL used for previewing the chat result.","deprecated":true},"text":{"type":"string","description":"The main user prompt or instruction that started the chat."},"modelConfiguration":{"type":"object","properties":{"modelId":{"default":"v0-pro","description":"Model to use for the generation.","type":"string","enum":["v0-auto","v0-opus-4.7","v0-mini","v0-pro","v0-max","v0-max-fast"]},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."},"thinking":{"default":false,"type":"boolean","description":"Enables thinking to generate a response in multiple steps."}},"additionalProperties":false,"description":"The configuration used to generate responses in this chat."},"permissions":{"type":"object","properties":{"write":{"type":"boolean","description":"If true, the user has write access to the chat."}},"required":["write"],"additionalProperties":false},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Arbitrary key-value data associated with this chat."}},"required":["id","object","shareable","privacy","createdAt","favorite","authorId","webUrl","apiUrl","url","messages","text","permissions","metadata"],"additionalProperties":false,"description":"Detailed representation of a chat, including its messages, files, versions, and model configuration."},"ChatSummary":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the chat."},"object":{"type":"string","const":"chat","description":"Fixed value identifying this object as a chat."},"shareable":{"type":"boolean","description":"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":"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"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The date and time when the version was created, in ISO 8601 format."},"updatedAt":{"description":"The date and time when the version was last updated, in ISO 8601 format.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","object","status","createdAt"],"additionalProperties":false}},"required":["id","object","shareable","privacy","createdAt","favorite","authorId","webUrl","apiUrl"],"additionalProperties":false,"description":"Summary of a chat, including metadata like privacy, author, latest version, and URLs."},"DeploymentDetail":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the deployment."},"object":{"type":"string","const":"deployment","description":"Fixed value identifying this object as a deployment."},"inspectorUrl":{"type":"string","description":"URL to the deployment inspector."},"chatId":{"type":"string","description":"The ID of the chat that this deployment is scoped to."},"projectId":{"type":"string","description":"The ID of the project 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","projectId","versionId","apiUrl","webUrl"],"additionalProperties":false},"DeploymentSummary":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the deployment."},"object":{"type":"string","const":"deployment","description":"Fixed value identifying this object as a deployment."},"inspectorUrl":{"type":"string","description":"URL to the deployment inspector."},"chatId":{"type":"string","description":"The ID of the chat that this deployment is scoped to."},"projectId":{"type":"string","description":"The ID of the project 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","projectId","versionId","apiUrl","webUrl"],"additionalProperties":false},"EnvironmentVariableDetailSchema":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the environment variable."},"object":{"type":"string","const":"environment_variable","description":"The object type."},"key":{"type":"string","description":"The name of the environment variable."},"value":{"type":"string","description":"The value of the environment variable."},"decrypted":{"type":"boolean","description":"Whether the value is decrypted or encrypted."},"createdAt":{"type":"number","description":"The timestamp when the environment variable was created."},"updatedAt":{"description":"The timestamp when the environment variable was last updated.","type":"number"}},"required":["id","object","key","value","decrypted","createdAt"],"additionalProperties":false,"description":"Detailed information for an environment variable including its value."},"EnvironmentVariableSummarySchema":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the environment variable."},"object":{"type":"string","const":"environment_variable","description":"The object type."},"key":{"type":"string","description":"The name of the environment variable."},"value":{"type":"string","description":"The value of the environment variable."},"decrypted":{"type":"boolean","description":"Whether the value is decrypted or encrypted."},"createdAt":{"type":"number","description":"The timestamp when the environment variable was created."},"updatedAt":{"description":"The timestamp when the environment variable was last updated.","type":"number"}},"required":["id","object","key","value","decrypted","createdAt"],"additionalProperties":false,"description":"Summary information for an environment variable."},"EnvironmentVariablesListSchema":{"type":"object","properties":{"object":{"type":"string","const":"list","description":"Fixed value identifying this as a list response."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the environment variable."},"object":{"type":"string","const":"environment_variable","description":"The object type."},"key":{"type":"string","description":"The name of the environment variable."},"value":{"type":"string","description":"The value of the environment variable."},"decrypted":{"type":"boolean","description":"Whether the value is decrypted or encrypted."},"createdAt":{"type":"number","description":"The timestamp when the environment variable was created."},"updatedAt":{"description":"The timestamp when the environment variable was last updated.","type":"number"}},"required":["id","object","key","value","decrypted","createdAt"],"additionalProperties":false,"description":"Detailed information for an environment variable including its value."},"description":"Array of environment variable details."}},"required":["object","data"],"additionalProperties":false,"description":"List response containing environment variables."},"FileDetail":{"type":"object","properties":{"object":{"type":"string","const":"file","description":"Fixed value identifying this object as a file."},"name":{"type":"string","description":"The name of the file, including its extension."},"content":{"type":"string","description":"The full contents of the file as a raw string."},"locked":{"type":"boolean","description":"Whether the file is locked to prevent AI from overwriting it during new version generation."}},"required":["object","name","content","locked"],"additionalProperties":false,"description":"Detailed representation of a file, including its content and lock status."},"FileSummary":{"type":"object","properties":{"object":{"type":"string","const":"file","description":"Fixed value identifying this object as a file."},"name":{"type":"string","description":"The name of the file, including its extension."}},"required":["object","name"],"additionalProperties":false,"description":"Basic metadata about a file, such as its type and name."},"HookDetail":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the webhook."},"object":{"type":"string","const":"hook","description":"Fixed value identifying this object as a webhook."},"name":{"type":"string","description":"A user-defined name to label the webhook."},"events":{"type":"array","items":{"type":"string","enum":["chat.created","chat.updated","chat.deleted","message.created","message.updated","message.deleted","message.finished"]},"description":"List of event types this webhook is subscribed to."},"chatId":{"description":"Optional ID of the chat that this webhook is scoped to.","type":"string"},"url":{"type":"string","description":"Target URL that receives event payloads for this webhook."}},"required":["id","object","name","events","url"],"additionalProperties":false,"description":"Full configuration details for a webhook, including its scope and subscription."},"HookEventDetail":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the webhook event log entry."},"object":{"type":"string","const":"hook_event","description":"Fixed value identifying this object as a webhook event."},"event":{"type":"string","enum":["chat.created","chat.updated","chat.deleted","message.created","message.updated","message.deleted","message.finished"],"description":"The type of event that triggered the webhook."},"status":{"default":"pending","description":"The delivery status of the webhook (e.g., delivered, failed).","type":"string","enum":["pending","success","error"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Timestamp of when the webhook event was triggered."}},"required":["id","object","event","createdAt"],"additionalProperties":false,"description":"Detailed record of a webhook event, including its type, status, and timestamp."},"HookSummary":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the webhook."},"object":{"type":"string","const":"hook","description":"Fixed value identifying this object as a webhook."},"name":{"type":"string","description":"A user-defined name to label the webhook."}},"required":["id","object","name"],"additionalProperties":false,"description":"Summary of a webhook, including its ID and display name."},"IntegrationConnectionDetailSchema":{"type":"object","properties":{"object":{"type":"string","const":"integration_connection","description":"The object type."},"id":{"type":"string","description":"The unique ID of the integration connection (format: {projectId}_{integrationId})."},"connected":{"type":"boolean","description":"Whether the integration is connected to the project."},"integration":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the integration."},"object":{"type":"string","const":"integration","description":"The object type."},"slug":{"type":"string","description":"The slug of the integration."},"name":{"type":"string","description":"The name of the integration."}},"required":["id","object","slug","name"],"additionalProperties":false,"description":"Information about the connected integration."},"metadata":{"description":"Additional metadata about the integration connection.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["object","id","connected","integration"],"additionalProperties":false,"description":"Detailed information about an integration connection to a project."},"IntegrationConnectionListSchema":{"type":"object","properties":{"object":{"type":"string","const":"list","description":"Fixed value identifying this as a list response."},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","const":"integration_connection","description":"The object type."},"id":{"type":"string","description":"The unique ID of the integration connection (format: {projectId}_{integrationId})."},"connected":{"type":"boolean","description":"Whether the integration is connected to the project."},"integration":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the integration."},"object":{"type":"string","const":"integration","description":"The object type."},"slug":{"type":"string","description":"The slug of the integration."},"name":{"type":"string","description":"The name of the integration."}},"required":["id","object","slug","name"],"additionalProperties":false,"description":"Information about the connected integration."}},"required":["object","id","connected","integration"],"additionalProperties":false,"description":"Summary information about an integration connection to a project."},"description":"Array of integration connection summaries."}},"required":["object","data"],"additionalProperties":false,"description":"List response containing integration connections."},"IntegrationConnectionSummarySchema":{"type":"object","properties":{"object":{"type":"string","const":"integration_connection","description":"The object type."},"id":{"type":"string","description":"The unique ID of the integration connection (format: {projectId}_{integrationId})."},"connected":{"type":"boolean","description":"Whether the integration is connected to the project."},"integration":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the integration."},"object":{"type":"string","const":"integration","description":"The object type."},"slug":{"type":"string","description":"The slug of the integration."},"name":{"type":"string","description":"The name of the integration."}},"required":["id","object","slug","name"],"additionalProperties":false,"description":"Information about the connected integration."}},"required":["object","id","connected","integration"],"additionalProperties":false,"description":"Summary information about an integration connection to a project."},"IntegrationDetailSchema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the integration."},"object":{"type":"string","const":"integration","description":"The object type."},"slug":{"type":"string","description":"The slug of the integration."},"name":{"type":"string","description":"The name of the integration."},"description":{"type":"string","description":"A short description of the integration."},"iconUrl":{"type":"string","description":"URL to the integration icon."}},"required":["id","object","slug","name","description","iconUrl"],"additionalProperties":false,"description":"Detailed information about an integration."},"IntegrationListSchema":{"type":"object","properties":{"object":{"type":"string","const":"list","description":"Fixed value identifying this as a list response."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the integration."},"object":{"type":"string","const":"integration","description":"The object type."},"slug":{"type":"string","description":"The slug of the integration."},"name":{"type":"string","description":"The name of the integration."},"description":{"type":"string","description":"A short description of the integration."},"iconUrl":{"type":"string","description":"URL to the integration icon."}},"required":["id","object","slug","name","description","iconUrl"],"additionalProperties":false,"description":"Detailed information about an integration."},"description":"Array of integration details."}},"required":["object","data"],"additionalProperties":false,"description":"List of available integrations."},"IntegrationSummarySchema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the integration."},"object":{"type":"string","const":"integration","description":"The object type."},"slug":{"type":"string","description":"The slug of the integration."},"name":{"type":"string","description":"The name of the integration."}},"required":["id","object","slug","name"],"additionalProperties":false,"description":"Basic information about an integration."},"MessageDetail":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the message."},"object":{"type":"string","const":"message","description":"Fixed value identifying this object as a message."},"content":{"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}},"chatId":{"type":"string","description":"The ID of the chat to which this message belongs."}},"required":["id","object","createdAt","type","role","apiUrl","authorId","chatId"],"additionalProperties":false,"description":"Detailed message object extending MessageSummary with chat metadata."},"MessageSummary":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the message."},"object":{"type":"string","const":"message","description":"Fixed value identifying this object as a message."},"content":{"type":"string","description":"The main text content of the message."},"experimental_content":{"description":"The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change.","type":"array","items":{"anyOf":[{"type":"array","prefixItems":[{"type":"number","const":0},{"type":"array","items":{}}],"description":"AST content section containing parsed markdown/MDX nodes"},{"type":"array","prefixItems":[{"type":"number","const":1},{"type":"object","properties":{"toJSONSchema":{"type":"string"},"def":{"type":"string"},"type":{"type":"string"},"check":{"type":"string"},"with":{"type":"string"},"clone":{"type":"string"},"brand":{"type":"string"},"register":{"type":"string"},"parse":{"type":"string"},"safeParse":{"type":"string"},"parseAsync":{"type":"string"},"safeParseAsync":{"type":"string"},"spa":{"type":"string"},"encode":{"type":"string"},"decode":{"type":"string"},"encodeAsync":{"type":"string"},"decodeAsync":{"type":"string"},"safeEncode":{"type":"string"},"safeDecode":{"type":"string"},"safeEncodeAsync":{"type":"string"},"safeDecodeAsync":{"type":"string"},"refine":{"type":"string"},"superRefine":{"type":"string"},"overwrite":{"type":"string"},"optional":{"type":"string"},"exactOptional":{"type":"string"},"nullable":{"type":"string"},"nullish":{"type":"string"},"nonoptional":{"type":"string"},"array":{"type":"string"},"or":{"type":"string"},"and":{"type":"string"},"transform":{"type":"string"},"default":{"type":"string"},"prefault":{"type":"string"},"catch":{"type":"string"},"pipe":{"type":"string"},"readonly":{"type":"string"},"describe":{"type":"string"},"meta":{"type":"string"},"isOptional":{"type":"string"},"isNullable":{"type":"string"},"apply":{"type":"string"},"keyof":{"type":"string"},"catchall":{"type":"string"},"passthrough":{"type":"string"},"loose":{"type":"string"},"strict":{"type":"string"},"strip":{"type":"string"},"extend":{"type":"string"},"safeExtend":{"type":"string"},"merge":{"type":"string"},"pick":{"type":"string"},"omit":{"type":"string"},"partial":{"type":"string"},"required":{"type":"string"}},"required":["toJSONSchema","def","type","check","with","clone","brand","register","parse","safeParse","parseAsync","safeParseAsync","spa","encode","decode","encodeAsync","decodeAsync","safeEncode","safeDecode","safeEncodeAsync","safeDecodeAsync","refine","superRefine","overwrite","optional","exactOptional","nullable","nullish","nonoptional","array","or","and","transform","default","prefault","catch","pipe","readonly","describe","meta","isOptional","isNullable","apply","keyof","catchall","passthrough","loose","strict","strip","extend","safeExtend","merge","pick","omit","partial","required"],"additionalProperties":false}],"description":"Metadata section containing title and other properties"}]}},"createdAt":{"type":"string","description":"The ISO timestamp representing when the message was created."},"updatedAt":{"description":"The ISO timestamp representing when the message was last updated.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"type":{"type":"string","enum":["message","forked-block","forked-chat","open-in-v0","refinement","added-environment-variables","added-integration","deleted-file","moved-file","renamed-file","edited-file","replace-src","reverted-block","fix-with-v0","auto-fix-with-v0","sync-git","pull-changes","fix-cve","answered-questions","cloned-repo","manual-commit","design-mode"],"description":"Indicates the format or category of the message, such as plain text or code."},"role":{"type":"string","enum":["user","assistant"],"description":"Specifies whether the message was sent by the user or the assistant."},"finishReason":{"description":"The reason why the message generation finished.","type":"string","enum":["stop","length","content-filter","tool-calls","error","other"]},"apiUrl":{"type":"string","description":"API URL to access this message via the API."},"authorId":{"description":"The ID of the user who sent the message.","type":["string","null"]},"parentId":{"description":"The ID of the parent message.","type":["string","null"]},"attachments":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"The URL where the attachment file can be accessed."},"name":{"description":"The original filename of the attachment.","type":"string"},"contentType":{"description":"The MIME type of the attachment file (e.g., image/png, application/pdf).","type":"string"},"size":{"type":"number","description":"The size of the attachment file in bytes."},"content":{"description":"The base64-encoded content of the attachment file, if available.","type":"string"},"type":{"description":"Optional v0-specific attachment type for enhanced processing.","type":"string","enum":["screenshot","figma","zip"]}},"required":["url","size"],"additionalProperties":false}}},"required":["id","object","content","createdAt","type","role","apiUrl","authorId"],"additionalProperties":false,"description":"Summary of a single message within a chat, including role, content, type, timestamp, and API URL."},"MessageSummaryList":{"type":"object","properties":{"object":{"type":"string","const":"list","description":"Fixed value identifying this as a list response."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the message."},"object":{"type":"string","const":"message","description":"Fixed value identifying this object as a message."},"content":{"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":"Array of message summaries in this page of results."},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Indicates if there are more results available beyond this page."},"nextCursor":{"description":"Cursor for fetching the next page of results.","type":"string"},"nextUrl":{"description":"API URL for retrieving the next page of results.","type":"string"}},"required":["hasMore"],"additionalProperties":false,"description":"Pagination metadata for navigating through multiple pages of results."}},"required":["object","data","pagination"],"additionalProperties":false,"description":"List response containing multiple message summaries with cursor-based pagination."},"NotificationPreferenceSchema":{"type":"object","properties":{"liveActivity":{"type":"boolean","description":"Whether the user wants to receive live activities."},"pushNotifications":{"type":"boolean","description":"Whether the user wants to receive push notifications."}},"required":["liveActivity","pushNotifications"],"additionalProperties":false,"description":"User preference for notification delivery methods."},"ProductDetailSchema":{"type":"object","properties":{"object":{"type":"string","const":"product","description":"The object type."},"id":{"type":"string","description":"The unique ID of the product."},"slug":{"type":"string","description":"The URL-friendly slug of the product."},"name":{"type":"string","description":"The name of the product."},"description":{"type":"string","description":"A short description of the product."},"iconUrl":{"type":"string","description":"URL to the product icon."},"iconBackgroundColor":{"description":"Background color for the product icon.","type":"string"}},"required":["object","id","slug","name","description","iconUrl"],"additionalProperties":false,"description":"Detailed information about a marketplace or store product."},"ProductListSchema":{"type":"object","properties":{"object":{"type":"string","const":"list","description":"Fixed value identifying this as a list response."},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","const":"product","description":"The object type."},"id":{"type":"string","description":"The unique ID of the product."},"slug":{"type":"string","description":"The URL-friendly slug of the product."},"name":{"type":"string","description":"The name of the product."},"description":{"type":"string","description":"A short description of the product."},"iconUrl":{"type":"string","description":"URL to the product icon."}},"required":["object","id","slug","name","description","iconUrl"],"additionalProperties":false,"description":"Summary information about a marketplace or store product."},"description":"Array of product summaries."}},"required":["object","data"],"additionalProperties":false,"description":"List of available marketplace and store products."},"ProductSummarySchema":{"type":"object","properties":{"object":{"type":"string","const":"product","description":"The object type."},"id":{"type":"string","description":"The unique ID of the product."},"slug":{"type":"string","description":"The URL-friendly slug of the product."},"name":{"type":"string","description":"The name of the product."},"description":{"type":"string","description":"A short description of the product."},"iconUrl":{"type":"string","description":"URL to the product icon."}},"required":["object","id","slug","name","description","iconUrl"],"additionalProperties":false,"description":"Summary information about a marketplace or store product."},"ProjectDetail":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the project."},"object":{"type":"string","const":"project","description":"Fixed value identifying this object as a project."},"name":{"type":"string","description":"The name of the project as defined by the user."},"privacy":{"type":"string","enum":["private","team"],"description":"The privacy setting for the project - either private or team."},"vercelProjectId":{"description":"Optional ID of the linked Vercel project, if connected.","type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The ISO timestamp representing when the project was created."},"updatedAt":{"description":"The ISO timestamp of the most recent update, if available.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"apiUrl":{"type":"string","format":"uri","description":"The API endpoint URL for accessing this project programmatically."},"webUrl":{"type":"string","format":"uri","description":"The web URL where the project can be viewed or managed."},"description":{"description":"The description of the project.","type":"string"},"instructions":{"description":"The instructions for the project.","type":"string"},"chats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the chat."},"object":{"type":"string","const":"chat","description":"Fixed value identifying this object as a chat."},"shareable":{"type":"boolean","description":"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":"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"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The date and time when the version was created, in ISO 8601 format."},"updatedAt":{"description":"The date and time when the version was last updated, in ISO 8601 format.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","object","status","createdAt"],"additionalProperties":false}},"required":["id","object","shareable","privacy","createdAt","favorite","authorId","webUrl","apiUrl"],"additionalProperties":false,"description":"Summary of a chat, including metadata like privacy, author, latest version, and URLs."},"description":"List of all chats that are associated with this project."}},"required":["id","object","name","privacy","createdAt","apiUrl","webUrl","chats"],"additionalProperties":false,"description":"Full representation of a project, including its associated chats."},"ProjectSummary":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the project."},"object":{"type":"string","const":"project","description":"Fixed value identifying this object as a project."},"name":{"type":"string","description":"The name of the project as defined by the user."},"privacy":{"type":"string","enum":["private","team"],"description":"The privacy setting for the project - either private or team."},"vercelProjectId":{"description":"Optional ID of the linked Vercel project, if connected.","type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The ISO timestamp representing when the project was created."},"updatedAt":{"description":"The ISO timestamp of the most recent update, if available.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"apiUrl":{"type":"string","format":"uri","description":"The API endpoint URL for accessing this project programmatically."},"webUrl":{"type":"string","format":"uri","description":"The web URL where the project can be viewed or managed."}},"required":["id","object","name","privacy","createdAt","apiUrl","webUrl"],"additionalProperties":false,"description":"Summary of a project, including metadata, timestamps, and optional Vercel linkage."},"ScopeSummary":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the scope (e.g., user or team workspace)."},"object":{"type":"string","const":"scope","description":"Fixed value identifying this object as a scope."},"name":{"description":"An optional human-readable name for the scope.","type":"string"}},"required":["id","object"],"additionalProperties":false,"description":"Basic information about a workspace or identity context for projects and chats."},"SearchResultItem":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the item returned in the search result."},"object":{"description":"Type of item returned, either 'chat' or 'project'.","type":"string","enum":["chat","project"]},"name":{"type":"string","description":"The display name of the item."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The ISO timestamp representing when the item was created."},"updatedAt":{"description":"The ISO timestamp of the last update to the item.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"apiUrl":{"type":"string","description":"API endpoint for accessing the item programmatically."},"webUrl":{"type":"string","description":"Web URL for viewing the item in the interface."}},"required":["id","object","name","createdAt","apiUrl","webUrl"],"additionalProperties":false,"description":"Generic result returned from a search query, representing either a chat or a project."},"UserDetailSchema":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the user."},"object":{"type":"string","const":"user","description":"Fixed value identifying this object as a user."},"name":{"description":"Optional full name of the user.","type":"string"},"email":{"type":"string","description":"The user's email address."},"avatar":{"type":"string","description":"URL to the user's avatar image."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The ISO timestamp representing when the user was created."},"updatedAt":{"description":"The ISO timestamp of the last update to the user.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","object","email","avatar","createdAt"],"additionalProperties":false},"UserPreferencesPostResponseSchema":{"type":"object","properties":{"object":{"type":"string","const":"user_preferences","description":"Object type identifier."},"preferences":{"anyOf":[{"type":"object","properties":{"notifications":{"type":"object","properties":{"liveActivity":{"type":"boolean","description":"Whether the user wants to receive live activities."},"pushNotifications":{"type":"boolean","description":"Whether the user wants to receive push notifications."}},"required":["liveActivity","pushNotifications"],"additionalProperties":false,"description":"The user's preferred method for receiving notifications."}},"required":["notifications"],"additionalProperties":false,"description":"User preferences configuration including notification settings."},{"type":"null"}],"description":"The updated preferences if successful, or null if failed."}},"required":["object","preferences"],"additionalProperties":false,"description":"Response schema for updating user preferences."},"UserPreferencesResponseSchema":{"type":"object","properties":{"object":{"type":"string","const":"user_preferences","description":"Object type identifier."},"preferences":{"anyOf":[{"type":"object","properties":{"notifications":{"type":"object","properties":{"liveActivity":{"type":"boolean","description":"Whether the user wants to receive live activities."},"pushNotifications":{"type":"boolean","description":"Whether the user wants to receive push notifications."}},"required":["liveActivity","pushNotifications"],"additionalProperties":false,"description":"The user's preferred method for receiving notifications."}},"required":["notifications"],"additionalProperties":false,"description":"User preferences configuration including notification settings."},{"type":"null"}],"description":"The user's current preferences, or null if errored."}},"required":["object","preferences"],"additionalProperties":false,"description":"Response schema for retrieving user preferences."},"UserPreferencesSchema":{"type":"object","properties":{"notifications":{"type":"object","properties":{"liveActivity":{"type":"boolean","description":"Whether the user wants to receive live activities."},"pushNotifications":{"type":"boolean","description":"Whether the user wants to receive push notifications."}},"required":["liveActivity","pushNotifications"],"additionalProperties":false,"description":"The user's preferred method for receiving notifications."}},"required":["notifications"],"additionalProperties":false,"description":"User preferences configuration including notification settings."},"UserSummarySchema":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the user."},"object":{"type":"string","const":"user","description":"Fixed value identifying this object as a user."},"name":{"description":"Optional full name of the user.","type":"string"},"email":{"type":"string","description":"The user's email address."},"avatar":{"type":"string","description":"URL to the user's avatar image."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The ISO timestamp representing when the user was created."},"updatedAt":{"description":"The ISO timestamp of the last update to the user.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","object","email","avatar","createdAt"],"additionalProperties":false,"description":"Details of the authenticated user, including profile and contact information."},"VercelProjectDetail":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the linked Vercel project."},"object":{"type":"string","const":"vercel_project","description":"Fixed value identifying this object as a Vercel project."},"name":{"type":"string","description":"The name of the Vercel project."}},"required":["id","object","name"],"additionalProperties":false},"VercelProjectSummary":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the linked Vercel project."},"object":{"type":"string","const":"vercel_project","description":"Fixed value identifying this object as a Vercel project."},"name":{"type":"string","description":"The name of the Vercel project."}},"required":["id","object","name"],"additionalProperties":false,"description":"Basic metadata about a Vercel project connected to a v0 project."},"VersionDetail":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the version."},"object":{"type":"string","const":"version","description":"Fixed value identifying this object as a version."},"status":{"type":"string","enum":["pending","completed","failed"],"description":"The current status of the version generation process."},"demoUrl":{"description":"Optional URL for previewing the generated output.","type":"string"},"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."},"VersionSummary":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the version."},"object":{"type":"string","const":"version","description":"Fixed value identifying this object as a version."},"status":{"type":"string","enum":["pending","completed","failed"],"description":"The current status of the version generation process."},"demoUrl":{"description":"Optional URL for previewing the generated output.","type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The date and time when the version was created, in ISO 8601 format."},"updatedAt":{"description":"The date and time when the version was last updated, in ISO 8601 format.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","object","status","createdAt"],"additionalProperties":false,"description":"Summary of a generated version of a chat, including its status and optional demo link."},"VersionSummaryList":{"type":"object","properties":{"object":{"type":"string","const":"list","description":"Fixed value identifying this as a list response."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the version."},"object":{"type":"string","const":"version","description":"Fixed value identifying this object as a version."},"status":{"type":"string","enum":["pending","completed","failed"],"description":"The current status of the version generation process."},"demoUrl":{"description":"Optional URL for previewing the generated output.","type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The date and time when the version was created, in ISO 8601 format."},"updatedAt":{"description":"The date and time when the version was last updated, in ISO 8601 format.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","object","status","createdAt"],"additionalProperties":false,"description":"Summary of a generated version of a chat, including its status and optional demo link."},"description":"Array of version summaries in this page of results."},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Indicates if there are more results available beyond this page."},"nextCursor":{"description":"Cursor for fetching the next page of results.","type":"string"},"nextUrl":{"description":"API URL for retrieving the next page of results.","type":"string"}},"required":["hasMore"],"additionalProperties":false,"description":"Pagination metadata for navigating through multiple pages of results."}},"required":["object","data","pagination"],"additionalProperties":false,"description":"List response containing multiple version summaries with cursor-based pagination."},"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."},"MessageSummary_AppApi":{"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."},"UnauthorizedError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","const":"unauthorized_error"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"ForbiddenError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","const":"forbidden_error"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"NotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","const":"not_found_error"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"ConflictError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","const":"conflict_error"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"PayloadTooLargeError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","const":"payload_too_large_error"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"UnprocessableEntityError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","const":"unprocessable_entity_error"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"TooManyRequestsError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","const":"too_many_requests_error"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"InternalServerError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","const":"internal_server_error"}},"required":["message","type"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}},"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your v0 API key. Get one at https://v0.app/chat/settings/keys"}}}}