Introducción La API de LoadSh.it ofrece acceso programático a la conversión de archivos, escaneos de seguridad, transcripción y todas las herramientas IA Boost (eliminación de fondos, upscaling, generación de subtítulos, pizarra→diagrama, chat con PDF, generador de diapositivas y más).
80+ formatos Vídeo, audio, imágenes, documentos
Escaneo ClamAV Antivirus empresarial
Whisper AI Transcripción en 99 idiomas
Herramientas IA Boost 30+ herramientas GPU/LLM, API de dispatch unificada
Endpoints Presigned Upload-URL anfordern Erster Schritt für jede Verarbeitung: holt eine signierte Upload-URL plus den `file_key`, den die anderen Endpoints später referenzieren.
Parámetros Nombre Tipo Descripción filename required string Original-Dateiname inkl. Endung. size required number Dateigrösse in Bytes. content_type string MIME-Typ (z.B. video/mp4).
Ejemplos
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(); Respuesta {
"success": true,
"upload_url": "https://...",
"file_key": "inputs/1/abc.mp4"
} Convertir archivo Convierte un archivo a otro formato. Dos caminos: O `jobId` del flujo multipart de /api/upload (frontend), O `file_key` de /api/nodrift/upload/presign (uso programático de API — recomendado). La respuesta contiene `job_id` para consultar via /api/nodrift/jobs/<id>. Sin creación de contenedor — nodrift.ch gestiona el pool GPU sin servidor.
Parámetros Nombre Tipo Descripción jobId required string Job ID de /api/upload (frontend) O file_key de /api/nodrift/upload/presign (API). targetFormat required string Formato destino (p. ej. "mp4", "pdf", "png"). processing_mode string "auto" | "force_cpu" | "force_gpu" — con file_key, el enrutado es automático.
Ejemplos
cURL
curl -X POST "https://loadsh.it/api/convert" \
-H "Authorization: Bearer lsh_live_xxxx" \
-F "file=@video.mov" \
-F "target_format=mp4"
JavaScript
const formData = new FormData();
formData.append('file', fileInput.files[0]);
formData.append('target_format', 'mp4');
const response = await fetch(
'https://loadsh.it/api/convert',
{
method: 'POST',
headers: { 'Authorization': 'Bearer lsh_live_xxxx' },
body: formData
}
);
const data = await response.json(); Respuesta {
"success": true,
"job_id": "job_abc123",
"status": "processing"
} Escaneo de seguridad Escanea un archivo en busca de virus, malware y otras amenazas con ClamAV & YARA Rules.
Parámetros Nombre Tipo Descripción file_key required string El archivo a escanear (multipart/form-data) original_filename string Original-Dateiname für Logs/Verlauf.
Ejemplos
cURL
curl -X POST "https://loadsh.it/api/scan" \
-H "Authorization: Bearer lsh_live_xxxx" \
-F "file=@download.exe"
JavaScript
const formData = new FormData();
formData.append('file', fileInput.files[0]);
const response = await fetch(
'https://loadsh.it/api/scan',
{
method: 'POST',
headers: { 'Authorization': 'Bearer lsh_live_xxxx' },
body: formData
}
);
const data = await response.json(); Respuesta {
"success": true,
"job_id": "job_xyz789",
"status": "queued"
} Transcripción audio/vídeo Transcribe audio/vídeo vía Whisper a través del flujo nodrift /jobs/dispatch (Spec 2026-05). Espera file_key del presign upload. Devuelve job_id; el cliente consulta /api/nodrift/jobs/<id> hasta status=completed — contiene transcript, language, srt_url y vtt_url. Sin creación de contenedor.
Parámetros Nombre Tipo Descripción file_key required string R2 file_key de /api/nodrift/upload/presign. language required string Código ISO-639-1 (de, en, fr, …). Dejar vacío para detección automática. output_format string "text" (por defecto), "timestamps", "srt", "vtt".
Ejemplos
cURL
curl -X POST "https://loadsh.it/api/transcript" \
-H "Authorization: Bearer lsh_live_xxxx" \
-F "file=@interview.mp4" \
-F "language=de"
JavaScript
const formData = new FormData();
formData.append('file', fileInput.files[0]);
formData.append('language', 'de');
const response = await fetch(
'https://loadsh.it/api/transcript',
{
method: 'POST',
headers: { 'Authorization': 'Bearer lsh_live_xxxx' },
body: formData
}
);
const data = await response.json(); Respuesta {
"success": true,
"job_id": "job_def456",
"status": "processing"
} Obtener estado del trabajo Comprueba el estado actual de un trabajo en curso o completado.
Parámetros Nombre Tipo Descripción jobId required string El ID del trabajo de la solicitud original
Ejemplos
cURL
curl -X GET "https://loadsh.it/api/status/conv_abc123" \
-H "Authorization: Bearer lsh_live_xxxx"
JavaScript
const response = await fetch(
'https://loadsh.it/api/status/conv_abc123',
{
headers: { 'Authorization': 'Bearer lsh_live_xxxx' }
}
);
const data = await response.json(); Respuesta {
"success": true,
"status": "completed",
"progress": 100,
"download_url": "https://loadsh.it/api/nodrift/download/..."
} Lanzar herramienta IA/Boost Dispatch universal para las 30+ herramientas IA Boost (bg-remove, upscale, voice-isolate, document-scan, chat-pdf, slides-generate, video-dub, …). task_type elige la herramienta, ai_options son específicas.
Parámetros Nombre Tipo Descripción service required string Siempre "ai" para herramientas Boost. task_type required string Slug de la herramienta, p. ej. "bg-remove", "subtitle-generate", "chat-pdf". Lista vía /api/nodrift/capabilities. file_key string R2 file_key del presign. Opcional para slides-generate (topic-only). ai_options object Objeto específico de la herramienta — p. ej. { output_bg, edge_feather } para bg-remove. target_lang string Opcional — idioma destino de traducción para subtitle-generate (top-level, NO en ai_options).
Ejemplos
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(); Respuesta {
"success": true,
"job_id": "job_xxxxx",
"status": "processing",
"credits_cost": 4,
"routing": {
"use_gpu": true,
"worker": "gpu"
},
"gpu_starting": false
} Comprobación de salud Endpoint de estado para smoke tests. Devuelve { status: "ok", timestamp }. Sin auth — válido también para monitoreo externo.
Ejemplos
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(); Respuesta {
"status": "ok",
"timestamp": 1735689600000
} Saldo de créditos Devuelve el saldo de créditos nodrift de la cuenta autenticada. Útil para comprobar antes de despachar trabajos caros.
Ejemplos
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(); Respuesta {
"credits": 142,
"currency": "CHF"
} Lista de jobs Lista los jobs nodrift de tu cuenta (paginado vía ?limit & ?cursor). Filtro: ?status=queued|processing|completed|failed.
Parámetros Nombre Tipo Descripción limit number Page size (default 20, max 100). cursor string Cursor from previous response. status string queued | processing | completed | failed
Ejemplos
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(); Respuesta {
"jobs": [
{
"job_id": "job_abc",
"status": "completed",
"task_type": "bg-remove"
}
],
"next_cursor": null
} Cancelar job Interrumpe un job en ejecución. DELETE /api/nodrift/jobs/<job_id>. Si el job ya terminó: 409.
Parámetros Nombre Tipo Descripción jobId required string Job-ID aus Dispatch-Antwort.
Ejemplos
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(); Respuesta {
"success": true,
"status": "cancelled"
} Importar desde URL Importa un archivo desde una URL pública (YouTube, enlace directo) en lugar de un upload multipart. Cuerpo: { url, target_format? }.
Parámetros Nombre Tipo Descripción url required string Origen (URL https, YouTube/Vimeo/etc.). target_format string Formato destino opcional — si se establece, la conversión sigue al import.
Ejemplos
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(); Respuesta {
"success": true,
"jobId": "job_imp_xyz",
"status": "queued"
} Herramientas IA universales Endpoint unificado POST /api/ai/<task_type> para las ~50 herramientas Boost (bg-remove, upscale, ocr-pro, headshot-generate, slides-generate, chat-pdf, math-solve, voice-clone, video-summarize, …). Cuerpo: { file_key, ai_options? } — para slides-generate { topic }, para chat-pdf { pdf_file_key, question | prior_messages }. Respuesta: { job_id, poll_url, gpu_starting, credits_cost }. Lista vía GET /api/ai.
Parámetros Nombre Tipo Descripción :taskType required string Parámetro de ruta — p. ej. bg-remove, upscale, ocr-pro, headshot-generate. file_key string Clave R2 de /api/nodrift/upload/presign. No necesaria para slides-generate (usar topic) o chat-pdf (usar pdf_file_key). ai_options object Parámetros específicos de la tarea (p. ej. scale=2 para upscale, tone=professional para cover-letter).
Ejemplos
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(); Respuesta {
"success": true,
"job_id": "job_abc123",
"status": "queued",
"gpu_starting": false,
"credits_cost": 2,
"poll_url": "https://loadsh.it/api/nodrift/jobs/job_abc123"
} Descubrimiento de herramientas Lista todos los task_types disponibles con ruta del endpoint y entradas requeridas. Usar /api/nodrift/capabilities para límites + costes en créditos por tarea.
Ejemplos
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(); Respuesta {
"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"
}
]
} Consultar capacidades de herramientas Lista todas las herramientas disponibles con pricing, engine, burst tier, max_input_mb e idiomas soportados. Cacheado 5 min en el edge. Sin auth.
Ejemplos
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(); Respuesta {
"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"
}
}
} Pre-calentar GPU Opcional — arranca el contenedor GPU antes del dispatch real. Ahorra 30-60s de cold-start. Body: { service, task_type? }. Service uno de "vision" | "ocr" | "llm" | "image-gen" | "audio-gen" | "video" | "transcribe".
Parámetros Nombre Tipo Descripción service required string Nombre del pool GPU. task_type string Opcional — afina el pool.
Ejemplos
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(); Respuesta {
"triggered": true,
"status": 202
} Listar claves API Lista todas las claves API del usuario autenticado.
Ejemplos
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(); Respuesta {
"success": true,
"keys": [
{
"id": "key_123",
"name": "Production",
"created_at": "2025-01-01",
"last_used": "2025-01-03"
}
]
} Crear clave API Crea una nueva clave API. ¡La clave completa solo se muestra una vez!
Parámetros Nombre Tipo Descripción name required string Nombre/descripción de la clave
Ejemplos
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(); Respuesta {
"success": true,
"key": {
"id": "key_456",
"name": "My App",
"token": "lsh_live_xxxxxxxxxxxxxxxxxxxxxxxx"
}
} Eliminar clave API Elimina permanentemente una clave API.
Parámetros Nombre Tipo Descripción id required string ID de la clave a eliminar
Ejemplos
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(); Respuesta {
"success": true,
"message": "Key deleted"
}