API ReferenceMessages
Stop Message
Stops an in-flight assistant message generation. The agent aborts at the next safe point and the message is marked finished.
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/{messageId}/stop
Usage
TypeScript Example
import { v0 } from 'v0'const result = await v0.messages.stop({ chatId: 'chat_abc123', messageId: 'msg_xyz789',})console.log(result)API Signature
Request
Path Parameters
chatId: string
The unique identifier of the chat.
messageId: string
The unique identifier of the assistant message to stop.
Response
success: 'true'
Always true when the stop signal was successfully sent.
Send Message (Streaming)
Sends a new message to an existing chat and returns a Server-Sent Events stream. Events include the initial assistant-message snapshot, content chunk deltas, final usage, and a closing message snapshot. The response is `text/event-stream`; each event is `data: <JSON>\n\n` where the JSON conforms to MessageStreamEvent.
Create Webhook
Creates a new webhook that listens for specific events. Supports optional association with a chat.