Create Chat From Vercel Project With Message (Async)
Creates a new chat from an existing Vercel project and processes a first message in the background. Returns immediately with the chat ID and message ID. Poll for the assistant message by ID until finishReason is non-null. If the chat is created but the message cannot be sent, the error names the chat; retry with messages.sendAsync instead of creating another chat.
Usage
import { v0 } from 'v0'const result = await v0.chats.createFromVercelProjectWithMessageAsync({ vercelProjectId: 'prj_abcdefghijklmnopqrstuvwxyz12', message: 'Hello, world!',})console.log(result)API Signature
Request
Request Body
Vercel project ID in the active user or team scope.
- Minimum length:
- 32
- Maximum length:
- 32
Base branch for a GitHub-linked project. Defaults to the repository default branch. Ignored for projects without a GitHub link.
- Minimum length:
- 1
- Maximum length:
- 250
Visibility setting for the new chat.
Title for the new chat.
Arbitrary key-value data to attach to the chat.
The prompt or instruction to send to the model.
- Minimum length:
- 1
Overrides for the model behavior.
Model to use for the generation. Use a v0 model ID, or an model ID in creator/model format. Gateway models must support tool calling and Zero Data Retention, and are subject to team model policy; unsupported IDs are rejected.
Enables image generations to generate up to 5 images per version.
Response
Unique chat identifier.
ID of the assistant message that will receive the response. Poll this message by ID and check its finishReason field to detect completion.