Vercel
API ReferenceMessages

Resolve Task

Resolves a pending task in a chat, continuing the conversation. The latest message in the active chat fork must be an assistant message currently blocked on a matching task (integration setup, plan approval, question answers, or permission grants). Blocks until the model response is complete and returns the resulting message.

v2 of the v0 API is currently in beta and not yet ready for production. There may be breaking changes.
POST/v2/chats/{chatId}/messages/resolve

Usage

TypeScript Example
import { v0 } from 'v0'const result = await v0.messages.resolve({  chatId: 'chat_abc123',  task: 'confirmed-steps',})console.log(result)

API Signature

Request

Path Parameters

chatId: string

The unique identifier of the chat.

Request Body

task: 'confirmed-steps' | 'plan-exit-response' | 'answered-questions' | 'confirmed-permissions'

The task resolution data. The latest message in the active chat fork must be an assistant message blocked on the matching task type.

modelConfiguration?: object

Overrides for the model behavior.

modelId: 'v0-auto' | 'v0-mini' | 'v0-pro' | 'v0-max' | 'v0-max-fast'

Model to use for the generation.

imageGenerations: boolean

Enables image generations to generate up to 5 images per version.

Response

id: string

Unique message identifier.

chatId: string

ID of the chat this message belongs to.

role: 'user' | 'assistant'

Who produced this message.

createdAt: string

ISO timestamp when the message was created.

updatedAt: string

ISO timestamp when the message was last updated.

content: string

The trailing prose of the message — the agent’s closing summary, or the user’s message text. Empty string when there is no closing prose.

parts: ('text' | 'thinking' | 'file-read' | 'file-edit' | 'search' | 'bash' | 'tool-call' | 'agent-action')[]

Ordered list of parts that make up the message. Iterate to render the full narrative including thinking, file operations, tool calls, and prose.

type: 'text'

A block of text output by the agent.

text: string

Markdown prose written by the agent or user.

startedAt?: string

ISO timestamp when this part began.

finishedAt?: string

ISO timestamp when this part completed.

finishReason: 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other' | null

Why generation ended. Null while the agent is still generating; once non-null, the message is final and safe to consume.

attachments?: object[]

Files attached to this message.

url: string

URL to the attachment.

name?: string

Original filename, when available.

contentType?: string

MIME type.

size?: integer

Size in bytes.

authorId: string | null

ID of the user who authored a user message; null for assistant messages.

usage: object

Token usage and credit cost. All values are zero on user messages and on assistant messages that have not yet generated tokens.

tokens: object

Token counts for this message.

input: number

Prompt input value (non-cached).

output: number

Completion output value.

cacheRead: number

Cache-read input value.

cacheWrite: number

Cache-write input value.

total: number

Sum of input, output, cacheRead, and cacheWrite.

creditsCost: object

Credit cost for this message.

input: number

Prompt input value (non-cached).

output: number

Completion output value.

cacheRead: number

Cache-read input value.

cacheWrite: number

Cache-write input value.

total: number

Sum of input, output, cacheRead, and cacheWrite.

On this page