---
title: Download version files
description: Download all files for a specific chat version as a zip or tarball archive. Use includeDefaultFiles=true to include all deployment files (package.json, configuration files, etc.) or false/omitted to return only the generated source files.
docs_index: /docs/llms.txt
lastUpdated: 2026-10-10
product: v0 API
type: reference
prerequisites:
  - /docs/api/v1/quickstart
---

> For an index of all documentation, see [/docs/llms.txt](/docs/llms.txt).

#### `GET/v1/chats/{chatId}/versions/{versionId}/download`

## Usage

```typescript
import { v0 } from 'v0-sdk'

const result = await v0.chats.downloadVersion({
  chatId: '123',
  versionId: '456',
})

console.log(result)
```

```bash
curl -X GET "https://api.v0.dev/v1/chats/123/versions/456/download"   -H "Authorization: Bearer $V0_API_KEY"   -o "version-files.zip"
```

## API Signature

### Request

#### Path Parameters

- `chatId: string` The unique identifier of the chat containing the version. Provided as a path parameter.
- `versionId: string` The unique identifier of the version to download. Provided as a path parameter.

#### Query Parameters

- `format?: 'zip' | 'tarball'` The archive format for the download. Choose "zip" for broad compatibility or "tarball" for Unix/Linux systems.
- `includeDefaultFiles?: 'true' | 'false'` When true, includes all default files (package.json, configuration files, etc.) that would be part of a complete deployment. When false or omitted, returns only the generated source files.

---

For a semantic overview of all documentation, see [/docs/sitemap.md](/docs/sitemap.md)

For an index of all available documentation, see [/docs/llms.txt](/docs/llms.txt)

For agent-facing discovery, including API and MCP surfaces, see [/docs/agents.md](/docs/agents.md)