Skip to main content
Use Bearer authentication at https://convex.memorycrystal.ai. Upload bytes through POST /api/mcp/asset/upload; direct raw storageKey registration at /api/mcp/asset returns 410.

Upload

Send the file as the raw request body, not JSON or multipart form data. Repeated tag URL parameters are also accepted.
Curl supplies the byte length for this file body. A successful upload returns ok and id; a reused idempotency key can additionally return deduped: true. Text processing is scheduled after upload. One MiB is 1,048,576 bytes. Both declared and measured body sizes are checked. Missing length or an empty body returns 411; size/quota failures return 413; MIME mismatch returns 415; checksum mismatch returns 400.

Storage allowance

Account-specific overrides can apply. These byte allowances are distinct from the non-KB memory count allowance. A quota failure may return quotaBytes, usedBytes, and availableBytes.

Read and manage

The following POST routes accept required assetId and optional channel, knowledgeBaseIds, and peerScope for visibility.
Resolve the returned relative URL against the backend base URL and use GET /api/assets/{id}/read. The proxy still requires Bearer authentication and rechecks scope. It is not a public download link. An expired descriptor returns 410; request a new one. Non-Convex storage returns 409 from read-url and requires reupload into supported storage. Missing or hidden assets return 404. Retry returns 409 when the asset is not failed. A successful delete response does not promise immediate physical erasure of stored bytes.

Examples

The raw-byte upload command above returns this JSON on a new upload:
Retain that ID for the following requests. Metadata and extraction can become available after the upload response.

POST /api/mcp/asset/read-url

Request body:
HTTP response:
Use the newly returned URL, not the illustrative expired timestamp above:

Errors and common mistakes

Do not wrap the upload in JSON or multipart form data. Measure bytes, not characters, when supplying Content-Length for Unicode text. A matching MIME type and kind are required even if the filename has a familiar extension. Use the same idempotency key for a retry of the same upload, not as a permanent key for unrelated files. A successful upload does not guarantee extraction has finished. Inspect metadata before retrying failed processing; /asset/retry is only valid for a failed asset. Keep the same visibility context when requesting and using a read descriptor.