library-curator
Reuse assets that already live in the user's OD Library — images captured with the OD Clipper, manual uploads, agent-generated media, and design-system material — without asking the user to re-upload them.
When to use
- The user references an asset they already have ("the screenshot I clipped", "my logo", "that hero image from earlier").
- You need an image for the page you're building and the user prefers their own library over freshly generated media.
Tools (tool-token track)
Both endpoints authenticate with the run's tool token (OD_TOOL_TOKEN, injected
by the daemon) and operate on the project the run belongs to.
Search
POST /api/tools/library/search
{ "query": "blue hero background", "kind": "image", "limit": 20 }
Returns { "results": [{ "asset": { "id": "...", "kind": "image", "sourceTitle": "...", "width": 1600, "height": 900, "sources": [...] }, "score": 0 }], "semantic": false }.
semantic: false means keyword/metadata matching (no embedding model
configured). Filter and rank the results yourself from the asset metadata.
Apply
POST /api/tools/library/apply
{ "assetId": "<id from search>", "dir": "…