API de análisis de malware

Ejecuta los mismos análisis de malware por HTTP.

URL base https://hashzyn.onrender.com. Auth: Authorization: Bearer hz_live_… o token de sesión Supabase.

Inicio rápido

  1. Crea una cuenta gratis e inicia sesión.
  2. Cuenta → Claves API: crea una clave (se muestra una sola vez).
  3. Llama un endpoint con Authorization: Bearer hz_live_…

URL base https://hashzyn.onrender.com

Autenticación

Envía un Bearer en cada petición. Claves API para servidores/CI; sesión para tus apps.

API key

Clave API (recomendado)

Crea claves hz_live_ en tu cuenta. El secreto completo solo se muestra al crearla.

Session

Sesión Supabase

Tras iniciar sesión, pasa el access token igual.

Authorization: Bearer hz_live_xxxxxxxx
Content-Type: application/json

Endpoints

Cada análisis devuelve un veredicto y el desglose de fuentes. Las muestras no se almacenan.

Veredictos: clean · suspicious · malicious · unknown

POST/v1/scan/lookup

Hash lookup

Look up a SHA-256 without uploading the file. If unknown, response may include needsUpload: true.

curl -s https://hashzyn.onrender.com/v1/scan/lookup \
  -H "Authorization: Bearer hz_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","filename":"empty"}'

Ejemplo de respuesta

{
  "id": "scn_…",
  "status": "done",
  "verdict": "unknown",
  "sha256": "e3b0…",
  "needsUpload": true,
  "sources": [
    { "engine": "hash_intel", "verdict": "unknown", "found": false }
  ]
}
POST/v1/scan/file

File scan

Multipart upload. Free plan max 3 MB; Starter/Pro max 10 MB. Sample bytes are discarded after the request — not archived.

curl -s https://hashzyn.onrender.com/v1/scan/file \
  -H "Authorization: Bearer hz_live_YOUR_KEY" \
  -F "file=@sample.bin" \
  -F "sha256=YOUR_SHA256"
POST/v1/scan/url

URL scan

Check a URL against threat feeds and page-source heuristics.

curl -s https://hashzyn.onrender.com/v1/scan/url \
  -H "Authorization: Bearer hz_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/suspicious"}'
POST/v1/scan/text

Text / code scan

Paste JavaScript, PHP, HTML, or other text for heuristic analysis.

curl -s https://hashzyn.onrender.com/v1/scan/text \
  -H "Authorization: Bearer hz_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content":"eval(atob(\"…\"))","language":"javascript"}'
GET/v1/scan/:id

Get scan by ID

Fetch a previously created scan result by id.

curl -s https://hashzyn.onrender.com/v1/scan/scn_YOUR_ID \
  -H "Authorization: Bearer hz_live_YOUR_KEY"
GET/v1/hash/:sha256

Public hash reputation

Read cached HashZyn reputation for a SHA-256 (no auth required). Also available as a shareable page on the site.

curl -s https://hashzyn.onrender.com/v1/hash/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
GET/v1/me

Account

Returns plan, credits, and dailyRemaining for the authenticated user.

curl -s https://hashzyn.onrender.com/v1/me \
  -H "Authorization: Bearer hz_live_YOUR_KEY"

Ejemplo de respuesta

{
  "id": "…",
  "email": "you@example.com",
  "plan": "free",
  "credits": 0,
  "dailyRemaining": 18
}
POST/v1/keys

Create API key

Creates a key. The full hz_live_… secret is returned once — store it securely. List with GET /v1/keys; revoke with DELETE /v1/keys/:id.

curl -s https://hashzyn.onrender.com/v1/keys \
  -H "Authorization: Bearer <session_or_key>" \
  -H "Content-Type: application/json" \
  -d '{"name":"ci"}'

Ejemplo de respuesta

{
  "id": "key_…",
  "name": "ci",
  "prefix": "hz_live_abcd1234",
  "key": "hz_live_…full_secret_once…"
}
GET/health

Salud

Comprobación de vida para monitores.

curl -s https://hashzyn.onrender.com/health

Errores

  • 401 — Bearer / clave API ausente o inválida.
  • 402 — Límite diario gratis o créditos agotados.
  • 429 — Tope IP — reintenta tras una breve espera.
  • 400 — Cuerpo inválido (hash, URL o archivo).

Límites y facturación

Un crédito = un análisis de archivo/URL no cacheado. Caché y reputación pública no consumen créditos.

  • Gratis: 20 análisis / día (UTC), 1 clave API.
  • Starter / Pro: créditos mensuales — ver precios.
  • Invitados (sin auth): límites IP más estrictos.
  • Archivos: máx. 10 MB.
Documentación de la API de análisis de malware — HashZyn