Store a conversation turn
One user + assistant exchange into short-term and long-term memory.
Request
- Base URL: https://api.wontopos.com
- URL: https://api.wontopos.com/api/v1/memory/store-turn
- Auth: API key in header X-API-Key
Headers
Which engine reads the memory (see GET /api/v1/models). All live models share one memory per workspace, so you can store with one and recall with another. A retired model answers 410 with error.type gone_error and error.code 0, except on DELETE /api/v1/memory/collection, which deletes the store under any model. Until then, a model scheduled to retire names the day in a Sunset header (RFC 8594) on every answer it serves, the same date GET /api/v1/models lists as retires_at.
Makes repeating THIS EXACT write safe. Accepted on the writes: store, store-turn, bulk-store, supersede, forget, POST and DELETE collection, POST and DELETE speakers, DELETE image; a read ignores it. The key is kept for 24 hours: a repeat gets the first 2xx response again, with Idempotent-Replayed: true, instead of storing again, and the same key with a different body answers 422. A repeat that arrives while the first request is still running answers 409 with retry_after_ms: wait, then send it again. Only a 2xx is kept, so a call that failed can be sent again at once, with one exception: when the first request did not come back with an answer, or the memory engine failed part-way through it, whether it was stored is not known, and a repeat answers 409 without retry_after_ms rather than risk storing it twice. Use it when the retry is yours: a job that died and was re-run, a queue that redelivers. Derive the key from the thing being stored ("import:row-42"), never a constant: reusing one key for two different writes replays the first and the second is silently lost.
Request body
Response
Success.
Changes
No recorded changes to this operation across all 1 revision of this API.