Quickstart
Three ways to upload: the CLI demo (zero signup), the SDK, or a single REST call.
Zero-signup demo
npx @dropkit/cli@latest upload ./photo.pngPrints the CDN URL. Files expire in 1 hour, 10 MB cap. Great for a quick share before you commit to anything. Run dropkit login to attach a permanent project.
The SDK
Install:
bun add @dropkit/sdkUpload:
import { dropkit } from '@dropkit/sdk';
const client = dropkit({ key: 'pk_live_...' });const { data, error } = await client.upload(file);if (error) throw new Error(error.message);console.log(data.url);That’s it. The URL is a live CDN link.
One REST call
For shell scripts, servers, or anywhere without the SDK:
curl -X POST https://api.dropkit.app/v1/upload \ -H "authorization: Bearer sk_live_..." \ -F "file=@photo.jpg"Response:
{ "id": "abc123...", "url": "https://cdn.dropkit.app/abc123.../photo.jpg", "name": "photo.jpg", "size": 12345, "type": "image/jpeg"}Use a server key here, not a browser key. Server keys don’t need an origin and can also delete and sign per-user uploads.
Mirror a remote URL
When you already have a URL (image-gen output, a screenshot link, anything ephemeral), hand it to dropkit and skip the download/re-upload dance:
const { data } = await client.uploadFromUrl('https://example.com/photo.jpg');console.log(data.url);Or from the CLI:
dropkit upload https://example.com/photo.jpgReal key only (the demo key is path-only). Full reference: URL ingest.
Or have your agent do it
Plug dropkit into Claude Code, Claude Desktop, Cursor, Windsurf, or ChatGPT via the MCP server. The agent uploads files mid-session and replies with a CDN URL the user can open.
For Claude Code, paste this in your terminal:
claude mcp add dropkit -- npx -y @dropkit/mcpFor Claude Desktop, Cursor, Windsurf, or ChatGPT, drop this into the client’s MCP config:
{ "mcpServers": { "dropkit": { "command": "npx", "args": ["-y", "@dropkit/mcp"] } }}Full setup: /docs/mcp.
Get your key
- Sign up at dash.dropkit.app.
- Create a project.
- Open the Keys page. Click New key.
dropkit creates two kinds of keys:
- Browser key (
pk_live_...): safe to ship in frontend code. Uploads only. Lock it to your app’s origin. - Server key (
sk_live_...): backend only. Can delete files, sign per-user uploads, run REST one-shots.
Most apps only need a browser key.
Next
- Recipes: copy-paste snippets for React, Svelte, Vue, Next, Remix, Expo, vanilla, Python, Go.
- CLI:
npx @dropkit/cli initornpx @dropkit/cli upload ./photo.jpg. - WordPress plugin: drop-in replacement for Media Library uploads.
- Private files: mark uploads as private and mint short-lived signed URLs.
- SDK reference: every option the SDK accepts.
- REST upload: the one-shot endpoint.
- Sign + complete flow: the resumable path.