Skip to main content
POST
Get Upload URL
Use this API to mint a short-lived signed URL for uploading a file up to 30 MB. Use it for the by-reference ingestion flow: get the URL, PUT the raw file bytes to it with a Content-Type header matching the mimeType you sent, then pass the returned fileRef to Ingest Knowledge.

Endpoint

POST https://api.velt.dev/v2/memory/knowledge/upload-url Rate limit: 100 requests per minute per API key.

Headers

string
required
Your API key.
string
required

Body

Params

object
required
A workspace can hold at most 50 outstanding upload URLs. Past that, this call returns RESOURCE_EXHAUSTED. Each URL holds a slot until you ingest its fileRef, so request URLs only for files you are about to upload. This endpoint also rejects unrecognized fields, so a misspelled key returns INVALID_ARGUMENT.

Example Requests

Request an upload URL for a PDF

Response

Upload the raw file bytes to uploadUrl with an HTTP PUT. Set the Content-Type header to the same mimeType you passed to this endpoint. The signed URL is bound to that value, so a PUT with a missing or different Content-Type is rejected before it reaches Velt. Then pass fileRef to Ingest Knowledge, repeating the same organizationId and documentId you sent here. A scope mismatch returns PERMISSION_DENIED. The URL expires at expiresAt (epoch ms), 15 minutes after it is minted.

Success Response

Failure Response