Responses
Post Responses Endpoint
Handle POST /v1/responses - with history reconstruction and storage.
If previous_response_id is provided, reconstructs the conversation history and includes it in the request to the backend. Stores the request-response pair for future history reconstruction.
Instructions resolution priority:
- prompt.id (render template with variables)
- explicit instructions field
- inherited from previous_response_id
- default_system_prompt from config
Supports both streaming (stream=true) and non-streaming modes. Supports background mode (background=true) returning 202.
post/v1/responses
Request
- Base URLhttps://api.pharia.example.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Response
When stream=false (default), returns a JSON response. When stream=true, returns Server-Sent Events.
Changes
No recorded changes to this operation across all 1 revision of this API.