API ReferenceChats

Download Artifact

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.

GET/v2/chats/{chatId}/artifacts/{artifactId}

Usage

TypeScript Example
import { v0 } from 'v0'const result = await v0.chats.downloadArtifact({  chatId: 'chat_abc123',  artifactId: 'id_abc123',})console.log(result)

API Signature

Request

Path Parameters

chatId: string

The unique identifier of the chat.

Minimum length:
1
artifactId: string

The artifactId from a show_artifact message part.

Minimum length:
1
Maximum length:
64