Documentación de la API

Almacenamiento de archivos agentic-first para desarrolladores y agentes de IA

URL base: https://www.easybits.cloud/api/v2

3 formas de integrarte: REST API (abajo), SDK tipado (npm i @easybits.cloud/sdk), o servidor MCP (100+ herramientas para agentes, 12 core por defecto).

Inicio rápido

  1. Crea una cuenta en easybits.cloud
  2. Ve al Dashboard de Desarrollador y crea una API key
  3. Haz tu primera llamada:

Obtén tu API key. Por defecto cargan 12 herramientas core. Agrega --tools docs,slides,all para más. Ver tool groups.

Authentication

All API requests require a Bearer token in the Authorization header.

What your key grants access to

An EasyBits API key authenticates you as the owner of your account. It grants access to all your resources: files, websites, databases, webhooks, documents, presentations, and landings. Keep it secret — anyone with your key can read, modify, or delete your data.

Scopes

Each key is created with one or more scopes. Use the most restrictive scope your integration needs.

ScopeAllows
READList and get files, websites, documents, webhooks, and usage stats
WRITECreate, upload, update, optimize, transform, and share files. Create websites, webhooks, databases, documents, and presentations
DELETESoft-delete and permanently remove files, websites, webhooks, and other resources
ADMINFull access including key management, provider configuration, sandbox/agent operations, and account-wide actions

Keys created from the Developer Dashboard default to READ + WRITE + DELETE. Use the API to create scoped keys programmatically.

Web clients (Claude.ai / Cowork): use OAuth 2.1 + Dynamic Client Registration instead of an API key. See the Claude Cowork section →

Ghosty Code

El runtime agéntico con EasyBits preinstalado. Cero configuración.

Ghosty Code v0.0.4+ ya trae EasyBits MCP HTTP preinstalado.

Solo necesitas tu API key. Nada que instalar, nada que configurar.

Conexión en 2 pasos

  1. Configura tu API key: export EASYBITS_API_KEY=eb_sk_live_YOUR_KEY
  2. Ejecuta: ghosty

EasyBits aparece como easybits en tu lista de MCPs con 100+ herramientas listas para usar.

¿Versión anterior o instalación manual?

Si usas Ghosty Code v0.0.3 o necesitas agregar EasyBits manualmente:

Qué incluye

EasyBits MCP

100+ herramientas para archivos, documentos, DBs, sandboxes y más

🧠DeepSeek V4

Modelo principal con razonamiento profundo (thinking tokens)

🌐Búsqueda web

BrightData integrado para búsquedas y scraping

🔌MCP dinámico

Agrega y quita servidores MCP en runtime sin reiniciar

📦Sandboxes

Firecracker microVMs para ejecutar código y agentes aislados

🔄Auto-actualización

ghosty update para mantener todo al día

¿Ya usas Ghosty Code? Actualiza a v0.0.4+ con ghosty update y EasyBits aparece automáticamente.

¿No usas Ghosty Code? EasyBits funciona con Claude Cowork, Cursor, VS Code y cualquier cliente MCP. Ver todas las opciones de conexión.

Claude Cowork (OAuth)

For Claude.ai, Cowork, and other web-based MCP clients that can't store API keys.

EasyBits implements OAuth 2.1 with Dynamic Client Registration (RFC 7591) and PKCE S256. Web MCP clients discover, register, and authenticate automatically — no API key copying, no JSON configs.

Connect in 4 steps

  1. In Cowork, open Settings → Connectors → Add custom connector
  2. Paste the MCP URL: https://www.easybits.cloud/api/mcp
  3. Click Connect — you'll be redirected to EasyBits to log in
  4. Authorize the connector. You're done — the agent has access to your workspace
Tip: append ?tools=all to the URL to expose all 100+ tools instead of the 12-tool core group. See Tool Groups for other options.

How it works

EasyBits exposes the standard OAuth discovery endpoints so any spec-compliant MCP client connects without manual setup:

