API reference

Agent API

The public, pay-per-request surface. Machine-readable spec at /openapi.json. See the x402 walkthrough for the payment flow.

EndpointSummaryNotes
POST /agent/v1/searchSearch an ephemeral private indexSemantic, cross-modal (text→image), or reverse-image search. $0.006 per call.
POST /agent/v1/ingestIngest a file ($0.03)multipart/form-data upload into the payer's ephemeral index.
GET /agent/v1/items/{item_id}Fetch item metadata ($0.002)
POST /agent/v1/workspacesCreate a workspace (pays for container time)An isolated sandbox decoupled from your wallet — its own capability token, TTL, spend limit, files, and search history. One wallet can run many. Pricing is per-container-minute (base + per-minute); ingest/search are included for the window. Body: {ttl_minutes, spend_limit_usd?}. The 201 returns a capability_token shown ONCE — send it as `Authorization: Bearer ` on this workspace's calls.
POST /agent/v1/workspaces/{id}/searchSearch within a workspace (capability token; included)Semantic, cross-modal, or reverse-image search over this workspace's index. Body accepts `query`, `families`, and `image_b64` (reverse image). Auth: Bearer capability token.
POST /agent/v1/workspaces/{id}/ingestIngest a document into a workspace (capability token; included)
GET /agent/v1/workspaces/{id}/usageWorkspace usage: TTL left, spend, searches, ingests
POST /agent/v1/workspaces/{id}/extendBuy more container time (x402; bounded by spend limit)
DELETE /agent/v1/workspaces/{id}Dispose a workspace; returns a signed disposal receipt