UploadKit
API Reference

REST API Overview

UploadKit REST API — base URL, authentication, response format, rate limiting, and pagination.

The UploadKit REST API gives backend developers and non-JavaScript consumers direct access to the upload flow, file management, project administration, and webhook configuration — all without the SDK.

Base URL

https://api.uploadkit.dev/api/v1

All requests must be made over HTTPS. HTTP requests are rejected.

Authentication

Every request requires an API key passed in the x-api-key header:

curl https://api.uploadkit.dev/api/v1/files \
  -H "x-api-key: uk_live_xxxxxxxxxxxxxxxxxxxxx"

API keys come in two forms:

PrefixPurpose
uk_live_Production — creates real files, counts against quota
uk_test_Test mode — isolated sandbox, no quota impact

See Authentication for full details on key types and security.

Response Format

All responses are JSON. Successful responses return the requested resource directly:

{
  "id": "abc123",
  "key": "uploads/abc123/photo.jpg",
  "url": "https://cdn.uploadkit.dev/uploads/abc123/photo.jpg",
  "status": "UPLOADED"
}

Error responses always have the shape:

{
  "error": {
    "code": "FILE_TOO_LARGE",
    "message": "File size 6291456 bytes exceeds the 4194304 byte limit",
    "suggestion": "Upgrade your plan at app.uploadkit.dev/billing"
  }
}

See Error Codes for the complete list.

Rate Limiting

The API uses a sliding window rate limiter backed by Upstash Redis. Limits are per API key:

TierRequests per minute
Free60
Pro300
Team1000
EnterpriseCustom

When the limit is exceeded, the API returns 429 Too Many Requests with these headers:

HeaderDescription
X-RateLimit-LimitMaximum requests allowed per window
X-RateLimit-RemainingRequests remaining in the current window
Retry-AfterSeconds until the window resets
HTTP/1.1 429 Too Many Requests
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 0
Retry-After: 23

Pagination

List endpoints use cursor-based pagination for consistent results even when records are added or deleted between requests.

Query parameters:

ParameterTypeDefaultDescription
limitnumber20Number of results per page (max 100)
cursorstringOpaque cursor from the previous response

Response shape:

{
  "items": [...],
  "nextCursor": "eyJpZCI6ImFiYzEyMyJ9",
  "hasMore": true
}

Pass nextCursor as cursor on the next request to get the following page. When hasMore is false, you have reached the last page.

Endpoints

ResourceDescription
UploadRequest presigned URLs, confirm uploads, multipart operations
FilesList, inspect, update metadata, delete files
ProjectsCreate and manage projects
WebhooksWebhook delivery, verification, and retry behavior

Looking for the SDK? The Next.js guide and React SDK reference cover the SDK upload flow that most apps should use.

On this page