EndpointSpecPurpose
/.well-known/oauth-protected-resourceRFC 9728Tells clients which Authorization Server protects /api/mcp
/.well-known/oauth-authorization-serverRFC 8414Advertises authorize, token, and registration endpoints
/oauth/registerRFC 7591Dynamic Client Registration — client_id + secret issued on POST
/oauth/authorizeOAuth 2.1User consent + code issuance (PKCE S256 required)
/oauth/tokenOAuth 2.1Exchanges code + verifier for a 1-hour JWT access token

Handshake flow

Flowtypescript

Notes

  • Access tokens are HS256 JWTs, valid for 1 hour. No refresh token — reauthorize is a single click when you already have a session.
  • Auto-approval: once logged in, the authorize screen redirects back immediately. The user already expressed consent by initiating the flow from the connector.
  • Additive: API key Bearer auth keeps working unchanged. The handler tries JWT verification first and silently falls through to API key validation.
  • PKCE S256 is mandatory. Plain and no-PKCE flows are rejected.
  • Scope: a single mcp scope — the authorized session has full access to the MCP handler.
Deep dive in the OAuth 2.1 + DCR blog post.

SDK

The typed SDK wraps the entire REST API. Install and use it in any Node.js/Bun/Deno project.

Installbash

All Methods

Files

MethodDescription
listFiles(params?)List files (paginated)
getFile(fileId)Get file + download URL
uploadFile(params)Create file + get upload URL
updateFile(fileId, params)Update name, access, metadata, status
deleteFile(fileId)Soft-delete (7-day retention)
restoreFile(fileId)Restore from trash
listDeletedFiles(params?)List trash with days until purge
searchFiles(query)AI-powered natural language search
duplicateFile(fileId, name?)Copy file (new storage object)
listPermissions(fileId)List sharing permissions

Bulk Operations

MethodDescription
bulkUploadFiles(items)Upload up to 20 files at once
bulkDeleteFiles(fileIds)Delete up to 100 files at once

Images

MethodDescription
optimizeImage(params)Convert to WebP/AVIF
transformImage(params)Resize, rotate, flip, convert, grayscale

Sharing

MethodDescription
shareFile(params)Share with another user by email
generateShareToken(fileId, expiresIn?)Temporary download URL
listShareTokens(params?)List tokens (paginated)

Webhooks

MethodDescription
listWebhooks()List configured webhooks
createWebhook(params)Create webhook (returns secret once)
getWebhook(webhookId)Get webhook details
updateWebhook(webhookId, params)Update URL, events, or status
deleteWebhook(webhookId)Delete permanently

Websites

MethodDescription
listWebsites()List static websites
createWebsite(name)Create website, get id + URL
getWebsite(websiteId)Get website details
updateWebsite(websiteId, params)Update name/status
deleteWebsite(websiteId)Delete website + files

Deploy files by uploading with fileName: "sites/{websiteId}/path" — see Websites section for full example.

Account

MethodDescription
getUsageStats()Storage, file counts, plan info
listProviders()Storage providers
listKeys()API keys

Error Handling

SDKtypescript

Files

GET/files

List your files (paginated)

Query Parameters
assetIdstringFilter by asset ID
limitnumberMax results (default 50, max 100)
cursorstringPagination cursor
statusstringSet to 'DELETED' to list deleted files
Response
SDK
GET/files/:fileId

Get file details with a temporary download URL

Response
SDK
POST/files

Create a file record and get a presigned upload URL

Request Body (JSON)
fileNamestringRequired
contentTypestringMIME type (required)
sizenumberFile size in bytes (required, 1B–5GB)
accessstring'public' or 'private' (default)
regionstring'LATAM', 'US', or 'EU'
Response
SDK

Upload bytes via PUT to putUrl, then PATCH the file status to 'DONE'.

PATCH/files/:fileId

Update file name, access level, metadata, or status

Request Body (JSON)
namestringNew file name
accessstring'public' or 'private'
metadataobjectKey-value pairs (merged, max 10KB)
statusstringOnly 'DONE' (from PENDING)
SDK
DELETE/files/:fileId

Soft-delete a file (7-day retention)

Response
SDK
POST/files/:fileId/restore

Restore a soft-deleted file

Response
SDK
GET/files/search?q=...

AI-powered natural language file search (requires AI key)

