Initialize Chat
Initializes a new chat from source content such as files, repositories, registries, or zip archives. Enables context-rich conversations based on code or assets.
Usage
API Signature
Request
Body
A user-defined name for the chat. Helps identify or describe the purpose of the chat session in the UI or API responses.
Controls the visibility of the chat. Defines whether the chat is private, shared with a team, or publicly accessible.
Associates the chat with a specific project. Useful for organizing and grouping chats in a workspace.
Specifies the initialization method. For this endpoint, it defines the source of content being used to initialize the chat.
An array of inline file objects used to initialize the chat. Each object must contain a file name
and its content
.
Whether to lock this file to prevent AI from overwriting it during generation
Specifies a repository source for initialization. Supports both public and private GitHub repositories. For private repositories, ensure your GitHub account is connected through Vercel.
Whether to lock all files from the zip archive to prevent AI from overwriting them during generation
Allows initialization from a predefined component or code registry. Includes the registry source and identifier for the desired component/module.
Provides a zipped bundle of files as the input source. Typically includes a base64-encoded archive or a remote URL reference.
The ID of the template to initialize the chat from. This should be a valid template ID from the v0 template system.
Response
A unique identifier for the chat.
Fixed value identifying this object as a chat.
Indicates whether the chat can be shared via public link.
Defines the visibility of the chat—private, team-only, or public.
An optional name assigned to the chat by the user.
Deprecated title field preserved for backward compatibility.
The ISO timestamp representing when the chat was created.
The ISO timestamp of the last update to the chat.
Indicates whether the chat is marked as a favorite.
The ID of the user who created the chat.
Optional ID of the v0 project associated with this chat.
Web URL to view this chat in the browser.
API URL to access this chat via the API.
Full details of the most recent generated version, if available.
A unique identifier for the version.
Fixed value identifying this object as a version.
The current status of the version generation process.
Optional URL for previewing the generated output.
The date and time when the version was created, in ISO 8601 format.
The date and time when the version was last updated, in ISO 8601 format.
A list of files that were generated or included in this version.
The canonical URL to access this chat.
All messages exchanged in the chat, including user and assistant entries.
A unique identifier for the message.
Fixed value identifying this object as a message.
The main text content of the message.
The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change.
The ISO timestamp representing when the message was created.
The ISO timestamp representing when the message was last updated.
Indicates the format or category of the message, such as plain text or code.
Specifies whether the message was sent by the user or the assistant.
The reason why the message generation finished.
API URL to access this message via the API.
The ID of the parent message.
Optional array of files associated with the chat context.
Programming language used in the file (e.g., JavaScript, Python).
A key-value map of metadata associated with the file (e.g., path, type).
The origin or identifier of the file source (e.g., path or upload label).
Deprecated demo URL used for previewing the chat result.
The main user prompt or instruction that started the chat.
The configuration used to generate responses in this chat.
Deprecated Model ID field preserved for backward compatibility.
Enables image generations to generate up to 5 images per version.
Enables thinking to generate a response in multiple steps.
If true, the user has write access to the chat.