Skip to content
Skip to Content
DevelopersAPI referenceAssets

Delete one of an item's files

DELETE
/v1/items/{id}/assets/{assetId}

Thumbnails cannot be deleted.

Authorization

bearer
headerAuthorizationBearer <token>

A personal API key (ga_…), sent as Authorization: Bearer ga_…. A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Path Parameters

id*string
assetId*string

Response Body

Deleted

Example Request
curl -X DELETE 'https://example.com/v1/items/string/assets/string'
Example Response
Empty

Delete one of the user's stored files DELETE

Deletes the file and frees its storage, whatever item it belongs to. Thumbnails cannot be deleted (422): they are replaced or removed with their item. API keys need `write` on `assets`.

Ask a question about your saved items POST

Ask questions about the caller's own saved items. By default each request is stateless: send the conversation so far (at most 20 messages of up to 4000 characters, ending with a user message) and get the next answer. **Chat memory** (only when the server runs with `CHAT_MEMORY=true`; the answer then carries `conversation_id`). The first turn starts a saved conversation. Send its `conversation_id` with later turns and only the new user message: the server uses the stored messages as the history and ignores any earlier ones sent. A conversation lasts one day from its first message, then it can no longer be read or continued (404 `chat.conversation_not_found`) and is deleted. It holds at most 100 messages (409 `chat.conversation_full`). Each turn turns the latest message into a search query, searches the caller's items (never other people's, not even items shared with them), and answers only from the best matches, citing them as `[n]`. The answer comes back with the sources it cites. A turn uses two model calls from the daily AI allowance (one when nothing matches). Errors: 503 when the server has no AI model, 429 when today's allowance (it resets at midnight UTC) or the hourly chat limit is used up, and 502 when the model fails or returns something unusable. Saved pages are untrusted text, and the model gets them as data only. **Streaming.** Send `Accept: text/event-stream` to get the turn as server-sent events instead of one JSON body: - `query` once, `{"query": "..."}`: the search being run, as soon as it is known. - `delta` any number of times, `{"text": "..."}`: the next piece of the answer. Citations to items that do not exist are already removed, and a half-written `[12` is held back until it is checked. - `done` last, with the same `ChatAnswer` body as the JSON response. Replace the streamed text with its `answer`: it is trimmed and length-capped, so it can differ slightly from the joined pieces. - `error` instead of `done` if the turn fails after events began: `{"error": {"status": 502, "type": "upstream_error", "message": "..."}}`. Pieces already shown were real answer text, but the answer is incomplete. Anything refused before the first event (validation, plan, allowance, rate limit, AI off) is the usual JSON error with its status code. The cost and limits are the same as a plain turn.