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 withPOST /api/v1/app/thread/{threadId}/interaction.
Endpoint parameters
Endpoint parameters
Example response (InteractionDTO)
Example response (InteractionDTO)
Adding media to the chat
If the selected model supports multimodal input, you can send media inpgpt.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 content blocks
Example content blocks
Endpoint parameters
Endpoint parameters
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:Endpoint parameters
Endpoint parameters
Endpoint parameters
Endpoint parameters
Example response (schema not defined in OpenAPI)
Example response (schema not defined in OpenAPI)
Endpoint parameters
Endpoint parameters
Update or delete a thread
List or fetch interactions
List interactions for a thread:Endpoint parameters
Endpoint parameters
Delete or stream an interaction
Cancel a running interaction:Example stream
Example stream
One‑shot chat
If you don’t need a thread, call the chat endpoint directly:Example response (schema not defined in OpenAPI)
Example response (schema not defined in OpenAPI)
Validate a chat request
Available tools
Pass tools inpgpt.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.