Skip to main content

Endpoint

Overview

This endpoint generates a short-lived Vercel Blob client token for direct uploads. Upload the file with the returned pathname and clientToken, then call /media/create to register the uploaded blob as media in your organization. Upload flow:
  1. Call /media/create/url with the filename and optional MIME type
  2. Upload the file directly to Vercel Blob using put(pathname, file, { token: clientToken })
  3. Call /media/create with the uploaded blob URL to create the media record

Request Body

string
required
Original filename. The API prefixes the stored path with your organization ID and adds a random suffix to avoid collisions.
string
Optional MIME type (for example image/jpeg or video/mp4). When omitted, the token allows image, video, and audio uploads.

Response

UploadTokenResponse
Upload token payload

TypeScript