Introduction The LoadSh.it API provides programmatic access to file conversion, security scans, transcription and all AI Boost tools (bg-remove, upscale, subtitle generation, whiteboard-to-diagram, chat-with-PDF, slide generator and more).
80+ Formats Video, audio, images, documents
ClamAV Scan Enterprise antivirus
Whisper AI Transcription in 99 languages
Boost AI Tools 30+ GPU/LLM tools, unified dispatch API
Endpoints Request presigned upload URL First step for any processing: fetches a signed upload URL plus the `file_key` that the other endpoints reference later.
Parameters Name Type Description filename required string Original filename including extension. size required number File size in bytes. content_type string MIME type (e.g. video/mp4).
Examples
cURL
curl -X POST "https://loadsh.it/api/nodrift/upload/presign" \
-H "Authorization: Bearer lsh_live_xxxx" \
-H "Content-Type: application/json" \
-d '{"filename":"<filename>","size":0,"content_type":"<content_type>"}'
JavaScript
const response = await fetch(
'https://loadsh.it/api/nodrift/upload/presign',
{
method: 'POST',
headers: {
'Authorization': 'Bearer lsh_live_xxxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({"filename":"<filename>","size":0,"content_type":"<content_type>"})
}
);
const data = await response.json(); Response {
"success": true,
"upload_url": "https://...",
"file_key": "inputs/1/abc.mp4"
} Convert file Converts a file to another format. Two paths: EITHER `jobId` from the /api/upload multipart flow (frontend), OR `file_key` from /api/nodrift/upload/presign (programmatic API use - recommended). Response contains `job_id` for polling via /api/nodrift/jobs/<id>. No container creation needed - nodrift.ch manages the GPU pool serverlessly.
Parameters Name Type Description jobId required string Job ID from /api/upload (frontend) OR file_key from /api/nodrift/upload/presign (API). targetFormat required string Target format (e.g. "mp4", "pdf", "png"). processing_mode string "auto" | "force_cpu" | "force_gpu" - with file_key path, routing is automatic.
Examples
cURL
curl -X POST "https://loadsh.it/api/convert" \
-H "Authorization: Bearer lsh_live_xxxx" \
-H "Content-Type: application/json" \
-d '{"file_key":"inputs/1/abc.mp4","targetFormat":"mp4"}'
JavaScript
const response = await fetch(
'https://loadsh.it/api/convert',
{
method: 'POST',
headers: {
'Authorization': 'Bearer lsh_live_xxxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({ file_key: 'inputs/1/abc.mp4', targetFormat: 'mp4' })
}
);
const data = await response.json(); Response {
"success": true,
"job_id": "job_abc123",
"status": "processing"
} Security Scan Scans a file for viruses, malware, and other threats using ClamAV & YARA Rules.
Parameters Name Type Description file_key required string The file to scan (multipart/form-data) original_filename string Original filename for logs/history.
Examples
cURL
curl -X POST "https://loadsh.it/api/scan" \
-H "Authorization: Bearer lsh_live_xxxx" \
-H "Content-Type: application/json" \
-d '{"file_key":"inputs/1/abc.exe"}'
JavaScript
const response = await fetch(
'https://loadsh.it/api/scan',
{
method: 'POST',
headers: {
'Authorization': 'Bearer lsh_live_xxxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({ file_key: 'inputs/1/abc.exe' })
}
);
const data = await response.json(); Response {
"success": true,
"job_id": "job_xyz789",
"status": "queued"
} Audio/Video transcription Transcribes audio/video via Whisper through the nodrift /jobs/dispatch flow (Spec 2026-05). Expects file_key from the presign upload. Returns job_id; client polls /api/nodrift/jobs/<id> until status=completed - that contains transcript, language, srt_url and vtt_url. No container creation needed anymore.
Parameters Name Type Description file_key required string R2 file_key from /api/nodrift/upload/presign. language required string ISO-639-1 code (de, en, fr, …). Leave empty for auto-detect. output_format string "text" (default), "timestamps", "srt", "vtt".
Examples
cURL
curl -X POST "https://loadsh.it/api/transcript" \
-H "Authorization: Bearer lsh_live_xxxx" \
-H "Content-Type: application/json" \
-d '{"file_key":"inputs/1/interview.mp4","language":"de"}'
JavaScript
const response = await fetch(
'https://loadsh.it/api/transcript',
{
method: 'POST',
headers: {
'Authorization': 'Bearer lsh_live_xxxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({ file_key: 'inputs/1/interview.mp4', language: 'de' })
}
);
const data = await response.json(); Response {
"success": true,
"job_id": "job_def456",
"status": "processing"
} Get Job Status Checks the current status of a running or completed job.
Parameters Name Type Description jobId required string The job ID from the original request
Examples
cURL
curl -X GET "https://loadsh.it/api/nodrift/jobs/job_abc123?jobId=value" \
-H "Authorization: Bearer lsh_live_xxxx"
JavaScript
const response = await fetch(
'https://loadsh.it/api/nodrift/jobs/job_abc123?jobId=value',
{
headers: { 'Authorization': 'Bearer lsh_live_xxxx' }
}
);
const data = await response.json(); Response {
"success": true,
"status": "completed",
"progress": 100,
"download_url": "https://loadsh.it/api/nodrift/download/..."
} Dispatch AI/Boost tool Universal dispatch for all 30+ AI Boost tools (bg-remove, upscale, voice-isolate, document-scan, chat-pdf, slides-generate, video-dub, …). task_type picks the tool, ai_options are tool-specific (see /api/nodrift/capabilities for the full list).
Parameters Name Type Description service required string Always "ai" for Boost tools. task_type required string Tool slug, e.g. "bg-remove", "subtitle-generate", "chat-pdf". List via /api/nodrift/capabilities. file_key string R2 file_key from the presign step. Optional for slides-generate (topic-only). ai_options object Tool-specific object. See nodrift spec - e.g. { output_bg, edge_feather } for bg-remove, { question, file_key, prior_messages } for chat-pdf. target_lang string Optional - translation target language for subtitle-generate (top-level, NOT in ai_options).
Examples
cURL
curl -X POST "https://loadsh.it/api/nodrift/jobs/dispatch" \
-H "Authorization: Bearer lsh_live_xxxx" \
-H "Content-Type: application/json" \
-d '{"service":"<service>","task_type":"<task_type>","file_key":"inputs/1/abc.mp4","ai_options":{},"target_lang":"<target_lang>"}'
JavaScript
const response = await fetch(
'https://loadsh.it/api/nodrift/jobs/dispatch',
{
method: 'POST',
headers: {
'Authorization': 'Bearer lsh_live_xxxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({"service":"<service>","task_type":"<task_type>","file_key":"inputs/1/abc.mp4","ai_options":{},"target_lang":"<target_lang>"})
}
);
const data = await response.json(); Response {
"success": true,
"job_id": "job_xxxxx",
"status": "processing",
"credits_cost": 4,
"routing": {
"use_gpu": true,
"worker": "gpu"
},
"gpu_starting": false
} Health check Status endpoint for smoke tests. Returns { status: "ok", timestamp }. No auth required - also fine for external uptime monitoring.
Examples
cURL
curl -X GET "https://loadsh.it/api/health" \
-H "Authorization: Bearer lsh_live_xxxx"
JavaScript
const response = await fetch(
'https://loadsh.it/api/health',
{
headers: { 'Authorization': 'Bearer lsh_live_xxxx' }
}
);
const data = await response.json(); Response {
"status": "ok",
"timestamp": 1735689600000
} Credit balance Returns the authenticated account's current nodrift credit balance. Useful for pre-flight checks before dispatching expensive jobs.
Examples
cURL
curl -X GET "https://loadsh.it/api/nodrift/credits" \
-H "Authorization: Bearer lsh_live_xxxx"
JavaScript
const response = await fetch(
'https://loadsh.it/api/nodrift/credits',
{
headers: { 'Authorization': 'Bearer lsh_live_xxxx' }
}
);
const data = await response.json(); Response {
"credits": 142,
"currency": "CHF"
} Jobs list Lists your own nodrift jobs (paginated via ?limit & ?cursor). Filter: ?status=queued|processing|completed|failed.
Parameters Name Type Description limit number Page size (default 20, max 100). cursor string Cursor from previous response. status string queued | processing | completed | failed
Examples
cURL
curl -X GET "https://loadsh.it/api/nodrift/jobs?limit=20&cursor=value&status=value" \
-H "Authorization: Bearer lsh_live_xxxx"
JavaScript
const response = await fetch(
'https://loadsh.it/api/nodrift/jobs?limit=20&cursor=value&status=value',
{
headers: { 'Authorization': 'Bearer lsh_live_xxxx' }
}
);
const data = await response.json(); Response {
"jobs": [
{
"job_id": "job_abc",
"status": "completed",
"task_type": "bg-remove"
}
],
"next_cursor": null
} Cancel job Aborts a running job. DELETE /api/nodrift/jobs/<job_id>. If the job already finished: 409.
Parameters Name Type Description jobId required string Job ID from the dispatch response.
Examples
cURL
curl -X DELETE "https://loadsh.it/api/nodrift/jobs/job_abc123" \
-H "Authorization: Bearer lsh_live_xxxx"
JavaScript
const response = await fetch(
'https://loadsh.it/api/nodrift/jobs/job_abc123',
{
method: 'DELETE',
headers: { 'Authorization': 'Bearer lsh_live_xxxx' }
}
);
const data = await response.json(); Response {
"success": true,
"status": "cancelled"
} Import from URL Imports a file from a public URL (YouTube, direct downloads) instead of a multipart upload. Body: { url, target_format? }. Returns a jobId for /api/status.
Parameters Name Type Description url required string Source (https URL, YouTube/Vimeo/etc.). target_format string Optional target format - if set, conversion runs straight after import.
Examples
cURL
curl -X POST "https://loadsh.it/api/import-url" \
-H "Authorization: Bearer lsh_live_xxxx" \
-H "Content-Type: application/json" \
-d '{"url":"<url>","target_format":"<target_format>"}'
JavaScript
const response = await fetch(
'https://loadsh.it/api/import-url',
{
method: 'POST',
headers: {
'Authorization': 'Bearer lsh_live_xxxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({"url":"<url>","target_format":"<target_format>"})
}
);
const data = await response.json(); Response {
"success": true,
"jobId": "job_imp_xyz",
"status": "queued"
} Universal AI Tools Unified endpoint POST /api/ai/<task_type> for all ~50 Boost tools (bg-remove, upscale, ocr-pro, headshot-generate, slides-generate, chat-pdf, math-solve, voice-clone, video-summarize, …). Body: { file_key, ai_options? } - for slides-generate use { topic }, for chat-pdf { pdf_file_key, question | prior_messages }. Response: { job_id, poll_url, gpu_starting, credits_cost }. List available tasks via GET /api/ai.
Parameters Name Type Description :taskType required string Path parameter - e.g. bg-remove, upscale, ocr-pro, headshot-generate. file_key string R2 key from /api/nodrift/upload/presign. Not needed for slides-generate (use topic) or chat-pdf (use pdf_file_key). ai_options object Task-specific parameters (e.g. scale=2 for upscale, tone=professional for cover-letter).
Examples
cURL
curl -X POST "https://loadsh.it/api/ai/bg-remove" \
-H "Authorization: Bearer lsh_live_xxxx" \
-H "Content-Type: application/json" \
-d '{"file_key":"inputs/1/abc.mp4","ai_options":{}}'
JavaScript
const response = await fetch(
'https://loadsh.it/api/ai/bg-remove',
{
method: 'POST',
headers: {
'Authorization': 'Bearer lsh_live_xxxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({"file_key":"inputs/1/abc.mp4","ai_options":{}})
}
);
const data = await response.json(); Response {
"success": true,
"job_id": "job_abc123",
"status": "queued",
"gpu_starting": false,
"credits_cost": 2,
"poll_url": "https://loadsh.it/api/nodrift/jobs/job_abc123"
} Tool Discovery Lists all available task types with endpoint path and required inputs. Use /api/nodrift/capabilities for limits + credit costs per task.
Examples
cURL
curl -X GET "https://loadsh.it/api/ai" \
-H "Authorization: Bearer lsh_live_xxxx"
JavaScript
const response = await fetch(
'https://loadsh.it/api/ai',
{
headers: { 'Authorization': 'Bearer lsh_live_xxxx' }
}
);
const data = await response.json(); Response {
"tasks": [
{
"task_type": "bg-remove",
"service": "image-gen",
"endpoint": "/api/ai/bg-remove",
"required_input": "file_key"
},
{
"task_type": "slides-generate",
"service": "llm",
"endpoint": "/api/ai/slides-generate",
"required_input": "topic"
},
{
"task_type": "chat-pdf",
"service": "llm",
"endpoint": "/api/ai/chat-pdf",
"required_input": "pdf_file_key+question"
}
]
} Query tool capabilities Lists all available tools with pricing, engine, burst tier, max_input_mb and supported_languages. Cached 5 min at the edge. No auth required.
Examples
cURL
curl -X GET "https://loadsh.it/api/nodrift/capabilities" \
-H "Authorization: Bearer lsh_live_xxxx"
JavaScript
const response = await fetch(
'https://loadsh.it/api/nodrift/capabilities',
{
headers: { 'Authorization': 'Bearer lsh_live_xxxx' }
}
);
const data = await response.json(); Response {
"tools": {
"bg-remove": {
"available": true,
"credit_cost": 2,
"category": "gpu",
"max_input_mb": 25
},
"subtitle-generate": {
"available": true,
"credit_cost": 3,
"category": "gpu",
"burst_tier": "whisper"
},
"chat-pdf": {
"available": true,
"credit_cost": 1,
"category": "workers-ai"
}
}
} Trigger GPU pre-warm Optional - kicks the GPU burst container for a service category BEFORE the actual job is dispatched. Saves 30-60s cold-start. Body: { service, task_type? }. Service is one of "vision" | "ocr" | "llm" | "image-gen" | "audio-gen" | "video" | "transcribe".
Parameters Name Type Description service required string GPU pool name (see spec). task_type string Optional - refines the pool if service covers multiple.
Examples
cURL
curl -X POST "https://loadsh.it/api/nodrift/gpu/warmup" \
-H "Authorization: Bearer lsh_live_xxxx" \
-H "Content-Type: application/json" \
-d '{"service":"<service>","task_type":"<task_type>"}'
JavaScript
const response = await fetch(
'https://loadsh.it/api/nodrift/gpu/warmup',
{
method: 'POST',
headers: {
'Authorization': 'Bearer lsh_live_xxxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({"service":"<service>","task_type":"<task_type>"})
}
);
const data = await response.json(); Response {
"triggered": true,
"status": 202
} List API Keys Lists all API keys of the authenticated user.
Examples
cURL
curl -X GET "https://loadsh.it/api/user/api-keys" \
-H "Authorization: Bearer lsh_live_xxxx"
JavaScript
const response = await fetch(
'https://loadsh.it/api/user/api-keys',
{
headers: { 'Authorization': 'Bearer lsh_live_xxxx' }
}
);
const data = await response.json(); Response {
"success": true,
"keys": [
{
"id": "key_123",
"name": "Production",
"created_at": "2025-01-01",
"last_used": "2025-01-03"
}
]
} Create API Key Creates a new API key. The full key is only shown once!
Parameters Name Type Description name required string Name/description of the key
Examples
cURL
curl -X POST "https://loadsh.it/api/user/api-keys" \
-H "Authorization: Bearer lsh_live_xxxx" \
-H "Content-Type: application/json" \
-d '{"name": "My App"}'
JavaScript
const response = await fetch(
'https://loadsh.it/api/user/api-keys',
{
method: 'POST',
headers: {
'Authorization': 'Bearer lsh_live_xxxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({ name: 'My App' })
}
);
const data = await response.json(); Response {
"success": true,
"key": {
"id": "key_456",
"name": "My App",
"token": "lsh_live_xxxxxxxxxxxxxxxxxxxxxxxx"
}
} Delete API Key Permanently deletes an API key.
Parameters Name Type Description id required string ID of the key to delete
Examples
cURL
curl -X DELETE "https://loadsh.it/api/user/api-keys/key_123" \
-H "Authorization: Bearer lsh_live_xxxx"
JavaScript
const response = await fetch(
'https://loadsh.it/api/user/api-keys/key_123',
{
method: 'DELETE',
headers: { 'Authorization': 'Bearer lsh_live_xxxx' }
}
);
const data = await response.json(); Response {
"success": true,
"message": "Key deleted"
}