Delete Chat Version Files
Deletes source files from a specific chat version (block). Files are removed from the version and a new source version is created.
Usage
import { v0 } from 'v0-sdk'const result = await v0.chats.deleteVersionFiles({ chatId: 'chat_abc123', versionId: 'version_xyz789', filePaths: ['components/old-component.tsx', 'lib/unused-utils.ts'],})console.log(result)API Signature
Request
Path Parameters
The unique identifier of the chat containing the version to delete files from.
The unique identifier of the version (block) to delete files from.
Body
Array of file paths to delete (e.g., ["components/test.tsx", "lib/utils.ts"]). Must contain at least one file path.
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.
An authenticated URL to retrieve a screenshot of this version. Fetching this URL requires the same Authorization: Bearer header as all other API calls — it cannot be used directly as an <img> src. To display it in a browser, proxy the request server-side and forward the Authorization header. Append ?ignoreCache=1 to bypass the one-week screenshot cache.
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 remain in this version after deletion.
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.