OpenCode icon

OpenCode

Interact with OpenCode Server API for AI coding assistant sessions

Message → Get

AI-generated

Summary

Retrieve a message from an OpenCode session by ID

Inputs

  • sessionId (required) — Select a session
  • targetMessageId (required) — The ID of the message to retrieve

Output shape

json

The full API response returned for the requested message, containing message data and metadata as provided by the OpenCode server.

Links

Discussion