Restore Chat Version
Restores a chat to a specific version in-place. Unlike forking, this keeps the same chat ID and creates a new version entry pointing to the restored files.
Usage
import { v0 } from 'v0-sdk'const result = await v0.chats.restoreVersion({ chatId: '123', versionId: 'abc',})console.log(result)API Signature
Request
Path Parameters
The unique identifier of the chat containing the version to restore. Provided as a path parameter.
The unique identifier of the version to restore. Provided as a path parameter.
Response
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.
URL to retrieve a screenshot of this version.
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.
Fixed value identifying this object as a file.
The name of the file, including its extension.
The full contents of the file as a raw string.
Whether the file is locked to prevent AI from overwriting it during new version generation.
Fork Chat
Creates a new chat fork (duplicate) from a specific version within an existing chat. Useful for branching off alternate directions without modifying the original conversation.
Send Message
Creates a new message in an existing chat. Triggers a model response using the provided prompt, with optional attachments and configuration settings.