{"openapi":"3.1.2","info":{"title":"v0 API","description":"Development documentation","version":"2.0.0"},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Error":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false},"Chat":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","description":"Unique chat identifier."},"title":{"description":"Chat title, if generated.","type":"string"},"privacy":{"type":"string","enum":["public","private","team","team-edit","unlisted"],"description":"Visibility setting of the chat."},"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":"ISO timestamp of when the chat was created."},"updatedAt":{"description":"ISO timestamp of when the chat 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))$"},"authorId":{"type":"string","description":"ID of the user who created the chat."},"vercelProjectId":{"description":"Associated Vercel project ID, if any.","type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"User-defined key-value metadata."},"writePermission":{"type":"boolean","description":"Whether the caller has write access to this chat."}},"required":["id","privacy","createdAt","authorId","metadata","writePermission"],"additionalProperties":false},"ChatWithUsage":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"chat":{"type":"object","properties":{"id":{"type":"string","description":"Unique chat identifier."},"title":{"description":"Chat title, if generated.","type":"string"},"privacy":{"type":"string","enum":["public","private","team","team-edit","unlisted"],"description":"Visibility setting of the chat."},"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":"ISO timestamp of when the chat was created."},"updatedAt":{"description":"ISO timestamp of when the chat 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))$"},"authorId":{"type":"string","description":"ID of the user who created the chat."},"vercelProjectId":{"description":"Associated Vercel project ID, if any.","type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"User-defined key-value metadata."},"writePermission":{"type":"boolean","description":"Whether the caller has write access to this chat."}},"required":["id","privacy","createdAt","authorId","metadata","writePermission"],"additionalProperties":false},"usage":{"type":"object","properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model identifier used for the assistant message, or null when not applicable or unavailable."},"tokens":{"type":"object","properties":{"input":{"type":"number","description":"Prompt input value (non-cached)."},"output":{"type":"number","description":"Completion output value."},"cacheRead":{"type":"number","description":"Cache-read input value."},"cacheWrite":{"type":"number","description":"Cache-write input value."},"total":{"type":"number","description":"Sum of input, output, cacheRead, and cacheWrite."}},"required":["input","output","cacheRead","cacheWrite","total"],"additionalProperties":false,"description":"Token counts for this message."},"creditsCost":{"type":"object","properties":{"input":{"type":"number","description":"Prompt input value (non-cached)."},"output":{"type":"number","description":"Completion output value."},"cacheRead":{"type":"number","description":"Cache-read input value."},"cacheWrite":{"type":"number","description":"Cache-write input value."},"total":{"type":"number","description":"Sum of input, output, cacheRead, and cacheWrite."}},"required":["input","output","cacheRead","cacheWrite","total"],"additionalProperties":false,"description":"Credit cost for this message."}},"required":["model","tokens","creditsCost"],"additionalProperties":false,"description":"Model, token usage, and credit cost for the prompt."}},"required":["chat","usage"],"additionalProperties":false,"description":"A chat response that also reports the usage."},"AsyncChat":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"chatId":{"type":"string","description":"Unique chat identifier."},"messageId":{"type":"string","description":"ID of the assistant message that will receive the response. Poll this message by ID and check its finishReason field to detect completion."}},"required":["chatId","messageId"],"additionalProperties":false},"ChatStreamEvent":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"id":{"type":"string","description":"Unique chat identifier."},"title":{"description":"Chat title, if generated.","type":"string"},"privacy":{"type":"string","enum":["public","private","team","team-edit","unlisted"],"description":"Visibility setting of the chat."},"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":"ISO timestamp of when the chat was created."},"updatedAt":{"description":"ISO timestamp of when the chat 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))$"},"authorId":{"type":"string","description":"ID of the user who created the chat."},"vercelProjectId":{"description":"Associated Vercel project ID, if any.","type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"User-defined key-value metadata."},"writePermission":{"type":"boolean","description":"Whether the caller has write access to this chat."},"object":{"type":"string","enum":["chat"],"description":"Discriminator: a chat-state snapshot."}},"required":["id","privacy","createdAt","authorId","metadata","writePermission","object"],"additionalProperties":false,"description":"Initial and final chat-state event. Emitted once at stream open with the freshly-created chat, and once at stream close with the chat including the completed assistant message."},{"type":"object","properties":{"id":{"type":"string","description":"Chat ID."},"object":{"type":"string","enum":["chat.title"],"description":"Discriminator."},"delta":{"type":"string","description":"Full title string at this point in the stream."}},"required":["id","object","delta"],"additionalProperties":false,"description":"Emitted when the chat title is (re)generated."},{"type":"object","properties":{"id":{"type":"string","description":"Assistant message ID."},"object":{"type":"string","enum":["message.parts.chunk"],"description":"Discriminator."},"delta":{"description":"jsondiffpatch delta to apply against the running public `Message.parts` array. Apply each delta in order to reconstruct the complete current parts snapshot."}},"required":["id","object","delta"],"additionalProperties":false,"description":"Incremental update to the assistant message content."},{"type":"object","properties":{"id":{"type":"string","description":"Assistant message ID this usage applies to."},"object":{"type":"string","enum":["message.usage"],"description":"Discriminator."},"usage":{"type":"object","properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model identifier used for the assistant message, or null when not applicable or unavailable."},"tokens":{"type":"object","properties":{"input":{"type":"number","description":"Prompt input value (non-cached)."},"output":{"type":"number","description":"Completion output value."},"cacheRead":{"type":"number","description":"Cache-read input value."},"cacheWrite":{"type":"number","description":"Cache-write input value."},"total":{"type":"number","description":"Sum of input, output, cacheRead, and cacheWrite."}},"required":["input","output","cacheRead","cacheWrite","total"],"additionalProperties":false,"description":"Token counts for this message."},"creditsCost":{"type":"object","properties":{"input":{"type":"number","description":"Prompt input value (non-cached)."},"output":{"type":"number","description":"Completion output value."},"cacheRead":{"type":"number","description":"Cache-read input value."},"cacheWrite":{"type":"number","description":"Cache-write input value."},"total":{"type":"number","description":"Sum of input, output, cacheRead, and cacheWrite."}},"required":["input","output","cacheRead","cacheWrite","total"],"additionalProperties":false,"description":"Credit cost for this message."}},"required":["model","tokens","creditsCost"],"additionalProperties":false,"description":"Model identifier, token usage, and credit cost. Token and credit values are zero on user messages and on assistant messages that have not generated tokens."}},"required":["id","object","usage"],"additionalProperties":false,"description":"Final model, token usage, and credit cost for the assistant message produced by this stream. Emitted once after the message finishes generating, before the closing state event."},{"type":"object","properties":{"id":{"type":"string","description":"Assistant message ID or chat ID, depending on what is in scope when the error is raised."},"object":{"type":"string","enum":["error"],"description":"Discriminator."},"message":{"type":"string","description":"Human-readable stream error message."},"code":{"description":"Optional machine-readable stream error code.","type":"string"}},"required":["id","object","message"],"additionalProperties":false,"description":"Emitted when a stream error occurs after the SSE response begins."}],"description":"A single Server-Sent Events payload emitted by streaming chat endpoints. Each SSE event is `data: <JSON>\\n\\n` where the JSON conforms to one of the union members."},"Message":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","description":"Unique message identifier."},"chatId":{"type":"string","description":"ID of the chat this message belongs to."},"role":{"type":"string","enum":["user","assistant"],"description":"Who produced this message."},"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":"ISO timestamp when the message was created."},"updatedAt":{"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":"ISO timestamp when the message was last updated."},"content":{"type":"string","description":"The trailing prose of the message — the agent’s closing summary, or the user’s message text. Empty string when there is no closing prose."},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","description":"Markdown prose written by the agent or user."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","text"],"additionalProperties":false,"description":"A block of text output by the agent."},{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"text":{"type":"string","description":"The agent's reasoning trace."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","text"],"additionalProperties":false,"description":"Extended thinking output by the agent."},{"type":"object","properties":{"type":{"type":"string","enum":["file-read"]},"paths":{"type":"array","items":{"type":"string"},"description":"The file paths the agent read in this step."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","paths"],"additionalProperties":false,"description":"Files read by the agent."},{"type":"object","properties":{"type":{"type":"string","enum":["file-edit"]},"operation":{"type":"string","enum":["create","update","delete","rename","patch"],"description":"The type of file edit performed."},"path":{"type":"string","description":"The target file path."},"toPath":{"description":"The new path when operation is \"rename\".","type":"string"},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","operation","path"],"additionalProperties":false,"description":"The agent created, modified, deleted, renamed, or patched a file."},{"type":"object","properties":{"type":{"type":"string","enum":["search"]},"scope":{"type":"string","enum":["repo","web"],"description":"Whether the agent searched the repository or the web."},"query":{"type":"string","description":"The search query."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","scope","query"],"additionalProperties":false,"description":"The agent searched for something."},{"type":"object","properties":{"type":{"type":"string","enum":["bash"]},"command":{"type":"string","description":"The shell command that was executed."},"output":{"description":"Combined stdout/stderr captured from the terminal. May be empty if the command produced no output.","type":"string"},"exitCode":{"description":"Process exit code, when available. Reserved for future use; currently always omitted.","anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"isDangerous":{"description":"True if the command was flagged as potentially dangerous and required explicit user approval.","type":"boolean"},"timeoutMs":{"description":"Command timeout in milliseconds, when configured.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","command"],"additionalProperties":false,"description":"The agent ran a shell command."},{"type":"object","properties":{"type":{"type":"string","enum":["tool-call"]},"name":{"type":"string","description":"The identifier the tool was invoked under. For MCP/integration tools this is a normalized identifier derived from the tool name — prefer `toolDisplayName` for display when present."},"toolDisplayName":{"description":"The tool's original human-readable name (an MCP/integration tool's server-side name), when `name` is a normalized identifier. Display-only.","anyOf":[{"type":"string"},{"type":"null"}]},"input":{"description":"The arguments passed to the tool. Schema depends on the specific tool."},"output":{"description":"The result returned by the tool. Schema depends on the specific tool."},"status":{"type":"string","enum":["ok","error"],"description":"Whether the tool call succeeded or returned an error."},"suggestedPermissions":{"description":"Present when the agent is blocked waiting for you to approve this tool call (for example, running a setup or migration script). Pass these objects back unchanged as the `permissions` of a `confirmed-permissions` task to approve. Omitted once the tool has run.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["ALLOW_DYNAMIC_TOOL_STRICT"],"description":"Permission grant type."},"toolName":{"type":"string","description":"The tool this permission authorizes."},"input":{"description":"The tool input this permission authorizes. Pass back unchanged when resolving."},"toolDisplayName":{"description":"The tool's original human-readable name (an MCP/integration tool's server name), when `toolName` is a normalized identifier. Display-only; pass back unchanged.","anyOf":[{"type":"string"},{"type":"null"}]},"taskNameActive":{"description":"Internal label for the in-progress task. Pass back unchanged.","anyOf":[{"type":"string"},{"type":"null"}]},"taskNameComplete":{"description":"Internal label for the completed task. Pass back unchanged.","anyOf":[{"type":"string"},{"type":"null"}]},"userMessage":{"description":"Optional message associated with the permission.","type":"string"}},"required":["type","toolName"],"additionalProperties":false,"description":"A permission the agent is waiting for you to grant. Pass these objects back unchanged as the `permissions` of a `confirmed-permissions` task."}},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","name","status"],"additionalProperties":false,"description":"The agent invoked a tool (MCP, integration, or other dynamic tool). For shell commands, use the \"bash\" part instead."},{"type":"object","properties":{"type":{"type":"string","enum":["agent-action"]},"name":{"type":"string","description":"Stable identifier for the action (e.g. \"generate_image\", \"manage_todos\", \"diagnostics\"). See documentation for the registry of known names."},"summary":{"type":"string","description":"A short human-readable summary of what happened. Always populated so clients can render something even without knowing the action name."},"data":{"description":"Structured payload for actions that carry data. Present on `ask_user_questions`, `exit_plan_mode`, `get_or_request_integration`, and `configure_vercel_connect` parts when the agent is waiting on you, and on `show_artifact` and `security_review` parts. Narrow by the part `name`: the presence of `data` alone does not mean the agent is waiting on you. Omitted for actions that do not carry structured data.","anyOf":[{"type":"object","properties":{"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Question identifier. Pass back as `questionId` when resolving with an `answered-questions` task."},"question":{"type":"string","description":"The full question text."},"header":{"type":"string","description":"Short label for the question."},"multiSelect":{"type":"boolean","description":"Whether more than one option may be selected."},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Option identifier."},"label":{"type":"string","description":"Display label. Pass matching labels back in `selectedLabels` when resolving."},"description":{"description":"Optional longer explanation of the option.","type":"string"}},"required":["id","label"],"additionalProperties":false},"description":"The available answer options."}},"required":["id","question","header","multiSelect","options"],"additionalProperties":false},"description":"The questions the agent is waiting for answers to. Resolve with an `answered-questions` task."}},"required":["questions"],"additionalProperties":false,"description":"Structured payload for an `ask_user_questions` agent action."},{"type":"object","properties":{"plan":{"type":"string","description":"The full proposed plan, as Markdown."},"summary":{"description":"A concise summary of the plan, when available.","type":"string"},"path":{"type":"string","description":"The path the plan applies to."}},"required":["plan","path"],"additionalProperties":false,"description":"Structured payload for an `exit_plan_mode` agent action."},{"type":"object","properties":{"requestedIntegrations":{"type":"array","items":{"type":"string"},"description":"Integration names the agent is asking you to connect (for example, \"Neon\"). Pass these back in `connectedIntegrationNames` when resolving with a `confirmed-steps` task."},"requestedNpmRegistryIds":{"type":"array","items":{"type":"string"},"description":"Deprecated. npm registry connections are no longer requested; this array is always empty.","deprecated":true},"requestedMcpPresets":{"type":"array","items":{"type":"string"},"description":"MCP preset names the agent is asking you to add. Pass these back in `connectedMcpPresetNames` when resolving with a `confirmed-steps` task."}},"required":["requestedIntegrations","requestedNpmRegistryIds","requestedMcpPresets"],"additionalProperties":false,"description":"Structured payload for a `get_or_request_integration` agent action."},{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["setup-required"],"description":"The agent is waiting for connector setup to be completed in a browser."},"requestId":{"type":"string","description":"Setup request identifier. Pass as `requestId` to GET /chats/{chatId}/connect/status to poll for completion."},"service":{"type":"string","description":"The service being connected (for example, \"linear\")."},"serviceIconUrl":{"description":"Icon URL for the service, hosted on vercel.com.","type":"string","format":"uri"},"connectorName":{"type":"string","description":"Display name of the connector being created."},"setupUrl":{"type":"string","format":"uri","description":"Open this vercel.com URL in a browser to complete connector setup. Requires a vercel.com session for a member of the team."},"environments":{"type":"array","items":{"type":"string","enum":["production","preview","development"],"description":"Vercel environment the connector is attached to."},"description":"Environments the connector will be attached to."},"triggerPath":{"description":"Webhook trigger path that will be registered on the connector, when requested.","type":"string"},"createdProject":{"description":"Vercel project auto-created for this chat during setup, when applicable.","type":"object","properties":{"id":{"type":"string","description":"Vercel project identifier."},"name":{"type":"string","description":"Vercel project name."}},"required":["id","name"],"additionalProperties":false}},"required":["status","requestId","service","connectorName","setupUrl","environments"],"additionalProperties":false,"description":"Connector setup is pending. Complete setup at `setupUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then resolve with a `vercel-connect-setup` task."},{"type":"object","properties":{"status":{"type":"string","enum":["authorization-required"],"description":"The agent is waiting for the current user to authorize a connector in a browser."},"requestId":{"type":"string","description":"Authorization request identifier. Pass as `requestId` to GET /chats/{chatId}/connect/status to poll for completion."},"service":{"type":"string","description":"The service being authorized."},"serviceIconUrl":{"description":"Icon URL for the service, hosted on vercel.com.","type":"string","format":"uri"},"connectorId":{"type":"string","description":"Connector being authorized."},"connectorName":{"type":"string","description":"Display name of the connector."},"authorizationUrl":{"type":"string","format":"uri","description":"Open this vercel.com URL in a browser to sign in to the provider as the current user. Requires a vercel.com session for a member of the team."}},"required":["status","requestId","service","connectorId","connectorName","authorizationUrl"],"additionalProperties":false,"description":"User authorization is pending. Sign in at `authorizationUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then resolve with a `vercel-connect-authorization` task."},{"type":"object","properties":{"status":{"type":"string","enum":["completed"],"description":"The Connect action finished; no user input is needed."},"action":{"type":"string","enum":["list","create","attach","authorize"],"description":"The Connect action that ran."},"summary":{"type":"string","description":"Human-readable result summary."},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Connector identifier."},"name":{"type":"string","description":"Connector display name."},"service":{"description":"Connected service identifier.","type":"string"},"attachedToProject":{"type":"boolean","description":"Whether the connector is attached to the chat’s Vercel project."}},"required":["id","name","attachedToProject"],"additionalProperties":false},"description":"Connectors involved in the action."},"createdProject":{"description":"Vercel project created during the action, when applicable.","type":"object","properties":{"id":{"type":"string","description":"Vercel project identifier."},"name":{"type":"string","description":"Vercel project name."}},"required":["id","name"],"additionalProperties":false}},"required":["status","action","summary","connectors"],"additionalProperties":false,"description":"The Connect action finished; no user input is needed."}],"description":"Structured payload for a `configure_vercel_connect` agent action."},{"type":"object","properties":{"artifactId":{"type":"string","description":"Artifact identifier. Download its bytes with GET /chats/{chatId}/artifacts/{artifactId}."},"title":{"type":"string","description":"Short title the agent gave the artifact."},"fileName":{"type":"string","description":"File name of the artifact, including its extension."},"kind":{"type":"string","enum":["html","markdown","json","csv","text","image","audio","video","pdf","model","code","document","spreadsheet","presentation","file"],"description":"How the artifact is rendered in v0."},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Size of the artifact in bytes."},"display":{"type":"string","enum":["tab","inline"],"description":"Where v0 shows the artifact: embedded in the message (`inline`) or in a separate tab (`tab`)."}},"required":["artifactId","title","fileName","kind","size","display"],"additionalProperties":false,"description":"Structured payload for a `show_artifact` agent action: a file the agent saved to show the user, such as a report, chart, or interactive HTML page."},{"oneOf":[{"type":"object","properties":{"outcome":{"type":"string","enum":["running"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."}},"required":["outcome","files","contextFileCount"],"additionalProperties":false,"description":"The review is running."},{"type":"object","properties":{"outcome":{"type":"string","enum":["clean"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."},"potentialIssueCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Potential issues the review reported, before the agent checked them against the project. The checked findings are in the final message."},"severities":{"type":"object","properties":{"critical":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"high":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"medium":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bug":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Non-security bugs the review reported."},"low":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["critical","high","medium","bug","low"],"additionalProperties":false,"description":"Potential issues by severity."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the review ran."}},"required":["outcome","files","contextFileCount","potentialIssueCount","severities","durationMs"],"additionalProperties":false,"description":"The review finished and reported no potential issues."},{"type":"object","properties":{"outcome":{"type":"string","enum":["findings"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."},"potentialIssueCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Potential issues the review reported, before the agent checked them against the project. The checked findings are in the final message."},"severities":{"type":"object","properties":{"critical":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"high":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"medium":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bug":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Non-security bugs the review reported."},"low":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["critical","high","medium","bug","low"],"additionalProperties":false,"description":"Potential issues by severity."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the review ran."}},"required":["outcome","files","contextFileCount","potentialIssueCount","severities","durationMs"],"additionalProperties":false,"description":"The review finished and reported potential issues."},{"type":"object","properties":{"outcome":{"type":"string","enum":["incomplete"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."},"reason":{"type":"string","enum":["ai-error","credits","timeout","stopped","not-started","interrupted"],"description":"Why the review ended without a result: `ai-error` (the AI calls failed), `credits` (not enough v0 credits), `timeout`, `stopped` (the turn was stopped while it ran), `not-started` (it never started), or `interrupted` (it stopped partway, or its result could not be read)."},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long it ran before it ended, when known."}},"required":["outcome","files","contextFileCount","reason","durationMs"],"additionalProperties":false,"description":"The review ended without a result."}],"description":"Payload for `security_review` parts. Narrow by `outcome`: only finished reviews carry counts, and only incomplete ones carry a `reason`."}]},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","name","summary"],"additionalProperties":false,"description":"A typed escape hatch for agent actions that don’t fit the other part types. Forward-compatible: new action types may appear without API version changes."}],"description":"A single entry in the ordered narrative of a message. Iterate `parts` in order to render the full transcript."},"description":"Ordered list of parts that make up the message. Iterate to render the full narrative including thinking, file operations, tool calls, and prose."},"finishReason":{"anyOf":[{"type":"string","enum":["stop","length","content-filter","tool-calls","error","other"],"description":"The reason why message generation finished, including standard completion reasons and error states."},{"type":"null"}],"description":"Why generation ended. Null while the agent is still generating; once non-null, the message is final and safe to consume."},"filesStatus":{"anyOf":[{"type":"string","enum":["pending","ready","failed"]},{"type":"null"}],"description":"Whether `GET /chats/{chatId}/files` reflects this assistant message. `pending` while the agent is generating or its changes are still being saved, which can continue for a few seconds after `finishReason` is set; `ready` once they are saved; `failed` if saving them failed, in which case the files are those of the previous version. Null on user messages."},"restorable":{"type":"boolean","description":"True when this is an assistant message that produced restorable code and is not the currently active code."},"attachments":{"description":"Files attached to this message.","type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"URL to the attachment."},"name":{"description":"Original filename, when available.","type":"string"},"contentType":{"description":"MIME type.","type":"string"},"size":{"description":"Size in bytes.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["url"],"additionalProperties":false}},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ID of the user who authored a user message; null for assistant messages."},"usage":{"type":"object","properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model identifier used for the assistant message, or null when not applicable or unavailable."},"tokens":{"type":"object","properties":{"input":{"type":"number","description":"Prompt input value (non-cached)."},"output":{"type":"number","description":"Completion output value."},"cacheRead":{"type":"number","description":"Cache-read input value."},"cacheWrite":{"type":"number","description":"Cache-write input value."},"total":{"type":"number","description":"Sum of input, output, cacheRead, and cacheWrite."}},"required":["input","output","cacheRead","cacheWrite","total"],"additionalProperties":false,"description":"Token counts for this message."},"creditsCost":{"type":"object","properties":{"input":{"type":"number","description":"Prompt input value (non-cached)."},"output":{"type":"number","description":"Completion output value."},"cacheRead":{"type":"number","description":"Cache-read input value."},"cacheWrite":{"type":"number","description":"Cache-write input value."},"total":{"type":"number","description":"Sum of input, output, cacheRead, and cacheWrite."}},"required":["input","output","cacheRead","cacheWrite","total"],"additionalProperties":false,"description":"Credit cost for this message."}},"required":["model","tokens","creditsCost"],"additionalProperties":false,"description":"Model identifier, token usage, and credit cost. Token and credit values are zero on user messages and on assistant messages that have not yet generated tokens."}},"required":["id","chatId","role","createdAt","updatedAt","content","parts","finishReason","filesStatus","restorable","authorId","usage"],"additionalProperties":false,"description":"A single message in a chat."},"MessageListResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique message identifier."},"chatId":{"type":"string","description":"ID of the chat this message belongs to."},"role":{"type":"string","enum":["user","assistant"],"description":"Who produced this message."},"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":"ISO timestamp when the message was created."},"updatedAt":{"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":"ISO timestamp when the message was last updated."},"content":{"type":"string","description":"The trailing prose of the message — the agent’s closing summary, or the user’s message text. Empty string when there is no closing prose."},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","description":"Markdown prose written by the agent or user."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","text"],"additionalProperties":false,"description":"A block of text output by the agent."},{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"text":{"type":"string","description":"The agent's reasoning trace."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","text"],"additionalProperties":false,"description":"Extended thinking output by the agent."},{"type":"object","properties":{"type":{"type":"string","enum":["file-read"]},"paths":{"type":"array","items":{"type":"string"},"description":"The file paths the agent read in this step."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","paths"],"additionalProperties":false,"description":"Files read by the agent."},{"type":"object","properties":{"type":{"type":"string","enum":["file-edit"]},"operation":{"type":"string","enum":["create","update","delete","rename","patch"],"description":"The type of file edit performed."},"path":{"type":"string","description":"The target file path."},"toPath":{"description":"The new path when operation is \"rename\".","type":"string"},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","operation","path"],"additionalProperties":false,"description":"The agent created, modified, deleted, renamed, or patched a file."},{"type":"object","properties":{"type":{"type":"string","enum":["search"]},"scope":{"type":"string","enum":["repo","web"],"description":"Whether the agent searched the repository or the web."},"query":{"type":"string","description":"The search query."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","scope","query"],"additionalProperties":false,"description":"The agent searched for something."},{"type":"object","properties":{"type":{"type":"string","enum":["bash"]},"command":{"type":"string","description":"The shell command that was executed."},"output":{"description":"Combined stdout/stderr captured from the terminal. May be empty if the command produced no output.","type":"string"},"exitCode":{"description":"Process exit code, when available. Reserved for future use; currently always omitted.","anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"isDangerous":{"description":"True if the command was flagged as potentially dangerous and required explicit user approval.","type":"boolean"},"timeoutMs":{"description":"Command timeout in milliseconds, when configured.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","command"],"additionalProperties":false,"description":"The agent ran a shell command."},{"type":"object","properties":{"type":{"type":"string","enum":["tool-call"]},"name":{"type":"string","description":"The identifier the tool was invoked under. For MCP/integration tools this is a normalized identifier derived from the tool name — prefer `toolDisplayName` for display when present."},"toolDisplayName":{"description":"The tool's original human-readable name (an MCP/integration tool's server-side name), when `name` is a normalized identifier. Display-only.","anyOf":[{"type":"string"},{"type":"null"}]},"input":{"description":"The arguments passed to the tool. Schema depends on the specific tool."},"output":{"description":"The result returned by the tool. Schema depends on the specific tool."},"status":{"type":"string","enum":["ok","error"],"description":"Whether the tool call succeeded or returned an error."},"suggestedPermissions":{"description":"Present when the agent is blocked waiting for you to approve this tool call (for example, running a setup or migration script). Pass these objects back unchanged as the `permissions` of a `confirmed-permissions` task to approve. Omitted once the tool has run.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["ALLOW_DYNAMIC_TOOL_STRICT"],"description":"Permission grant type."},"toolName":{"type":"string","description":"The tool this permission authorizes."},"input":{"description":"The tool input this permission authorizes. Pass back unchanged when resolving."},"toolDisplayName":{"description":"The tool's original human-readable name (an MCP/integration tool's server name), when `toolName` is a normalized identifier. Display-only; pass back unchanged.","anyOf":[{"type":"string"},{"type":"null"}]},"taskNameActive":{"description":"Internal label for the in-progress task. Pass back unchanged.","anyOf":[{"type":"string"},{"type":"null"}]},"taskNameComplete":{"description":"Internal label for the completed task. Pass back unchanged.","anyOf":[{"type":"string"},{"type":"null"}]},"userMessage":{"description":"Optional message associated with the permission.","type":"string"}},"required":["type","toolName"],"additionalProperties":false,"description":"A permission the agent is waiting for you to grant. Pass these objects back unchanged as the `permissions` of a `confirmed-permissions` task."}},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","name","status"],"additionalProperties":false,"description":"The agent invoked a tool (MCP, integration, or other dynamic tool). For shell commands, use the \"bash\" part instead."},{"type":"object","properties":{"type":{"type":"string","enum":["agent-action"]},"name":{"type":"string","description":"Stable identifier for the action (e.g. \"generate_image\", \"manage_todos\", \"diagnostics\"). See documentation for the registry of known names."},"summary":{"type":"string","description":"A short human-readable summary of what happened. Always populated so clients can render something even without knowing the action name."},"data":{"description":"Structured payload for actions that carry data. Present on `ask_user_questions`, `exit_plan_mode`, `get_or_request_integration`, and `configure_vercel_connect` parts when the agent is waiting on you, and on `show_artifact` and `security_review` parts. Narrow by the part `name`: the presence of `data` alone does not mean the agent is waiting on you. Omitted for actions that do not carry structured data.","anyOf":[{"type":"object","properties":{"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Question identifier. Pass back as `questionId` when resolving with an `answered-questions` task."},"question":{"type":"string","description":"The full question text."},"header":{"type":"string","description":"Short label for the question."},"multiSelect":{"type":"boolean","description":"Whether more than one option may be selected."},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Option identifier."},"label":{"type":"string","description":"Display label. Pass matching labels back in `selectedLabels` when resolving."},"description":{"description":"Optional longer explanation of the option.","type":"string"}},"required":["id","label"],"additionalProperties":false},"description":"The available answer options."}},"required":["id","question","header","multiSelect","options"],"additionalProperties":false},"description":"The questions the agent is waiting for answers to. Resolve with an `answered-questions` task."}},"required":["questions"],"additionalProperties":false,"description":"Structured payload for an `ask_user_questions` agent action."},{"type":"object","properties":{"plan":{"type":"string","description":"The full proposed plan, as Markdown."},"summary":{"description":"A concise summary of the plan, when available.","type":"string"},"path":{"type":"string","description":"The path the plan applies to."}},"required":["plan","path"],"additionalProperties":false,"description":"Structured payload for an `exit_plan_mode` agent action."},{"type":"object","properties":{"requestedIntegrations":{"type":"array","items":{"type":"string"},"description":"Integration names the agent is asking you to connect (for example, \"Neon\"). Pass these back in `connectedIntegrationNames` when resolving with a `confirmed-steps` task."},"requestedNpmRegistryIds":{"type":"array","items":{"type":"string"},"description":"Deprecated. npm registry connections are no longer requested; this array is always empty.","deprecated":true},"requestedMcpPresets":{"type":"array","items":{"type":"string"},"description":"MCP preset names the agent is asking you to add. Pass these back in `connectedMcpPresetNames` when resolving with a `confirmed-steps` task."}},"required":["requestedIntegrations","requestedNpmRegistryIds","requestedMcpPresets"],"additionalProperties":false,"description":"Structured payload for a `get_or_request_integration` agent action."},{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["setup-required"],"description":"The agent is waiting for connector setup to be completed in a browser."},"requestId":{"type":"string","description":"Setup request identifier. Pass as `requestId` to GET /chats/{chatId}/connect/status to poll for completion."},"service":{"type":"string","description":"The service being connected (for example, \"linear\")."},"serviceIconUrl":{"description":"Icon URL for the service, hosted on vercel.com.","type":"string","format":"uri"},"connectorName":{"type":"string","description":"Display name of the connector being created."},"setupUrl":{"type":"string","format":"uri","description":"Open this vercel.com URL in a browser to complete connector setup. Requires a vercel.com session for a member of the team."},"environments":{"type":"array","items":{"type":"string","enum":["production","preview","development"],"description":"Vercel environment the connector is attached to."},"description":"Environments the connector will be attached to."},"triggerPath":{"description":"Webhook trigger path that will be registered on the connector, when requested.","type":"string"},"createdProject":{"description":"Vercel project auto-created for this chat during setup, when applicable.","type":"object","properties":{"id":{"type":"string","description":"Vercel project identifier."},"name":{"type":"string","description":"Vercel project name."}},"required":["id","name"],"additionalProperties":false}},"required":["status","requestId","service","connectorName","setupUrl","environments"],"additionalProperties":false,"description":"Connector setup is pending. Complete setup at `setupUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then resolve with a `vercel-connect-setup` task."},{"type":"object","properties":{"status":{"type":"string","enum":["authorization-required"],"description":"The agent is waiting for the current user to authorize a connector in a browser."},"requestId":{"type":"string","description":"Authorization request identifier. Pass as `requestId` to GET /chats/{chatId}/connect/status to poll for completion."},"service":{"type":"string","description":"The service being authorized."},"serviceIconUrl":{"description":"Icon URL for the service, hosted on vercel.com.","type":"string","format":"uri"},"connectorId":{"type":"string","description":"Connector being authorized."},"connectorName":{"type":"string","description":"Display name of the connector."},"authorizationUrl":{"type":"string","format":"uri","description":"Open this vercel.com URL in a browser to sign in to the provider as the current user. Requires a vercel.com session for a member of the team."}},"required":["status","requestId","service","connectorId","connectorName","authorizationUrl"],"additionalProperties":false,"description":"User authorization is pending. Sign in at `authorizationUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then resolve with a `vercel-connect-authorization` task."},{"type":"object","properties":{"status":{"type":"string","enum":["completed"],"description":"The Connect action finished; no user input is needed."},"action":{"type":"string","enum":["list","create","attach","authorize"],"description":"The Connect action that ran."},"summary":{"type":"string","description":"Human-readable result summary."},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Connector identifier."},"name":{"type":"string","description":"Connector display name."},"service":{"description":"Connected service identifier.","type":"string"},"attachedToProject":{"type":"boolean","description":"Whether the connector is attached to the chat’s Vercel project."}},"required":["id","name","attachedToProject"],"additionalProperties":false},"description":"Connectors involved in the action."},"createdProject":{"description":"Vercel project created during the action, when applicable.","type":"object","properties":{"id":{"type":"string","description":"Vercel project identifier."},"name":{"type":"string","description":"Vercel project name."}},"required":["id","name"],"additionalProperties":false}},"required":["status","action","summary","connectors"],"additionalProperties":false,"description":"The Connect action finished; no user input is needed."}],"description":"Structured payload for a `configure_vercel_connect` agent action."},{"type":"object","properties":{"artifactId":{"type":"string","description":"Artifact identifier. Download its bytes with GET /chats/{chatId}/artifacts/{artifactId}."},"title":{"type":"string","description":"Short title the agent gave the artifact."},"fileName":{"type":"string","description":"File name of the artifact, including its extension."},"kind":{"type":"string","enum":["html","markdown","json","csv","text","image","audio","video","pdf","model","code","document","spreadsheet","presentation","file"],"description":"How the artifact is rendered in v0."},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Size of the artifact in bytes."},"display":{"type":"string","enum":["tab","inline"],"description":"Where v0 shows the artifact: embedded in the message (`inline`) or in a separate tab (`tab`)."}},"required":["artifactId","title","fileName","kind","size","display"],"additionalProperties":false,"description":"Structured payload for a `show_artifact` agent action: a file the agent saved to show the user, such as a report, chart, or interactive HTML page."},{"oneOf":[{"type":"object","properties":{"outcome":{"type":"string","enum":["running"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."}},"required":["outcome","files","contextFileCount"],"additionalProperties":false,"description":"The review is running."},{"type":"object","properties":{"outcome":{"type":"string","enum":["clean"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."},"potentialIssueCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Potential issues the review reported, before the agent checked them against the project. The checked findings are in the final message."},"severities":{"type":"object","properties":{"critical":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"high":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"medium":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bug":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Non-security bugs the review reported."},"low":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["critical","high","medium","bug","low"],"additionalProperties":false,"description":"Potential issues by severity."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the review ran."}},"required":["outcome","files","contextFileCount","potentialIssueCount","severities","durationMs"],"additionalProperties":false,"description":"The review finished and reported no potential issues."},{"type":"object","properties":{"outcome":{"type":"string","enum":["findings"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."},"potentialIssueCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Potential issues the review reported, before the agent checked them against the project. The checked findings are in the final message."},"severities":{"type":"object","properties":{"critical":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"high":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"medium":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bug":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Non-security bugs the review reported."},"low":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["critical","high","medium","bug","low"],"additionalProperties":false,"description":"Potential issues by severity."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the review ran."}},"required":["outcome","files","contextFileCount","potentialIssueCount","severities","durationMs"],"additionalProperties":false,"description":"The review finished and reported potential issues."},{"type":"object","properties":{"outcome":{"type":"string","enum":["incomplete"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."},"reason":{"type":"string","enum":["ai-error","credits","timeout","stopped","not-started","interrupted"],"description":"Why the review ended without a result: `ai-error` (the AI calls failed), `credits` (not enough v0 credits), `timeout`, `stopped` (the turn was stopped while it ran), `not-started` (it never started), or `interrupted` (it stopped partway, or its result could not be read)."},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long it ran before it ended, when known."}},"required":["outcome","files","contextFileCount","reason","durationMs"],"additionalProperties":false,"description":"The review ended without a result."}],"description":"Payload for `security_review` parts. Narrow by `outcome`: only finished reviews carry counts, and only incomplete ones carry a `reason`."}]},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","name","summary"],"additionalProperties":false,"description":"A typed escape hatch for agent actions that don’t fit the other part types. Forward-compatible: new action types may appear without API version changes."}],"description":"A single entry in the ordered narrative of a message. Iterate `parts` in order to render the full transcript."},"description":"Ordered list of parts that make up the message. Iterate to render the full narrative including thinking, file operations, tool calls, and prose."},"finishReason":{"anyOf":[{"type":"string","enum":["stop","length","content-filter","tool-calls","error","other"],"description":"The reason why message generation finished, including standard completion reasons and error states."},{"type":"null"}],"description":"Why generation ended. Null while the agent is still generating; once non-null, the message is final and safe to consume."},"filesStatus":{"anyOf":[{"type":"string","enum":["pending","ready","failed"]},{"type":"null"}],"description":"Whether `GET /chats/{chatId}/files` reflects this assistant message. `pending` while the agent is generating or its changes are still being saved, which can continue for a few seconds after `finishReason` is set; `ready` once they are saved; `failed` if saving them failed, in which case the files are those of the previous version. Null on user messages."},"restorable":{"type":"boolean","description":"True when this is an assistant message that produced restorable code and is not the currently active code."},"attachments":{"description":"Files attached to this message.","type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"URL to the attachment."},"name":{"description":"Original filename, when available.","type":"string"},"contentType":{"description":"MIME type.","type":"string"},"size":{"description":"Size in bytes.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["url"],"additionalProperties":false}},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ID of the user who authored a user message; null for assistant messages."},"usage":{"type":"object","properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model identifier used for the assistant message, or null when not applicable or unavailable."},"tokens":{"type":"object","properties":{"input":{"type":"number","description":"Prompt input value (non-cached)."},"output":{"type":"number","description":"Completion output value."},"cacheRead":{"type":"number","description":"Cache-read input value."},"cacheWrite":{"type":"number","description":"Cache-write input value."},"total":{"type":"number","description":"Sum of input, output, cacheRead, and cacheWrite."}},"required":["input","output","cacheRead","cacheWrite","total"],"additionalProperties":false,"description":"Token counts for this message."},"creditsCost":{"type":"object","properties":{"input":{"type":"number","description":"Prompt input value (non-cached)."},"output":{"type":"number","description":"Completion output value."},"cacheRead":{"type":"number","description":"Cache-read input value."},"cacheWrite":{"type":"number","description":"Cache-write input value."},"total":{"type":"number","description":"Sum of input, output, cacheRead, and cacheWrite."}},"required":["input","output","cacheRead","cacheWrite","total"],"additionalProperties":false,"description":"Credit cost for this message."}},"required":["model","tokens","creditsCost"],"additionalProperties":false,"description":"Model identifier, token usage, and credit cost. Token and credit values are zero on user messages and on assistant messages that have not yet generated tokens."}},"required":["id","chatId","role","createdAt","updatedAt","content","parts","finishReason","filesStatus","restorable","authorId","usage"],"additionalProperties":false,"description":"A single message in a chat."},"description":"The messages in this page, newest first."},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor to fetch the next page, or null if there are no more messages."}},"required":["messages","cursor"],"additionalProperties":false},"AsyncMessage":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messageId":{"type":"string","description":"ID of the assistant message that will receive the response. Poll GET /chats/:chatId/messages/:messageId and check `finishReason` for completion."}},"required":["messageId"],"additionalProperties":false,"description":"Acknowledgement that an async message has been queued."},"MessageStreamEvent":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"id":{"type":"string","description":"Unique message identifier."},"chatId":{"type":"string","description":"ID of the chat this message belongs to."},"role":{"type":"string","enum":["user","assistant"],"description":"Who produced this message."},"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":"ISO timestamp when the message was created."},"updatedAt":{"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":"ISO timestamp when the message was last updated."},"content":{"type":"string","description":"The trailing prose of the message — the agent’s closing summary, or the user’s message text. Empty string when there is no closing prose."},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","description":"Markdown prose written by the agent or user."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","text"],"additionalProperties":false,"description":"A block of text output by the agent."},{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"text":{"type":"string","description":"The agent's reasoning trace."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","text"],"additionalProperties":false,"description":"Extended thinking output by the agent."},{"type":"object","properties":{"type":{"type":"string","enum":["file-read"]},"paths":{"type":"array","items":{"type":"string"},"description":"The file paths the agent read in this step."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","paths"],"additionalProperties":false,"description":"Files read by the agent."},{"type":"object","properties":{"type":{"type":"string","enum":["file-edit"]},"operation":{"type":"string","enum":["create","update","delete","rename","patch"],"description":"The type of file edit performed."},"path":{"type":"string","description":"The target file path."},"toPath":{"description":"The new path when operation is \"rename\".","type":"string"},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","operation","path"],"additionalProperties":false,"description":"The agent created, modified, deleted, renamed, or patched a file."},{"type":"object","properties":{"type":{"type":"string","enum":["search"]},"scope":{"type":"string","enum":["repo","web"],"description":"Whether the agent searched the repository or the web."},"query":{"type":"string","description":"The search query."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","scope","query"],"additionalProperties":false,"description":"The agent searched for something."},{"type":"object","properties":{"type":{"type":"string","enum":["bash"]},"command":{"type":"string","description":"The shell command that was executed."},"output":{"description":"Combined stdout/stderr captured from the terminal. May be empty if the command produced no output.","type":"string"},"exitCode":{"description":"Process exit code, when available. Reserved for future use; currently always omitted.","anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"isDangerous":{"description":"True if the command was flagged as potentially dangerous and required explicit user approval.","type":"boolean"},"timeoutMs":{"description":"Command timeout in milliseconds, when configured.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","command"],"additionalProperties":false,"description":"The agent ran a shell command."},{"type":"object","properties":{"type":{"type":"string","enum":["tool-call"]},"name":{"type":"string","description":"The identifier the tool was invoked under. For MCP/integration tools this is a normalized identifier derived from the tool name — prefer `toolDisplayName` for display when present."},"toolDisplayName":{"description":"The tool's original human-readable name (an MCP/integration tool's server-side name), when `name` is a normalized identifier. Display-only.","anyOf":[{"type":"string"},{"type":"null"}]},"input":{"description":"The arguments passed to the tool. Schema depends on the specific tool."},"output":{"description":"The result returned by the tool. Schema depends on the specific tool."},"status":{"type":"string","enum":["ok","error"],"description":"Whether the tool call succeeded or returned an error."},"suggestedPermissions":{"description":"Present when the agent is blocked waiting for you to approve this tool call (for example, running a setup or migration script). Pass these objects back unchanged as the `permissions` of a `confirmed-permissions` task to approve. Omitted once the tool has run.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["ALLOW_DYNAMIC_TOOL_STRICT"],"description":"Permission grant type."},"toolName":{"type":"string","description":"The tool this permission authorizes."},"input":{"description":"The tool input this permission authorizes. Pass back unchanged when resolving."},"toolDisplayName":{"description":"The tool's original human-readable name (an MCP/integration tool's server name), when `toolName` is a normalized identifier. Display-only; pass back unchanged.","anyOf":[{"type":"string"},{"type":"null"}]},"taskNameActive":{"description":"Internal label for the in-progress task. Pass back unchanged.","anyOf":[{"type":"string"},{"type":"null"}]},"taskNameComplete":{"description":"Internal label for the completed task. Pass back unchanged.","anyOf":[{"type":"string"},{"type":"null"}]},"userMessage":{"description":"Optional message associated with the permission.","type":"string"}},"required":["type","toolName"],"additionalProperties":false,"description":"A permission the agent is waiting for you to grant. Pass these objects back unchanged as the `permissions` of a `confirmed-permissions` task."}},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","name","status"],"additionalProperties":false,"description":"The agent invoked a tool (MCP, integration, or other dynamic tool). For shell commands, use the \"bash\" part instead."},{"type":"object","properties":{"type":{"type":"string","enum":["agent-action"]},"name":{"type":"string","description":"Stable identifier for the action (e.g. \"generate_image\", \"manage_todos\", \"diagnostics\"). See documentation for the registry of known names."},"summary":{"type":"string","description":"A short human-readable summary of what happened. Always populated so clients can render something even without knowing the action name."},"data":{"description":"Structured payload for actions that carry data. Present on `ask_user_questions`, `exit_plan_mode`, `get_or_request_integration`, and `configure_vercel_connect` parts when the agent is waiting on you, and on `show_artifact` and `security_review` parts. Narrow by the part `name`: the presence of `data` alone does not mean the agent is waiting on you. Omitted for actions that do not carry structured data.","anyOf":[{"type":"object","properties":{"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Question identifier. Pass back as `questionId` when resolving with an `answered-questions` task."},"question":{"type":"string","description":"The full question text."},"header":{"type":"string","description":"Short label for the question."},"multiSelect":{"type":"boolean","description":"Whether more than one option may be selected."},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Option identifier."},"label":{"type":"string","description":"Display label. Pass matching labels back in `selectedLabels` when resolving."},"description":{"description":"Optional longer explanation of the option.","type":"string"}},"required":["id","label"],"additionalProperties":false},"description":"The available answer options."}},"required":["id","question","header","multiSelect","options"],"additionalProperties":false},"description":"The questions the agent is waiting for answers to. Resolve with an `answered-questions` task."}},"required":["questions"],"additionalProperties":false,"description":"Structured payload for an `ask_user_questions` agent action."},{"type":"object","properties":{"plan":{"type":"string","description":"The full proposed plan, as Markdown."},"summary":{"description":"A concise summary of the plan, when available.","type":"string"},"path":{"type":"string","description":"The path the plan applies to."}},"required":["plan","path"],"additionalProperties":false,"description":"Structured payload for an `exit_plan_mode` agent action."},{"type":"object","properties":{"requestedIntegrations":{"type":"array","items":{"type":"string"},"description":"Integration names the agent is asking you to connect (for example, \"Neon\"). Pass these back in `connectedIntegrationNames` when resolving with a `confirmed-steps` task."},"requestedNpmRegistryIds":{"type":"array","items":{"type":"string"},"description":"Deprecated. npm registry connections are no longer requested; this array is always empty.","deprecated":true},"requestedMcpPresets":{"type":"array","items":{"type":"string"},"description":"MCP preset names the agent is asking you to add. Pass these back in `connectedMcpPresetNames` when resolving with a `confirmed-steps` task."}},"required":["requestedIntegrations","requestedNpmRegistryIds","requestedMcpPresets"],"additionalProperties":false,"description":"Structured payload for a `get_or_request_integration` agent action."},{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["setup-required"],"description":"The agent is waiting for connector setup to be completed in a browser."},"requestId":{"type":"string","description":"Setup request identifier. Pass as `requestId` to GET /chats/{chatId}/connect/status to poll for completion."},"service":{"type":"string","description":"The service being connected (for example, \"linear\")."},"serviceIconUrl":{"description":"Icon URL for the service, hosted on vercel.com.","type":"string","format":"uri"},"connectorName":{"type":"string","description":"Display name of the connector being created."},"setupUrl":{"type":"string","format":"uri","description":"Open this vercel.com URL in a browser to complete connector setup. Requires a vercel.com session for a member of the team."},"environments":{"type":"array","items":{"type":"string","enum":["production","preview","development"],"description":"Vercel environment the connector is attached to."},"description":"Environments the connector will be attached to."},"triggerPath":{"description":"Webhook trigger path that will be registered on the connector, when requested.","type":"string"},"createdProject":{"description":"Vercel project auto-created for this chat during setup, when applicable.","type":"object","properties":{"id":{"type":"string","description":"Vercel project identifier."},"name":{"type":"string","description":"Vercel project name."}},"required":["id","name"],"additionalProperties":false}},"required":["status","requestId","service","connectorName","setupUrl","environments"],"additionalProperties":false,"description":"Connector setup is pending. Complete setup at `setupUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then resolve with a `vercel-connect-setup` task."},{"type":"object","properties":{"status":{"type":"string","enum":["authorization-required"],"description":"The agent is waiting for the current user to authorize a connector in a browser."},"requestId":{"type":"string","description":"Authorization request identifier. Pass as `requestId` to GET /chats/{chatId}/connect/status to poll for completion."},"service":{"type":"string","description":"The service being authorized."},"serviceIconUrl":{"description":"Icon URL for the service, hosted on vercel.com.","type":"string","format":"uri"},"connectorId":{"type":"string","description":"Connector being authorized."},"connectorName":{"type":"string","description":"Display name of the connector."},"authorizationUrl":{"type":"string","format":"uri","description":"Open this vercel.com URL in a browser to sign in to the provider as the current user. Requires a vercel.com session for a member of the team."}},"required":["status","requestId","service","connectorId","connectorName","authorizationUrl"],"additionalProperties":false,"description":"User authorization is pending. Sign in at `authorizationUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then resolve with a `vercel-connect-authorization` task."},{"type":"object","properties":{"status":{"type":"string","enum":["completed"],"description":"The Connect action finished; no user input is needed."},"action":{"type":"string","enum":["list","create","attach","authorize"],"description":"The Connect action that ran."},"summary":{"type":"string","description":"Human-readable result summary."},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Connector identifier."},"name":{"type":"string","description":"Connector display name."},"service":{"description":"Connected service identifier.","type":"string"},"attachedToProject":{"type":"boolean","description":"Whether the connector is attached to the chat’s Vercel project."}},"required":["id","name","attachedToProject"],"additionalProperties":false},"description":"Connectors involved in the action."},"createdProject":{"description":"Vercel project created during the action, when applicable.","type":"object","properties":{"id":{"type":"string","description":"Vercel project identifier."},"name":{"type":"string","description":"Vercel project name."}},"required":["id","name"],"additionalProperties":false}},"required":["status","action","summary","connectors"],"additionalProperties":false,"description":"The Connect action finished; no user input is needed."}],"description":"Structured payload for a `configure_vercel_connect` agent action."},{"type":"object","properties":{"artifactId":{"type":"string","description":"Artifact identifier. Download its bytes with GET /chats/{chatId}/artifacts/{artifactId}."},"title":{"type":"string","description":"Short title the agent gave the artifact."},"fileName":{"type":"string","description":"File name of the artifact, including its extension."},"kind":{"type":"string","enum":["html","markdown","json","csv","text","image","audio","video","pdf","model","code","document","spreadsheet","presentation","file"],"description":"How the artifact is rendered in v0."},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Size of the artifact in bytes."},"display":{"type":"string","enum":["tab","inline"],"description":"Where v0 shows the artifact: embedded in the message (`inline`) or in a separate tab (`tab`)."}},"required":["artifactId","title","fileName","kind","size","display"],"additionalProperties":false,"description":"Structured payload for a `show_artifact` agent action: a file the agent saved to show the user, such as a report, chart, or interactive HTML page."},{"oneOf":[{"type":"object","properties":{"outcome":{"type":"string","enum":["running"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."}},"required":["outcome","files","contextFileCount"],"additionalProperties":false,"description":"The review is running."},{"type":"object","properties":{"outcome":{"type":"string","enum":["clean"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."},"potentialIssueCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Potential issues the review reported, before the agent checked them against the project. The checked findings are in the final message."},"severities":{"type":"object","properties":{"critical":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"high":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"medium":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bug":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Non-security bugs the review reported."},"low":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["critical","high","medium","bug","low"],"additionalProperties":false,"description":"Potential issues by severity."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the review ran."}},"required":["outcome","files","contextFileCount","potentialIssueCount","severities","durationMs"],"additionalProperties":false,"description":"The review finished and reported no potential issues."},{"type":"object","properties":{"outcome":{"type":"string","enum":["findings"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."},"potentialIssueCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Potential issues the review reported, before the agent checked them against the project. The checked findings are in the final message."},"severities":{"type":"object","properties":{"critical":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"high":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"medium":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bug":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Non-security bugs the review reported."},"low":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["critical","high","medium","bug","low"],"additionalProperties":false,"description":"Potential issues by severity."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the review ran."}},"required":["outcome","files","contextFileCount","potentialIssueCount","severities","durationMs"],"additionalProperties":false,"description":"The review finished and reported potential issues."},{"type":"object","properties":{"outcome":{"type":"string","enum":["incomplete"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."},"reason":{"type":"string","enum":["ai-error","credits","timeout","stopped","not-started","interrupted"],"description":"Why the review ended without a result: `ai-error` (the AI calls failed), `credits` (not enough v0 credits), `timeout`, `stopped` (the turn was stopped while it ran), `not-started` (it never started), or `interrupted` (it stopped partway, or its result could not be read)."},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long it ran before it ended, when known."}},"required":["outcome","files","contextFileCount","reason","durationMs"],"additionalProperties":false,"description":"The review ended without a result."}],"description":"Payload for `security_review` parts. Narrow by `outcome`: only finished reviews carry counts, and only incomplete ones carry a `reason`."}]},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","name","summary"],"additionalProperties":false,"description":"A typed escape hatch for agent actions that don’t fit the other part types. Forward-compatible: new action types may appear without API version changes."}],"description":"A single entry in the ordered narrative of a message. Iterate `parts` in order to render the full transcript."},"description":"Ordered list of parts that make up the message. Iterate to render the full narrative including thinking, file operations, tool calls, and prose."},"finishReason":{"anyOf":[{"type":"string","enum":["stop","length","content-filter","tool-calls","error","other"],"description":"The reason why message generation finished, including standard completion reasons and error states."},{"type":"null"}],"description":"Why generation ended. Null while the agent is still generating; once non-null, the message is final and safe to consume."},"filesStatus":{"anyOf":[{"type":"string","enum":["pending","ready","failed"]},{"type":"null"}],"description":"Whether `GET /chats/{chatId}/files` reflects this assistant message. `pending` while the agent is generating or its changes are still being saved, which can continue for a few seconds after `finishReason` is set; `ready` once they are saved; `failed` if saving them failed, in which case the files are those of the previous version. Null on user messages."},"restorable":{"type":"boolean","description":"True when this is an assistant message that produced restorable code and is not the currently active code."},"attachments":{"description":"Files attached to this message.","type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"URL to the attachment."},"name":{"description":"Original filename, when available.","type":"string"},"contentType":{"description":"MIME type.","type":"string"},"size":{"description":"Size in bytes.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["url"],"additionalProperties":false}},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ID of the user who authored a user message; null for assistant messages."},"usage":{"type":"object","properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model identifier used for the assistant message, or null when not applicable or unavailable."},"tokens":{"type":"object","properties":{"input":{"type":"number","description":"Prompt input value (non-cached)."},"output":{"type":"number","description":"Completion output value."},"cacheRead":{"type":"number","description":"Cache-read input value."},"cacheWrite":{"type":"number","description":"Cache-write input value."},"total":{"type":"number","description":"Sum of input, output, cacheRead, and cacheWrite."}},"required":["input","output","cacheRead","cacheWrite","total"],"additionalProperties":false,"description":"Token counts for this message."},"creditsCost":{"type":"object","properties":{"input":{"type":"number","description":"Prompt input value (non-cached)."},"output":{"type":"number","description":"Completion output value."},"cacheRead":{"type":"number","description":"Cache-read input value."},"cacheWrite":{"type":"number","description":"Cache-write input value."},"total":{"type":"number","description":"Sum of input, output, cacheRead, and cacheWrite."}},"required":["input","output","cacheRead","cacheWrite","total"],"additionalProperties":false,"description":"Credit cost for this message."}},"required":["model","tokens","creditsCost"],"additionalProperties":false,"description":"Model identifier, token usage, and credit cost. Token and credit values are zero on user messages and on assistant messages that have not yet generated tokens."},"object":{"type":"string","enum":["message"],"description":"Discriminator: a message snapshot."}},"required":["id","chatId","role","createdAt","updatedAt","content","parts","finishReason","filesStatus","restorable","authorId","usage","object"],"additionalProperties":false,"description":"Initial and final message-state event. Emitted once at stream open with the freshly-created assistant message (empty parts, null finishReason), and once at stream close with the completed message."},{"type":"object","properties":{"id":{"type":"string","description":"Assistant message ID."},"object":{"type":"string","enum":["message.parts.chunk"],"description":"Discriminator."},"delta":{"description":"jsondiffpatch delta to apply against the running public `Message.parts` array. Apply each delta in order to reconstruct the complete current parts snapshot."}},"required":["id","object","delta"],"additionalProperties":false,"description":"Incremental update to the assistant message content."},{"type":"object","properties":{"id":{"type":"string","description":"Assistant message ID this usage applies to."},"object":{"type":"string","enum":["message.usage"],"description":"Discriminator."},"usage":{"type":"object","properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model identifier used for the assistant message, or null when not applicable or unavailable."},"tokens":{"type":"object","properties":{"input":{"type":"number","description":"Prompt input value (non-cached)."},"output":{"type":"number","description":"Completion output value."},"cacheRead":{"type":"number","description":"Cache-read input value."},"cacheWrite":{"type":"number","description":"Cache-write input value."},"total":{"type":"number","description":"Sum of input, output, cacheRead, and cacheWrite."}},"required":["input","output","cacheRead","cacheWrite","total"],"additionalProperties":false,"description":"Token counts for this message."},"creditsCost":{"type":"object","properties":{"input":{"type":"number","description":"Prompt input value (non-cached)."},"output":{"type":"number","description":"Completion output value."},"cacheRead":{"type":"number","description":"Cache-read input value."},"cacheWrite":{"type":"number","description":"Cache-write input value."},"total":{"type":"number","description":"Sum of input, output, cacheRead, and cacheWrite."}},"required":["input","output","cacheRead","cacheWrite","total"],"additionalProperties":false,"description":"Credit cost for this message."}},"required":["model","tokens","creditsCost"],"additionalProperties":false,"description":"Model identifier, token usage, and credit cost. Token and credit values are zero on user messages and on assistant messages that have not generated tokens."}},"required":["id","object","usage"],"additionalProperties":false,"description":"Final model, token usage, and credit cost for the assistant message produced by this stream. Emitted once after the message finishes generating, before the closing state event."},{"type":"object","properties":{"id":{"type":"string","description":"Assistant message ID or chat ID, depending on what is in scope when the error is raised."},"object":{"type":"string","enum":["error"],"description":"Discriminator."},"message":{"type":"string","description":"Human-readable stream error message."},"code":{"description":"Optional machine-readable stream error code.","type":"string"}},"required":["id","object","message"],"additionalProperties":false,"description":"Emitted when a stream error occurs after the SSE response begins."}],"description":"A single Server-Sent Events payload emitted by the streaming send-message endpoint. Each SSE event is `data: <JSON>\\n\\n` where the JSON conforms to one of the union members."},"ChatTemplateSync":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"templateId":{"type":"string","description":"ID of the template published from this chat, as shown in its v0.app/templates URL."},"gitSha":{"type":"string","description":"Commit the template is pinned to after the sync."},"previousGitSha":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Commit the template was pinned to before the sync, or null if none was recorded."},"changed":{"type":"boolean","description":"Whether the sync published a new template version. False when the template was already pinned to the production commit."}},"required":["templateId","gitSha","previousGitSha","changed"],"additionalProperties":false},"Files":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Project-relative file path, e.g. \"app/page.tsx\"."},"content":{"type":"string","description":"Content of the file."},"encoding":{"type":"string","enum":["utf8","base64"],"description":"How `content` is encoded. `utf8` for text files; `base64` for binary files."}},"required":["path","content","encoding"],"additionalProperties":false,"description":"A single source file in the chat."},"description":"All source files in the chat."}},"required":["files"],"additionalProperties":false,"description":"The source files of a chat."},"McpServer":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the MCP server."},"name":{"type":"string","description":"Display name of the MCP server."},"url":{"type":"string","description":"URL endpoint of the MCP server."},"description":{"type":"string","description":"Optional description of the MCP server."},"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":"ISO timestamp of when the server was created."},"updatedAt":{"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":"ISO timestamp of the last update."},"userId":{"type":"string","description":"ID of the user who created the server."},"enabled":{"type":"boolean","description":"Whether the MCP server is enabled."},"auth":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bearer"]},"token":{"type":"string","description":"Bearer token for authentication."}},"required":["type","token"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom-headers"]},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Custom headers to include in requests."}},"required":["type","headers"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["oauth"]},"config":{"description":"OAuth configuration discovered or manually set.","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"registrationUrl":{"type":"string","format":"uri"},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"usePKCE":{"type":"boolean"},"issuer":{"type":"string"},"resource":{"type":"string"},"clientIdMetadataDocumentSupported":{"type":"boolean"}},"required":["authorizationUrl","tokenUrl","clientId","scopes","usePKCE"],"additionalProperties":false},"connected":{"default":false,"description":"Whether OAuth is currently connected.","type":"boolean"},"expiresAt":{"description":"ISO timestamp when the token expires.","type":"string"}},"required":["type","connected"],"additionalProperties":false}],"description":"Authentication configuration for the MCP server."},"scope":{"type":"string","enum":["user","team"],"description":"Scope of the MCP server configuration."}},"required":["id","name","url","description","createdAt","updatedAt","userId","enabled","auth","scope"],"additionalProperties":false},"ApiKey":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the API key."},"name":{"type":"string","description":"The name of the API key."},"ownerId":{"type":"string","description":"The team ID that owns this key."},"partialKey":{"type":"string","description":"The last few characters of the API key."},"lastUsed":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The last time this key was used, or null if never used."}},"required":["id","name","ownerId","partialKey","lastUsed"],"additionalProperties":false},"ApiKeyWithSecret":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the API key."},"name":{"type":"string","description":"The name of the API key."},"ownerId":{"type":"string","description":"The team ID that owns this key."},"apiKey":{"type":"string","description":"The full API key. Only returned on creation."}},"required":["id","name","ownerId","apiKey"],"additionalProperties":false},"SpendLimit":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entityId":{"type":"string","description":"The team ID or organization ID this limit applies to."},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The spend limit in dollars."},"source":{"type":"string","enum":["team","organization"],"description":"Whether this limit is set at the team or organization level."},"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":"ISO timestamp of when the spend limit was created."},"updatedAt":{"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":"ISO timestamp of when the spend limit was last updated."}},"required":["entityId","limit","source","createdAt","updatedAt"],"additionalProperties":false},"PoolCreditLimitDefault":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","enum":["pool_credit_limit_default"]},"setting":{"oneOf":[{"type":"object","properties":{"access":{"type":"string","enum":["unlimited"],"description":"The member may spend shared-pool credits without a cap."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["none"],"description":"The member may spend only their monthly credits."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["limited"],"description":"The member may spend up to `limit` of shared-pool credits per billing cycle."},"limit":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$","description":"USD amount per billing cycle, with up to two decimals."}},"required":["access","limit"],"additionalProperties":false}],"description":"How much of the shared credit pool a member may spend per billing cycle, after their monthly credits."}},"required":["object","setting"],"additionalProperties":false},"PoolCreditLimitMember":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","enum":["pool_credit_limit_member"]},"userId":{"type":"string","description":"Team member user ID."},"setting":{"oneOf":[{"type":"object","properties":{"access":{"type":"string","enum":["unlimited"],"description":"The member may spend shared-pool credits without a cap."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["none"],"description":"The member may spend only their monthly credits."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["limited"],"description":"The member may spend up to `limit` of shared-pool credits per billing cycle."},"limit":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$","description":"USD amount per billing cycle, with up to two decimals."}},"required":["access","limit"],"additionalProperties":false}],"description":"How much of the shared credit pool a member may spend per billing cycle, after their monthly credits."},"source":{"type":"string","enum":["default","member"],"description":"`default` when the team default applies, `member` when the member has their own setting."}},"required":["object","userId","setting","source"],"additionalProperties":false},"TrustedPreviewHosts":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"hosts":{"type":"array","items":{"type":"string"},"description":"Canonicalized hostname patterns trusted to embed previews. Exact hosts match only themselves; *.example.com matches exactly one subdomain label; **.example.com matches one or more subdomain labels. Wildcards do not include the apex, so list example.com separately when it should also be trusted."}},"required":["hosts"],"additionalProperties":false},"UsageActivity":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","enum":["usage_activity"],"description":"Object type identifier."},"range":{"type":"object","properties":{"start":{"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":"Inclusive ISO 8601 start timestamp."},"end":{"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":"Exclusive ISO 8601 end timestamp."}},"required":["start","end"],"additionalProperties":false,"description":"Time range covered by the response."},"scope":{"type":"object","properties":{"id":{"type":"string","description":"Billing scope identifier."},"type":{"type":"string","enum":["team","personal"],"description":"Billing scope type."},"isTeamWide":{"type":"boolean","description":"Whether the response includes usage for the entire team."},"userId":{"description":"User attribution applied to the response, when filtered.","type":"string"}},"required":["id","type","isTeamWide"],"additionalProperties":false,"description":"Authorized billing scope used for this response."},"summary":{"type":"object","properties":{"activeUsers":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct active users."},"activeDays":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct active days."},"chatCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct active chats."},"messageCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Assistant messages."}},"required":["activeUsers","activeDays","chatCount","messageCount"],"additionalProperties":false},"projects":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["project","drafts","unavailable"],"description":"Project grouping type."},"vercelProjectId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Vercel project identifier, when available."},"name":{"type":"string","description":"Project grouping display name."},"chatCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct active chats."},"messageCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Assistant messages."},"activeDays":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct active days."},"firstActivity":{"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":"First activity timestamp."},"lastActivity":{"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":"Most recent activity timestamp."}},"required":["kind","vercelProjectId","name","chatCount","messageCount","activeDays","firstActivity","lastActivity"],"additionalProperties":false},"description":"Activity grouped by Vercel project or draft status."},"chats":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["chat","unavailable"],"description":"Chat availability type."},"chatId":{"type":"string","description":"Chat identifier."},"title":{"type":"string","description":"Chat title or availability label."},"vercelProjectId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Associated Vercel project identifier."},"projectName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Associated project name."},"messageCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Assistant messages."},"activeDays":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct active days."},"firstActivity":{"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":"First activity timestamp."},"lastActivity":{"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":"Most recent activity timestamp."}},"required":["kind","chatId","title","vercelProjectId","projectName","messageCount","activeDays","firstActivity","lastActivity"],"additionalProperties":false},"description":"Activity grouped by chat."}},"required":["object","range","scope","summary","projects","chats"],"additionalProperties":false},"UsageSummary":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","enum":["usage_summary"],"description":"Object type identifier."},"range":{"type":"object","properties":{"start":{"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":"Inclusive ISO 8601 start timestamp."},"end":{"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":"Exclusive ISO 8601 end timestamp."}},"required":["start","end"],"additionalProperties":false,"description":"Time range covered by the response."},"scope":{"type":"object","properties":{"id":{"type":"string","description":"Billing scope identifier."},"type":{"type":"string","enum":["team","personal"],"description":"Billing scope type."},"isTeamWide":{"type":"boolean","description":"Whether the response includes usage for the entire team."},"userId":{"description":"User attribution applied to the response, when filtered.","type":"string"}},"required":["id","type","isTeamWide"],"additionalProperties":false,"description":"Authorized billing scope used for this response."},"credits":{"type":"object","properties":{"plan":{"type":"number","description":"Credits consumed from included plan credits."},"onDemand":{"type":"number","description":"Credits consumed from on-demand credits."},"total":{"type":"number","description":"Total credits consumed."}},"required":["plan","onDemand","total"],"additionalProperties":false,"description":"Credits consumed during the selected range."},"daily":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"UTC date in YYYY-MM-DD format."},"credits":{"type":"object","properties":{"plan":{"type":"number","description":"Credits consumed from included plan credits."},"onDemand":{"type":"number","description":"Credits consumed from on-demand credits."},"total":{"type":"number","description":"Total credits consumed."}},"required":["plan","onDemand","total"],"additionalProperties":false,"description":"Credits consumed during the selected range."}},"required":["date","credits"],"additionalProperties":false},"description":"Daily credit totals in chronological order."},"dataAsOf":{"description":"Timestamp of the reporting snapshot backing this response.","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","range","scope","credits","daily"],"additionalProperties":false},"UsageEventList":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Object type identifier."},"range":{"type":"object","properties":{"start":{"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":"Inclusive ISO 8601 start timestamp."},"end":{"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":"Exclusive ISO 8601 end timestamp."}},"required":["start","end"],"additionalProperties":false,"description":"Time range covered by the response."},"scope":{"type":"object","properties":{"id":{"type":"string","description":"Billing scope identifier."},"type":{"type":"string","enum":["team","personal"],"description":"Billing scope type."},"isTeamWide":{"type":"boolean","description":"Whether the response includes usage for the entire team."},"userId":{"description":"User attribution applied to the response, when filtered.","type":"string"}},"required":["id","type","isTeamWide"],"additionalProperties":false,"description":"Authorized billing scope used for this response."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Billing event identifier."},"object":{"type":"string","enum":["usage_event"],"description":"Object type identifier."},"type":{"type":"string","description":"Kind of product usage represented by the event."},"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 the usage event."},"userId":{"description":"Attributed user identifier.","type":"string"},"user":{"description":"Attributed user details. Omitted when the user cannot be resolved.","type":"object","properties":{"id":{"type":"string","description":"User identifier."},"email":{"type":"string","description":"User email address."},"name":{"description":"User display name, when set.","type":"string"}},"required":["id","email"],"additionalProperties":false},"chatId":{"description":"Related chat identifier.","type":"string"},"messageId":{"description":"Related message identifier.","type":"string"},"model":{"description":"Model associated with the event.","type":"string"},"sources":{"type":"array","items":{"type":"string","enum":["plan","on-demand"]},"description":"Credit sources used by the event."},"waived":{"type":"boolean","description":"Whether credits fully waived this event."},"costBreakdownStatus":{"description":"Whether the cost components are estimated or unavailable. When unavailable, creditsCost components are zero placeholders for compatibility and must be ignored; total and charged remain authoritative.","type":"string","enum":["estimated","unavailable"]},"tokens":{"anyOf":[{"type":"object","properties":{"input":{"type":"number","description":"Input amount excluding cached input."},"output":{"type":"number","description":"Output amount."},"cacheRead":{"type":"number","description":"Cache-read input amount."},"cacheWrite":{"type":"number","description":"Cache-write input amount."},"total":{"type":"number","description":"Total amount across all categories."}},"required":["input","output","cacheRead","cacheWrite","total"],"additionalProperties":false},{"type":"null"}],"description":"Persisted token counts, or null for image generation and when the source message is unavailable."},"creditsCost":{"type":"object","properties":{"input":{"type":"number","description":"Input amount excluding cached input."},"output":{"type":"number","description":"Output amount."},"cacheRead":{"type":"number","description":"Cache-read input amount."},"cacheWrite":{"type":"number","description":"Cache-write input amount."},"total":{"type":"number","description":"Total recorded cost, including costs without an available breakdown."},"charged":{"type":"number","description":"Credits charged after a full waiver."}},"required":["input","output","cacheRead","cacheWrite","total","charged"],"additionalProperties":false}},"required":["id","object","type","createdAt","sources","waived","tokens","creditsCost"],"additionalProperties":false},"description":"Usage events in this page."},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether another page is available."},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or null at the end."}},"required":["hasMore","cursor"],"additionalProperties":false,"description":"Pagination state for this response."}},"required":["object","range","scope","data","pagination"],"additionalProperties":false},"WebhookEventType":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["chat.created","chat.updated","chat.deleted","message.created","message.updated","message.deleted","message.finished"],"description":"The event type that triggers a webhook. A webhook will be invoked whenever the specified lifecycle event occurs."},"Webhook":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the webhook."},"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."},"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":"The event type that triggers a webhook. A webhook will be invoked whenever the specified lifecycle event occurs."},"description":"List of event types this webhook is subscribed to."},"url":{"type":"string","description":"Target URL that receives event payloads for this webhook."},"chatId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional ID of the chat that this webhook is scoped to."}},"required":["id","createdAt","name","events","url","chatId"],"additionalProperties":false}}},"security":[{"bearerAuth":[]}],"paths":{"/chats":{"post":{"tags":["Chats"],"summary":"Create Chat","description":"Creates a new chat from a prompt. The request blocks until the model response is complete and returns the chat.","operationId":"chats.create","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"type":"string","minLength":1,"description":"The prompt or instruction to send to the model."},"systemPrompt":{"description":"System-level context for the chat, such as frameworks or development environment details.","type":"string"},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false},"attachments":{"description":"Files or assets to include with the message. Provide either a URL or data URI, or inline UTF-8 text content.","type":"array","items":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"URL or data URI containing the attachment."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"name":{"description":"Display name for the inline text attachment.","type":"string","minLength":1},"content":{"type":"string","minLength":1,"description":"UTF-8 text content of the attachment."}},"required":["content"],"additionalProperties":false}]}},"mcpServerIds":{"description":"MCP server IDs to enable. When omitted, uses default enabled servers.","type":"array","items":{"type":"string"}},"skills":{"description":"Skills to force-attach to the chat. Supports skills.sh (`remote`), user/team memory (`memory`), and project (`project`) skills. Maximum 3.","maxItems":3,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["remote"],"description":"Discriminator: a skills.sh skill."},"id":{"type":"string","description":"Skill ID from skills.sh."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["memory"],"description":"Discriminator: a user- or team-scoped memory skill."},"scope":{"type":"string","enum":["user","team"],"description":"Whether the skill lives in user or team memory."},"skillName":{"type":"string","description":"Name of the memory skill to attach."}},"required":["type","scope","skillName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["project"],"description":"Discriminator: a skill defined in the project repo."},"skillName":{"type":"string","description":"Name of the project skill to attach."}},"required":["type","skillName"],"additionalProperties":false}],"description":"A skill to force-attach to the chat. Skills provide domain-specific knowledge to the AI. Use `remote` for skills.sh skills, `memory` for user/team memory skills (including design-system skills), and `project` for skills defined in the chat repo."}},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"credentialAccess":{"description":"Credentials the chat's sandbox may use. Not supported for Vercel OIDC principals.","type":"object","properties":{"sharedNpm":{"description":"Let the chat's sandbox install private packages with the team's shared npm credentials (`NPM_RC` / `NPM_TOKEN`). Defaults to `false`.","type":"boolean"},"vercel":{"description":"Let the chat's sandbox use the requesting user's Vercel credentials instead of a project-only token. Defaults to `false`.","type":"boolean"},"github":{"description":"Let the chat's sandbox use the requesting user's GitHub credentials. Defaults to `false`.","type":"boolean"}},"additionalProperties":false}},"required":["message"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"type":"string","minLength":1,"description":"The prompt or instruction to send to the model."},"systemPrompt":{"description":"System-level context for the chat, such as frameworks or development environment details.","type":"string"},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false},"attachments":{"description":"Files or assets to include with the message. Provide either a URL or data URI, or inline UTF-8 text content.","type":"array","items":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"URL or data URI containing the attachment."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"name":{"description":"Display name for the inline text attachment.","type":"string","minLength":1},"content":{"type":"string","minLength":1,"description":"UTF-8 text content of the attachment."}},"required":["content"],"additionalProperties":false}]}},"mcpServerIds":{"description":"MCP server IDs to enable. When omitted, uses default enabled servers.","type":"array","items":{"type":"string"}},"skills":{"description":"Skills to force-attach to the chat. Supports skills.sh (`remote`), user/team memory (`memory`), and project (`project`) skills. Maximum 3.","maxItems":3,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["remote"],"description":"Discriminator: a skills.sh skill."},"id":{"type":"string","description":"Skill ID from skills.sh."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["memory"],"description":"Discriminator: a user- or team-scoped memory skill."},"scope":{"type":"string","enum":["user","team"],"description":"Whether the skill lives in user or team memory."},"skillName":{"type":"string","description":"Name of the memory skill to attach."}},"required":["type","scope","skillName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["project"],"description":"Discriminator: a skill defined in the project repo."},"skillName":{"type":"string","description":"Name of the project skill to attach."}},"required":["type","skillName"],"additionalProperties":false}],"description":"A skill to force-attach to the chat. Skills provide domain-specific knowledge to the AI. Use `remote` for skills.sh skills, `memory` for user/team memory skills (including design-system skills), and `project` for skills defined in the chat repo."}},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"credentialAccess":{"description":"Credentials the chat's sandbox may use. Not supported for Vercel OIDC principals.","type":"object","properties":{"sharedNpm":{"description":"Let the chat's sandbox install private packages with the team's shared npm credentials (`NPM_RC` / `NPM_TOKEN`). Defaults to `false`.","type":"boolean"},"vercel":{"description":"Let the chat's sandbox use the requesting user's Vercel credentials instead of a project-only token. Defaults to `false`.","type":"boolean"},"github":{"description":"Let the chat's sandbox use the requesting user's GitHub credentials. Defaults to `false`.","type":"boolean"}},"additionalProperties":false}},"required":["message"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"type":"string","minLength":1,"description":"The prompt or instruction to send to the model."},"systemPrompt":{"description":"System-level context for the chat, such as frameworks or development environment details.","type":"string"},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false},"attachments":{"description":"Files or assets to include with the message. Provide either a URL or data URI, or inline UTF-8 text content.","type":"array","items":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"URL or data URI containing the attachment."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"name":{"description":"Display name for the inline text attachment.","type":"string","minLength":1},"content":{"type":"string","minLength":1,"description":"UTF-8 text content of the attachment."}},"required":["content"],"additionalProperties":false}]}},"mcpServerIds":{"description":"MCP server IDs to enable. When omitted, uses default enabled servers.","type":"array","items":{"type":"string"}},"skills":{"description":"Skills to force-attach to the chat. Supports skills.sh (`remote`), user/team memory (`memory`), and project (`project`) skills. Maximum 3.","maxItems":3,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["remote"],"description":"Discriminator: a skills.sh skill."},"id":{"type":"string","description":"Skill ID from skills.sh."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["memory"],"description":"Discriminator: a user- or team-scoped memory skill."},"scope":{"type":"string","enum":["user","team"],"description":"Whether the skill lives in user or team memory."},"skillName":{"type":"string","description":"Name of the memory skill to attach."}},"required":["type","scope","skillName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["project"],"description":"Discriminator: a skill defined in the project repo."},"skillName":{"type":"string","description":"Name of the project skill to attach."}},"required":["type","skillName"],"additionalProperties":false}],"description":"A skill to force-attach to the chat. Skills provide domain-specific knowledge to the AI. Use `remote` for skills.sh skills, `memory` for user/team memory skills (including design-system skills), and `project` for skills defined in the chat repo."}},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"credentialAccess":{"description":"Credentials the chat's sandbox may use. Not supported for Vercel OIDC principals.","type":"object","properties":{"sharedNpm":{"description":"Let the chat's sandbox install private packages with the team's shared npm credentials (`NPM_RC` / `NPM_TOKEN`). Defaults to `false`.","type":"boolean"},"vercel":{"description":"Let the chat's sandbox use the requesting user's Vercel credentials instead of a project-only token. Defaults to `false`.","type":"boolean"},"github":{"description":"Let the chat's sandbox use the requesting user's GitHub credentials. Defaults to `false`.","type":"boolean"}},"additionalProperties":false}},"required":["message"],"additionalProperties":false}}}},"responses":{"200":{"description":"A chat response that also reports the usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatWithUsage"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["Chats"],"summary":"List Chats","description":"Lists chats accessible to the authenticated user, newest first. Use it to list, browse, find or search v0 chats when you do not have a chat ID. Use metadata[key]=value style query parameters to filter chats by metadata.","operationId":"chats.list","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"Maximum number of chats to return (1-100, default 20)."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Pagination cursor returned from a previous response."},{"name":"orderBy","in":"query","required":false,"schema":{"type":"string","enum":["createdAt","updatedAt"],"default":"createdAt"},"description":"Field to sort chats by (default createdAt). Pass the same value when paginating with a cursor."},{"name":"orderDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Sort direction (default desc, newest first). Pass the same value when paginating with a cursor."},{"name":"authorId","in":"query","required":false,"schema":{"type":"string"},"description":"Restrict results to chats created by this user. Must be a member of the calling scope."},{"name":"vercelProjectId","in":"query","required":false,"schema":{"type":"string"},"description":"Restrict results to chats associated with this Vercel project."},{"name":"metadata","in":"query","required":false,"style":"deepObject","explode":true,"schema":{"type":"object","additionalProperties":{"type":"string","maxLength":500}},"description":"Filter by metadata, e.g. metadata[environment]=production. Returns chats matching all supplied key-value pairs."}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"chats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique chat identifier."},"title":{"description":"Chat title, if generated.","type":"string"},"privacy":{"type":"string","enum":["public","private","team","team-edit","unlisted"],"description":"Visibility setting of the chat."},"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":"ISO timestamp of when the chat was created."},"updatedAt":{"description":"ISO timestamp of when the chat 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))$"},"authorId":{"type":"string","description":"ID of the user who created the chat."},"vercelProjectId":{"description":"Associated Vercel project ID, if any.","type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"User-defined key-value metadata."},"writePermission":{"type":"boolean","description":"Whether the caller has write access to this chat."}},"required":["id","privacy","createdAt","authorId","metadata","writePermission"],"additionalProperties":false},"description":"The chats in this page."},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor to fetch the next page, or null if there are no more chats."}},"required":["chats","cursor"],"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/from-files":{"post":{"tags":["Chats"],"summary":"Create Chat From Files","description":"Creates a new chat from inline UTF-8 or base64-encoded source files.","operationId":"chats.createFromFiles","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"files":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Path of the file in the project."},"content":{"type":"string","description":"File content encoded according to `encoding`."},"encoding":{"description":"How `content` is encoded. Defaults to `utf8` when omitted.","type":"string","enum":["utf8","base64"]}},"required":["name","content"],"additionalProperties":false},"description":"Source files used to seed the new chat."},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["files"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"files":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Path of the file in the project."},"content":{"type":"string","description":"File content encoded according to `encoding`."},"encoding":{"description":"How `content` is encoded. Defaults to `utf8` when omitted.","type":"string","enum":["utf8","base64"]}},"required":["name","content"],"additionalProperties":false},"description":"Source files used to seed the new chat."},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["files"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"files":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Path of the file in the project."},"content":{"type":"string","description":"File content encoded according to `encoding`."},"encoding":{"description":"How `content` is encoded. Defaults to `utf8` when omitted.","type":"string","enum":["utf8","base64"]}},"required":["name","content"],"additionalProperties":false},"description":"Source files used to seed the new chat."},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["files"],"additionalProperties":false}}}},"responses":{"200":{"description":"A chat response that also reports the usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatWithUsage"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/from-zip":{"post":{"tags":["Chats"],"summary":"Create Chat From ZIP","description":"Creates a new chat from a zip archive.","operationId":"chats.createFromZip","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri","description":"Zip archive used to seed the new chat."},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["url"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri","description":"Zip archive used to seed the new chat."},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["url"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri","description":"Zip archive used to seed the new chat."},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["url"],"additionalProperties":false}}}},"responses":{"200":{"description":"A chat response that also reports the usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatWithUsage"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/from-repo":{"post":{"tags":["Chats"],"summary":"Create Chat From Repository","description":"Creates a new chat from a GitHub repository. If the repository is already linked to a Vercel project in the current scope, the chat uses that project. Otherwise, a new Vercel project linked to the repository is created. To start from a specific project, create the chat from that Vercel project instead.","operationId":"chats.createFromRepo","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"repo":{"type":"object","properties":{"url":{"type":"string","minLength":1,"description":"GitHub repository URL, for example https://github.com/vercel/next.js."},"branch":{"description":"Branch to import. If omitted, v0 uses the repository default branch.","type":"string","maxLength":250}},"required":["url"],"additionalProperties":false,"description":"Repository source for initialization. Supports public GitHub repositories and private repositories connected through Vercel."},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["repo"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"repo":{"type":"object","properties":{"url":{"type":"string","minLength":1,"description":"GitHub repository URL, for example https://github.com/vercel/next.js."},"branch":{"description":"Branch to import. If omitted, v0 uses the repository default branch.","type":"string","maxLength":250}},"required":["url"],"additionalProperties":false,"description":"Repository source for initialization. Supports public GitHub repositories and private repositories connected through Vercel."},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["repo"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"repo":{"type":"object","properties":{"url":{"type":"string","minLength":1,"description":"GitHub repository URL, for example https://github.com/vercel/next.js."},"branch":{"description":"Branch to import. If omitted, v0 uses the repository default branch.","type":"string","maxLength":250}},"required":["url"],"additionalProperties":false,"description":"Repository source for initialization. Supports public GitHub repositories and private repositories connected through Vercel."},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["repo"],"additionalProperties":false}}}},"responses":{"200":{"description":"A chat response that also reports the usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatWithUsage"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/from-template":{"post":{"tags":["Chats"],"summary":"Create Chat From Template","description":"Creates a new chat from a v0 template, the same way opening it from v0.app/templates does.","operationId":"chats.createFromTemplate","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"templateId":{"type":"string","minLength":1,"description":"ID of the v0 template to start from, as shown in its v0.app/templates URL."},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["templateId"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"templateId":{"type":"string","minLength":1,"description":"ID of the v0 template to start from, as shown in its v0.app/templates URL."},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["templateId"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"templateId":{"type":"string","minLength":1,"description":"ID of the v0 template to start from, as shown in its v0.app/templates URL."},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["templateId"],"additionalProperties":false}}}},"responses":{"200":{"description":"A chat response that also reports the usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatWithUsage"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/from-vercel-project":{"post":{"tags":["Chats"],"summary":"Create Chat From Vercel Project","description":"Creates a new chat from an existing Vercel project.","operationId":"chats.createFromVercelProject","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"vercelProjectId":{"type":"string","minLength":32,"maxLength":32,"pattern":"^prj_[A-Za-z0-9]+$","description":"Vercel project ID in the active user or team scope."},"baseBranch":{"description":"Base branch for a GitHub-linked project. Defaults to the repository default branch. Ignored for projects without a GitHub link.","type":"string","minLength":1,"maxLength":250},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["vercelProjectId"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"vercelProjectId":{"type":"string","minLength":32,"maxLength":32,"pattern":"^prj_[A-Za-z0-9]+$","description":"Vercel project ID in the active user or team scope."},"baseBranch":{"description":"Base branch for a GitHub-linked project. Defaults to the repository default branch. Ignored for projects without a GitHub link.","type":"string","minLength":1,"maxLength":250},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["vercelProjectId"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"vercelProjectId":{"type":"string","minLength":32,"maxLength":32,"pattern":"^prj_[A-Za-z0-9]+$","description":"Vercel project ID in the active user or team scope."},"baseBranch":{"description":"Base branch for a GitHub-linked project. Defaults to the repository default branch. Ignored for projects without a GitHub link.","type":"string","minLength":1,"maxLength":250},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["vercelProjectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"A chat response that also reports the usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatWithUsage"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/from-vercel-project/async":{"post":{"tags":["Chats"],"summary":"Create Chat From Vercel Project With Message (Async)","description":"Creates a new chat from an existing Vercel project and processes a first message in the background. Returns immediately with the chat ID and message ID. Poll for the assistant message by ID until `finishReason` is non-null. If the chat is created but the message cannot be sent, the error names the chat; retry with `messages.sendAsync` instead of creating another chat.","operationId":"chats.createFromVercelProjectWithMessageAsync","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"vercelProjectId":{"type":"string","minLength":32,"maxLength":32,"pattern":"^prj_[A-Za-z0-9]+$","description":"Vercel project ID in the active user or team scope."},"baseBranch":{"description":"Base branch for a GitHub-linked project. Defaults to the repository default branch. Ignored for projects without a GitHub link.","type":"string","minLength":1,"maxLength":250},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"message":{"type":"string","minLength":1,"description":"The prompt or instruction to send to the model."},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false}},"required":["vercelProjectId","message"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"vercelProjectId":{"type":"string","minLength":32,"maxLength":32,"pattern":"^prj_[A-Za-z0-9]+$","description":"Vercel project ID in the active user or team scope."},"baseBranch":{"description":"Base branch for a GitHub-linked project. Defaults to the repository default branch. Ignored for projects without a GitHub link.","type":"string","minLength":1,"maxLength":250},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"message":{"type":"string","minLength":1,"description":"The prompt or instruction to send to the model."},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false}},"required":["vercelProjectId","message"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"vercelProjectId":{"type":"string","minLength":32,"maxLength":32,"pattern":"^prj_[A-Za-z0-9]+$","description":"Vercel project ID in the active user or team scope."},"baseBranch":{"description":"Base branch for a GitHub-linked project. Defaults to the repository default branch. Ignored for projects without a GitHub link.","type":"string","minLength":1,"maxLength":250},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"message":{"type":"string","minLength":1,"description":"The prompt or instruction to send to the model."},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false}},"required":["vercelProjectId","message"],"additionalProperties":false}}}},"responses":{"202":{"description":"Response for status 202","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncChat"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/stream":{"post":{"tags":["Chats"],"summary":"Create Chat (Streaming)","description":"Creates a new chat with a user message and returns a Server-Sent Events stream. Events include initial chat state, title deltas, content chunk deltas, and final chat state. The response is `text/event-stream`; each event is `data: <JSON>\\n\\n` where the JSON conforms to ChatStreamEvent. If the stream disconnects before the final event, reconnect with `POST /chats/{chatId}/resume` instead of sending the message again.","operationId":"chats.createStream","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"type":"string","minLength":1,"description":"The prompt or instruction to send to the model."},"systemPrompt":{"description":"System-level context for the chat, such as frameworks or development environment details.","type":"string"},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false},"attachments":{"description":"Files or assets to include with the message. Provide either a URL or data URI, or inline UTF-8 text content.","type":"array","items":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"URL or data URI containing the attachment."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"name":{"description":"Display name for the inline text attachment.","type":"string","minLength":1},"content":{"type":"string","minLength":1,"description":"UTF-8 text content of the attachment."}},"required":["content"],"additionalProperties":false}]}},"mcpServerIds":{"description":"MCP server IDs to enable. When omitted, uses default enabled servers.","type":"array","items":{"type":"string"}},"skills":{"description":"Skills to force-attach to the chat. Supports skills.sh (`remote`), user/team memory (`memory`), and project (`project`) skills. Maximum 3.","maxItems":3,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["remote"],"description":"Discriminator: a skills.sh skill."},"id":{"type":"string","description":"Skill ID from skills.sh."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["memory"],"description":"Discriminator: a user- or team-scoped memory skill."},"scope":{"type":"string","enum":["user","team"],"description":"Whether the skill lives in user or team memory."},"skillName":{"type":"string","description":"Name of the memory skill to attach."}},"required":["type","scope","skillName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["project"],"description":"Discriminator: a skill defined in the project repo."},"skillName":{"type":"string","description":"Name of the project skill to attach."}},"required":["type","skillName"],"additionalProperties":false}],"description":"A skill to force-attach to the chat. Skills provide domain-specific knowledge to the AI. Use `remote` for skills.sh skills, `memory` for user/team memory skills (including design-system skills), and `project` for skills defined in the chat repo."}},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"credentialAccess":{"description":"Credentials the chat's sandbox may use. Not supported for Vercel OIDC principals.","type":"object","properties":{"sharedNpm":{"description":"Let the chat's sandbox install private packages with the team's shared npm credentials (`NPM_RC` / `NPM_TOKEN`). Defaults to `false`.","type":"boolean"},"vercel":{"description":"Let the chat's sandbox use the requesting user's Vercel credentials instead of a project-only token. Defaults to `false`.","type":"boolean"},"github":{"description":"Let the chat's sandbox use the requesting user's GitHub credentials. Defaults to `false`.","type":"boolean"}},"additionalProperties":false}},"required":["message"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"type":"string","minLength":1,"description":"The prompt or instruction to send to the model."},"systemPrompt":{"description":"System-level context for the chat, such as frameworks or development environment details.","type":"string"},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false},"attachments":{"description":"Files or assets to include with the message. Provide either a URL or data URI, or inline UTF-8 text content.","type":"array","items":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"URL or data URI containing the attachment."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"name":{"description":"Display name for the inline text attachment.","type":"string","minLength":1},"content":{"type":"string","minLength":1,"description":"UTF-8 text content of the attachment."}},"required":["content"],"additionalProperties":false}]}},"mcpServerIds":{"description":"MCP server IDs to enable. When omitted, uses default enabled servers.","type":"array","items":{"type":"string"}},"skills":{"description":"Skills to force-attach to the chat. Supports skills.sh (`remote`), user/team memory (`memory`), and project (`project`) skills. Maximum 3.","maxItems":3,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["remote"],"description":"Discriminator: a skills.sh skill."},"id":{"type":"string","description":"Skill ID from skills.sh."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["memory"],"description":"Discriminator: a user- or team-scoped memory skill."},"scope":{"type":"string","enum":["user","team"],"description":"Whether the skill lives in user or team memory."},"skillName":{"type":"string","description":"Name of the memory skill to attach."}},"required":["type","scope","skillName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["project"],"description":"Discriminator: a skill defined in the project repo."},"skillName":{"type":"string","description":"Name of the project skill to attach."}},"required":["type","skillName"],"additionalProperties":false}],"description":"A skill to force-attach to the chat. Skills provide domain-specific knowledge to the AI. Use `remote` for skills.sh skills, `memory` for user/team memory skills (including design-system skills), and `project` for skills defined in the chat repo."}},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"credentialAccess":{"description":"Credentials the chat's sandbox may use. Not supported for Vercel OIDC principals.","type":"object","properties":{"sharedNpm":{"description":"Let the chat's sandbox install private packages with the team's shared npm credentials (`NPM_RC` / `NPM_TOKEN`). Defaults to `false`.","type":"boolean"},"vercel":{"description":"Let the chat's sandbox use the requesting user's Vercel credentials instead of a project-only token. Defaults to `false`.","type":"boolean"},"github":{"description":"Let the chat's sandbox use the requesting user's GitHub credentials. Defaults to `false`.","type":"boolean"}},"additionalProperties":false}},"required":["message"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"type":"string","minLength":1,"description":"The prompt or instruction to send to the model."},"systemPrompt":{"description":"System-level context for the chat, such as frameworks or development environment details.","type":"string"},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false},"attachments":{"description":"Files or assets to include with the message. Provide either a URL or data URI, or inline UTF-8 text content.","type":"array","items":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"URL or data URI containing the attachment."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"name":{"description":"Display name for the inline text attachment.","type":"string","minLength":1},"content":{"type":"string","minLength":1,"description":"UTF-8 text content of the attachment."}},"required":["content"],"additionalProperties":false}]}},"mcpServerIds":{"description":"MCP server IDs to enable. When omitted, uses default enabled servers.","type":"array","items":{"type":"string"}},"skills":{"description":"Skills to force-attach to the chat. Supports skills.sh (`remote`), user/team memory (`memory`), and project (`project`) skills. Maximum 3.","maxItems":3,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["remote"],"description":"Discriminator: a skills.sh skill."},"id":{"type":"string","description":"Skill ID from skills.sh."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["memory"],"description":"Discriminator: a user- or team-scoped memory skill."},"scope":{"type":"string","enum":["user","team"],"description":"Whether the skill lives in user or team memory."},"skillName":{"type":"string","description":"Name of the memory skill to attach."}},"required":["type","scope","skillName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["project"],"description":"Discriminator: a skill defined in the project repo."},"skillName":{"type":"string","description":"Name of the project skill to attach."}},"required":["type","skillName"],"additionalProperties":false}],"description":"A skill to force-attach to the chat. Skills provide domain-specific knowledge to the AI. Use `remote` for skills.sh skills, `memory` for user/team memory skills (including design-system skills), and `project` for skills defined in the chat repo."}},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"credentialAccess":{"description":"Credentials the chat's sandbox may use. Not supported for Vercel OIDC principals.","type":"object","properties":{"sharedNpm":{"description":"Let the chat's sandbox install private packages with the team's shared npm credentials (`NPM_RC` / `NPM_TOKEN`). Defaults to `false`.","type":"boolean"},"vercel":{"description":"Let the chat's sandbox use the requesting user's Vercel credentials instead of a project-only token. Defaults to `false`.","type":"boolean"},"github":{"description":"Let the chat's sandbox use the requesting user's GitHub credentials. Defaults to `false`.","type":"boolean"}},"additionalProperties":false}},"required":["message"],"additionalProperties":false}}}},"responses":{"200":{"description":"A single Server-Sent Events payload emitted by streaming chat endpoints. Each SSE event is `data: <JSON>\\n\\n` where the JSON conforms to one of the union members.","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/ChatStreamEvent"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/async":{"post":{"tags":["Chats"],"summary":"Create Chat (Async)","description":"Creates a new chat with a user message and processes it in the background. Returns immediately with the chat ID and message ID. Poll for the assistant message by ID until `finishReason` is non-null.","operationId":"chats.createAsync","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"type":"string","minLength":1,"description":"The prompt or instruction to send to the model."},"systemPrompt":{"description":"System-level context for the chat, such as frameworks or development environment details.","type":"string"},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false},"attachments":{"description":"Files or assets to include with the message. Provide either a URL or data URI, or inline UTF-8 text content.","type":"array","items":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"URL or data URI containing the attachment."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"name":{"description":"Display name for the inline text attachment.","type":"string","minLength":1},"content":{"type":"string","minLength":1,"description":"UTF-8 text content of the attachment."}},"required":["content"],"additionalProperties":false}]}},"mcpServerIds":{"description":"MCP server IDs to enable. When omitted, uses default enabled servers.","type":"array","items":{"type":"string"}},"skills":{"description":"Skills to force-attach to the chat. Supports skills.sh (`remote`), user/team memory (`memory`), and project (`project`) skills. Maximum 3.","maxItems":3,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["remote"],"description":"Discriminator: a skills.sh skill."},"id":{"type":"string","description":"Skill ID from skills.sh."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["memory"],"description":"Discriminator: a user- or team-scoped memory skill."},"scope":{"type":"string","enum":["user","team"],"description":"Whether the skill lives in user or team memory."},"skillName":{"type":"string","description":"Name of the memory skill to attach."}},"required":["type","scope","skillName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["project"],"description":"Discriminator: a skill defined in the project repo."},"skillName":{"type":"string","description":"Name of the project skill to attach."}},"required":["type","skillName"],"additionalProperties":false}],"description":"A skill to force-attach to the chat. Skills provide domain-specific knowledge to the AI. Use `remote` for skills.sh skills, `memory` for user/team memory skills (including design-system skills), and `project` for skills defined in the chat repo."}},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"credentialAccess":{"description":"Credentials the chat's sandbox may use. Not supported for Vercel OIDC principals.","type":"object","properties":{"sharedNpm":{"description":"Let the chat's sandbox install private packages with the team's shared npm credentials (`NPM_RC` / `NPM_TOKEN`). Defaults to `false`.","type":"boolean"},"vercel":{"description":"Let the chat's sandbox use the requesting user's Vercel credentials instead of a project-only token. Defaults to `false`.","type":"boolean"},"github":{"description":"Let the chat's sandbox use the requesting user's GitHub credentials. Defaults to `false`.","type":"boolean"}},"additionalProperties":false}},"required":["message"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"type":"string","minLength":1,"description":"The prompt or instruction to send to the model."},"systemPrompt":{"description":"System-level context for the chat, such as frameworks or development environment details.","type":"string"},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false},"attachments":{"description":"Files or assets to include with the message. Provide either a URL or data URI, or inline UTF-8 text content.","type":"array","items":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"URL or data URI containing the attachment."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"name":{"description":"Display name for the inline text attachment.","type":"string","minLength":1},"content":{"type":"string","minLength":1,"description":"UTF-8 text content of the attachment."}},"required":["content"],"additionalProperties":false}]}},"mcpServerIds":{"description":"MCP server IDs to enable. When omitted, uses default enabled servers.","type":"array","items":{"type":"string"}},"skills":{"description":"Skills to force-attach to the chat. Supports skills.sh (`remote`), user/team memory (`memory`), and project (`project`) skills. Maximum 3.","maxItems":3,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["remote"],"description":"Discriminator: a skills.sh skill."},"id":{"type":"string","description":"Skill ID from skills.sh."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["memory"],"description":"Discriminator: a user- or team-scoped memory skill."},"scope":{"type":"string","enum":["user","team"],"description":"Whether the skill lives in user or team memory."},"skillName":{"type":"string","description":"Name of the memory skill to attach."}},"required":["type","scope","skillName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["project"],"description":"Discriminator: a skill defined in the project repo."},"skillName":{"type":"string","description":"Name of the project skill to attach."}},"required":["type","skillName"],"additionalProperties":false}],"description":"A skill to force-attach to the chat. Skills provide domain-specific knowledge to the AI. Use `remote` for skills.sh skills, `memory` for user/team memory skills (including design-system skills), and `project` for skills defined in the chat repo."}},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"credentialAccess":{"description":"Credentials the chat's sandbox may use. Not supported for Vercel OIDC principals.","type":"object","properties":{"sharedNpm":{"description":"Let the chat's sandbox install private packages with the team's shared npm credentials (`NPM_RC` / `NPM_TOKEN`). Defaults to `false`.","type":"boolean"},"vercel":{"description":"Let the chat's sandbox use the requesting user's Vercel credentials instead of a project-only token. Defaults to `false`.","type":"boolean"},"github":{"description":"Let the chat's sandbox use the requesting user's GitHub credentials. Defaults to `false`.","type":"boolean"}},"additionalProperties":false}},"required":["message"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"type":"string","minLength":1,"description":"The prompt or instruction to send to the model."},"systemPrompt":{"description":"System-level context for the chat, such as frameworks or development environment details.","type":"string"},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false},"attachments":{"description":"Files or assets to include with the message. Provide either a URL or data URI, or inline UTF-8 text content.","type":"array","items":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"URL or data URI containing the attachment."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"name":{"description":"Display name for the inline text attachment.","type":"string","minLength":1},"content":{"type":"string","minLength":1,"description":"UTF-8 text content of the attachment."}},"required":["content"],"additionalProperties":false}]}},"mcpServerIds":{"description":"MCP server IDs to enable. When omitted, uses default enabled servers.","type":"array","items":{"type":"string"}},"skills":{"description":"Skills to force-attach to the chat. Supports skills.sh (`remote`), user/team memory (`memory`), and project (`project`) skills. Maximum 3.","maxItems":3,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["remote"],"description":"Discriminator: a skills.sh skill."},"id":{"type":"string","description":"Skill ID from skills.sh."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["memory"],"description":"Discriminator: a user- or team-scoped memory skill."},"scope":{"type":"string","enum":["user","team"],"description":"Whether the skill lives in user or team memory."},"skillName":{"type":"string","description":"Name of the memory skill to attach."}},"required":["type","scope","skillName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["project"],"description":"Discriminator: a skill defined in the project repo."},"skillName":{"type":"string","description":"Name of the project skill to attach."}},"required":["type","skillName"],"additionalProperties":false}],"description":"A skill to force-attach to the chat. Skills provide domain-specific knowledge to the AI. Use `remote` for skills.sh skills, `memory` for user/team memory skills (including design-system skills), and `project` for skills defined in the chat repo."}},"privacy":{"description":"Visibility setting for the new chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Title for the new chat.","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"credentialAccess":{"description":"Credentials the chat's sandbox may use. Not supported for Vercel OIDC principals.","type":"object","properties":{"sharedNpm":{"description":"Let the chat's sandbox install private packages with the team's shared npm credentials (`NPM_RC` / `NPM_TOKEN`). Defaults to `false`.","type":"boolean"},"vercel":{"description":"Let the chat's sandbox use the requesting user's Vercel credentials instead of a project-only token. Defaults to `false`.","type":"boolean"},"github":{"description":"Let the chat's sandbox use the requesting user's GitHub credentials. Defaults to `false`.","type":"boolean"}},"additionalProperties":false}},"required":["message"],"additionalProperties":false}}}},"responses":{"202":{"description":"Response for status 202","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncChat"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/messages":{"get":{"tags":["Messages"],"summary":"List Messages","description":"Lists all messages in a chat.","operationId":"messages.list","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}},{"name":"limit","in":"query","required":true,"schema":{"default":20,"description":"Maximum number of messages to return (1-100, default 20).","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Pagination cursor returned from a previous response.","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageListResponse"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Messages"],"summary":"Send Message","description":"Sends a new message to an existing chat. Blocks until the model response is complete and returns the message response. Include designMode to apply element-scoped design edits; message may be omitted when edits are provided.","operationId":"messages.send","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"description":"The prompt or instruction to send to the model. May be omitted when designMode contains edits.","type":"string","minLength":1},"designMode":{"type":"object","properties":{"edits":{"description":"Element edits to apply to the source code. Maximum 100.","maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["style"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false},"changes":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"object","properties":{"from":{"type":"string","description":"Previous value. Context for the model, not a checked precondition."},"to":{"type":"string","description":"Requested value."}},"required":["from","to"],"additionalProperties":false},"description":"CSS property names in camelCase mapped to old and new values. Use textContent for text replacement."}},"required":["type","element","changes"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["deleteElement"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false}},"required":["type","element"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["move"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false},"toParentSelector":{"description":"Destination parent selector. Required when position is inside.","type":"string","minLength":1},"targetSelector":{"description":"Destination sibling selector. Required when position is before or after.","type":"string","minLength":1},"position":{"type":"string","enum":["before","after","inside"],"description":"Placement relative to the destination."}},"required":["type","element","position"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["fontInjection"]},"fontName":{"type":"string","minLength":1,"description":"Font to add to the project, such as Inter."}},"required":["type","fontName"],"additionalProperties":false}]}},"element":{"description":"CSS selector limiting the scope of the message instructions.","type":"string","minLength":1},"screenshot":{"description":"Screenshot providing visual context for the requested edits.","type":"object","properties":{"url":{"type":"string","minLength":1,"description":"HTTPS image URL or base64 image data URI. Counts toward the attachment limits. Not supported for Vercel OIDC principals."},"anchorElement":{"description":"CSS selector anchoring the screenshot to a rendered element.","type":"string","minLength":1}},"required":["url"],"additionalProperties":false}},"additionalProperties":false,"description":"Apply element-scoped design edits using Design Mode. Source changes are model-generated, not deterministic DOM patches. The Design Mode model is selected automatically, regardless of modelConfiguration.modelId."},"systemPrompt":{"description":"System-level context for the chat, such as frameworks or development environment details.","type":"string"},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false},"mcpServerIds":{"description":"MCP server IDs to enable. When omitted, uses default enabled servers.","type":"array","items":{"type":"string"}},"attachments":{"description":"Files or assets to include with the message. Provide either a URL or data URI, or inline UTF-8 text content.","type":"array","items":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"URL or data URI containing the attachment."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"name":{"description":"Display name for the inline text attachment.","type":"string","minLength":1},"content":{"type":"string","minLength":1,"description":"UTF-8 text content of the attachment."}},"required":["content"],"additionalProperties":false}]}},"skills":{"description":"Skills to force-attach to the message. Supports skills.sh (`remote`), user/team memory (`memory`), and project (`project`) skills. Maximum 3.","maxItems":3,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["remote"],"description":"Discriminator: a skills.sh skill."},"id":{"type":"string","description":"Skill ID from skills.sh."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["memory"],"description":"Discriminator: a user- or team-scoped memory skill."},"scope":{"type":"string","enum":["user","team"],"description":"Whether the skill lives in user or team memory."},"skillName":{"type":"string","description":"Name of the memory skill to attach."}},"required":["type","scope","skillName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["project"],"description":"Discriminator: a skill defined in the project repo."},"skillName":{"type":"string","description":"Name of the project skill to attach."}},"required":["type","skillName"],"additionalProperties":false}],"description":"A skill to force-attach to the chat. Skills provide domain-specific knowledge to the AI. Use `remote` for skills.sh skills, `memory` for user/team memory skills (including design-system skills), and `project` for skills defined in the chat repo."}}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"description":"The prompt or instruction to send to the model. May be omitted when designMode contains edits.","type":"string","minLength":1},"designMode":{"type":"object","properties":{"edits":{"description":"Element edits to apply to the source code. Maximum 100.","maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["style"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false},"changes":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"object","properties":{"from":{"type":"string","description":"Previous value. Context for the model, not a checked precondition."},"to":{"type":"string","description":"Requested value."}},"required":["from","to"],"additionalProperties":false},"description":"CSS property names in camelCase mapped to old and new values. Use textContent for text replacement."}},"required":["type","element","changes"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["deleteElement"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false}},"required":["type","element"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["move"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false},"toParentSelector":{"description":"Destination parent selector. Required when position is inside.","type":"string","minLength":1},"targetSelector":{"description":"Destination sibling selector. Required when position is before or after.","type":"string","minLength":1},"position":{"type":"string","enum":["before","after","inside"],"description":"Placement relative to the destination."}},"required":["type","element","position"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["fontInjection"]},"fontName":{"type":"string","minLength":1,"description":"Font to add to the project, such as Inter."}},"required":["type","fontName"],"additionalProperties":false}]}},"element":{"description":"CSS selector limiting the scope of the message instructions.","type":"string","minLength":1},"screenshot":{"description":"Screenshot providing visual context for the requested edits.","type":"object","properties":{"url":{"type":"string","minLength":1,"description":"HTTPS image URL or base64 image data URI. Counts toward the attachment limits. Not supported for Vercel OIDC principals."},"anchorElement":{"description":"CSS selector anchoring the screenshot to a rendered element.","type":"string","minLength":1}},"required":["url"],"additionalProperties":false}},"additionalProperties":false,"description":"Apply element-scoped design edits using Design Mode. Source changes are model-generated, not deterministic DOM patches. The Design Mode model is selected automatically, regardless of modelConfiguration.modelId."},"systemPrompt":{"description":"System-level context for the chat, such as frameworks or development environment details.","type":"string"},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false},"mcpServerIds":{"description":"MCP server IDs to enable. When omitted, uses default enabled servers.","type":"array","items":{"type":"string"}},"attachments":{"description":"Files or assets to include with the message. Provide either a URL or data URI, or inline UTF-8 text content.","type":"array","items":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"URL or data URI containing the attachment."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"name":{"description":"Display name for the inline text attachment.","type":"string","minLength":1},"content":{"type":"string","minLength":1,"description":"UTF-8 text content of the attachment."}},"required":["content"],"additionalProperties":false}]}},"skills":{"description":"Skills to force-attach to the message. Supports skills.sh (`remote`), user/team memory (`memory`), and project (`project`) skills. Maximum 3.","maxItems":3,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["remote"],"description":"Discriminator: a skills.sh skill."},"id":{"type":"string","description":"Skill ID from skills.sh."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["memory"],"description":"Discriminator: a user- or team-scoped memory skill."},"scope":{"type":"string","enum":["user","team"],"description":"Whether the skill lives in user or team memory."},"skillName":{"type":"string","description":"Name of the memory skill to attach."}},"required":["type","scope","skillName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["project"],"description":"Discriminator: a skill defined in the project repo."},"skillName":{"type":"string","description":"Name of the project skill to attach."}},"required":["type","skillName"],"additionalProperties":false}],"description":"A skill to force-attach to the chat. Skills provide domain-specific knowledge to the AI. Use `remote` for skills.sh skills, `memory` for user/team memory skills (including design-system skills), and `project` for skills defined in the chat repo."}}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"description":"The prompt or instruction to send to the model. May be omitted when designMode contains edits.","type":"string","minLength":1},"designMode":{"type":"object","properties":{"edits":{"description":"Element edits to apply to the source code. Maximum 100.","maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["style"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false},"changes":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"object","properties":{"from":{"type":"string","description":"Previous value. Context for the model, not a checked precondition."},"to":{"type":"string","description":"Requested value."}},"required":["from","to"],"additionalProperties":false},"description":"CSS property names in camelCase mapped to old and new values. Use textContent for text replacement."}},"required":["type","element","changes"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["deleteElement"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false}},"required":["type","element"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["move"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false},"toParentSelector":{"description":"Destination parent selector. Required when position is inside.","type":"string","minLength":1},"targetSelector":{"description":"Destination sibling selector. Required when position is before or after.","type":"string","minLength":1},"position":{"type":"string","enum":["before","after","inside"],"description":"Placement relative to the destination."}},"required":["type","element","position"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["fontInjection"]},"fontName":{"type":"string","minLength":1,"description":"Font to add to the project, such as Inter."}},"required":["type","fontName"],"additionalProperties":false}]}},"element":{"description":"CSS selector limiting the scope of the message instructions.","type":"string","minLength":1},"screenshot":{"description":"Screenshot providing visual context for the requested edits.","type":"object","properties":{"url":{"type":"string","minLength":1,"description":"HTTPS image URL or base64 image data URI. Counts toward the attachment limits. Not supported for Vercel OIDC principals."},"anchorElement":{"description":"CSS selector anchoring the screenshot to a rendered element.","type":"string","minLength":1}},"required":["url"],"additionalProperties":false}},"additionalProperties":false,"description":"Apply element-scoped design edits using Design Mode. Source changes are model-generated, not deterministic DOM patches. The Design Mode model is selected automatically, regardless of modelConfiguration.modelId."},"systemPrompt":{"description":"System-level context for the chat, such as frameworks or development environment details.","type":"string"},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false},"mcpServerIds":{"description":"MCP server IDs to enable. When omitted, uses default enabled servers.","type":"array","items":{"type":"string"}},"attachments":{"description":"Files or assets to include with the message. Provide either a URL or data URI, or inline UTF-8 text content.","type":"array","items":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"URL or data URI containing the attachment."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"name":{"description":"Display name for the inline text attachment.","type":"string","minLength":1},"content":{"type":"string","minLength":1,"description":"UTF-8 text content of the attachment."}},"required":["content"],"additionalProperties":false}]}},"skills":{"description":"Skills to force-attach to the message. Supports skills.sh (`remote`), user/team memory (`memory`), and project (`project`) skills. Maximum 3.","maxItems":3,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["remote"],"description":"Discriminator: a skills.sh skill."},"id":{"type":"string","description":"Skill ID from skills.sh."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["memory"],"description":"Discriminator: a user- or team-scoped memory skill."},"scope":{"type":"string","enum":["user","team"],"description":"Whether the skill lives in user or team memory."},"skillName":{"type":"string","description":"Name of the memory skill to attach."}},"required":["type","scope","skillName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["project"],"description":"Discriminator: a skill defined in the project repo."},"skillName":{"type":"string","description":"Name of the project skill to attach."}},"required":["type","skillName"],"additionalProperties":false}],"description":"A skill to force-attach to the chat. Skills provide domain-specific knowledge to the AI. Use `remote` for skills.sh skills, `memory` for user/team memory skills (including design-system skills), and `project` for skills defined in the chat repo."}}},"additionalProperties":false}}}},"responses":{"200":{"description":"A single message in a chat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/messages/{messageId}":{"get":{"tags":["Messages"],"summary":"Get Message","description":"Fetches a single message in a chat.","operationId":"messages.get","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the message."}}],"responses":{"200":{"description":"A single message in a chat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/messages/stream":{"post":{"tags":["Messages"],"summary":"Send Message (Streaming)","description":"Sends a new message to an existing chat and returns a Server-Sent Events stream. Include designMode to apply element-scoped design edits; message may be omitted when edits are provided. Events include the initial assistant-message snapshot, content chunk deltas, final usage, and a closing message snapshot. The response is `text/event-stream`; each event is `data: <JSON>\\n\\n` where the JSON conforms to MessageStreamEvent. If the stream disconnects before the final event, reconnect with `POST /chats/{chatId}/resume` instead of sending the message again.","operationId":"messages.sendStream","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"description":"The prompt or instruction to send to the model. May be omitted when designMode contains edits.","type":"string","minLength":1},"designMode":{"type":"object","properties":{"edits":{"description":"Element edits to apply to the source code. Maximum 100.","maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["style"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false},"changes":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"object","properties":{"from":{"type":"string","description":"Previous value. Context for the model, not a checked precondition."},"to":{"type":"string","description":"Requested value."}},"required":["from","to"],"additionalProperties":false},"description":"CSS property names in camelCase mapped to old and new values. Use textContent for text replacement."}},"required":["type","element","changes"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["deleteElement"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false}},"required":["type","element"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["move"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false},"toParentSelector":{"description":"Destination parent selector. Required when position is inside.","type":"string","minLength":1},"targetSelector":{"description":"Destination sibling selector. Required when position is before or after.","type":"string","minLength":1},"position":{"type":"string","enum":["before","after","inside"],"description":"Placement relative to the destination."}},"required":["type","element","position"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["fontInjection"]},"fontName":{"type":"string","minLength":1,"description":"Font to add to the project, such as Inter."}},"required":["type","fontName"],"additionalProperties":false}]}},"element":{"description":"CSS selector limiting the scope of the message instructions.","type":"string","minLength":1},"screenshot":{"description":"Screenshot providing visual context for the requested edits.","type":"object","properties":{"url":{"type":"string","minLength":1,"description":"HTTPS image URL or base64 image data URI. Counts toward the attachment limits. Not supported for Vercel OIDC principals."},"anchorElement":{"description":"CSS selector anchoring the screenshot to a rendered element.","type":"string","minLength":1}},"required":["url"],"additionalProperties":false}},"additionalProperties":false,"description":"Apply element-scoped design edits using Design Mode. Source changes are model-generated, not deterministic DOM patches. The Design Mode model is selected automatically, regardless of modelConfiguration.modelId."},"systemPrompt":{"description":"System-level context for the chat, such as frameworks or development environment details.","type":"string"},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false},"mcpServerIds":{"description":"MCP server IDs to enable. When omitted, uses default enabled servers.","type":"array","items":{"type":"string"}},"attachments":{"description":"Files or assets to include with the message. Provide either a URL or data URI, or inline UTF-8 text content.","type":"array","items":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"URL or data URI containing the attachment."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"name":{"description":"Display name for the inline text attachment.","type":"string","minLength":1},"content":{"type":"string","minLength":1,"description":"UTF-8 text content of the attachment."}},"required":["content"],"additionalProperties":false}]}},"skills":{"description":"Skills to force-attach to the message. Supports skills.sh (`remote`), user/team memory (`memory`), and project (`project`) skills. Maximum 3.","maxItems":3,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["remote"],"description":"Discriminator: a skills.sh skill."},"id":{"type":"string","description":"Skill ID from skills.sh."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["memory"],"description":"Discriminator: a user- or team-scoped memory skill."},"scope":{"type":"string","enum":["user","team"],"description":"Whether the skill lives in user or team memory."},"skillName":{"type":"string","description":"Name of the memory skill to attach."}},"required":["type","scope","skillName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["project"],"description":"Discriminator: a skill defined in the project repo."},"skillName":{"type":"string","description":"Name of the project skill to attach."}},"required":["type","skillName"],"additionalProperties":false}],"description":"A skill to force-attach to the chat. Skills provide domain-specific knowledge to the AI. Use `remote` for skills.sh skills, `memory` for user/team memory skills (including design-system skills), and `project` for skills defined in the chat repo."}}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"description":"The prompt or instruction to send to the model. May be omitted when designMode contains edits.","type":"string","minLength":1},"designMode":{"type":"object","properties":{"edits":{"description":"Element edits to apply to the source code. Maximum 100.","maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["style"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false},"changes":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"object","properties":{"from":{"type":"string","description":"Previous value. Context for the model, not a checked precondition."},"to":{"type":"string","description":"Requested value."}},"required":["from","to"],"additionalProperties":false},"description":"CSS property names in camelCase mapped to old and new values. Use textContent for text replacement."}},"required":["type","element","changes"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["deleteElement"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false}},"required":["type","element"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["move"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false},"toParentSelector":{"description":"Destination parent selector. Required when position is inside.","type":"string","minLength":1},"targetSelector":{"description":"Destination sibling selector. Required when position is before or after.","type":"string","minLength":1},"position":{"type":"string","enum":["before","after","inside"],"description":"Placement relative to the destination."}},"required":["type","element","position"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["fontInjection"]},"fontName":{"type":"string","minLength":1,"description":"Font to add to the project, such as Inter."}},"required":["type","fontName"],"additionalProperties":false}]}},"element":{"description":"CSS selector limiting the scope of the message instructions.","type":"string","minLength":1},"screenshot":{"description":"Screenshot providing visual context for the requested edits.","type":"object","properties":{"url":{"type":"string","minLength":1,"description":"HTTPS image URL or base64 image data URI. Counts toward the attachment limits. Not supported for Vercel OIDC principals."},"anchorElement":{"description":"CSS selector anchoring the screenshot to a rendered element.","type":"string","minLength":1}},"required":["url"],"additionalProperties":false}},"additionalProperties":false,"description":"Apply element-scoped design edits using Design Mode. Source changes are model-generated, not deterministic DOM patches. The Design Mode model is selected automatically, regardless of modelConfiguration.modelId."},"systemPrompt":{"description":"System-level context for the chat, such as frameworks or development environment details.","type":"string"},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false},"mcpServerIds":{"description":"MCP server IDs to enable. When omitted, uses default enabled servers.","type":"array","items":{"type":"string"}},"attachments":{"description":"Files or assets to include with the message. Provide either a URL or data URI, or inline UTF-8 text content.","type":"array","items":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"URL or data URI containing the attachment."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"name":{"description":"Display name for the inline text attachment.","type":"string","minLength":1},"content":{"type":"string","minLength":1,"description":"UTF-8 text content of the attachment."}},"required":["content"],"additionalProperties":false}]}},"skills":{"description":"Skills to force-attach to the message. Supports skills.sh (`remote`), user/team memory (`memory`), and project (`project`) skills. Maximum 3.","maxItems":3,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["remote"],"description":"Discriminator: a skills.sh skill."},"id":{"type":"string","description":"Skill ID from skills.sh."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["memory"],"description":"Discriminator: a user- or team-scoped memory skill."},"scope":{"type":"string","enum":["user","team"],"description":"Whether the skill lives in user or team memory."},"skillName":{"type":"string","description":"Name of the memory skill to attach."}},"required":["type","scope","skillName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["project"],"description":"Discriminator: a skill defined in the project repo."},"skillName":{"type":"string","description":"Name of the project skill to attach."}},"required":["type","skillName"],"additionalProperties":false}],"description":"A skill to force-attach to the chat. Skills provide domain-specific knowledge to the AI. Use `remote` for skills.sh skills, `memory` for user/team memory skills (including design-system skills), and `project` for skills defined in the chat repo."}}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"description":"The prompt or instruction to send to the model. May be omitted when designMode contains edits.","type":"string","minLength":1},"designMode":{"type":"object","properties":{"edits":{"description":"Element edits to apply to the source code. Maximum 100.","maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["style"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false},"changes":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"object","properties":{"from":{"type":"string","description":"Previous value. Context for the model, not a checked precondition."},"to":{"type":"string","description":"Requested value."}},"required":["from","to"],"additionalProperties":false},"description":"CSS property names in camelCase mapped to old and new values. Use textContent for text replacement."}},"required":["type","element","changes"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["deleteElement"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false}},"required":["type","element"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["move"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false},"toParentSelector":{"description":"Destination parent selector. Required when position is inside.","type":"string","minLength":1},"targetSelector":{"description":"Destination sibling selector. Required when position is before or after.","type":"string","minLength":1},"position":{"type":"string","enum":["before","after","inside"],"description":"Placement relative to the destination."}},"required":["type","element","position"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["fontInjection"]},"fontName":{"type":"string","minLength":1,"description":"Font to add to the project, such as Inter."}},"required":["type","fontName"],"additionalProperties":false}]}},"element":{"description":"CSS selector limiting the scope of the message instructions.","type":"string","minLength":1},"screenshot":{"description":"Screenshot providing visual context for the requested edits.","type":"object","properties":{"url":{"type":"string","minLength":1,"description":"HTTPS image URL or base64 image data URI. Counts toward the attachment limits. Not supported for Vercel OIDC principals."},"anchorElement":{"description":"CSS selector anchoring the screenshot to a rendered element.","type":"string","minLength":1}},"required":["url"],"additionalProperties":false}},"additionalProperties":false,"description":"Apply element-scoped design edits using Design Mode. Source changes are model-generated, not deterministic DOM patches. The Design Mode model is selected automatically, regardless of modelConfiguration.modelId."},"systemPrompt":{"description":"System-level context for the chat, such as frameworks or development environment details.","type":"string"},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false},"mcpServerIds":{"description":"MCP server IDs to enable. When omitted, uses default enabled servers.","type":"array","items":{"type":"string"}},"attachments":{"description":"Files or assets to include with the message. Provide either a URL or data URI, or inline UTF-8 text content.","type":"array","items":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"URL or data URI containing the attachment."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"name":{"description":"Display name for the inline text attachment.","type":"string","minLength":1},"content":{"type":"string","minLength":1,"description":"UTF-8 text content of the attachment."}},"required":["content"],"additionalProperties":false}]}},"skills":{"description":"Skills to force-attach to the message. Supports skills.sh (`remote`), user/team memory (`memory`), and project (`project`) skills. Maximum 3.","maxItems":3,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["remote"],"description":"Discriminator: a skills.sh skill."},"id":{"type":"string","description":"Skill ID from skills.sh."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["memory"],"description":"Discriminator: a user- or team-scoped memory skill."},"scope":{"type":"string","enum":["user","team"],"description":"Whether the skill lives in user or team memory."},"skillName":{"type":"string","description":"Name of the memory skill to attach."}},"required":["type","scope","skillName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["project"],"description":"Discriminator: a skill defined in the project repo."},"skillName":{"type":"string","description":"Name of the project skill to attach."}},"required":["type","skillName"],"additionalProperties":false}],"description":"A skill to force-attach to the chat. Skills provide domain-specific knowledge to the AI. Use `remote` for skills.sh skills, `memory` for user/team memory skills (including design-system skills), and `project` for skills defined in the chat repo."}}},"additionalProperties":false}}}},"responses":{"200":{"description":"A single Server-Sent Events payload emitted by the streaming send-message endpoint. Each SSE event is `data: <JSON>\\n\\n` where the JSON conforms to one of the union members.","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/MessageStreamEvent"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/messages/async":{"post":{"tags":["Messages"],"summary":"Send Message (Async)","description":"Sends a new message to an existing chat and processes it in the background. Include designMode to apply element-scoped design edits; message may be omitted when edits are provided. Returns immediately with the assistant message ID. Poll GET /chats/:chatId/messages/:messageId and check `finishReason` to detect completion.","operationId":"messages.sendAsync","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"description":"The prompt or instruction to send to the model. May be omitted when designMode contains edits.","type":"string","minLength":1},"designMode":{"type":"object","properties":{"edits":{"description":"Element edits to apply to the source code. Maximum 100.","maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["style"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false},"changes":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"object","properties":{"from":{"type":"string","description":"Previous value. Context for the model, not a checked precondition."},"to":{"type":"string","description":"Requested value."}},"required":["from","to"],"additionalProperties":false},"description":"CSS property names in camelCase mapped to old and new values. Use textContent for text replacement."}},"required":["type","element","changes"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["deleteElement"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false}},"required":["type","element"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["move"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false},"toParentSelector":{"description":"Destination parent selector. Required when position is inside.","type":"string","minLength":1},"targetSelector":{"description":"Destination sibling selector. Required when position is before or after.","type":"string","minLength":1},"position":{"type":"string","enum":["before","after","inside"],"description":"Placement relative to the destination."}},"required":["type","element","position"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["fontInjection"]},"fontName":{"type":"string","minLength":1,"description":"Font to add to the project, such as Inter."}},"required":["type","fontName"],"additionalProperties":false}]}},"element":{"description":"CSS selector limiting the scope of the message instructions.","type":"string","minLength":1},"screenshot":{"description":"Screenshot providing visual context for the requested edits.","type":"object","properties":{"url":{"type":"string","minLength":1,"description":"HTTPS image URL or base64 image data URI. Counts toward the attachment limits. Not supported for Vercel OIDC principals."},"anchorElement":{"description":"CSS selector anchoring the screenshot to a rendered element.","type":"string","minLength":1}},"required":["url"],"additionalProperties":false}},"additionalProperties":false,"description":"Apply element-scoped design edits using Design Mode. Source changes are model-generated, not deterministic DOM patches. The Design Mode model is selected automatically, regardless of modelConfiguration.modelId."},"systemPrompt":{"description":"System-level context for the chat, such as frameworks or development environment details.","type":"string"},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false},"mcpServerIds":{"description":"MCP server IDs to enable. When omitted, uses default enabled servers.","type":"array","items":{"type":"string"}},"attachments":{"description":"Files or assets to include with the message. Provide either a URL or data URI, or inline UTF-8 text content.","type":"array","items":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"URL or data URI containing the attachment."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"name":{"description":"Display name for the inline text attachment.","type":"string","minLength":1},"content":{"type":"string","minLength":1,"description":"UTF-8 text content of the attachment."}},"required":["content"],"additionalProperties":false}]}},"skills":{"description":"Skills to force-attach to the message. Supports skills.sh (`remote`), user/team memory (`memory`), and project (`project`) skills. Maximum 3.","maxItems":3,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["remote"],"description":"Discriminator: a skills.sh skill."},"id":{"type":"string","description":"Skill ID from skills.sh."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["memory"],"description":"Discriminator: a user- or team-scoped memory skill."},"scope":{"type":"string","enum":["user","team"],"description":"Whether the skill lives in user or team memory."},"skillName":{"type":"string","description":"Name of the memory skill to attach."}},"required":["type","scope","skillName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["project"],"description":"Discriminator: a skill defined in the project repo."},"skillName":{"type":"string","description":"Name of the project skill to attach."}},"required":["type","skillName"],"additionalProperties":false}],"description":"A skill to force-attach to the chat. Skills provide domain-specific knowledge to the AI. Use `remote` for skills.sh skills, `memory` for user/team memory skills (including design-system skills), and `project` for skills defined in the chat repo."}}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"description":"The prompt or instruction to send to the model. May be omitted when designMode contains edits.","type":"string","minLength":1},"designMode":{"type":"object","properties":{"edits":{"description":"Element edits to apply to the source code. Maximum 100.","maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["style"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false},"changes":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"object","properties":{"from":{"type":"string","description":"Previous value. Context for the model, not a checked precondition."},"to":{"type":"string","description":"Requested value."}},"required":["from","to"],"additionalProperties":false},"description":"CSS property names in camelCase mapped to old and new values. Use textContent for text replacement."}},"required":["type","element","changes"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["deleteElement"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false}},"required":["type","element"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["move"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false},"toParentSelector":{"description":"Destination parent selector. Required when position is inside.","type":"string","minLength":1},"targetSelector":{"description":"Destination sibling selector. Required when position is before or after.","type":"string","minLength":1},"position":{"type":"string","enum":["before","after","inside"],"description":"Placement relative to the destination."}},"required":["type","element","position"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["fontInjection"]},"fontName":{"type":"string","minLength":1,"description":"Font to add to the project, such as Inter."}},"required":["type","fontName"],"additionalProperties":false}]}},"element":{"description":"CSS selector limiting the scope of the message instructions.","type":"string","minLength":1},"screenshot":{"description":"Screenshot providing visual context for the requested edits.","type":"object","properties":{"url":{"type":"string","minLength":1,"description":"HTTPS image URL or base64 image data URI. Counts toward the attachment limits. Not supported for Vercel OIDC principals."},"anchorElement":{"description":"CSS selector anchoring the screenshot to a rendered element.","type":"string","minLength":1}},"required":["url"],"additionalProperties":false}},"additionalProperties":false,"description":"Apply element-scoped design edits using Design Mode. Source changes are model-generated, not deterministic DOM patches. The Design Mode model is selected automatically, regardless of modelConfiguration.modelId."},"systemPrompt":{"description":"System-level context for the chat, such as frameworks or development environment details.","type":"string"},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false},"mcpServerIds":{"description":"MCP server IDs to enable. When omitted, uses default enabled servers.","type":"array","items":{"type":"string"}},"attachments":{"description":"Files or assets to include with the message. Provide either a URL or data URI, or inline UTF-8 text content.","type":"array","items":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"URL or data URI containing the attachment."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"name":{"description":"Display name for the inline text attachment.","type":"string","minLength":1},"content":{"type":"string","minLength":1,"description":"UTF-8 text content of the attachment."}},"required":["content"],"additionalProperties":false}]}},"skills":{"description":"Skills to force-attach to the message. Supports skills.sh (`remote`), user/team memory (`memory`), and project (`project`) skills. Maximum 3.","maxItems":3,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["remote"],"description":"Discriminator: a skills.sh skill."},"id":{"type":"string","description":"Skill ID from skills.sh."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["memory"],"description":"Discriminator: a user- or team-scoped memory skill."},"scope":{"type":"string","enum":["user","team"],"description":"Whether the skill lives in user or team memory."},"skillName":{"type":"string","description":"Name of the memory skill to attach."}},"required":["type","scope","skillName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["project"],"description":"Discriminator: a skill defined in the project repo."},"skillName":{"type":"string","description":"Name of the project skill to attach."}},"required":["type","skillName"],"additionalProperties":false}],"description":"A skill to force-attach to the chat. Skills provide domain-specific knowledge to the AI. Use `remote` for skills.sh skills, `memory` for user/team memory skills (including design-system skills), and `project` for skills defined in the chat repo."}}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"description":"The prompt or instruction to send to the model. May be omitted when designMode contains edits.","type":"string","minLength":1},"designMode":{"type":"object","properties":{"edits":{"description":"Element edits to apply to the source code. Maximum 100.","maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["style"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false},"changes":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"object","properties":{"from":{"type":"string","description":"Previous value. Context for the model, not a checked precondition."},"to":{"type":"string","description":"Requested value."}},"required":["from","to"],"additionalProperties":false},"description":"CSS property names in camelCase mapped to old and new values. Use textContent for text replacement."}},"required":["type","element","changes"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["deleteElement"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false}},"required":["type","element"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["move"]},"element":{"type":"object","properties":{"selectorPath":{"type":"string","minLength":1,"description":"CSS selector identifying the rendered element."},"tagName":{"type":"string","minLength":1,"description":"HTML tag name, such as h1 or button."},"id":{"description":"Element ID, if present.","type":"string"},"classNames":{"description":"Element CSS classes.","type":"array","items":{"type":"string"}},"textContent":{"description":"Current text of the element, to help locate its source.","type":"string"},"reactComponentName":{"description":"React component name, if known.","type":"string"}},"required":["selectorPath","tagName"],"additionalProperties":false},"toParentSelector":{"description":"Destination parent selector. Required when position is inside.","type":"string","minLength":1},"targetSelector":{"description":"Destination sibling selector. Required when position is before or after.","type":"string","minLength":1},"position":{"type":"string","enum":["before","after","inside"],"description":"Placement relative to the destination."}},"required":["type","element","position"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["fontInjection"]},"fontName":{"type":"string","minLength":1,"description":"Font to add to the project, such as Inter."}},"required":["type","fontName"],"additionalProperties":false}]}},"element":{"description":"CSS selector limiting the scope of the message instructions.","type":"string","minLength":1},"screenshot":{"description":"Screenshot providing visual context for the requested edits.","type":"object","properties":{"url":{"type":"string","minLength":1,"description":"HTTPS image URL or base64 image data URI. Counts toward the attachment limits. Not supported for Vercel OIDC principals."},"anchorElement":{"description":"CSS selector anchoring the screenshot to a rendered element.","type":"string","minLength":1}},"required":["url"],"additionalProperties":false}},"additionalProperties":false,"description":"Apply element-scoped design edits using Design Mode. Source changes are model-generated, not deterministic DOM patches. The Design Mode model is selected automatically, regardless of modelConfiguration.modelId."},"systemPrompt":{"description":"System-level context for the chat, such as frameworks or development environment details.","type":"string"},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"required":["modelId","imageGenerations"],"additionalProperties":false},"mcpServerIds":{"description":"MCP server IDs to enable. When omitted, uses default enabled servers.","type":"array","items":{"type":"string"}},"attachments":{"description":"Files or assets to include with the message. Provide either a URL or data URI, or inline UTF-8 text content.","type":"array","items":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"URL or data URI containing the attachment."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"name":{"description":"Display name for the inline text attachment.","type":"string","minLength":1},"content":{"type":"string","minLength":1,"description":"UTF-8 text content of the attachment."}},"required":["content"],"additionalProperties":false}]}},"skills":{"description":"Skills to force-attach to the message. Supports skills.sh (`remote`), user/team memory (`memory`), and project (`project`) skills. Maximum 3.","maxItems":3,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["remote"],"description":"Discriminator: a skills.sh skill."},"id":{"type":"string","description":"Skill ID from skills.sh."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["memory"],"description":"Discriminator: a user- or team-scoped memory skill."},"scope":{"type":"string","enum":["user","team"],"description":"Whether the skill lives in user or team memory."},"skillName":{"type":"string","description":"Name of the memory skill to attach."}},"required":["type","scope","skillName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["project"],"description":"Discriminator: a skill defined in the project repo."},"skillName":{"type":"string","description":"Name of the project skill to attach."}},"required":["type","skillName"],"additionalProperties":false}],"description":"A skill to force-attach to the chat. Skills provide domain-specific knowledge to the AI. Use `remote` for skills.sh skills, `memory` for user/team memory skills (including design-system skills), and `project` for skills defined in the chat repo."}}},"additionalProperties":false}}}},"responses":{"202":{"description":"Acknowledgement that an async message has been queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncMessage"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/messages/resolve":{"post":{"tags":["Messages"],"summary":"Resolve Task","description":"Resolves a pending task in a chat. Blocks until the model response is complete and returns the resulting message.","operationId":"messages.resolve","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"task":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["confirmed-steps"]},"connectedIntegrationNames":{"description":"Names of integrations that were successfully connected (e.g. \"Neon\"). Pass an empty array to skip.","default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":2052}},"connectedNpmRegistryIds":{"description":"Deprecated. npm registry connections are no longer supported; this field is accepted for compatibility and ignored.","deprecated":true,"default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":2052}},"connectedMcpPresetNames":{"description":"Names of MCP presets that were connected (e.g. \"Linear\", \"Sentry\"). Pass an empty array to skip.","default":[],"type":"array","items":{"type":"string","enum":["Linear","Notion","Context7","Sentry","Zapier","Glean","Hex","Sanity","Granola","PostHog","Contentful","Mobbin","Slack","Nitrosend","Datadog"]}},"appliedScripts":{"description":"Names of scripts that were applied.","default":[],"type":"array","items":{"type":"string","minLength":1}},"addedEnvVars":{"description":"Names of environment variables that were added.","default":[],"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","enum":["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","enum":["answered-questions"]},"answers":{"minItems":1,"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","enum":["confirmed-permissions"]},"permissions":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["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."},"toolDisplayName":{"description":"The tool's original human-readable name from the stopped task. Display-only; pass back unchanged. Capped at 100 characters, matching the cap applied when the name is ingested from the server.","anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"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."},{"type":"object","properties":{"type":{"type":"string","enum":["vercel-connect-setup"]}},"required":["type"],"additionalProperties":false,"description":"Resolves a Vercel Connect setup task. The agent asked the user to complete connector setup in a browser (a `configure_vercel_connect` agent action with `status: \"setup-required\"`). Complete setup at the action’s `setupUrl`, poll GET /chats/{chatId}/connect/status until it returns `ready`, then send this task. The server verifies the setup result and attaches the connector; no connector ID is needed. Returns 409 if setup is still pending or failed, or 404 if setup has not started or the request expired."},{"type":"object","properties":{"type":{"type":"string","enum":["vercel-connect-authorization"]}},"required":["type"],"additionalProperties":false,"description":"Resolves a Vercel Connect authorization task (a `configure_vercel_connect` agent action with `status: \"authorization-required\"`). Sign in at the action's `authorizationUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then send this task. Returns 409 while authorization is pending or after it failed, 404 if it has not started or expired."}],"description":"The task resolution data. Use this when the chat is waiting for user input on the matching task type."},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"additionalProperties":false}},"required":["task"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"task":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["confirmed-steps"]},"connectedIntegrationNames":{"description":"Names of integrations that were successfully connected (e.g. \"Neon\"). Pass an empty array to skip.","default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":2052}},"connectedNpmRegistryIds":{"description":"Deprecated. npm registry connections are no longer supported; this field is accepted for compatibility and ignored.","deprecated":true,"default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":2052}},"connectedMcpPresetNames":{"description":"Names of MCP presets that were connected (e.g. \"Linear\", \"Sentry\"). Pass an empty array to skip.","default":[],"type":"array","items":{"type":"string","enum":["Linear","Notion","Context7","Sentry","Zapier","Glean","Hex","Sanity","Granola","PostHog","Contentful","Mobbin","Slack","Nitrosend","Datadog"]}},"appliedScripts":{"description":"Names of scripts that were applied.","default":[],"type":"array","items":{"type":"string","minLength":1}},"addedEnvVars":{"description":"Names of environment variables that were added.","default":[],"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","enum":["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","enum":["answered-questions"]},"answers":{"minItems":1,"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","enum":["confirmed-permissions"]},"permissions":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["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."},"toolDisplayName":{"description":"The tool's original human-readable name from the stopped task. Display-only; pass back unchanged. Capped at 100 characters, matching the cap applied when the name is ingested from the server.","anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"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."},{"type":"object","properties":{"type":{"type":"string","enum":["vercel-connect-setup"]}},"required":["type"],"additionalProperties":false,"description":"Resolves a Vercel Connect setup task. The agent asked the user to complete connector setup in a browser (a `configure_vercel_connect` agent action with `status: \"setup-required\"`). Complete setup at the action’s `setupUrl`, poll GET /chats/{chatId}/connect/status until it returns `ready`, then send this task. The server verifies the setup result and attaches the connector; no connector ID is needed. Returns 409 if setup is still pending or failed, or 404 if setup has not started or the request expired."},{"type":"object","properties":{"type":{"type":"string","enum":["vercel-connect-authorization"]}},"required":["type"],"additionalProperties":false,"description":"Resolves a Vercel Connect authorization task (a `configure_vercel_connect` agent action with `status: \"authorization-required\"`). Sign in at the action's `authorizationUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then send this task. Returns 409 while authorization is pending or after it failed, 404 if it has not started or expired."}],"description":"The task resolution data. Use this when the chat is waiting for user input on the matching task type."},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"additionalProperties":false}},"required":["task"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"task":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["confirmed-steps"]},"connectedIntegrationNames":{"description":"Names of integrations that were successfully connected (e.g. \"Neon\"). Pass an empty array to skip.","default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":2052}},"connectedNpmRegistryIds":{"description":"Deprecated. npm registry connections are no longer supported; this field is accepted for compatibility and ignored.","deprecated":true,"default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":2052}},"connectedMcpPresetNames":{"description":"Names of MCP presets that were connected (e.g. \"Linear\", \"Sentry\"). Pass an empty array to skip.","default":[],"type":"array","items":{"type":"string","enum":["Linear","Notion","Context7","Sentry","Zapier","Glean","Hex","Sanity","Granola","PostHog","Contentful","Mobbin","Slack","Nitrosend","Datadog"]}},"appliedScripts":{"description":"Names of scripts that were applied.","default":[],"type":"array","items":{"type":"string","minLength":1}},"addedEnvVars":{"description":"Names of environment variables that were added.","default":[],"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","enum":["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","enum":["answered-questions"]},"answers":{"minItems":1,"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","enum":["confirmed-permissions"]},"permissions":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["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."},"toolDisplayName":{"description":"The tool's original human-readable name from the stopped task. Display-only; pass back unchanged. Capped at 100 characters, matching the cap applied when the name is ingested from the server.","anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"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."},{"type":"object","properties":{"type":{"type":"string","enum":["vercel-connect-setup"]}},"required":["type"],"additionalProperties":false,"description":"Resolves a Vercel Connect setup task. The agent asked the user to complete connector setup in a browser (a `configure_vercel_connect` agent action with `status: \"setup-required\"`). Complete setup at the action’s `setupUrl`, poll GET /chats/{chatId}/connect/status until it returns `ready`, then send this task. The server verifies the setup result and attaches the connector; no connector ID is needed. Returns 409 if setup is still pending or failed, or 404 if setup has not started or the request expired."},{"type":"object","properties":{"type":{"type":"string","enum":["vercel-connect-authorization"]}},"required":["type"],"additionalProperties":false,"description":"Resolves a Vercel Connect authorization task (a `configure_vercel_connect` agent action with `status: \"authorization-required\"`). Sign in at the action's `authorizationUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then send this task. Returns 409 while authorization is pending or after it failed, 404 if it has not started or expired."}],"description":"The task resolution data. Use this when the chat is waiting for user input on the matching task type."},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}},"responses":{"200":{"description":"A single message in a chat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/messages/resolve/stream":{"post":{"tags":["Messages"],"summary":"Resolve Task (Streaming)","description":"Resolves a pending task in a chat and returns a Server-Sent Events stream. Events include the initial assistant-message snapshot, content chunk deltas, final usage, and a closing message snapshot. The response is `text/event-stream`; each event is `data: <JSON>\\n\\n` where the JSON conforms to MessageStreamEvent. If the stream disconnects before the final event, reconnect with `POST /chats/{chatId}/resume` instead of resolving the task again.","operationId":"messages.resolveStream","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"task":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["confirmed-steps"]},"connectedIntegrationNames":{"description":"Names of integrations that were successfully connected (e.g. \"Neon\"). Pass an empty array to skip.","default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":2052}},"connectedNpmRegistryIds":{"description":"Deprecated. npm registry connections are no longer supported; this field is accepted for compatibility and ignored.","deprecated":true,"default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":2052}},"connectedMcpPresetNames":{"description":"Names of MCP presets that were connected (e.g. \"Linear\", \"Sentry\"). Pass an empty array to skip.","default":[],"type":"array","items":{"type":"string","enum":["Linear","Notion","Context7","Sentry","Zapier","Glean","Hex","Sanity","Granola","PostHog","Contentful","Mobbin","Slack","Nitrosend","Datadog"]}},"appliedScripts":{"description":"Names of scripts that were applied.","default":[],"type":"array","items":{"type":"string","minLength":1}},"addedEnvVars":{"description":"Names of environment variables that were added.","default":[],"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","enum":["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","enum":["answered-questions"]},"answers":{"minItems":1,"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","enum":["confirmed-permissions"]},"permissions":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["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."},"toolDisplayName":{"description":"The tool's original human-readable name from the stopped task. Display-only; pass back unchanged. Capped at 100 characters, matching the cap applied when the name is ingested from the server.","anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"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."},{"type":"object","properties":{"type":{"type":"string","enum":["vercel-connect-setup"]}},"required":["type"],"additionalProperties":false,"description":"Resolves a Vercel Connect setup task. The agent asked the user to complete connector setup in a browser (a `configure_vercel_connect` agent action with `status: \"setup-required\"`). Complete setup at the action’s `setupUrl`, poll GET /chats/{chatId}/connect/status until it returns `ready`, then send this task. The server verifies the setup result and attaches the connector; no connector ID is needed. Returns 409 if setup is still pending or failed, or 404 if setup has not started or the request expired."},{"type":"object","properties":{"type":{"type":"string","enum":["vercel-connect-authorization"]}},"required":["type"],"additionalProperties":false,"description":"Resolves a Vercel Connect authorization task (a `configure_vercel_connect` agent action with `status: \"authorization-required\"`). Sign in at the action's `authorizationUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then send this task. Returns 409 while authorization is pending or after it failed, 404 if it has not started or expired."}],"description":"The task resolution data. Use this when the chat is waiting for user input on the matching task type."},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"additionalProperties":false}},"required":["task"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"task":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["confirmed-steps"]},"connectedIntegrationNames":{"description":"Names of integrations that were successfully connected (e.g. \"Neon\"). Pass an empty array to skip.","default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":2052}},"connectedNpmRegistryIds":{"description":"Deprecated. npm registry connections are no longer supported; this field is accepted for compatibility and ignored.","deprecated":true,"default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":2052}},"connectedMcpPresetNames":{"description":"Names of MCP presets that were connected (e.g. \"Linear\", \"Sentry\"). Pass an empty array to skip.","default":[],"type":"array","items":{"type":"string","enum":["Linear","Notion","Context7","Sentry","Zapier","Glean","Hex","Sanity","Granola","PostHog","Contentful","Mobbin","Slack","Nitrosend","Datadog"]}},"appliedScripts":{"description":"Names of scripts that were applied.","default":[],"type":"array","items":{"type":"string","minLength":1}},"addedEnvVars":{"description":"Names of environment variables that were added.","default":[],"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","enum":["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","enum":["answered-questions"]},"answers":{"minItems":1,"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","enum":["confirmed-permissions"]},"permissions":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["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."},"toolDisplayName":{"description":"The tool's original human-readable name from the stopped task. Display-only; pass back unchanged. Capped at 100 characters, matching the cap applied when the name is ingested from the server.","anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"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."},{"type":"object","properties":{"type":{"type":"string","enum":["vercel-connect-setup"]}},"required":["type"],"additionalProperties":false,"description":"Resolves a Vercel Connect setup task. The agent asked the user to complete connector setup in a browser (a `configure_vercel_connect` agent action with `status: \"setup-required\"`). Complete setup at the action’s `setupUrl`, poll GET /chats/{chatId}/connect/status until it returns `ready`, then send this task. The server verifies the setup result and attaches the connector; no connector ID is needed. Returns 409 if setup is still pending or failed, or 404 if setup has not started or the request expired."},{"type":"object","properties":{"type":{"type":"string","enum":["vercel-connect-authorization"]}},"required":["type"],"additionalProperties":false,"description":"Resolves a Vercel Connect authorization task (a `configure_vercel_connect` agent action with `status: \"authorization-required\"`). Sign in at the action's `authorizationUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then send this task. Returns 409 while authorization is pending or after it failed, 404 if it has not started or expired."}],"description":"The task resolution data. Use this when the chat is waiting for user input on the matching task type."},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"additionalProperties":false}},"required":["task"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"task":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["confirmed-steps"]},"connectedIntegrationNames":{"description":"Names of integrations that were successfully connected (e.g. \"Neon\"). Pass an empty array to skip.","default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":2052}},"connectedNpmRegistryIds":{"description":"Deprecated. npm registry connections are no longer supported; this field is accepted for compatibility and ignored.","deprecated":true,"default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":2052}},"connectedMcpPresetNames":{"description":"Names of MCP presets that were connected (e.g. \"Linear\", \"Sentry\"). Pass an empty array to skip.","default":[],"type":"array","items":{"type":"string","enum":["Linear","Notion","Context7","Sentry","Zapier","Glean","Hex","Sanity","Granola","PostHog","Contentful","Mobbin","Slack","Nitrosend","Datadog"]}},"appliedScripts":{"description":"Names of scripts that were applied.","default":[],"type":"array","items":{"type":"string","minLength":1}},"addedEnvVars":{"description":"Names of environment variables that were added.","default":[],"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","enum":["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","enum":["answered-questions"]},"answers":{"minItems":1,"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","enum":["confirmed-permissions"]},"permissions":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["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."},"toolDisplayName":{"description":"The tool's original human-readable name from the stopped task. Display-only; pass back unchanged. Capped at 100 characters, matching the cap applied when the name is ingested from the server.","anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"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."},{"type":"object","properties":{"type":{"type":"string","enum":["vercel-connect-setup"]}},"required":["type"],"additionalProperties":false,"description":"Resolves a Vercel Connect setup task. The agent asked the user to complete connector setup in a browser (a `configure_vercel_connect` agent action with `status: \"setup-required\"`). Complete setup at the action’s `setupUrl`, poll GET /chats/{chatId}/connect/status until it returns `ready`, then send this task. The server verifies the setup result and attaches the connector; no connector ID is needed. Returns 409 if setup is still pending or failed, or 404 if setup has not started or the request expired."},{"type":"object","properties":{"type":{"type":"string","enum":["vercel-connect-authorization"]}},"required":["type"],"additionalProperties":false,"description":"Resolves a Vercel Connect authorization task (a `configure_vercel_connect` agent action with `status: \"authorization-required\"`). Sign in at the action's `authorizationUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then send this task. Returns 409 while authorization is pending or after it failed, 404 if it has not started or expired."}],"description":"The task resolution data. Use this when the chat is waiting for user input on the matching task type."},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}},"responses":{"200":{"description":"A single Server-Sent Events payload emitted by the streaming send-message endpoint. Each SSE event is `data: <JSON>\\n\\n` where the JSON conforms to one of the union members.","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/MessageStreamEvent"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/messages/resolve/async":{"post":{"tags":["Messages"],"summary":"Resolve Task (Async)","description":"Resolves a pending task and processes it in the background. Returns immediately with the assistant message ID. Poll GET /chats/:chatId/messages/:messageId and check `finishReason` to detect completion.","operationId":"messages.resolveAsync","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"task":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["confirmed-steps"]},"connectedIntegrationNames":{"description":"Names of integrations that were successfully connected (e.g. \"Neon\"). Pass an empty array to skip.","default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":2052}},"connectedNpmRegistryIds":{"description":"Deprecated. npm registry connections are no longer supported; this field is accepted for compatibility and ignored.","deprecated":true,"default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":2052}},"connectedMcpPresetNames":{"description":"Names of MCP presets that were connected (e.g. \"Linear\", \"Sentry\"). Pass an empty array to skip.","default":[],"type":"array","items":{"type":"string","enum":["Linear","Notion","Context7","Sentry","Zapier","Glean","Hex","Sanity","Granola","PostHog","Contentful","Mobbin","Slack","Nitrosend","Datadog"]}},"appliedScripts":{"description":"Names of scripts that were applied.","default":[],"type":"array","items":{"type":"string","minLength":1}},"addedEnvVars":{"description":"Names of environment variables that were added.","default":[],"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","enum":["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","enum":["answered-questions"]},"answers":{"minItems":1,"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","enum":["confirmed-permissions"]},"permissions":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["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."},"toolDisplayName":{"description":"The tool's original human-readable name from the stopped task. Display-only; pass back unchanged. Capped at 100 characters, matching the cap applied when the name is ingested from the server.","anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"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."},{"type":"object","properties":{"type":{"type":"string","enum":["vercel-connect-setup"]}},"required":["type"],"additionalProperties":false,"description":"Resolves a Vercel Connect setup task. The agent asked the user to complete connector setup in a browser (a `configure_vercel_connect` agent action with `status: \"setup-required\"`). Complete setup at the action’s `setupUrl`, poll GET /chats/{chatId}/connect/status until it returns `ready`, then send this task. The server verifies the setup result and attaches the connector; no connector ID is needed. Returns 409 if setup is still pending or failed, or 404 if setup has not started or the request expired."},{"type":"object","properties":{"type":{"type":"string","enum":["vercel-connect-authorization"]}},"required":["type"],"additionalProperties":false,"description":"Resolves a Vercel Connect authorization task (a `configure_vercel_connect` agent action with `status: \"authorization-required\"`). Sign in at the action's `authorizationUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then send this task. Returns 409 while authorization is pending or after it failed, 404 if it has not started or expired."}],"description":"The task resolution data. Use this when the chat is waiting for user input on the matching task type."},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"additionalProperties":false}},"required":["task"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"task":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["confirmed-steps"]},"connectedIntegrationNames":{"description":"Names of integrations that were successfully connected (e.g. \"Neon\"). Pass an empty array to skip.","default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":2052}},"connectedNpmRegistryIds":{"description":"Deprecated. npm registry connections are no longer supported; this field is accepted for compatibility and ignored.","deprecated":true,"default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":2052}},"connectedMcpPresetNames":{"description":"Names of MCP presets that were connected (e.g. \"Linear\", \"Sentry\"). Pass an empty array to skip.","default":[],"type":"array","items":{"type":"string","enum":["Linear","Notion","Context7","Sentry","Zapier","Glean","Hex","Sanity","Granola","PostHog","Contentful","Mobbin","Slack","Nitrosend","Datadog"]}},"appliedScripts":{"description":"Names of scripts that were applied.","default":[],"type":"array","items":{"type":"string","minLength":1}},"addedEnvVars":{"description":"Names of environment variables that were added.","default":[],"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","enum":["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","enum":["answered-questions"]},"answers":{"minItems":1,"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","enum":["confirmed-permissions"]},"permissions":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["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."},"toolDisplayName":{"description":"The tool's original human-readable name from the stopped task. Display-only; pass back unchanged. Capped at 100 characters, matching the cap applied when the name is ingested from the server.","anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"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."},{"type":"object","properties":{"type":{"type":"string","enum":["vercel-connect-setup"]}},"required":["type"],"additionalProperties":false,"description":"Resolves a Vercel Connect setup task. The agent asked the user to complete connector setup in a browser (a `configure_vercel_connect` agent action with `status: \"setup-required\"`). Complete setup at the action’s `setupUrl`, poll GET /chats/{chatId}/connect/status until it returns `ready`, then send this task. The server verifies the setup result and attaches the connector; no connector ID is needed. Returns 409 if setup is still pending or failed, or 404 if setup has not started or the request expired."},{"type":"object","properties":{"type":{"type":"string","enum":["vercel-connect-authorization"]}},"required":["type"],"additionalProperties":false,"description":"Resolves a Vercel Connect authorization task (a `configure_vercel_connect` agent action with `status: \"authorization-required\"`). Sign in at the action's `authorizationUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then send this task. Returns 409 while authorization is pending or after it failed, 404 if it has not started or expired."}],"description":"The task resolution data. Use this when the chat is waiting for user input on the matching task type."},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"additionalProperties":false}},"required":["task"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"task":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["confirmed-steps"]},"connectedIntegrationNames":{"description":"Names of integrations that were successfully connected (e.g. \"Neon\"). Pass an empty array to skip.","default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":2052}},"connectedNpmRegistryIds":{"description":"Deprecated. npm registry connections are no longer supported; this field is accepted for compatibility and ignored.","deprecated":true,"default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":2052}},"connectedMcpPresetNames":{"description":"Names of MCP presets that were connected (e.g. \"Linear\", \"Sentry\"). Pass an empty array to skip.","default":[],"type":"array","items":{"type":"string","enum":["Linear","Notion","Context7","Sentry","Zapier","Glean","Hex","Sanity","Granola","PostHog","Contentful","Mobbin","Slack","Nitrosend","Datadog"]}},"appliedScripts":{"description":"Names of scripts that were applied.","default":[],"type":"array","items":{"type":"string","minLength":1}},"addedEnvVars":{"description":"Names of environment variables that were added.","default":[],"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","enum":["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","enum":["answered-questions"]},"answers":{"minItems":1,"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","enum":["confirmed-permissions"]},"permissions":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["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."},"toolDisplayName":{"description":"The tool's original human-readable name from the stopped task. Display-only; pass back unchanged. Capped at 100 characters, matching the cap applied when the name is ingested from the server.","anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"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."},{"type":"object","properties":{"type":{"type":"string","enum":["vercel-connect-setup"]}},"required":["type"],"additionalProperties":false,"description":"Resolves a Vercel Connect setup task. The agent asked the user to complete connector setup in a browser (a `configure_vercel_connect` agent action with `status: \"setup-required\"`). Complete setup at the action’s `setupUrl`, poll GET /chats/{chatId}/connect/status until it returns `ready`, then send this task. The server verifies the setup result and attaches the connector; no connector ID is needed. Returns 409 if setup is still pending or failed, or 404 if setup has not started or the request expired."},{"type":"object","properties":{"type":{"type":"string","enum":["vercel-connect-authorization"]}},"required":["type"],"additionalProperties":false,"description":"Resolves a Vercel Connect authorization task (a `configure_vercel_connect` agent action with `status: \"authorization-required\"`). Sign in at the action's `authorizationUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then send this task. Returns 409 while authorization is pending or after it failed, 404 if it has not started or expired."}],"description":"The task resolution data. Use this when the chat is waiting for user input on the matching task type."},"modelConfiguration":{"description":"Overrides for the model behavior.","type":"object","properties":{"modelId":{"default":"v0-pro","anyOf":[{"type":"string","enum":["v0-mini","v0-pro","v0-max","v0-max-fast"]},{"type":"string","minLength":3,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$"}],"description":"Model to use for the generation. Use a v0 model ID, or an [AI Gateway](https://vercel.com/ai-gateway/models) model ID in `creator/model` format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected."},"imageGenerations":{"default":false,"type":"boolean","description":"Enables image generations to generate up to 5 images per version."}},"additionalProperties":false}},"required":["task"],"additionalProperties":false}}}},"responses":{"202":{"description":"Acknowledgement that an async message has been queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncMessage"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/messages/{messageId}/stop":{"post":{"tags":["Messages"],"summary":"Stop Message","description":"Stops an in-flight assistant message generation. The agent aborts at the next safe point and the message is marked finished.","operationId":"messages.stop","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the assistant message to stop."}}],"responses":{"200":{"description":"The stopped message.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messageId":{"type":"string","description":"The unique identifier of the stopped message."}},"required":["messageId"],"additionalProperties":false,"description":"The stopped message."}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/security-checks/{checkId}":{"get":{"tags":["Security Checks"],"summary":"Get Security Check","description":"Returns a DeepSec Security Check's status, v0's checked findings, and what the check cost. Poll until `status` is `completed`.","operationId":"securityChecks.get","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}},{"name":"checkId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The Security Check ID."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","description":"The Security Check ID, which is also the ID of the assistant message that runs it."},"object":{"type":"string","enum":["security_check"]},"chatId":{"type":"string","description":"The chat the check runs in."},"scope":{"type":"string","enum":["project","changes"],"description":"`changes`: what changed in the chat. `project`: the riskiest files across the app."},"status":{"type":"string","enum":["running","completed"],"description":"`completed` once v0 has finished its reply."},"review":{"description":"How the review itself went. Absent until it starts, while v0 retries an attempt that couldn't start, and when v0 didn't run one (for example, when there were no changes to review, or reviews aren't available for this chat).","oneOf":[{"type":"object","properties":{"outcome":{"type":"string","enum":["running"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."}},"required":["outcome","files","contextFileCount"],"additionalProperties":false,"description":"The review is running."},{"type":"object","properties":{"outcome":{"type":"string","enum":["clean"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."},"potentialIssueCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Potential issues the review reported, before the agent checked them against the project. The checked findings are in the final message."},"severities":{"type":"object","properties":{"critical":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"high":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"medium":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bug":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Non-security bugs the review reported."},"low":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["critical","high","medium","bug","low"],"additionalProperties":false,"description":"Potential issues by severity."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the review ran."}},"required":["outcome","files","contextFileCount","potentialIssueCount","severities","durationMs"],"additionalProperties":false,"description":"The review finished and reported no potential issues."},{"type":"object","properties":{"outcome":{"type":"string","enum":["findings"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."},"potentialIssueCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Potential issues the review reported, before the agent checked them against the project. The checked findings are in the final message."},"severities":{"type":"object","properties":{"critical":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"high":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"medium":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bug":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Non-security bugs the review reported."},"low":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["critical","high","medium","bug","low"],"additionalProperties":false,"description":"Potential issues by severity."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the review ran."}},"required":["outcome","files","contextFileCount","potentialIssueCount","severities","durationMs"],"additionalProperties":false,"description":"The review finished and reported potential issues."},{"type":"object","properties":{"outcome":{"type":"string","enum":["incomplete"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."},"reason":{"type":"string","enum":["ai-error","credits","timeout","stopped","not-started","interrupted"],"description":"Why the review ended without a result: `ai-error` (the AI calls failed), `credits` (not enough v0 credits), `timeout`, `stopped` (the turn was stopped while it ran), `not-started` (it never started), or `interrupted` (it stopped partway, or its result could not be read)."},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long it ran before it ended, when known."}},"required":["outcome","files","contextFileCount","reason","durationMs"],"additionalProperties":false,"description":"The review ended without a result."}]},"summary":{"description":"Counts of v0's checked findings. Present whenever `findings` is.","type":"object","properties":{"confirmed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Findings v0 confirmed."},"dismissed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Findings v0 dismissed after checking."},"highestSeverity":{"anyOf":[{"type":"string","enum":["critical","high","medium","low","bug"],"description":"The severity v0 concluded after checking, most severe first; `bug` is a non-security bug."},{"type":"null"}],"description":"The most severe confirmed finding, or null when none was confirmed. For example, fail a deploy when it is `critical` or `high`."},"bySeverity":{"type":"object","properties":{"critical":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"high":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"medium":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"low":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bug":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["critical","high","medium","low","bug"],"additionalProperties":false,"description":"Confirmed findings by severity."}},"required":["confirmed","dismissed","highestSeverity","bySeverity"],"additionalProperties":false},"findings":{"description":"v0's checked findings: confirmed first, then most severe first. Empty for a clean review. Absent until v0 records them, and when no review finished with a result.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The finding's number within this check."},"title":{"type":"string","description":"Short name of the issue."},"severity":{"type":"string","enum":["critical","high","medium","low","bug"],"description":"The severity v0 concluded after checking, most severe first; `bug` is a non-security bug."},"file":{"type":"string","description":"Project-relative file path."},"line":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"1-based line of the issue, or null when it spans the file."},"status":{"type":"string","enum":["confirmed","dismissed"],"description":"`confirmed`: a real risk. `dismissed`: other code in the project already handles it."},"explanation":{"type":"string","description":"Why it is a risk, or which code handles it when dismissed."},"fix":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The suggested fix for a confirmed finding."}},"required":["id","title","severity","file","line","status","explanation","fix"],"additionalProperties":false}},"reply":{"description":"v0's final reply, once the check is completed.","type":"string"},"cost":{"description":"What the check's AI calls cost so far. v0's own reply is billed like any message and isn't included.","type":"object","properties":{"credits":{"type":"string","description":"v0 credits used by the check's AI calls, as a decimal string."},"charged":{"type":"boolean","description":"Whether the credits were charged; false when v0 covered them."}},"required":["credits","charged"],"additionalProperties":false},"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":"When the check was started."}},"required":["id","object","chatId","scope","status","createdAt"],"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/artifacts/{artifactId}":{"get":{"tags":["Chats"],"operationId":"chats.downloadArtifact","summary":"Download Artifact","description":"Downloads the saved bytes of an artifact the agent showed in this chat. Find artifact IDs on `show_artifact` agent-action message parts. The response `Content-Type` is the artifact’s file type, such as `text/html`, `text/markdown`, `application/json`, `text/csv`, or an image type.","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}},{"name":"artifactId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"description":"The `artifactId` from a `show_artifact` message part."}}],"responses":{"200":{"description":"The artifact file.","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/template/sync":{"post":{"tags":["Chats"],"summary":"Sync Chat Template","description":"Republishes the template published from this chat at the commit of the chat's READY production deployment, like Sync from Repo in the template settings. Only templates connected to a GitHub repository can be synced, by the template's author or an owner of the team the template is shared with. Call it after a production deployment is ready, for example from a GitHub Actions workflow.","operationId":"chats.syncTemplate","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat the template is published from."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"expectedGitSha":{"description":"Commit you expect the production deployment to be on, such as the commit of the deployment that triggered your workflow. A full SHA or a prefix of at least 7 characters. If production is on a different commit, the request fails with 409 and nothing is published.","type":"string","pattern":"^[0-9a-fA-F]{7,64}$"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"expectedGitSha":{"description":"Commit you expect the production deployment to be on, such as the commit of the deployment that triggered your workflow. A full SHA or a prefix of at least 7 characters. If production is on a different commit, the request fails with 409 and nothing is published.","type":"string","pattern":"^[0-9a-fA-F]{7,64}$"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"expectedGitSha":{"description":"Commit you expect the production deployment to be on, such as the commit of the deployment that triggered your workflow. A full SHA or a prefix of at least 7 characters. If production is on a different commit, the request fails with 409 and nothing is published.","type":"string","pattern":"^[0-9a-fA-F]{7,64}$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatTemplateSync"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}":{"get":{"tags":["Chats"],"summary":"Get Chat","description":"Retrieves a chat by ID.","operationId":"chats.get","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Chats"],"summary":"Update Chat","description":"Updates a chat's title, privacy, or metadata.","operationId":"chats.update","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"description":"A new title to assign to the chat.","type":"string"},"privacy":{"description":"Updated visibility setting for the chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"metadata":{"description":"User-defined key-value metadata. Merged with existing entries. Pass `null` for a value to delete that key, or pass `null` for the whole field to delete all entries. Maximum 50 active entries.","anyOf":[{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":50},"additionalProperties":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},{"type":"null"}]}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"description":"A new title to assign to the chat.","type":"string"},"privacy":{"description":"Updated visibility setting for the chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"metadata":{"description":"User-defined key-value metadata. Merged with existing entries. Pass `null` for a value to delete that key, or pass `null` for the whole field to delete all entries. Maximum 50 active entries.","anyOf":[{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":50},"additionalProperties":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},{"type":"null"}]}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"description":"A new title to assign to the chat.","type":"string"},"privacy":{"description":"Updated visibility setting for the chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"metadata":{"description":"User-defined key-value metadata. Merged with existing entries. Pass `null` for a value to delete that key, or pass `null` for the whole field to delete all entries. Maximum 50 active entries.","anyOf":[{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":50},"additionalProperties":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Chats"],"summary":"Delete Chat","description":"Deletes a chat and all its associated messages. The requester must have edit access to the chat.","operationId":"chats.delete","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"chatId":{"type":"string","description":"The ID of the deleted chat."}},"required":["chatId"],"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/preview":{"get":{"tags":["Chats"],"summary":"Get Preview URL","description":"Returns the preview URL for a chat. If the preview isn't ready, the response is null. Poll this endpoint until the response is non-null.","operationId":"chats.getPreview","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}}],"responses":{"200":{"description":"The preview details, or null if the preview is still starting. Poll this endpoint until the response is non-null.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The preview URL for this chat."},"token":{"type":"string","description":"A short-lived token for accessing the preview URL via the x-v0-preview-token header."},"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 token expires."}},"required":["url","token","expiresAt"],"additionalProperties":false},{"type":"null"}],"description":"The preview details, or null if the preview is still starting. Poll this endpoint until the response is non-null."}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/files":{"get":{"tags":["Chats"],"summary":"Get Chat Files","description":"Returns the source files for a chat.","operationId":"chats.getFiles","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}}],"responses":{"200":{"description":"The source files of a chat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Files"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Chats"],"summary":"Update Chat Files","description":"Creates, updates, or deletes UTF-8 or base64-encoded files for a chat. Pass null to delete.","operationId":"chats.updateFiles","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"files":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Project-relative file path, e.g. \"app/page.tsx\"."},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"New file content. Pass `null` to delete the file at this path."},"encoding":{"description":"How non-null `content` is encoded. Defaults to `utf8` when omitted.","type":"string","enum":["utf8","base64"]}},"required":["path","content"],"additionalProperties":false},"description":"The files to create, update, or delete. Each path must be unique."}},"required":["files"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"files":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Project-relative file path, e.g. \"app/page.tsx\"."},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"New file content. Pass `null` to delete the file at this path."},"encoding":{"description":"How non-null `content` is encoded. Defaults to `utf8` when omitted.","type":"string","enum":["utf8","base64"]}},"required":["path","content"],"additionalProperties":false},"description":"The files to create, update, or delete. Each path must be unique."}},"required":["files"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"files":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Project-relative file path, e.g. \"app/page.tsx\"."},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"New file content. Pass `null` to delete the file at this path."},"encoding":{"description":"How non-null `content` is encoded. Defaults to `utf8` when omitted.","type":"string","enum":["utf8","base64"]}},"required":["path","content"],"additionalProperties":false},"description":"The files to create, update, or delete. Each path must be unique."}},"required":["files"],"additionalProperties":false}}}},"responses":{"200":{"description":"The messages created to record the file edit.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique message identifier."},"chatId":{"type":"string","description":"ID of the chat this message belongs to."},"role":{"type":"string","enum":["user","assistant"],"description":"Who produced this message."},"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":"ISO timestamp when the message was created."},"updatedAt":{"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":"ISO timestamp when the message was last updated."},"content":{"type":"string","description":"The trailing prose of the message — the agent’s closing summary, or the user’s message text. Empty string when there is no closing prose."},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","description":"Markdown prose written by the agent or user."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","text"],"additionalProperties":false,"description":"A block of text output by the agent."},{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"text":{"type":"string","description":"The agent's reasoning trace."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","text"],"additionalProperties":false,"description":"Extended thinking output by the agent."},{"type":"object","properties":{"type":{"type":"string","enum":["file-read"]},"paths":{"type":"array","items":{"type":"string"},"description":"The file paths the agent read in this step."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","paths"],"additionalProperties":false,"description":"Files read by the agent."},{"type":"object","properties":{"type":{"type":"string","enum":["file-edit"]},"operation":{"type":"string","enum":["create","update","delete","rename","patch"],"description":"The type of file edit performed."},"path":{"type":"string","description":"The target file path."},"toPath":{"description":"The new path when operation is \"rename\".","type":"string"},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","operation","path"],"additionalProperties":false,"description":"The agent created, modified, deleted, renamed, or patched a file."},{"type":"object","properties":{"type":{"type":"string","enum":["search"]},"scope":{"type":"string","enum":["repo","web"],"description":"Whether the agent searched the repository or the web."},"query":{"type":"string","description":"The search query."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","scope","query"],"additionalProperties":false,"description":"The agent searched for something."},{"type":"object","properties":{"type":{"type":"string","enum":["bash"]},"command":{"type":"string","description":"The shell command that was executed."},"output":{"description":"Combined stdout/stderr captured from the terminal. May be empty if the command produced no output.","type":"string"},"exitCode":{"description":"Process exit code, when available. Reserved for future use; currently always omitted.","anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"isDangerous":{"description":"True if the command was flagged as potentially dangerous and required explicit user approval.","type":"boolean"},"timeoutMs":{"description":"Command timeout in milliseconds, when configured.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","command"],"additionalProperties":false,"description":"The agent ran a shell command."},{"type":"object","properties":{"type":{"type":"string","enum":["tool-call"]},"name":{"type":"string","description":"The identifier the tool was invoked under. For MCP/integration tools this is a normalized identifier derived from the tool name — prefer `toolDisplayName` for display when present."},"toolDisplayName":{"description":"The tool's original human-readable name (an MCP/integration tool's server-side name), when `name` is a normalized identifier. Display-only.","anyOf":[{"type":"string"},{"type":"null"}]},"input":{"description":"The arguments passed to the tool. Schema depends on the specific tool."},"output":{"description":"The result returned by the tool. Schema depends on the specific tool."},"status":{"type":"string","enum":["ok","error"],"description":"Whether the tool call succeeded or returned an error."},"suggestedPermissions":{"description":"Present when the agent is blocked waiting for you to approve this tool call (for example, running a setup or migration script). Pass these objects back unchanged as the `permissions` of a `confirmed-permissions` task to approve. Omitted once the tool has run.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["ALLOW_DYNAMIC_TOOL_STRICT"],"description":"Permission grant type."},"toolName":{"type":"string","description":"The tool this permission authorizes."},"input":{"description":"The tool input this permission authorizes. Pass back unchanged when resolving."},"toolDisplayName":{"description":"The tool's original human-readable name (an MCP/integration tool's server name), when `toolName` is a normalized identifier. Display-only; pass back unchanged.","anyOf":[{"type":"string"},{"type":"null"}]},"taskNameActive":{"description":"Internal label for the in-progress task. Pass back unchanged.","anyOf":[{"type":"string"},{"type":"null"}]},"taskNameComplete":{"description":"Internal label for the completed task. Pass back unchanged.","anyOf":[{"type":"string"},{"type":"null"}]},"userMessage":{"description":"Optional message associated with the permission.","type":"string"}},"required":["type","toolName"],"additionalProperties":false,"description":"A permission the agent is waiting for you to grant. Pass these objects back unchanged as the `permissions` of a `confirmed-permissions` task."}},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","name","status"],"additionalProperties":false,"description":"The agent invoked a tool (MCP, integration, or other dynamic tool). For shell commands, use the \"bash\" part instead."},{"type":"object","properties":{"type":{"type":"string","enum":["agent-action"]},"name":{"type":"string","description":"Stable identifier for the action (e.g. \"generate_image\", \"manage_todos\", \"diagnostics\"). See documentation for the registry of known names."},"summary":{"type":"string","description":"A short human-readable summary of what happened. Always populated so clients can render something even without knowing the action name."},"data":{"description":"Structured payload for actions that carry data. Present on `ask_user_questions`, `exit_plan_mode`, `get_or_request_integration`, and `configure_vercel_connect` parts when the agent is waiting on you, and on `show_artifact` and `security_review` parts. Narrow by the part `name`: the presence of `data` alone does not mean the agent is waiting on you. Omitted for actions that do not carry structured data.","anyOf":[{"type":"object","properties":{"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Question identifier. Pass back as `questionId` when resolving with an `answered-questions` task."},"question":{"type":"string","description":"The full question text."},"header":{"type":"string","description":"Short label for the question."},"multiSelect":{"type":"boolean","description":"Whether more than one option may be selected."},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Option identifier."},"label":{"type":"string","description":"Display label. Pass matching labels back in `selectedLabels` when resolving."},"description":{"description":"Optional longer explanation of the option.","type":"string"}},"required":["id","label"],"additionalProperties":false},"description":"The available answer options."}},"required":["id","question","header","multiSelect","options"],"additionalProperties":false},"description":"The questions the agent is waiting for answers to. Resolve with an `answered-questions` task."}},"required":["questions"],"additionalProperties":false,"description":"Structured payload for an `ask_user_questions` agent action."},{"type":"object","properties":{"plan":{"type":"string","description":"The full proposed plan, as Markdown."},"summary":{"description":"A concise summary of the plan, when available.","type":"string"},"path":{"type":"string","description":"The path the plan applies to."}},"required":["plan","path"],"additionalProperties":false,"description":"Structured payload for an `exit_plan_mode` agent action."},{"type":"object","properties":{"requestedIntegrations":{"type":"array","items":{"type":"string"},"description":"Integration names the agent is asking you to connect (for example, \"Neon\"). Pass these back in `connectedIntegrationNames` when resolving with a `confirmed-steps` task."},"requestedNpmRegistryIds":{"type":"array","items":{"type":"string"},"description":"Deprecated. npm registry connections are no longer requested; this array is always empty.","deprecated":true},"requestedMcpPresets":{"type":"array","items":{"type":"string"},"description":"MCP preset names the agent is asking you to add. Pass these back in `connectedMcpPresetNames` when resolving with a `confirmed-steps` task."}},"required":["requestedIntegrations","requestedNpmRegistryIds","requestedMcpPresets"],"additionalProperties":false,"description":"Structured payload for a `get_or_request_integration` agent action."},{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["setup-required"],"description":"The agent is waiting for connector setup to be completed in a browser."},"requestId":{"type":"string","description":"Setup request identifier. Pass as `requestId` to GET /chats/{chatId}/connect/status to poll for completion."},"service":{"type":"string","description":"The service being connected (for example, \"linear\")."},"serviceIconUrl":{"description":"Icon URL for the service, hosted on vercel.com.","type":"string","format":"uri"},"connectorName":{"type":"string","description":"Display name of the connector being created."},"setupUrl":{"type":"string","format":"uri","description":"Open this vercel.com URL in a browser to complete connector setup. Requires a vercel.com session for a member of the team."},"environments":{"type":"array","items":{"type":"string","enum":["production","preview","development"],"description":"Vercel environment the connector is attached to."},"description":"Environments the connector will be attached to."},"triggerPath":{"description":"Webhook trigger path that will be registered on the connector, when requested.","type":"string"},"createdProject":{"description":"Vercel project auto-created for this chat during setup, when applicable.","type":"object","properties":{"id":{"type":"string","description":"Vercel project identifier."},"name":{"type":"string","description":"Vercel project name."}},"required":["id","name"],"additionalProperties":false}},"required":["status","requestId","service","connectorName","setupUrl","environments"],"additionalProperties":false,"description":"Connector setup is pending. Complete setup at `setupUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then resolve with a `vercel-connect-setup` task."},{"type":"object","properties":{"status":{"type":"string","enum":["authorization-required"],"description":"The agent is waiting for the current user to authorize a connector in a browser."},"requestId":{"type":"string","description":"Authorization request identifier. Pass as `requestId` to GET /chats/{chatId}/connect/status to poll for completion."},"service":{"type":"string","description":"The service being authorized."},"serviceIconUrl":{"description":"Icon URL for the service, hosted on vercel.com.","type":"string","format":"uri"},"connectorId":{"type":"string","description":"Connector being authorized."},"connectorName":{"type":"string","description":"Display name of the connector."},"authorizationUrl":{"type":"string","format":"uri","description":"Open this vercel.com URL in a browser to sign in to the provider as the current user. Requires a vercel.com session for a member of the team."}},"required":["status","requestId","service","connectorId","connectorName","authorizationUrl"],"additionalProperties":false,"description":"User authorization is pending. Sign in at `authorizationUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then resolve with a `vercel-connect-authorization` task."},{"type":"object","properties":{"status":{"type":"string","enum":["completed"],"description":"The Connect action finished; no user input is needed."},"action":{"type":"string","enum":["list","create","attach","authorize"],"description":"The Connect action that ran."},"summary":{"type":"string","description":"Human-readable result summary."},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Connector identifier."},"name":{"type":"string","description":"Connector display name."},"service":{"description":"Connected service identifier.","type":"string"},"attachedToProject":{"type":"boolean","description":"Whether the connector is attached to the chat’s Vercel project."}},"required":["id","name","attachedToProject"],"additionalProperties":false},"description":"Connectors involved in the action."},"createdProject":{"description":"Vercel project created during the action, when applicable.","type":"object","properties":{"id":{"type":"string","description":"Vercel project identifier."},"name":{"type":"string","description":"Vercel project name."}},"required":["id","name"],"additionalProperties":false}},"required":["status","action","summary","connectors"],"additionalProperties":false,"description":"The Connect action finished; no user input is needed."}],"description":"Structured payload for a `configure_vercel_connect` agent action."},{"type":"object","properties":{"artifactId":{"type":"string","description":"Artifact identifier. Download its bytes with GET /chats/{chatId}/artifacts/{artifactId}."},"title":{"type":"string","description":"Short title the agent gave the artifact."},"fileName":{"type":"string","description":"File name of the artifact, including its extension."},"kind":{"type":"string","enum":["html","markdown","json","csv","text","image","audio","video","pdf","model","code","document","spreadsheet","presentation","file"],"description":"How the artifact is rendered in v0."},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Size of the artifact in bytes."},"display":{"type":"string","enum":["tab","inline"],"description":"Where v0 shows the artifact: embedded in the message (`inline`) or in a separate tab (`tab`)."}},"required":["artifactId","title","fileName","kind","size","display"],"additionalProperties":false,"description":"Structured payload for a `show_artifact` agent action: a file the agent saved to show the user, such as a report, chart, or interactive HTML page."},{"oneOf":[{"type":"object","properties":{"outcome":{"type":"string","enum":["running"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."}},"required":["outcome","files","contextFileCount"],"additionalProperties":false,"description":"The review is running."},{"type":"object","properties":{"outcome":{"type":"string","enum":["clean"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."},"potentialIssueCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Potential issues the review reported, before the agent checked them against the project. The checked findings are in the final message."},"severities":{"type":"object","properties":{"critical":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"high":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"medium":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bug":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Non-security bugs the review reported."},"low":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["critical","high","medium","bug","low"],"additionalProperties":false,"description":"Potential issues by severity."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the review ran."}},"required":["outcome","files","contextFileCount","potentialIssueCount","severities","durationMs"],"additionalProperties":false,"description":"The review finished and reported no potential issues."},{"type":"object","properties":{"outcome":{"type":"string","enum":["findings"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."},"potentialIssueCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Potential issues the review reported, before the agent checked them against the project. The checked findings are in the final message."},"severities":{"type":"object","properties":{"critical":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"high":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"medium":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bug":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Non-security bugs the review reported."},"low":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["critical","high","medium","bug","low"],"additionalProperties":false,"description":"Potential issues by severity."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the review ran."}},"required":["outcome","files","contextFileCount","potentialIssueCount","severities","durationMs"],"additionalProperties":false,"description":"The review finished and reported potential issues."},{"type":"object","properties":{"outcome":{"type":"string","enum":["incomplete"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."},"reason":{"type":"string","enum":["ai-error","credits","timeout","stopped","not-started","interrupted"],"description":"Why the review ended without a result: `ai-error` (the AI calls failed), `credits` (not enough v0 credits), `timeout`, `stopped` (the turn was stopped while it ran), `not-started` (it never started), or `interrupted` (it stopped partway, or its result could not be read)."},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long it ran before it ended, when known."}},"required":["outcome","files","contextFileCount","reason","durationMs"],"additionalProperties":false,"description":"The review ended without a result."}],"description":"Payload for `security_review` parts. Narrow by `outcome`: only finished reviews carry counts, and only incomplete ones carry a `reason`."}]},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","name","summary"],"additionalProperties":false,"description":"A typed escape hatch for agent actions that don’t fit the other part types. Forward-compatible: new action types may appear without API version changes."}],"description":"A single entry in the ordered narrative of a message. Iterate `parts` in order to render the full transcript."},"description":"Ordered list of parts that make up the message. Iterate to render the full narrative including thinking, file operations, tool calls, and prose."},"finishReason":{"anyOf":[{"type":"string","enum":["stop","length","content-filter","tool-calls","error","other"],"description":"The reason why message generation finished, including standard completion reasons and error states."},{"type":"null"}],"description":"Why generation ended. Null while the agent is still generating; once non-null, the message is final and safe to consume."},"filesStatus":{"anyOf":[{"type":"string","enum":["pending","ready","failed"]},{"type":"null"}],"description":"Whether `GET /chats/{chatId}/files` reflects this assistant message. `pending` while the agent is generating or its changes are still being saved, which can continue for a few seconds after `finishReason` is set; `ready` once they are saved; `failed` if saving them failed, in which case the files are those of the previous version. Null on user messages."},"restorable":{"type":"boolean","description":"True when this is an assistant message that produced restorable code and is not the currently active code."},"attachments":{"description":"Files attached to this message.","type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"URL to the attachment."},"name":{"description":"Original filename, when available.","type":"string"},"contentType":{"description":"MIME type.","type":"string"},"size":{"description":"Size in bytes.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["url"],"additionalProperties":false}},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ID of the user who authored a user message; null for assistant messages."},"usage":{"type":"object","properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model identifier used for the assistant message, or null when not applicable or unavailable."},"tokens":{"type":"object","properties":{"input":{"type":"number","description":"Prompt input value (non-cached)."},"output":{"type":"number","description":"Completion output value."},"cacheRead":{"type":"number","description":"Cache-read input value."},"cacheWrite":{"type":"number","description":"Cache-write input value."},"total":{"type":"number","description":"Sum of input, output, cacheRead, and cacheWrite."}},"required":["input","output","cacheRead","cacheWrite","total"],"additionalProperties":false,"description":"Token counts for this message."},"creditsCost":{"type":"object","properties":{"input":{"type":"number","description":"Prompt input value (non-cached)."},"output":{"type":"number","description":"Completion output value."},"cacheRead":{"type":"number","description":"Cache-read input value."},"cacheWrite":{"type":"number","description":"Cache-write input value."},"total":{"type":"number","description":"Sum of input, output, cacheRead, and cacheWrite."}},"required":["input","output","cacheRead","cacheWrite","total"],"additionalProperties":false,"description":"Credit cost for this message."}},"required":["model","tokens","creditsCost"],"additionalProperties":false,"description":"Model identifier, token usage, and credit cost. Token and credit values are zero on user messages and on assistant messages that have not yet generated tokens."}},"required":["id","chatId","role","createdAt","updatedAt","content","parts","finishReason","filesStatus","restorable","authorId","usage"],"additionalProperties":false,"description":"A single message in a chat."},"description":"The user and assistant messages created by the edit, in chronological order."}},"required":["messages"],"additionalProperties":false,"description":"The messages created to record the file edit."}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"message":{"type":"string","enum":["Invalid file contents"]},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The invalid request body field path."},"error":{"type":"string","description":"Validation error for the field."}},"required":["path","error"],"additionalProperties":false},"description":"All file content validation issues."}},"required":["message","issues"],"additionalProperties":false},{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}]}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/files/download":{"get":{"tags":["Chats"],"summary":"Download Chat Files","description":"Downloads the source files for a chat as a ZIP archive.","operationId":"chats.downloadFiles","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}}],"responses":{"200":{"description":"ZIP archive of the chat files.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"ZIP archive of the chat files."}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/connect/status":{"get":{"tags":["Chats"],"summary":"Get Connect Setup Status","description":"Polls the status of a Vercel Connect connector setup started by a `configure_vercel_connect` agent action. Open the `setupUrl` from the agent action data in a browser, then poll this endpoint every few seconds while `pending`. When it returns `ready`, resolve the chat with a `vercel-connect-setup` task to resume generation.","operationId":"chats.getConnectStatus","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}},{"name":"requestId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"description":"The `requestId` from the `configure_vercel_connect` agent action data."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"],"description":"Setup is still in progress."},"progress":{"description":"Current setup progress.","type":"string"}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["ready"],"description":"Setup completed successfully."},"connector":{"type":"object","properties":{"id":{"type":"string","description":"Vercel Connect connector identifier."},"uid":{"description":"Optional connector UID.","type":"string"},"name":{"type":"string","description":"Connector display name."},"service":{"description":"Connected service identifier.","type":"string"},"type":{"type":"string","description":"Connector type."},"supportedSubjectTypes":{"description":"Subject types supported by the connector.","type":"array","items":{"type":"string","enum":["app","user","jwt-bearer"]}},"supportsInstallation":{"description":"Whether the connector supports installation.","type":"boolean"},"attachedToProject":{"type":"boolean","description":"Whether the connector is already attached to the project."}},"required":["id","name","type","attachedToProject"],"additionalProperties":false,"description":"Connector created by setup."}},"required":["status","connector"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["error"],"description":"Setup completed with an error."},"message":{"type":"string","description":"Safe user-facing setup error message."}},"required":["status","message"],"additionalProperties":false}]}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/restore-message":{"post":{"tags":["Chats"],"summary":"Restore Message","description":"Restores the files associated with an assistant message. The associated files must not already be the latest files in the chat.","operationId":"chats.restoreMessage","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messageId":{"type":"string","minLength":1,"description":"The unique identifier of the assistant message whose files to restore."}},"required":["messageId"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messageId":{"type":"string","minLength":1,"description":"The unique identifier of the assistant message whose files to restore."}},"required":["messageId"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messageId":{"type":"string","minLength":1,"description":"The unique identifier of the assistant message whose files to restore."}},"required":["messageId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The messages created to record the restore.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique message identifier."},"chatId":{"type":"string","description":"ID of the chat this message belongs to."},"role":{"type":"string","enum":["user","assistant"],"description":"Who produced this message."},"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":"ISO timestamp when the message was created."},"updatedAt":{"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":"ISO timestamp when the message was last updated."},"content":{"type":"string","description":"The trailing prose of the message — the agent’s closing summary, or the user’s message text. Empty string when there is no closing prose."},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","description":"Markdown prose written by the agent or user."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","text"],"additionalProperties":false,"description":"A block of text output by the agent."},{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"text":{"type":"string","description":"The agent's reasoning trace."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","text"],"additionalProperties":false,"description":"Extended thinking output by the agent."},{"type":"object","properties":{"type":{"type":"string","enum":["file-read"]},"paths":{"type":"array","items":{"type":"string"},"description":"The file paths the agent read in this step."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","paths"],"additionalProperties":false,"description":"Files read by the agent."},{"type":"object","properties":{"type":{"type":"string","enum":["file-edit"]},"operation":{"type":"string","enum":["create","update","delete","rename","patch"],"description":"The type of file edit performed."},"path":{"type":"string","description":"The target file path."},"toPath":{"description":"The new path when operation is \"rename\".","type":"string"},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","operation","path"],"additionalProperties":false,"description":"The agent created, modified, deleted, renamed, or patched a file."},{"type":"object","properties":{"type":{"type":"string","enum":["search"]},"scope":{"type":"string","enum":["repo","web"],"description":"Whether the agent searched the repository or the web."},"query":{"type":"string","description":"The search query."},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","scope","query"],"additionalProperties":false,"description":"The agent searched for something."},{"type":"object","properties":{"type":{"type":"string","enum":["bash"]},"command":{"type":"string","description":"The shell command that was executed."},"output":{"description":"Combined stdout/stderr captured from the terminal. May be empty if the command produced no output.","type":"string"},"exitCode":{"description":"Process exit code, when available. Reserved for future use; currently always omitted.","anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"isDangerous":{"description":"True if the command was flagged as potentially dangerous and required explicit user approval.","type":"boolean"},"timeoutMs":{"description":"Command timeout in milliseconds, when configured.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","command"],"additionalProperties":false,"description":"The agent ran a shell command."},{"type":"object","properties":{"type":{"type":"string","enum":["tool-call"]},"name":{"type":"string","description":"The identifier the tool was invoked under. For MCP/integration tools this is a normalized identifier derived from the tool name — prefer `toolDisplayName` for display when present."},"toolDisplayName":{"description":"The tool's original human-readable name (an MCP/integration tool's server-side name), when `name` is a normalized identifier. Display-only.","anyOf":[{"type":"string"},{"type":"null"}]},"input":{"description":"The arguments passed to the tool. Schema depends on the specific tool."},"output":{"description":"The result returned by the tool. Schema depends on the specific tool."},"status":{"type":"string","enum":["ok","error"],"description":"Whether the tool call succeeded or returned an error."},"suggestedPermissions":{"description":"Present when the agent is blocked waiting for you to approve this tool call (for example, running a setup or migration script). Pass these objects back unchanged as the `permissions` of a `confirmed-permissions` task to approve. Omitted once the tool has run.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["ALLOW_DYNAMIC_TOOL_STRICT"],"description":"Permission grant type."},"toolName":{"type":"string","description":"The tool this permission authorizes."},"input":{"description":"The tool input this permission authorizes. Pass back unchanged when resolving."},"toolDisplayName":{"description":"The tool's original human-readable name (an MCP/integration tool's server name), when `toolName` is a normalized identifier. Display-only; pass back unchanged.","anyOf":[{"type":"string"},{"type":"null"}]},"taskNameActive":{"description":"Internal label for the in-progress task. Pass back unchanged.","anyOf":[{"type":"string"},{"type":"null"}]},"taskNameComplete":{"description":"Internal label for the completed task. Pass back unchanged.","anyOf":[{"type":"string"},{"type":"null"}]},"userMessage":{"description":"Optional message associated with the permission.","type":"string"}},"required":["type","toolName"],"additionalProperties":false,"description":"A permission the agent is waiting for you to grant. Pass these objects back unchanged as the `permissions` of a `confirmed-permissions` task."}},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","name","status"],"additionalProperties":false,"description":"The agent invoked a tool (MCP, integration, or other dynamic tool). For shell commands, use the \"bash\" part instead."},{"type":"object","properties":{"type":{"type":"string","enum":["agent-action"]},"name":{"type":"string","description":"Stable identifier for the action (e.g. \"generate_image\", \"manage_todos\", \"diagnostics\"). See documentation for the registry of known names."},"summary":{"type":"string","description":"A short human-readable summary of what happened. Always populated so clients can render something even without knowing the action name."},"data":{"description":"Structured payload for actions that carry data. Present on `ask_user_questions`, `exit_plan_mode`, `get_or_request_integration`, and `configure_vercel_connect` parts when the agent is waiting on you, and on `show_artifact` and `security_review` parts. Narrow by the part `name`: the presence of `data` alone does not mean the agent is waiting on you. Omitted for actions that do not carry structured data.","anyOf":[{"type":"object","properties":{"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Question identifier. Pass back as `questionId` when resolving with an `answered-questions` task."},"question":{"type":"string","description":"The full question text."},"header":{"type":"string","description":"Short label for the question."},"multiSelect":{"type":"boolean","description":"Whether more than one option may be selected."},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Option identifier."},"label":{"type":"string","description":"Display label. Pass matching labels back in `selectedLabels` when resolving."},"description":{"description":"Optional longer explanation of the option.","type":"string"}},"required":["id","label"],"additionalProperties":false},"description":"The available answer options."}},"required":["id","question","header","multiSelect","options"],"additionalProperties":false},"description":"The questions the agent is waiting for answers to. Resolve with an `answered-questions` task."}},"required":["questions"],"additionalProperties":false,"description":"Structured payload for an `ask_user_questions` agent action."},{"type":"object","properties":{"plan":{"type":"string","description":"The full proposed plan, as Markdown."},"summary":{"description":"A concise summary of the plan, when available.","type":"string"},"path":{"type":"string","description":"The path the plan applies to."}},"required":["plan","path"],"additionalProperties":false,"description":"Structured payload for an `exit_plan_mode` agent action."},{"type":"object","properties":{"requestedIntegrations":{"type":"array","items":{"type":"string"},"description":"Integration names the agent is asking you to connect (for example, \"Neon\"). Pass these back in `connectedIntegrationNames` when resolving with a `confirmed-steps` task."},"requestedNpmRegistryIds":{"type":"array","items":{"type":"string"},"description":"Deprecated. npm registry connections are no longer requested; this array is always empty.","deprecated":true},"requestedMcpPresets":{"type":"array","items":{"type":"string"},"description":"MCP preset names the agent is asking you to add. Pass these back in `connectedMcpPresetNames` when resolving with a `confirmed-steps` task."}},"required":["requestedIntegrations","requestedNpmRegistryIds","requestedMcpPresets"],"additionalProperties":false,"description":"Structured payload for a `get_or_request_integration` agent action."},{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["setup-required"],"description":"The agent is waiting for connector setup to be completed in a browser."},"requestId":{"type":"string","description":"Setup request identifier. Pass as `requestId` to GET /chats/{chatId}/connect/status to poll for completion."},"service":{"type":"string","description":"The service being connected (for example, \"linear\")."},"serviceIconUrl":{"description":"Icon URL for the service, hosted on vercel.com.","type":"string","format":"uri"},"connectorName":{"type":"string","description":"Display name of the connector being created."},"setupUrl":{"type":"string","format":"uri","description":"Open this vercel.com URL in a browser to complete connector setup. Requires a vercel.com session for a member of the team."},"environments":{"type":"array","items":{"type":"string","enum":["production","preview","development"],"description":"Vercel environment the connector is attached to."},"description":"Environments the connector will be attached to."},"triggerPath":{"description":"Webhook trigger path that will be registered on the connector, when requested.","type":"string"},"createdProject":{"description":"Vercel project auto-created for this chat during setup, when applicable.","type":"object","properties":{"id":{"type":"string","description":"Vercel project identifier."},"name":{"type":"string","description":"Vercel project name."}},"required":["id","name"],"additionalProperties":false}},"required":["status","requestId","service","connectorName","setupUrl","environments"],"additionalProperties":false,"description":"Connector setup is pending. Complete setup at `setupUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then resolve with a `vercel-connect-setup` task."},{"type":"object","properties":{"status":{"type":"string","enum":["authorization-required"],"description":"The agent is waiting for the current user to authorize a connector in a browser."},"requestId":{"type":"string","description":"Authorization request identifier. Pass as `requestId` to GET /chats/{chatId}/connect/status to poll for completion."},"service":{"type":"string","description":"The service being authorized."},"serviceIconUrl":{"description":"Icon URL for the service, hosted on vercel.com.","type":"string","format":"uri"},"connectorId":{"type":"string","description":"Connector being authorized."},"connectorName":{"type":"string","description":"Display name of the connector."},"authorizationUrl":{"type":"string","format":"uri","description":"Open this vercel.com URL in a browser to sign in to the provider as the current user. Requires a vercel.com session for a member of the team."}},"required":["status","requestId","service","connectorId","connectorName","authorizationUrl"],"additionalProperties":false,"description":"User authorization is pending. Sign in at `authorizationUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then resolve with a `vercel-connect-authorization` task."},{"type":"object","properties":{"status":{"type":"string","enum":["completed"],"description":"The Connect action finished; no user input is needed."},"action":{"type":"string","enum":["list","create","attach","authorize"],"description":"The Connect action that ran."},"summary":{"type":"string","description":"Human-readable result summary."},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Connector identifier."},"name":{"type":"string","description":"Connector display name."},"service":{"description":"Connected service identifier.","type":"string"},"attachedToProject":{"type":"boolean","description":"Whether the connector is attached to the chat’s Vercel project."}},"required":["id","name","attachedToProject"],"additionalProperties":false},"description":"Connectors involved in the action."},"createdProject":{"description":"Vercel project created during the action, when applicable.","type":"object","properties":{"id":{"type":"string","description":"Vercel project identifier."},"name":{"type":"string","description":"Vercel project name."}},"required":["id","name"],"additionalProperties":false}},"required":["status","action","summary","connectors"],"additionalProperties":false,"description":"The Connect action finished; no user input is needed."}],"description":"Structured payload for a `configure_vercel_connect` agent action."},{"type":"object","properties":{"artifactId":{"type":"string","description":"Artifact identifier. Download its bytes with GET /chats/{chatId}/artifacts/{artifactId}."},"title":{"type":"string","description":"Short title the agent gave the artifact."},"fileName":{"type":"string","description":"File name of the artifact, including its extension."},"kind":{"type":"string","enum":["html","markdown","json","csv","text","image","audio","video","pdf","model","code","document","spreadsheet","presentation","file"],"description":"How the artifact is rendered in v0."},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Size of the artifact in bytes."},"display":{"type":"string","enum":["tab","inline"],"description":"Where v0 shows the artifact: embedded in the message (`inline`) or in a separate tab (`tab`)."}},"required":["artifactId","title","fileName","kind","size","display"],"additionalProperties":false,"description":"Structured payload for a `show_artifact` agent action: a file the agent saved to show the user, such as a report, chart, or interactive HTML page."},{"oneOf":[{"type":"object","properties":{"outcome":{"type":"string","enum":["running"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."}},"required":["outcome","files","contextFileCount"],"additionalProperties":false,"description":"The review is running."},{"type":"object","properties":{"outcome":{"type":"string","enum":["clean"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."},"potentialIssueCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Potential issues the review reported, before the agent checked them against the project. The checked findings are in the final message."},"severities":{"type":"object","properties":{"critical":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"high":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"medium":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bug":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Non-security bugs the review reported."},"low":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["critical","high","medium","bug","low"],"additionalProperties":false,"description":"Potential issues by severity."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the review ran."}},"required":["outcome","files","contextFileCount","potentialIssueCount","severities","durationMs"],"additionalProperties":false,"description":"The review finished and reported no potential issues."},{"type":"object","properties":{"outcome":{"type":"string","enum":["findings"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."},"potentialIssueCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Potential issues the review reported, before the agent checked them against the project. The checked findings are in the final message."},"severities":{"type":"object","properties":{"critical":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"high":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"medium":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bug":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Non-security bugs the review reported."},"low":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["critical","high","medium","bug","low"],"additionalProperties":false,"description":"Potential issues by severity."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the review ran."}},"required":["outcome","files","contextFileCount","potentialIssueCount","severities","durationMs"],"additionalProperties":false,"description":"The review finished and reported potential issues."},{"type":"object","properties":{"outcome":{"type":"string","enum":["incomplete"]},"files":{"type":"array","items":{"type":"string"},"description":"Project-relative paths of the files the review covered."},"contextFileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many other files the review read for context."},"reason":{"type":"string","enum":["ai-error","credits","timeout","stopped","not-started","interrupted"],"description":"Why the review ended without a result: `ai-error` (the AI calls failed), `credits` (not enough v0 credits), `timeout`, `stopped` (the turn was stopped while it ran), `not-started` (it never started), or `interrupted` (it stopped partway, or its result could not be read)."},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long it ran before it ended, when known."}},"required":["outcome","files","contextFileCount","reason","durationMs"],"additionalProperties":false,"description":"The review ended without a result."}],"description":"Payload for `security_review` parts. Narrow by `outcome`: only finished reviews carry counts, and only incomplete ones carry a `reason`."}]},"startedAt":{"description":"ISO timestamp when this part began.","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))$"},"finishedAt":{"description":"ISO timestamp when this part completed.","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":["type","name","summary"],"additionalProperties":false,"description":"A typed escape hatch for agent actions that don’t fit the other part types. Forward-compatible: new action types may appear without API version changes."}],"description":"A single entry in the ordered narrative of a message. Iterate `parts` in order to render the full transcript."},"description":"Ordered list of parts that make up the message. Iterate to render the full narrative including thinking, file operations, tool calls, and prose."},"finishReason":{"anyOf":[{"type":"string","enum":["stop","length","content-filter","tool-calls","error","other"],"description":"The reason why message generation finished, including standard completion reasons and error states."},{"type":"null"}],"description":"Why generation ended. Null while the agent is still generating; once non-null, the message is final and safe to consume."},"filesStatus":{"anyOf":[{"type":"string","enum":["pending","ready","failed"]},{"type":"null"}],"description":"Whether `GET /chats/{chatId}/files` reflects this assistant message. `pending` while the agent is generating or its changes are still being saved, which can continue for a few seconds after `finishReason` is set; `ready` once they are saved; `failed` if saving them failed, in which case the files are those of the previous version. Null on user messages."},"restorable":{"type":"boolean","description":"True when this is an assistant message that produced restorable code and is not the currently active code."},"attachments":{"description":"Files attached to this message.","type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"URL to the attachment."},"name":{"description":"Original filename, when available.","type":"string"},"contentType":{"description":"MIME type.","type":"string"},"size":{"description":"Size in bytes.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["url"],"additionalProperties":false}},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ID of the user who authored a user message; null for assistant messages."},"usage":{"type":"object","properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model identifier used for the assistant message, or null when not applicable or unavailable."},"tokens":{"type":"object","properties":{"input":{"type":"number","description":"Prompt input value (non-cached)."},"output":{"type":"number","description":"Completion output value."},"cacheRead":{"type":"number","description":"Cache-read input value."},"cacheWrite":{"type":"number","description":"Cache-write input value."},"total":{"type":"number","description":"Sum of input, output, cacheRead, and cacheWrite."}},"required":["input","output","cacheRead","cacheWrite","total"],"additionalProperties":false,"description":"Token counts for this message."},"creditsCost":{"type":"object","properties":{"input":{"type":"number","description":"Prompt input value (non-cached)."},"output":{"type":"number","description":"Completion output value."},"cacheRead":{"type":"number","description":"Cache-read input value."},"cacheWrite":{"type":"number","description":"Cache-write input value."},"total":{"type":"number","description":"Sum of input, output, cacheRead, and cacheWrite."}},"required":["input","output","cacheRead","cacheWrite","total"],"additionalProperties":false,"description":"Credit cost for this message."}},"required":["model","tokens","creditsCost"],"additionalProperties":false,"description":"Model identifier, token usage, and credit cost. Token and credit values are zero on user messages and on assistant messages that have not yet generated tokens."}},"required":["id","chatId","role","createdAt","updatedAt","content","parts","finishReason","filesStatus","restorable","authorId","usage"],"additionalProperties":false,"description":"A single message in a chat."},"description":"The user and assistant messages created by the restore, in chronological order."}},"required":["messages"],"additionalProperties":false,"description":"The messages created to record the restore."}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/duplicate":{"post":{"tags":["Chats"],"summary":"Duplicate Chat","description":"Creates a new chat by duplicating an existing chat.","operationId":"chats.duplicate","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{"privacy":"private"},"type":"object","properties":{"privacy":{"default":"private","description":"Visibility setting for the duplicated chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Custom title for the duplicated chat. If omitted, the original title is reused with an incremented suffix (e.g. \"My Chat (2)\").","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["privacy"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{"privacy":"private"},"type":"object","properties":{"privacy":{"default":"private","description":"Visibility setting for the duplicated chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Custom title for the duplicated chat. If omitted, the original title is reused with an incremented suffix (e.g. \"My Chat (2)\").","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["privacy"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{"privacy":"private"},"type":"object","properties":{"privacy":{"default":"private","description":"Visibility setting for the duplicated chat.","type":"string","enum":["public","private","team","team-edit","unlisted"]},"title":{"description":"Custom title for the duplicated chat. If omitted, the original title is reused with an incremented suffix (e.g. \"My Chat (2)\").","type":"string"},"metadata":{"description":"Arbitrary key-value data to attach to the chat.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["privacy"],"additionalProperties":false}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/deploy":{"post":{"tags":["Chats"],"summary":"Deploy Chat","description":"Triggers a Vercel deployment for a chat. Creates a Vercel project if one does not exist.","operationId":"chats.deploy","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}}],"responses":{"200":{"description":"A deployment created for a chat. The deployment build runs asynchronously on Vercel - use the Vercel API with the returned deploymentId to track status, fetch logs, or read build errors.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deploymentId":{"type":"string","description":"Unique identifier of the Vercel deployment."},"vercelProjectId":{"type":"string","description":"The Vercel project that the deployment belongs to."}},"required":["deploymentId","vercelProjectId"],"additionalProperties":false,"description":"A deployment created for a chat. The deployment build runs asynchronously on Vercel - use the Vercel API with the returned deploymentId to track status, fetch logs, or read build errors."}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Response for status 429","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/vercel-project":{"post":{"tags":["Chats"],"summary":"Create Vercel Project","description":"Creates a Vercel project and attaches it to the chat.","operationId":"chats.createVercelProject","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"name":{"description":"Name for the Vercel project. When omitted, the chat's title is used.","type":"string","minLength":1}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"name":{"description":"Name for the Vercel project. When omitted, the chat's title is used.","type":"string","minLength":1}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"name":{"description":"Name for the Vercel project. When omitted, the chat's title is used.","type":"string","minLength":1}},"additionalProperties":false}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"vercelProjectId":{"type":"string","description":"Created Vercel project ID."}},"required":["vercelProjectId"],"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{chatId}/resume":{"post":{"tags":["Chats"],"summary":"Resume Chat Stream","description":"Resumes consumption of the active assistant generation as Server-Sent Events. If the latest message has already finished, returns a closing chat-state event. The response is `text/event-stream`; each event is `data: <JSON>\\n\\n` where the JSON conforms to ChatStreamEvent.","operationId":"chats.resume","parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the chat."}}],"responses":{"200":{"description":"A single Server-Sent Events payload emitted by streaming chat endpoints. Each SSE event is `data: <JSON>\\n\\n` where the JSON conforms to one of the union members.","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/ChatStreamEvent"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/security-checks/":{"post":{"tags":["Security Checks"],"summary":"Create Security Check","description":"Runs a DeepSec Security Check of your v0 app. To check an app that isn't in v0 yet, pass its GitHub repository or Vercel project, and v0 imports it into a new private chat. Poll GET /chats/:chatId/security-checks/:checkId for the result. Requires a user API key.","operationId":"securityChecks.create","requestBody":{"description":"Provide exactly one of `chatId`, `repo` or `vercelProjectId`.","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"scope":{"type":"string","enum":["project","changes"],"description":"`changes`: what changed in the chat. `project`: the riskiest files across the app."},"chatId":{"description":"The v0 chat to check.","type":"string","minLength":1},"repo":{"description":"A GitHub repository to import and check. Requires scope `project`.","type":"object","properties":{"url":{"type":"string","minLength":1,"description":"GitHub repository URL, for example https://github.com/vercel/next.js."},"branch":{"description":"Branch to import. If omitted, v0 uses the repository default branch.","type":"string","maxLength":250}},"required":["url"],"additionalProperties":false},"vercelProjectId":{"description":"A Vercel project to import and check. Requires scope `project`.","type":"string","minLength":32,"maxLength":32,"pattern":"^prj_[A-Za-z0-9]+$"},"baseBranch":{"description":"Base branch for a GitHub-linked project. Defaults to the repository default branch. Ignored for projects without a GitHub link.","type":"string","minLength":1,"maxLength":250}},"required":["scope"],"additionalProperties":false,"description":"Provide exactly one of `chatId`, `repo` or `vercelProjectId`."}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"scope":{"type":"string","enum":["project","changes"],"description":"`changes`: what changed in the chat. `project`: the riskiest files across the app."},"chatId":{"description":"The v0 chat to check.","type":"string","minLength":1},"repo":{"description":"A GitHub repository to import and check. Requires scope `project`.","type":"object","properties":{"url":{"type":"string","minLength":1,"description":"GitHub repository URL, for example https://github.com/vercel/next.js."},"branch":{"description":"Branch to import. If omitted, v0 uses the repository default branch.","type":"string","maxLength":250}},"required":["url"],"additionalProperties":false},"vercelProjectId":{"description":"A Vercel project to import and check. Requires scope `project`.","type":"string","minLength":32,"maxLength":32,"pattern":"^prj_[A-Za-z0-9]+$"},"baseBranch":{"description":"Base branch for a GitHub-linked project. Defaults to the repository default branch. Ignored for projects without a GitHub link.","type":"string","minLength":1,"maxLength":250}},"required":["scope"],"additionalProperties":false,"description":"Provide exactly one of `chatId`, `repo` or `vercelProjectId`."}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"scope":{"type":"string","enum":["project","changes"],"description":"`changes`: what changed in the chat. `project`: the riskiest files across the app."},"chatId":{"description":"The v0 chat to check.","type":"string","minLength":1},"repo":{"description":"A GitHub repository to import and check. Requires scope `project`.","type":"object","properties":{"url":{"type":"string","minLength":1,"description":"GitHub repository URL, for example https://github.com/vercel/next.js."},"branch":{"description":"Branch to import. If omitted, v0 uses the repository default branch.","type":"string","maxLength":250}},"required":["url"],"additionalProperties":false},"vercelProjectId":{"description":"A Vercel project to import and check. Requires scope `project`.","type":"string","minLength":32,"maxLength":32,"pattern":"^prj_[A-Za-z0-9]+$"},"baseBranch":{"description":"Base branch for a GitHub-linked project. Defaults to the repository default branch. Ignored for projects without a GitHub link.","type":"string","minLength":1,"maxLength":250}},"required":["scope"],"additionalProperties":false,"description":"Provide exactly one of `chatId`, `repo` or `vercelProjectId`."}}}},"responses":{"202":{"description":"Response for status 202","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","description":"The Security Check ID. Poll GET /chats/:chatId/security-checks/:checkId for its status and findings."},"object":{"type":"string","enum":["security_check"]},"chatId":{"type":"string"},"scope":{"type":"string","enum":["project","changes"],"description":"`changes`: what changed in the chat. `project`: the riskiest files across the app."},"status":{"type":"string","enum":["running"]}},"required":["id","object","chatId","scope","status"],"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/mcp-servers":{"get":{"tags":["MCP Servers"],"summary":"List MCP Servers","description":"Retrieves all MCP servers configured for the current user.","operationId":"mcpServers.list","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the MCP server."},"name":{"type":"string","description":"Display name of the MCP server."},"url":{"type":"string","description":"URL endpoint of the MCP server."},"description":{"type":"string","description":"Optional description of the MCP server."},"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":"ISO timestamp of when the server was created."},"updatedAt":{"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":"ISO timestamp of the last update."},"userId":{"type":"string","description":"ID of the user who created the server."},"enabled":{"type":"boolean","description":"Whether the MCP server is enabled."},"auth":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bearer"]},"token":{"type":"string","description":"Bearer token for authentication."}},"required":["type","token"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom-headers"]},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Custom headers to include in requests."}},"required":["type","headers"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["oauth"]},"config":{"description":"OAuth configuration discovered or manually set.","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"registrationUrl":{"type":"string","format":"uri"},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"usePKCE":{"type":"boolean"},"issuer":{"type":"string"},"resource":{"type":"string"},"clientIdMetadataDocumentSupported":{"type":"boolean"}},"required":["authorizationUrl","tokenUrl","clientId","scopes","usePKCE"],"additionalProperties":false},"connected":{"default":false,"description":"Whether OAuth is currently connected.","type":"boolean"},"expiresAt":{"description":"ISO timestamp when the token expires.","type":"string"}},"required":["type","connected"],"additionalProperties":false}],"description":"Authentication configuration for the MCP server."},"scope":{"type":"string","enum":["user","team"],"description":"Scope of the MCP server configuration."}},"required":["id","name","url","description","createdAt","updatedAt","userId","enabled","auth","scope"],"additionalProperties":false}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["MCP Servers"],"summary":"Create MCP Server","description":"Creates a new MCP server configuration. Limited to 100 servers per user.","operationId":"mcpServers.create","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Display name for the MCP server."},"url":{"type":"string","maxLength":500,"format":"uri","description":"URL endpoint of the MCP server."},"description":{"description":"Optional description of the MCP server.","type":"string","maxLength":500},"enabled":{"default":true,"description":"Whether the server should be enabled.","type":"boolean"},"auth":{"default":{"type":"none"},"description":"Authentication configuration.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bearer"]},"token":{"type":"string","description":"Bearer token for authentication."}},"required":["type","token"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom-headers"]},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Custom headers to include in requests."}},"required":["type","headers"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["oauth"]},"config":{"description":"OAuth configuration discovered or manually set.","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"registrationUrl":{"type":"string","format":"uri"},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"usePKCE":{"type":"boolean"},"issuer":{"type":"string"},"resource":{"type":"string"},"clientIdMetadataDocumentSupported":{"type":"boolean"}},"required":["authorizationUrl","tokenUrl","clientId","scopes","usePKCE"],"additionalProperties":false},"connected":{"default":false,"description":"Whether OAuth is currently connected.","type":"boolean"},"expiresAt":{"description":"ISO timestamp when the token expires.","type":"string"}},"required":["type","connected"],"additionalProperties":false}]},"scope":{"default":"user","description":"Scope of the MCP server configuration.","type":"string","enum":["user","team"]}},"required":["name","url","enabled","auth","scope"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Display name for the MCP server."},"url":{"type":"string","maxLength":500,"format":"uri","description":"URL endpoint of the MCP server."},"description":{"description":"Optional description of the MCP server.","type":"string","maxLength":500},"enabled":{"default":true,"description":"Whether the server should be enabled.","type":"boolean"},"auth":{"default":{"type":"none"},"description":"Authentication configuration.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bearer"]},"token":{"type":"string","description":"Bearer token for authentication."}},"required":["type","token"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom-headers"]},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Custom headers to include in requests."}},"required":["type","headers"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["oauth"]},"config":{"description":"OAuth configuration discovered or manually set.","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"registrationUrl":{"type":"string","format":"uri"},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"usePKCE":{"type":"boolean"},"issuer":{"type":"string"},"resource":{"type":"string"},"clientIdMetadataDocumentSupported":{"type":"boolean"}},"required":["authorizationUrl","tokenUrl","clientId","scopes","usePKCE"],"additionalProperties":false},"connected":{"default":false,"description":"Whether OAuth is currently connected.","type":"boolean"},"expiresAt":{"description":"ISO timestamp when the token expires.","type":"string"}},"required":["type","connected"],"additionalProperties":false}]},"scope":{"default":"user","description":"Scope of the MCP server configuration.","type":"string","enum":["user","team"]}},"required":["name","url","enabled","auth","scope"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Display name for the MCP server."},"url":{"type":"string","maxLength":500,"format":"uri","description":"URL endpoint of the MCP server."},"description":{"description":"Optional description of the MCP server.","type":"string","maxLength":500},"enabled":{"default":true,"description":"Whether the server should be enabled.","type":"boolean"},"auth":{"default":{"type":"none"},"description":"Authentication configuration.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bearer"]},"token":{"type":"string","description":"Bearer token for authentication."}},"required":["type","token"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom-headers"]},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Custom headers to include in requests."}},"required":["type","headers"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["oauth"]},"config":{"description":"OAuth configuration discovered or manually set.","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"registrationUrl":{"type":"string","format":"uri"},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"usePKCE":{"type":"boolean"},"issuer":{"type":"string"},"resource":{"type":"string"},"clientIdMetadataDocumentSupported":{"type":"boolean"}},"required":["authorizationUrl","tokenUrl","clientId","scopes","usePKCE"],"additionalProperties":false},"connected":{"default":false,"description":"Whether OAuth is currently connected.","type":"boolean"},"expiresAt":{"description":"ISO timestamp when the token expires.","type":"string"}},"required":["type","connected"],"additionalProperties":false}]},"scope":{"default":"user","description":"Scope of the MCP server configuration.","type":"string","enum":["user","team"]}},"required":["name","url","enabled","auth","scope"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServer"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/mcp-servers/{mcpServerId}":{"get":{"tags":["MCP Servers"],"summary":"Get MCP Server","description":"Retrieves a specific MCP server by ID.","operationId":"mcpServers.get","parameters":[{"name":"mcpServerId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the MCP server."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServer"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["MCP Servers"],"summary":"Update MCP Server","description":"Updates an existing MCP server configuration.","operationId":"mcpServers.update","parameters":[{"name":"mcpServerId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the MCP server to update."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"description":"New display name.","type":"string","minLength":1,"maxLength":100},"url":{"description":"New URL endpoint.","type":"string","maxLength":500,"format":"uri"},"description":{"description":"New description.","type":"string","maxLength":500},"enabled":{"description":"Enable or disable.","type":"boolean"},"auth":{"description":"New authentication configuration.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bearer"]},"token":{"type":"string","description":"Bearer token for authentication."}},"required":["type","token"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom-headers"]},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Custom headers to include in requests."}},"required":["type","headers"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["oauth"]},"config":{"description":"OAuth configuration discovered or manually set.","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"registrationUrl":{"type":"string","format":"uri"},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"usePKCE":{"type":"boolean"},"issuer":{"type":"string"},"resource":{"type":"string"},"clientIdMetadataDocumentSupported":{"type":"boolean"}},"required":["authorizationUrl","tokenUrl","clientId","scopes","usePKCE"],"additionalProperties":false},"connected":{"default":false,"description":"Whether OAuth is currently connected.","type":"boolean"},"expiresAt":{"description":"ISO timestamp when the token expires.","type":"string"}},"required":["type","connected"],"additionalProperties":false}]},"scope":{"description":"New scope.","type":"string","enum":["user","team"]}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"description":"New display name.","type":"string","minLength":1,"maxLength":100},"url":{"description":"New URL endpoint.","type":"string","maxLength":500,"format":"uri"},"description":{"description":"New description.","type":"string","maxLength":500},"enabled":{"description":"Enable or disable.","type":"boolean"},"auth":{"description":"New authentication configuration.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bearer"]},"token":{"type":"string","description":"Bearer token for authentication."}},"required":["type","token"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom-headers"]},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Custom headers to include in requests."}},"required":["type","headers"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["oauth"]},"config":{"description":"OAuth configuration discovered or manually set.","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"registrationUrl":{"type":"string","format":"uri"},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"usePKCE":{"type":"boolean"},"issuer":{"type":"string"},"resource":{"type":"string"},"clientIdMetadataDocumentSupported":{"type":"boolean"}},"required":["authorizationUrl","tokenUrl","clientId","scopes","usePKCE"],"additionalProperties":false},"connected":{"default":false,"description":"Whether OAuth is currently connected.","type":"boolean"},"expiresAt":{"description":"ISO timestamp when the token expires.","type":"string"}},"required":["type","connected"],"additionalProperties":false}]},"scope":{"description":"New scope.","type":"string","enum":["user","team"]}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"description":"New display name.","type":"string","minLength":1,"maxLength":100},"url":{"description":"New URL endpoint.","type":"string","maxLength":500,"format":"uri"},"description":{"description":"New description.","type":"string","maxLength":500},"enabled":{"description":"Enable or disable.","type":"boolean"},"auth":{"description":"New authentication configuration.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bearer"]},"token":{"type":"string","description":"Bearer token for authentication."}},"required":["type","token"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom-headers"]},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Custom headers to include in requests."}},"required":["type","headers"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["oauth"]},"config":{"description":"OAuth configuration discovered or manually set.","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"registrationUrl":{"type":"string","format":"uri"},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"usePKCE":{"type":"boolean"},"issuer":{"type":"string"},"resource":{"type":"string"},"clientIdMetadataDocumentSupported":{"type":"boolean"}},"required":["authorizationUrl","tokenUrl","clientId","scopes","usePKCE"],"additionalProperties":false},"connected":{"default":false,"description":"Whether OAuth is currently connected.","type":"boolean"},"expiresAt":{"description":"ISO timestamp when the token expires.","type":"string"}},"required":["type","connected"],"additionalProperties":false}]},"scope":{"description":"New scope.","type":"string","enum":["user","team"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServer"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["MCP Servers"],"summary":"Delete MCP Server","description":"Deletes an MCP server and cleans up associated OAuth tokens. This action is irreversible.","operationId":"mcpServers.delete","parameters":[{"name":"mcpServerId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the MCP server to delete."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pool-credit-limits/default":{"get":{"tags":["Pool Credit Limits"],"summary":"Get Pool Credit Limit Default","description":"Returns the setting for team members without their own. Team owners and billing members only.","operationId":"poolCreditLimits.getDefault","x-v0-mcp-tool":false,"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PoolCreditLimitDefault"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Response for status 429","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Pool Credit Limits"],"summary":"Set Pool Credit Limit Default","description":"Sets the setting for team members without their own. Team owners and billing members only.","operationId":"poolCreditLimits.setDefault","x-v0-mcp-tool":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"setting":{"oneOf":[{"type":"object","properties":{"access":{"type":"string","enum":["unlimited"],"description":"The member may spend shared-pool credits without a cap."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["none"],"description":"The member may spend only their monthly credits."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["limited"],"description":"The member may spend up to `limit` of shared-pool credits per billing cycle."},"limit":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$","description":"USD amount per billing cycle, with up to two decimals."}},"required":["access","limit"],"additionalProperties":false}],"description":"How much of the shared credit pool a member may spend per billing cycle, after their monthly credits."}},"required":["setting"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"setting":{"oneOf":[{"type":"object","properties":{"access":{"type":"string","enum":["unlimited"],"description":"The member may spend shared-pool credits without a cap."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["none"],"description":"The member may spend only their monthly credits."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["limited"],"description":"The member may spend up to `limit` of shared-pool credits per billing cycle."},"limit":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$","description":"USD amount per billing cycle, with up to two decimals."}},"required":["access","limit"],"additionalProperties":false}],"description":"How much of the shared credit pool a member may spend per billing cycle, after their monthly credits."}},"required":["setting"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"setting":{"oneOf":[{"type":"object","properties":{"access":{"type":"string","enum":["unlimited"],"description":"The member may spend shared-pool credits without a cap."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["none"],"description":"The member may spend only their monthly credits."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["limited"],"description":"The member may spend up to `limit` of shared-pool credits per billing cycle."},"limit":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$","description":"USD amount per billing cycle, with up to two decimals."}},"required":["access","limit"],"additionalProperties":false}],"description":"How much of the shared credit pool a member may spend per billing cycle, after their monthly credits."}},"required":["setting"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PoolCreditLimitDefault"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Response for status 429","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pool-credit-limits/members":{"get":{"tags":["Pool Credit Limits"],"summary":"List Pool Credit Limit Members","description":"Lists team members with v0 access, each with the setting that applies to them. Team owners and billing members only.","operationId":"poolCreditLimits.members.list","x-v0-mcp-tool":false,"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"description":"Next-page cursor.","type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"description":"Members per page, from 1 to 100. Defaults to 50.","type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["pool_credit_limit_member"]},"userId":{"type":"string","description":"Team member user ID."},"setting":{"oneOf":[{"type":"object","properties":{"access":{"type":"string","enum":["unlimited"],"description":"The member may spend shared-pool credits without a cap."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["none"],"description":"The member may spend only their monthly credits."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["limited"],"description":"The member may spend up to `limit` of shared-pool credits per billing cycle."},"limit":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$","description":"USD amount per billing cycle, with up to two decimals."}},"required":["access","limit"],"additionalProperties":false}],"description":"How much of the shared credit pool a member may spend per billing cycle, after their monthly credits."},"source":{"type":"string","enum":["default","member"],"description":"`default` when the team default applies, `member` when the member has their own setting."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name."},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Username."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Email address."},"role":{"type":"string","description":"Team role."}},"required":["object","userId","setting","source","name","username","email","role"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean"},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as `cursor` to fetch the next page."}},"required":["hasMore","cursor"],"additionalProperties":false}},"required":["object","data","pagination"],"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Response for status 429","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Pool Credit Limits"],"summary":"Update Pool Credit Limit Members","description":"Sets or removes up to 100 members’ own settings in one request. Every change is validated first, and either all of them are saved or none are. Team owners and billing members only.","operationId":"poolCreditLimits.members.update","x-v0-mcp-tool":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"updates":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"description":"Team member user ID, or `me` for the authenticated user."},"setting":{"anyOf":[{"oneOf":[{"type":"object","properties":{"access":{"type":"string","enum":["unlimited"],"description":"The member may spend shared-pool credits without a cap."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["none"],"description":"The member may spend only their monthly credits."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["limited"],"description":"The member may spend up to `limit` of shared-pool credits per billing cycle."},"limit":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$","description":"USD amount per billing cycle, with up to two decimals."}},"required":["access","limit"],"additionalProperties":false}],"description":"How much of the shared credit pool a member may spend per billing cycle, after their monthly credits."},{"type":"null"}],"description":"The member’s own setting, or null to remove it so the team default applies."}},"required":["userId","setting"],"additionalProperties":false},"description":"Up to 100 changes, applied together or not at all."}},"required":["updates"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"updates":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"description":"Team member user ID, or `me` for the authenticated user."},"setting":{"anyOf":[{"oneOf":[{"type":"object","properties":{"access":{"type":"string","enum":["unlimited"],"description":"The member may spend shared-pool credits without a cap."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["none"],"description":"The member may spend only their monthly credits."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["limited"],"description":"The member may spend up to `limit` of shared-pool credits per billing cycle."},"limit":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$","description":"USD amount per billing cycle, with up to two decimals."}},"required":["access","limit"],"additionalProperties":false}],"description":"How much of the shared credit pool a member may spend per billing cycle, after their monthly credits."},{"type":"null"}],"description":"The member’s own setting, or null to remove it so the team default applies."}},"required":["userId","setting"],"additionalProperties":false},"description":"Up to 100 changes, applied together or not at all."}},"required":["updates"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"updates":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"description":"Team member user ID, or `me` for the authenticated user."},"setting":{"anyOf":[{"oneOf":[{"type":"object","properties":{"access":{"type":"string","enum":["unlimited"],"description":"The member may spend shared-pool credits without a cap."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["none"],"description":"The member may spend only their monthly credits."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["limited"],"description":"The member may spend up to `limit` of shared-pool credits per billing cycle."},"limit":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$","description":"USD amount per billing cycle, with up to two decimals."}},"required":["access","limit"],"additionalProperties":false}],"description":"How much of the shared credit pool a member may spend per billing cycle, after their monthly credits."},{"type":"null"}],"description":"The member’s own setting, or null to remove it so the team default applies."}},"required":["userId","setting"],"additionalProperties":false},"description":"Up to 100 changes, applied together or not at all."}},"required":["updates"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["pool_credit_limit_member"]},"userId":{"type":"string","description":"Team member user ID."},"setting":{"oneOf":[{"type":"object","properties":{"access":{"type":"string","enum":["unlimited"],"description":"The member may spend shared-pool credits without a cap."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["none"],"description":"The member may spend only their monthly credits."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["limited"],"description":"The member may spend up to `limit` of shared-pool credits per billing cycle."},"limit":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$","description":"USD amount per billing cycle, with up to two decimals."}},"required":["access","limit"],"additionalProperties":false}],"description":"How much of the shared credit pool a member may spend per billing cycle, after their monthly credits."},"source":{"type":"string","enum":["default","member"],"description":"`default` when the team default applies, `member` when the member has their own setting."}},"required":["object","userId","setting","source"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Response for status 429","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pool-credit-limits/members/{userId}":{"get":{"tags":["Pool Credit Limits"],"summary":"Get Pool Credit Limit Member","description":"Returns the setting that applies to a team member and their shared-pool usage this billing cycle. Team owners and billing members can read anyone; other members can read only themselves.","operationId":"poolCreditLimits.members.get","x-v0-mcp-tool":false,"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Team member user ID, or `me` for the authenticated user (for an API key, the user who created it)."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","enum":["pool_credit_limit_member"]},"userId":{"type":"string","description":"Team member user ID."},"setting":{"oneOf":[{"type":"object","properties":{"access":{"type":"string","enum":["unlimited"],"description":"The member may spend shared-pool credits without a cap."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["none"],"description":"The member may spend only their monthly credits."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["limited"],"description":"The member may spend up to `limit` of shared-pool credits per billing cycle."},"limit":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$","description":"USD amount per billing cycle, with up to two decimals."}},"required":["access","limit"],"additionalProperties":false}],"description":"How much of the shared credit pool a member may spend per billing cycle, after their monthly credits."},"source":{"type":"string","enum":["default","member"],"description":"`default` when the team default applies, `member` when the member has their own setting."},"usage":{"type":"object","properties":{"used":{"type":"string","description":"Shared-pool credits used since the billing cycle started, in USD."},"remaining":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Shared-pool credits the member may still use under their setting this billing cycle, in USD, or null when unlimited. The team pool’s balance may be lower."},"cycleStart":{"type":"string","description":"Start of the current billing cycle."},"cycleEnd":{"type":"string","description":"End of the current billing cycle."}},"required":["used","remaining","cycleStart","cycleEnd"],"additionalProperties":false}},"required":["object","userId","setting","source","usage"],"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Response for status 429","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Pool Credit Limits"],"summary":"Set Pool Credit Limit Member","description":"Gives a team member their own setting, in place of the team default. Team owners and billing members only.","operationId":"poolCreditLimits.members.set","x-v0-mcp-tool":false,"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Team member user ID, or `me` for the authenticated user (for an API key, the user who created it)."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"setting":{"oneOf":[{"type":"object","properties":{"access":{"type":"string","enum":["unlimited"],"description":"The member may spend shared-pool credits without a cap."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["none"],"description":"The member may spend only their monthly credits."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["limited"],"description":"The member may spend up to `limit` of shared-pool credits per billing cycle."},"limit":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$","description":"USD amount per billing cycle, with up to two decimals."}},"required":["access","limit"],"additionalProperties":false}],"description":"How much of the shared credit pool a member may spend per billing cycle, after their monthly credits."}},"required":["setting"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"setting":{"oneOf":[{"type":"object","properties":{"access":{"type":"string","enum":["unlimited"],"description":"The member may spend shared-pool credits without a cap."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["none"],"description":"The member may spend only their monthly credits."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["limited"],"description":"The member may spend up to `limit` of shared-pool credits per billing cycle."},"limit":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$","description":"USD amount per billing cycle, with up to two decimals."}},"required":["access","limit"],"additionalProperties":false}],"description":"How much of the shared credit pool a member may spend per billing cycle, after their monthly credits."}},"required":["setting"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"setting":{"oneOf":[{"type":"object","properties":{"access":{"type":"string","enum":["unlimited"],"description":"The member may spend shared-pool credits without a cap."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["none"],"description":"The member may spend only their monthly credits."}},"required":["access"],"additionalProperties":false},{"type":"object","properties":{"access":{"type":"string","enum":["limited"],"description":"The member may spend up to `limit` of shared-pool credits per billing cycle."},"limit":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$","description":"USD amount per billing cycle, with up to two decimals."}},"required":["access","limit"],"additionalProperties":false}],"description":"How much of the shared credit pool a member may spend per billing cycle, after their monthly credits."}},"required":["setting"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PoolCreditLimitMember"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Response for status 429","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Pool Credit Limits"],"summary":"Reset Pool Credit Limit Member","description":"Removes a team member’s own setting, so the team default applies. Team owners and billing members only.","operationId":"poolCreditLimits.members.reset","x-v0-mcp-tool":false,"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Team member user ID, or `me` for the authenticated user (for an API key, the user who created it)."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PoolCreditLimitMember"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Response for status 429","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/settings/preview-hosts":{"get":{"tags":["Settings"],"summary":"Get Trusted Preview Hosts","description":"Returns the hostname patterns trusted to embed previews for the current team.","operationId":"settings.getPreviewHosts","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrustedPreviewHosts"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Settings"],"summary":"Set Trusted Preview Hosts","description":"Sets the host patterns trusted to embed previews for a team.","operationId":"settings.setPreviewHosts","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"hosts":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":256},"description":"The complete list of exact or wildcard hostname patterns trusted to embed previews. Provide hostnames only, without a scheme, port, path, userinfo, query string, or fragment. Use *.example.com for exactly one subdomain label and **.example.com for one or more. Wildcards do not include example.com itself; add the apex as a separate entry when needed."}},"required":["hosts"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"hosts":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":256},"description":"The complete list of exact or wildcard hostname patterns trusted to embed previews. Provide hostnames only, without a scheme, port, path, userinfo, query string, or fragment. Use *.example.com for exactly one subdomain label and **.example.com for one or more. Wildcards do not include example.com itself; add the apex as a separate entry when needed."}},"required":["hosts"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"hosts":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":256},"description":"The complete list of exact or wildcard hostname patterns trusted to embed previews. Provide hostnames only, without a scheme, port, path, userinfo, query string, or fragment. Use *.example.com for exactly one subdomain label and **.example.com for one or more. Wildcards do not include example.com itself; add the apex as a separate entry when needed."}},"required":["hosts"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrustedPreviewHosts"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Settings"],"summary":"Append Trusted Preview Hosts","description":"Appends host patterns without replacing existing hosts. Returns 422 if any normalized pattern already exists or the resulting list exceeds 100 hosts. The entire request succeeds or fails together.","operationId":"settings.appendPreviewHosts","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"hosts":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","maxLength":256},"description":"Distinct hostname patterns to append. Provide hostnames only, without scheme, port, path, userinfo, query, or fragment. *.example.com matches one subdomain label; **.example.com matches one or more. Neither includes the apex. Patterns are canonicalized before comparison."}},"required":["hosts"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"hosts":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","maxLength":256},"description":"Distinct hostname patterns to append. Provide hostnames only, without scheme, port, path, userinfo, query, or fragment. *.example.com matches one subdomain label; **.example.com matches one or more. Neither includes the apex. Patterns are canonicalized before comparison."}},"required":["hosts"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"hosts":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","maxLength":256},"description":"Distinct hostname patterns to append. Provide hostnames only, without scheme, port, path, userinfo, query, or fragment. *.example.com matches one subdomain label; **.example.com matches one or more. Neither includes the apex. Patterns are canonicalized before comparison."}},"required":["hosts"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrustedPreviewHosts"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Settings"],"summary":"Delete Trusted Preview Hosts","description":"Deletes exact normalized host patterns. Returns 404 if any pattern is not configured. Wildcard coverage does not count as an exact match. The entire request succeeds or fails together.","operationId":"settings.deletePreviewHosts","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"hosts":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","maxLength":256},"description":"Distinct hostname patterns to delete. Provide hostnames only, without scheme, port, path, userinfo, query, or fragment. *.example.com matches one subdomain label; **.example.com matches one or more. Neither includes the apex. Patterns are canonicalized before comparison."}},"required":["hosts"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"hosts":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","maxLength":256},"description":"Distinct hostname patterns to delete. Provide hostnames only, without scheme, port, path, userinfo, query, or fragment. *.example.com matches one subdomain label; **.example.com matches one or more. Neither includes the apex. Patterns are canonicalized before comparison."}},"required":["hosts"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"hosts":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","maxLength":256},"description":"Distinct hostname patterns to delete. Provide hostnames only, without scheme, port, path, userinfo, query, or fragment. *.example.com matches one subdomain label; **.example.com matches one or more. Neither includes the apex. Patterns are canonicalized before comparison."}},"required":["hosts"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/usage/summary":{"get":{"tags":["Usage"],"summary":"Get Usage Summary","description":"Returns credit usage for the active billing scope. Team owners and billing members receive team-wide usage by default; other team members receive their own usage.","operationId":"usage.getSummary","parameters":[{"name":"start","in":"query","required":false,"schema":{"description":"Inclusive ISO 8601 start timestamp. Defaults to seven days ago.","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))$"}},{"name":"end","in":"query","required":false,"schema":{"description":"Exclusive ISO 8601 end timestamp. Defaults to the current time.","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))$"}},{"name":"userId","in":"query","required":false,"schema":{"description":"Filter usage by user. Team owners and billing members may select any team member; other callers may select only themselves.","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSummary"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Response for status 429","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/usage/events":{"get":{"tags":["Usage"],"summary":"List Usage Events","description":"Lists individual credit usage events. Each event includes the credits charged and, when available, associated token counts.","operationId":"usage.listEvents","parameters":[{"name":"start","in":"query","required":false,"schema":{"description":"Inclusive ISO 8601 start timestamp. Defaults to seven days ago.","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))$"}},{"name":"end","in":"query","required":false,"schema":{"description":"Exclusive ISO 8601 end timestamp. Defaults to the current time.","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))$"}},{"name":"userId","in":"query","required":false,"schema":{"description":"Filter usage by user. Team owners and billing members may select any team member; other callers may select only themselves.","type":"string"}},{"name":"chatId","in":"query","required":false,"schema":{"description":"Filter usage by chat identifier.","type":"string"}},{"name":"messageId","in":"query","required":false,"schema":{"description":"Filter usage by message identifier.","type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"Maximum billing records considered per credit source (1-100, default 50). Related records may be combined into one event.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor returned by the previous page. It preserves the prior range and filters, so other query parameters may be omitted on subsequent pages.","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageEventList"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/usage/activity":{"get":{"tags":["Usage"],"summary":"Get Usage Activity","description":"Returns chat and project activity for the active billing scope. Team owners and billing members receive team-wide activity by default; other team members receive their own activity.","operationId":"usage.getActivity","parameters":[{"name":"start","in":"query","required":false,"schema":{"description":"Inclusive ISO 8601 start timestamp. Defaults to seven days ago.","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))$"}},{"name":"end","in":"query","required":false,"schema":{"description":"Exclusive ISO 8601 end timestamp. Defaults to the current time.","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))$"}},{"name":"userId","in":"query","required":false,"schema":{"description":"Filter usage by user. Team owners and billing members may select any team member; other callers may select only themselves.","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageActivity"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Response for status 429","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/hooks":{"get":{"tags":["Webhooks"],"summary":"List Webhooks","description":"Retrieves a list of all webhooks in your workspace.","operationId":"webhooks.list","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the webhook."},"name":{"type":"string","description":"The name of the webhook."}},"required":["id","name"],"additionalProperties":false}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Webhooks"],"summary":"Create Webhook","description":"Creates a new webhook that listens for specific events. Supports optional association with a chat.","operationId":"webhooks.create","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","description":"A human-readable name for the webhook."},"events":{"type":"array","items":{"type":"string","enum":["chat.created","chat.updated","chat.deleted","message.created","message.updated","message.deleted","message.finished"],"description":"The event type that triggers a webhook. A webhook will be invoked whenever the specified lifecycle event occurs."},"description":"List of event types the webhook should subscribe to."},"url":{"type":"string","format":"uri","description":"The target URL to receive the webhook payloads."},"chatId":{"default":null,"description":"The ID of a chat to scope the webhook to.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","events","url","chatId"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","description":"A human-readable name for the webhook."},"events":{"type":"array","items":{"type":"string","enum":["chat.created","chat.updated","chat.deleted","message.created","message.updated","message.deleted","message.finished"],"description":"The event type that triggers a webhook. A webhook will be invoked whenever the specified lifecycle event occurs."},"description":"List of event types the webhook should subscribe to."},"url":{"type":"string","format":"uri","description":"The target URL to receive the webhook payloads."},"chatId":{"default":null,"description":"The ID of a chat to scope the webhook to.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","events","url","chatId"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","description":"A human-readable name for the webhook."},"events":{"type":"array","items":{"type":"string","enum":["chat.created","chat.updated","chat.deleted","message.created","message.updated","message.deleted","message.finished"],"description":"The event type that triggers a webhook. A webhook will be invoked whenever the specified lifecycle event occurs."},"description":"List of event types the webhook should subscribe to."},"url":{"type":"string","format":"uri","description":"The target URL to receive the webhook payloads."},"chatId":{"default":null,"description":"The ID of a chat to scope the webhook to.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","events","url","chatId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/hooks/{hookId}":{"get":{"tags":["Webhooks"],"summary":"Get Webhook","description":"Retrieves the details of a specific webhook using its ID.","operationId":"webhooks.get","parameters":[{"name":"hookId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the webhook to retrieve."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Webhooks"],"summary":"Update Webhook","description":"Updates the configuration of an existing webhook, including its name, event subscriptions, or target URL.","operationId":"webhooks.update","parameters":[{"name":"hookId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the webhook to update."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"description":"A new display name for the webhook.","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"],"description":"The event type that triggers a webhook. A webhook will be invoked whenever the specified lifecycle event occurs."}},"url":{"description":"A new target URL to receive webhook payloads.","type":"string","format":"uri"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"description":"A new display name for the webhook.","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"],"description":"The event type that triggers a webhook. A webhook will be invoked whenever the specified lifecycle event occurs."}},"url":{"description":"A new target URL to receive webhook payloads.","type":"string","format":"uri"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"description":"A new display name for the webhook.","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"],"description":"The event type that triggers a webhook. A webhook will be invoked whenever the specified lifecycle event occurs."}},"url":{"description":"A new target URL to receive webhook payloads.","type":"string","format":"uri"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete Webhook","description":"Deletes a webhook. This action is irreversible.","operationId":"webhooks.delete","parameters":[{"name":"hookId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The unique identifier of the webhook to delete."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"],"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"servers":[{"url":"https://api.v0.dev/v2"}]}