Responses
Post Compact Endpoint
Handle POST /v1/responses/compact.
Loads the chain anchored at previous_response_id, asks the inference backend (via the same scheduler used by /v1/responses) to summarise it using the fixed summarisation prompt, persists the result via CompactionPort, and returns the synthetic CompactedResponse.
Per the ADR: 404 on ownership/missing, 413 on > 10 MiB output, 502/504 on backend failure, 501 when compaction storage is not configured. target_size_pct is resolved here from ContextConfig so the domain service stays free of application-layer imports.
post/v1/responses/compact
Request
- Base URLhttps://api.pharia.example.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.