Query Parameters
qstringNatural language query (required)
Response
SDK
POST/files/:fileId/duplicate

Create a copy of an existing file (new storage object)

Request Body (JSON)
namestringName for the copy (optional, defaults to 'Copy of ...')
Response
SDK
GET/files/:fileId/permissions

List sharing permissions for a file

Response
SDK

Bulk Operations

POST/files/bulk-upload

Create multiple file records and get presigned upload URLs (max 20)

Request Body (JSON)
itemsarrayArray of { fileName, contentType, size, access? }
Response
SDK

Each file must be uploaded via PUT to its putUrl, then status set to DONE.

POST/files/bulk-delete

Soft-delete multiple files at once (max 100)

Request Body (JSON)
fileIdsstring[]Array of file IDs to delete
Response
SDK

Images

POST/files/:fileId/optimize

Convert image to WebP or AVIF (creates a new file)

Request Body (JSON)
formatstring'webp' (default) or 'avif'
qualitynumber1–100 (default: 80 webp, 50 avif)
Response
SDK
POST/files/:fileId/transform

Resize, crop, rotate, flip, or convert an image (creates a new file)

Request Body (JSON)
widthnumberTarget width in px
heightnumberTarget height in px
fitstring'cover', 'contain', 'fill', 'inside', 'outside'
formatstring'webp', 'avif', 'png', 'jpeg'
qualitynumber1–100
rotatenumberDegrees
flipbooleanVertical flip
grayscalebooleanConvert to grayscale
Response
SDK

Sharing

POST/files/:fileId/share

Share a file with another user by email

Request Body (JSON)
targetEmailstringRecipient email (required)
canReadbooleanDefault: true
canWritebooleanDefault: false
canDeletebooleanDefault: false
SDK
POST/files/:fileId/share-token

Generate a temporary download URL

Request Body (JSON)
expiresInnumberSeconds (60–604800, default 3600)
Response
SDK
GET/share-tokens

List share tokens (paginated)

Query Parameters
fileIdstringFilter by file
limitnumberMax results
cursorstringPagination cursor
SDK

Webhooks

Receive real-time POST notifications when events occur. Payloads are signed with HMAC SHA-256 via the X-Easybits-Signature header. Webhooks auto-pause after 5 consecutive delivery failures.

Events: file.created, file.updated, file.deleted, file.restored, website.created, website.deleted
GET/webhooks

List your configured webhooks

Response
SDK
POST/webhooks

Create a webhook. The secret is only returned on creation — save it.

Request Body (JSON)
urlstringHTTPS URL to receive POST notifications (required)
eventsstring[]Events to subscribe to (required)
Response
SDK

Max 10 webhooks per account. URL must use HTTPS.

GET/webhooks/:webhookId

Get webhook details (excluding secret)

SDK
PATCH/webhooks/:webhookId

Update webhook URL, events, or status

Request Body (JSON)
urlstringNew HTTPS URL
eventsstring[]New events list
statusstring'ACTIVE' or 'PAUSED'. Reactivating resets fail counter.
SDK
DELETE/webhooks/:webhookId

Permanently delete a webhook

Response
SDK

Verifying Signatures

Node.jsjavascript

Payload Format

JSONjson

Websites

How website deploys work:
  1. Create a website — you get an id and a URL like https://my-site.easybits.cloud
  2. Upload files with fileName set to sites/{websiteId}/path (e.g. sites/{id}/index.html)
  3. PUT the bytes to each putUrl, then set status to DONE
  4. Your site is live — SPA fallback to index.html is built-in

Deploy Example

SDKtypescript

Endpoints

GET/websites

List your static websites

SDK
POST/websites

Create a new website

Request Body (JSON)
namestringWebsite name (required)
Response
SDK
GET/websites/:websiteId

Get website details

SDK
PATCH/websites/:websiteId

Update website name or status

Request Body (JSON)
namestringNew name
statusstringe.g. 'DEPLOYED'
SDK
DELETE/websites/:websiteId

Delete website and soft-delete all its files

SDK

Documents

AI-generated professional documents (reports, brochures, catalogs, proposals, CVs) with parallel page generation, design directions, and semantic color themes.

GET/documents

