Cache developers
Docs
Base address https://developers.cacheanything.com · send Authorization: Bearer cache_sk_… · JSON in, JSON out.
GET /v1/me
The key in use: its name, level and limits
GET /v1/projects
Your projects
GET /v1/projects/{id}/saves
A project's saves, newest first
id(path, required) The project's idlimit(query)cursor(query) next_cursor from the previous page
GET /v1/saves/{id}
One save, with its text and projects
id(path, required) The save's id
GET /v1/search
The most relevant pieces of your saves for a question (your AI writes the answer)
q(query, required)project_id(query)limit(query)
POST /v1/saves
Save a link or a note (needs an add key)
Idempotency-Key(header) Send the same value again within a day to get the first answer back instead of saving twice
{"url": "https://…", "title": "optional", "project_id": "optional"}
{"text": "a note", "title": "optional", "project_id": "optional"}POST /v1/saves/{id}/projects
Add an existing save to a project (needs a read, add and organise key)
id(path, required) The save's id
{"project_id": "…"}Paging
Lists take limit (1–100, default 25). When there is more, the reply has next_cursor: send it back as cursor for the next page.
Retries
On POST /v1/saves, send Idempotency-Key: <your id>. The same key and id within a day returns the first answer (with Idempotent-Replay: true) and saves nothing new.
Errors
Every error looks like {"error": {"code": "…", "message": "…"}}.
- 400
bad_requestSomething in the request is missing or wrong; the message says what. - 401
unauthorizedNo key, a wrong key, or a revoked key. - 403
forbidden_levelThe key can't do this: saving needs read and add; adding a save to a project needs read, add and organise. - 404
not_foundNo project or save with that id for this key. - 429
rate_limited / daily_limitOver a limit. Wait the Retry-After seconds. - 502
failedCache couldn't do it just now. Try again in a minute.