HTTP API

Every endpoint, one base URL.

No SDK required - any HTTP client works. Base URL https://api.wontopos.com, auth via the X-API-Key header, JSON in and out. Memory ops are POST; managing stores uses POST / GET / DELETE on /collection. A store must exist first (see Stores) or in-store ops return 404.

Headers

HeaderWhat it does
X-API-KeyRequired on every call. Your key, issued in the console.
X-WOS-ModelOptional. Which engine answers. Omit it and the account default is used. GET /api/v1/models lists the models your key may select; an endpoint an older engine cannot serve answers 501 and names that model.
Idempotency-KeyOptional, on writes. The same key with the same body replays the first response instead of storing again - see the note below.

Endpoint

EndpointPurposeBody fields
POST /api/v1/memory/collectioncreate a storeuser_id
GET /api/v1/memory/collectionslist your stores(none)
DELETE /api/v1/memory/collectiondelete a store + its memoriesuser_id
/api/v1/memory/storestore one memoryuser_id · content · metadata? (event_date · speaker) · image?
/api/v1/memory/store-turnstore a conversation turnuser_id · user_msg · assistant_msg
POST /api/v1/memory/speakersregister a speaker (explicit, up to 50)user_id · speaker
GET /api/v1/memory/speakerslist registered speakers + memory countsuser_id
DELETE /api/v1/memory/speakersunregister a speaker (memories stay)user_id · speaker
/api/v1/memory/by-speakerwhat one person said, newest first ("me" = the agent)user_id · speaker · limit? · before? · skip_ids?
POST /api/v1/memory/imagethe picture we hold for an image memory - not your originaluser_id · memory_id
DELETE /api/v1/memory/imageremove the image, keep the captionuser_id · memory_id · preview?
/api/v1/memory/imagesa store's images, newest first (+ the store total)user_id · limit? · before? · skip_ids?
/api/v1/memory/lineageone memory's chain of edits, oldest firstuser_id · memory_id
GET /api/v1/won/usageWhat this key has spent and what is left — so a model can decide whether to keep going. Free.days?
GET /api/v1/memory/usageWhat this key has spent and what is left — so a model can decide whether to keep going. Free.days?
/api/v1/won/revisionshow much of a store has been rewritten. Freeuser_id · include? · limit? · before? · skip_ids?
/api/v1/memory/revisionsthe same call under the memory plane. Freeuser_id · include? · limit? · before? · skip_ids?
/api/v1/memory/bulk-storebackfill a text blobuser_id · content · category? · timestamp?
/api/v1/memory/searchsemantic searchuser_id · query · max_results? · speaker? · cache_control? · filters? · verify? · max_images?
/api/v1/memory/recallshort + long + contextuser_id · query · limit? · context_limit?
/api/v1/memory/getone memory by iduser_id · memory_id
/api/v1/memory/listpage through a storeuser_id · limit? · cursor?
/api/v1/memory/historyrecent turnsuser_id
/api/v1/memory/statsmemory countsuser_id
/api/v1/memory/supersedereplace a changed factuser_id · old_memory_id · new_content
/api/v1/memory/forgetdelete one (or all)user_id · memory_id? (omit = delete all)
GET /api/v1/engramengrams this model can run(none)
POST /api/v1/engram/runrun one engramname · user_id · query · form? · tz?
GET /api/v1/modelsavailable models(none)
Writes accept an Idempotency-Key header. Send the same key with the same body and the first response is replayed instead of storing again (10 minutes); the same key with a different body answers 422. Only 2xx are cached, so a failed call is retryable at once.
# create the store once (stores are explicit)
curl -X POST https://api.wontopos.com/api/v1/memory/collection \
  -H "X-API-Key: $WOS_API_KEY" -H "Content-Type: application/json" \
  -d '{"user_id":"alice"}'

# store a memory
curl -X POST https://api.wontopos.com/api/v1/memory/store \
  -H "X-API-Key: $WOS_API_KEY" -H "Content-Type: application/json" \
  -d '{"user_id":"alice","content":"she prefers tea over coffee"}'

# recall - one call, ready for your prompt
curl -X POST https://api.wontopos.com/api/v1/memory/recall \
  -H "X-API-Key: $WOS_API_KEY" -H "Content-Type: application/json" \
  -d '{"user_id":"alice","query":"what does alice drink?"}'
Actual response - store
{"id": "576700aa-f0e0-4c26-99a0-10e2d5b0d624", "status": "stored (1 chunks)"}