List all your documents

Response
SDK
GET/documents/:id

Get a document with full page/section data

Response
SDK
POST/documents

Create a new document

Request Body (JSON)
namestringDocument name (required)
promptstringDescription for AI generation
themestringTheme: minimal, calido, oceano, noche, bosque, rosa
customColorsobjectCustom palette: { primary, secondary, accent, surface }
Response
SDK
PATCH/documents/:id

Update document metadata (name, theme, colors). Use page tools for content changes.

Request Body (JSON)
namestringNew name
promptstringUpdated prompt
themestringTheme name
customColorsobjectCustom color palette
SDK
DELETE/documents/:id

Delete a document

SDK
POST/documents/:id/deploy

Publish as a live website at slug.easybits.cloud

Response
SDK
POST/documents/:id/unpublish

Remove the live website and revert to draft

SDK

Page Management (MCP)

These tools are available via MCP for surgical page-level editing.

get_page_htmlMCP

documentId, pageId

Get the HTML and metadata of a single page.

set_page_htmlMCP

documentId, pageId, html

Update a single page's full HTML. Preferred over update_document for content edits.

get_section_htmlMCP

documentId, pageId, cssSelector

Get the outerHTML of a specific element within a page by CSS selector.

set_section_htmlMCP

documentId, pageId, cssSelector, html

Replace a specific element within a page. Enables surgical edits.

add_pageMCP

documentId, html?, afterPageIndex?, label?

Add a new page. Optionally provide HTML and insertion position.

delete_pageMCP

documentId, pageId

Remove a page. Cannot delete the last remaining page.

reorder_pagesMCP

documentId, pageIds

Reorder all pages. pageIds must contain every page ID exactly once.

get_page_screenshotMCP

documentId, pageIndex?

Take a screenshot of a page. Returns a PNG image (letter-sized). Prefer this tool to verify edits visually.

AI Generation (MCP)

generate_documentMCP

documentId, prompt, skipCover?

Generate all pages with AI via streaming. Use skipCover: true to add pages without regenerating the cover.

refine_document_sectionMCP

documentId, sectionId, instruction

Surgical AI changes to a specific page. Use get_page_html to see the result.

regenerate_document_pageMCP

documentId, sectionId

Completely redesign a page while keeping the same content intent.

enhance_document_promptMCP

name, prompt?, action?

Auto-generate a description from the title or improve an existing prompt.

get_document_directionsMCP

prompt, pageCount?, sourceContent?

Get 4 design directions (fonts, colors, mood). Pass one to generate_document.

clone_documentMCP

documentId, name?

Duplicate a document with all its pages.

Workflow

1. enhance_document_prompt — auto-generate a description

2. get_document_directions — get 4 design directions

3. create_document — create the document

4. generate_document — AI generates all pages

5. get_page_screenshot — verify pages visually

6. refine_document_section — tweak individual pages

7. deploy_document — publish at slug.easybits.cloud

Account & Usage

GET/usage

Get account usage statistics: storage, file counts, plan info

Response
SDK
GET/providers

List your configured storage providers

Response
SDK
GET/keys

List your API keys (session auth only)

SDK

Errors & Rate Limits

StatusMeaning
400Bad request (invalid params)
401Unauthorized (missing/invalid API key)
403Forbidden (insufficient scope)
404Resource not found
429Rate limited (too many requests)
500Server error

All error responses include a JSON body: {"error": "message"}

Rate limits: 100 requests per 15 minutes for all plans.

Agentes & Sandboxes

MicroVMs Firecracker para correr agentes y código aislado. Crea sandboxes, ejecuta comandos, expón puertos, y despliega agentes persistentes — todo desde el SDK, REST API o herramientas MCP.

22 herramientas MCP en el grupo sandbox. Agrega --tools sandbox para habilitarlas. Ver tool groups.

Templates

Cada sandbox se crea desde un template. Estos son los disponibles:

