Step 1: get a signed Storage URL for a binary upload.
Three-step binary upload, step 1 of 3. The server validates the declared MIME + size against the appropriate bucket's allowlist (media-uploads for audio/video, document-uploads for PDF/image), generates a single-use signed URL the client PUTs bytes to directly, and returns the path + which finalize endpoint to call next. Vercel caps request bodies at 4.5 MB; this flow exists because direct-to-Storage upload bypasses that limit. Rate limit: 30/hr per token.
Three-step binary upload, step 1 of 3. The server validates the declared MIME + size against the appropriate bucket's allowlist (media-uploads for audio/video, document-uploads for PDF/image), generates a single-use signed URL the client PUTs bytes to directly, and returns the path + which finalize endpoint to call next. Vercel caps request bodies at 4.5 MB; this flow exists because direct-to-Storage upload bypasses that limit. Rate limit: 30/hr per token.
Authorization
bearerAuth Per-user bearer token minted at /settings/integrations. Format: 'lev_' followed by 32 base64url chars. Each token carries a capability set (read | write) and a folder scope (whole library or a list of specific folders). Per-endpoint requirements are noted on each operation.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/uploads/signed-url" \ -H "Content-Type: application/json" \ -d '{ "mime": "audio/mpeg", "size": 1 }'{
"bucket": "media-uploads",
"path": "string",
"token": "string",
"signed_url": "http://example.com",
"mime": "string",
"kind": "audio",
"extension": "mp3",
"max_bytes": 0,
"finalize_endpoint": "/api/v1/uploads/finalize"
}{
"error": "string",
"message": "string"
}{
"error": "string",
"message": "string"
}{
"error": "string",
"message": "string"
}{
"error": "string",
"message": "string"
}{
"error": "rate_limited",
"retry_after_sec": 0
}{
"error": "string",
"message": "string"
}Add content to the caller's knowledge base. POST
Ingest a URL or raw text snippet. Requires the 'write' capability on the bearer token. Per-token rate limit: 60/hr. Counts against monthly transcription quota for paid-transcription paths (audio URLs, YouTube videos, audio/video uploads).
Step 2: PUT the file bytes to Storage
Direct PUT from the client to the signed Supabase Storage URL returned by Step 1. Not a Graniite endpoint — the binary never traverses our application servers.