Skip to main content
Chats in the Workspace API are organized around threads and interactions: Use threads when you want history and follow‑ups. Use interactions to send a new turn into a thread. Use the chat endpoint for single‑turn requests.

Basic request and response

Create a thread interaction with POST /api/v1/app/thread/{threadId}/interaction.

Adding media to the chat

If the selected model supports multimodal input, you can send media in pgpt.messages[].content[] (the same request shape used by both thread interactions and one-shot chat). You can mix multiple content blocks in one message. Supported block types in the schema: start_timestamp, stop_timestamp, and _meta are optional on all blocks.
Example interaction request with image + text and runtime flags:
  • system.citations.enabled: asks the model to include citation references when available.
  • thinking.enabled: enables deep thinking mode; responses can take longer but are typically better reasoned.

Create or list threads

Create a new thread in a project:
List threads in a project:
Create a thread and first interaction in one request:

Update or delete a thread

Delete a thread:

List or fetch interactions

List interactions for a thread:
Fetch a specific interaction:

Delete or stream an interaction

Cancel a running interaction:
Delete an interaction:
Stream interaction output:

One‑shot chat

If you don’t need a thread, call the chat endpoint directly:

Validate a chat request

Available tools

Pass tools in pgpt.tools as { "name": "...", "type": "..." }.

Errors and edge cases

  • 400: invalid message schema (use /chat/validate).
  • 404: thread or interaction not found.
  • 409: interaction already completed when canceling.