TemplateTipoDescripción
code-interpretersandboxPython con kernel Jupyter persistente. Variables, imports y gráficas sobreviven entre celdas
python / node / bunsandboxRuntimes base. Cada sandbox_run_code ejecuta un proceso fresco
ubuntusandboxLinux completo. Ideal para instalar paquetes, compilar, o correr servidores
rust-ghostyagenteGhosty: cerebro CodeWhale/Rust DeepSeek-first con canales web SSE y WhatsApp
claude-codeagenteClaude Agent SDK loop. Modelo Sonnet 4.6, billing por token
computer-ghostyagenteComputer-use con escritorio Linux XFCE + terminal noVNC público
ghostyclaw / openclawagenteDaemons always-on para WhatsApp, Slack, Telegram

Flujo básico: sandbox efímero

Crea un sandbox, ejecuta código, expón un puerto, destrúyelo. Ideal para ejecución aislada.

Exponer un puerto (URL pública)

Arranca un servidor dentro del sandbox y obtén una URL HTTPS pública al instante.

SDKtypescript

Kernel persistente (code-interpreter)

El template code-interpreter mantiene un kernel Jupyter con estado entre celdas. Variables, imports y gráficas (matplotlib) sobreviven.

SDKtypescript

Agentes persistentes (agent_create)

Crea agentes de larga duración con un endpoint HTTP público. Ideal para chatbots embebidos, asistentes en WhatsApp, o dashboards.

SDKtypescript

Agent Run (one-shot)

Dispara un agente Claude para una tarea, espera el resultado, y destruye el sandbox. Ideal para CI/CD, procesamiento por lotes, o tareas puntuales.

SDKtypescript

Herramientas MCP del grupo sandbox

sandbox_createMCP

template, timeoutSeconds

Crear un sandbox nuevo

sandbox_listMCP

Listar sandboxes activos

sandbox_statusMCP

sandboxId

Estado del sandbox (running/stopped/error)

sandbox_destroyMCP

sandboxId

Destruir y liberar recursos

sandbox_extendMCP

sandboxId, extendSeconds

Extender TTL del sandbox

sandbox_suspendMCP

sandboxId

Snapshot a disco y liberar CPU

sandbox_resumeMCP

sandboxId

Restaurar desde snapshot

sandbox_execMCP

sandboxId, command

Ejecutar comando (sync, 60s timeout)

sandbox_exec_backgroundMCP

sandboxId, command

Ejecutar comando en background

sandbox_exec_statusMCP

sandboxId, execId

Consultar estado de ejecución background

sandbox_run_codeMCP

sandboxId, code, lang

Ejecutar Python/Node/Bash inline

sandbox_run_cellMCP

sandboxId, code

Ejecutar celda en kernel Jupyter persistente

sandbox_files_writeMCP

sandboxId, path, content

Escribir archivo en el sandbox

sandbox_files_readMCP

sandboxId, path

Leer archivo del sandbox

sandbox_files_listMCP

sandboxId, path

Listar directorio

sandbox_expose_portMCP

sandboxId, port

Exponer puerto como URL pública HTTPS

agent_createMCP

template

Crear agente persistente (endpoint HTTP)

agent_listMCP

Listar agentes persistentes

agent_messageMCP

agentId, content

Enviar mensaje a un agente

agent_runMCP

prompt, model?

Agente Claude one-shot (async)

agent_run_statusMCP

jobId

Consultar estado de agent_run

templates_listMCP

tier?

Listar templates disponibles

Rate limits: 10 spawns/min (sandbox_create, agent_create, agent_run). 120 operaciones/min para el resto. Sandboxes se auto-destruyen al TTL (default 5 min, max 60 min).

Tool Groups

Por defecto el servidor MCP carga 12 herramientas core para minimizar el uso de tokens. Habilita grupos adicionales para desbloquear más capacidades.

GrupoHerramientasDescripción
core12Archivos, DB, documentos, cotizaciones, estadísticas (default)
sandbox22MicroVMs Firecracker: crear, ejecutar, exponer puertos, agentes persistentes y one-shot
files~37Todas las ops de archivos: bulk, sharing, permisos, webhooks, imágenes, AI keys
docs~33Documentos: generación AI, refine, screenshots, structured docs
sites~8Sitios web: CRUD, upload, deploy
brand~8Brand kits, plantillas, temas
all~104Todo (incluye slides y agentes)

Uso