Vercel
API ReferenceChats

Get Preview URL

Returns the preview URL for a chat. If the preview isn't ready, the response is null. Poll this endpoint until the response is non-null.

GET/v2/chats/{chatId}/preview

Usage

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

API Signature

Request

Path Parameters

chatId: string

The unique identifier of the chat.

Response

url: string

The preview URL for this chat.

token: string

A short-lived token for accessing the preview URL via the x-v0-preview-token header.

expiresAt: string

The ISO timestamp when token expires.

On this page