Send Message
Creates a new message in an existing chat. Triggers a model response using the provided prompt, with optional attachments and configuration settings.
Usage
API Signature
Request
Path Parameters
The unique identifier of the chat to send the message to. Provided as a path parameter.
Body
The prompt or instruction to send to the model as part of the chat.
A list of files or assets to include with the message.
Overrides for the model behavior.
Deprecated Model ID field preserved for backward compatibility.
Enables image generations to generate up to 5 images per version.
Enables thinking to generate a response in multiple steps.
Controls how the response is delivered.
"sync"
: The response is returned immediately with the HTTP request."async"
: Returns a message placeholder immediately; use getById to poll for completion status and final output."experimental_stream"
: Returns content parts as Server-Sent Events for real-time streaming.
Response
A unique identifier for the chat.
Fixed value identifying this object as a chat.
Indicates whether the chat can be shared via public link.
Defines the visibility of the chat—private, team-only, or public.
An optional name assigned to the chat by the user.
Deprecated title field preserved for backward compatibility.
The ISO timestamp representing when the chat was created.
The ISO timestamp of the last update to the chat.
Indicates whether the chat is marked as a favorite.
The ID of the user who created the chat.
Optional ID of the v0 project associated with this chat.
Web URL to view this chat in the browser.
API URL to access this chat via the API.
Full details of the most recent generated version, if available.
A unique identifier for the version.
Fixed value identifying this object as a version.
The current status of the version generation process.
Optional URL for previewing the generated output.
The date and time when the version was created, in ISO 8601 format.
The date and time when the version was last updated, in ISO 8601 format.
A list of files that were generated or included in this version.
The canonical URL to access this chat.
All messages exchanged in the chat, including user and assistant entries.
A unique identifier for the message.
Fixed value identifying this object as a message.
The main text content of the message.
The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change.
The ISO timestamp representing when the message was created.
The ISO timestamp representing when the message was last updated.
Indicates the format or category of the message, such as plain text or code.
Specifies whether the message was sent by the user or the assistant.
The reason why the message generation finished.
API URL to access this message via the API.
The ID of the parent message.
Optional array of files associated with the chat context.
Programming language used in the file (e.g., JavaScript, Python).
A key-value map of metadata associated with the file (e.g., path, type).
The origin or identifier of the file source (e.g., path or upload label).
Deprecated demo URL used for previewing the chat result.
The main user prompt or instruction that started the chat.
The configuration used to generate responses in this chat.
Deprecated Model ID field preserved for backward compatibility.
Enables image generations to generate up to 5 images per version.
Enables thinking to generate a response in multiple steps.
If true, the user has write access to the chat.
Fork Chat
Creates a new chat fork from a specific version within an existing chat. Useful for branching off alternate directions without modifying the original conversation.
Find Chat Messages
Retrieves a list of all messages for a specific chat, ordered by creation date (newest first). Supports cursor-based pagination and includes message content, role, and type information.