API de Reality Check

Sella fotos y videos con prueba de autenticidad. Verifica integridad en tiempo real. Genera informes periciales ISO/IEC 27037. Integra analisis IA sobre evidencia autenticada.

Para agentes IA: Si eres un agente o LLM integrando esta API, ve directamente a la guia de integracion para agentes. Tambien puedes leer /static/llms.txt para un resumen machine-readable.
Base URL: https://prorealitycheck.com/api/v1
Formato: JSON (application/json) — archivos via multipart/form-data
Auth: Cabecera X-API-Key: rc_live_...

Quick start — 3 pasos

# 1. Obtén tu API key en /developer # 2. Sella una foto curl -X POST https://prorealitycheck.com/api/v1/certify \ -H "X-API-Key: rc_live_YOUR_KEY" \ -F "file=@foto.jpg" \ -F "client_hash=sha256_de_la_foto" \ -F "ref_id=caso-001" # 3. Verifica la integridad curl https://prorealitycheck.com/api/v1/verify/RC-20250320-AB12 \ -H "X-API-Key: rc_live_YOUR_KEY"

Autenticacion

Todas las llamadas requieren una API key en la cabecera X-API-Key.

Tipo de claveFormatoUso
rc_live_...44 caracteresAPI personal (portal /developer)
rc_...44 caracteresAPI Partner B2B (/api/partner)
rck_...48 caracteresClave corporativa (Bearer token)
cURL
Python
JavaScript
curl https://prorealitycheck.com/api/v1/status \ -H "X-API-Key: rc_live_YOUR_KEY"
import requests KEY = "rc_live_YOUR_KEY" r = requests.get("https://prorealitycheck.com/api/v1/status", headers={"X-API-Key": KEY}) print(r.json())
const r = await fetch('https://prorealitycheck.com/api/v1/status', { headers: { 'X-API-Key': 'rc_live_YOUR_KEY' } }); const data = await r.json();

Codigos de error

HTTPSignificadoAccion
400Parametros invalidosRevisa el body de la peticion
401API key invalida o expiradaRegenera la clave en /developer
402Sin creditos disponiblesCompra creditos en /billing
404Evidencia no encontradaComprueba el codigo CSV
413Archivo demasiado grandeMax 15MB fotos, 500MB videos
422Hash no coincide / formato invalidoRecalcula el SHA-256 del archivo
429Rate limit superadoEspera y reintenta con backoff

Todos los errores devuelven JSON: {"detail": "descripcion del error"}

Rate limits

EndpointLimite
GET /api/v1/status30 req/min
POST /api/v1/certify10 req/min
GET /api/v1/verify/{csv}20 req/min
GET /api/v1/report/{csv}5 req/min
GET /api/v1/usage20 req/min
POST /api/partner/onboarding3 req/min
POST /api/partner/verify/batch10 req/min

Endpoints — API v1

GET/api/v1/statusSaldo de creditos

Devuelve el balance de creditos del propietario de la API key.

{ "email": "user@example.com", "credits": { "free_remaining": 5, "paid_photo": 50, "verify_credits": 10, "report_credits": 2 } }
POST/api/v1/certifyCertificar foto — 1 credito

Sella una foto con hash, GPS y marca de tiempo. Consume 1 credito de foto.

Parametros (multipart/form-data)

CampoTipoDescripcion
filefileReqImagen JPG/PNG/WebP (max 15 MB)
client_hashstringReqSHA-256 hex del archivo (validacion anti-tampering)
ref_idstringReqReferencia identificativa (max 100 chars)
latfloatOptLatitud GPS (default 0.0)
lonfloatOptLongitud GPS (default 0.0)

Respuesta (201)

{ "csv_code": "RC-20250320-AB12", "hash_fiel": "a1b2c3d4e5f6...", "hash_pub": "f6e5d4c3b2a1...", "trust_rating": 5, "verify_url": "https://.../api/v1/verify/RC-20250320-AB12", "report_url": "https://.../api/v1/report/RC-20250320-AB12", "credit_source": "paid" }

Ejemplo Python

import hashlib, requests # Calcular hash del archivo with open("foto.jpg", "rb") as f: data = f.read() sha = hashlib.sha256(data).hexdigest() r = requests.post("https://prorealitycheck.com/api/v1/certify", headers={"X-API-Key": "rc_live_YOUR_KEY"}, files={"file": ("foto.jpg", data, "image/jpeg")}, data={"client_hash": sha, "ref_id": "caso-001"} ) print(r.json())

Ejemplo JavaScript (Node.js / fetch)

const fs = require('fs'); const crypto = require('crypto'); const file = fs.readFileSync('foto.jpg'); const hash = crypto.createHash('sha256').update(file).digest('hex'); const form = new FormData(); form.append('file', new Blob([file]), 'foto.jpg'); form.append('client_hash', hash); form.append('ref_id', 'caso-001'); const r = await fetch('https://prorealitycheck.com/api/v1/certify', { method: 'POST', headers: { 'X-API-Key': 'rc_live_YOUR_KEY' }, body: form, }); const data = await r.json(); console.log(data.csv_code); // RC-20250326-XXXX
GET/api/v1/verify/{csv_code}Verificar integridad — 1 credito

Re-hashea el vault y compara con el registro en BD. Consume 1 credito de verificacion.

{ "csv_code": "RC-20250320-AB12", "integrity_intact": true, "integrity_msg": "Archivo integro desde su sellado", "hash_fiel": "a1b2c3d4e5f6...", "timestamp": "2025-03-20T14:32:15+00:00", "lat": 40.4168, "lon": -3.7038, "ciudad": "Madrid", "trust_rating": 5 }

Ejemplo rapido

Python
JavaScript
cURL
r = requests.get("https://prorealitycheck.com/api/v1/verify/RC-20250320-AB12", headers={"X-API-Key": KEY}) d = r.json() if d["integrity_intact"]: print("Imagen autentica", d["trust_rating"], "estrellas") else: print("ALERTA: imagen manipulada")
const r = await fetch('https://prorealitycheck.com/api/v1/verify/RC-20250320-AB12', { headers: { 'X-API-Key': 'rc_live_YOUR_KEY' } }); const d = await r.json(); if (d.integrity_intact) console.log('Autentica', d.trust_rating, '★'); else console.warn('MANIPULADA');
curl https://prorealitycheck.com/api/v1/verify/RC-20250320-AB12 \ -H "X-API-Key: rc_live_YOUR_KEY"
GET/api/v1/report/{csv_code}Informe judicial PDF — 1 credito

Genera un acta pericial ISO/IEC 27037 en PDF. Consume 1 credito de informe.

Respuesta: binario PDF con Content-Type: application/pdf

curl -OJ https://prorealitycheck.com/api/v1/report/RC-20250320-AB12 \ -H "X-API-Key: rc_live_YOUR_KEY" # Descarga: ACTA_RC-20250320-AB12.pdf
GET/api/v1/usage?months=3Historial de consumo
{ "key_prefix": "rc_live_xxxx", "usage_by_month": [ { "year":2025, "month":3, "certify_calls":15, "verify_calls":20, "report_calls":5 } ] }
POST/api/v1/request-captureInvitacion invertida — empresa paga y solicita foto
Flujo invertido: La empresa crea la invitacion, paga la sellado, y obtiene derechos de analisis IA sobre la imagen sellada. Solo disponible para Pro Business (39 EUR/mes) y Enterprise (499 EUR/mes).
CampoTipoDescripcion
capturer_emailstringReqEmail de quien tomara la foto
notestringOptInstrucciones para el capturador
expires_hoursintOptValidez de la invitacion (1-720h, default 72)
analysis_typestringOptTipo de analisis: general, damage_assessment, content_description
// Respuesta { "token": "abc123...", "capture_url": "https://.../capture-page?invite=abc123...", "paid_by": "empresa@axa.com", "analysis_enabled": true, "message": "Invitacion creada. Cuando el cliente complete la foto, tendras derechos de analisis." }

Flujo completo

# 1. Empresa solicita foto al cliente (paga 1 credito) r = requests.post("https://prorealitycheck.com/api/v1/request-capture", headers={"X-API-Key": KEY}, json={"capturer_email": "cliente@gmail.com", "note": "Foto frontal del vehiculo siniestrado"}) invite = r.json() # → Enviar invite["capture_url"] al cliente por email/WhatsApp # 2. Cliente abre el link, hace la foto, RC la sella # 3. Empresa recibe webhook "certify.complete" con csv_code # 4. Empresa obtiene metadatos de la evidencia sellada ev = requests.get(f"https://prorealitycheck.com/api/v1/evidence/{csv_code}", headers={"X-API-Key": KEY}).json() # 5. Empresa descarga imagen y ejecuta su IA img = requests.get(ev["download_url"]).content ai_result = my_damage_model.analyze(img) # 6. Empresa sube el analisis a RC (queda vinculado permanentemente) requests.post(f"https://prorealitycheck.com/api/v1/evidence/{csv_code}/analyze", headers={"X-API-Key": KEY}, json={ "provider_name": "AXA Damage AI v2.1", "analysis_type": "damage_assessment", "results": ai_result, "confidence": 0.94 })
GET/api/v1/evidence/{csv_code}Evidencia completa + URL de descarga (para IA)

Devuelve la prueba de integridad, metadatos completos y una URL firmada para descargar la imagen original verificada. Consume 1 credito de verificacion.

Caso de uso: Tu sistema recibe un codigo CSV, llama a este endpoint para confirmar que la imagen es autentica, descarga el original verificado via download_url y lo pasa a tu modelo de IA sabiendo que no ha sido manipulado.
// Respuesta { "csv_code": "RC-20250325-AB12", "verified": true, "integrity": { "intact": true, "msg": "Archivo integro desde su sellado", "hash_fiel": "A1B2C3...", "hash_pub": "D4E5F6..." }, "metadata": { "timestamp": "2025-03-25T14:32:15+00:00", "lat": 40.4168, "lon": -3.7038, "ref_id": "siniestro-2025-001", "media_type": "photo", "trust_rating": 5 }, "download_url": "https://.../api/v1/download/RC-...?exp=...&sig=...", "download_ttl_seconds": 3600 }

Ejemplo: Pipeline IA en Python

import requests KEY = "rc_live_YOUR_KEY" CSV = "RC-20250325-AB12" # 1. Verificar y obtener URL de descarga r = requests.get(f"https://prorealitycheck.com/api/v1/evidence/{CSV}", headers={"X-API-Key": KEY}) data = r.json() if not data["integrity"]["intact"]: raise ValueError("Imagen manipulada — no procesar") # 2. Descargar la imagen original verificada img_r = requests.get(data["download_url"]) img_bytes = img_r.content # 3. Pasar a tu modelo de IA con garantia de autenticidad # La imagen tiene SHA-256 = data["integrity"]["hash_fiel"] # Trust rating = data["metadata"]["trust_rating"] (1-5) result = your_ai_model.analyze(img_bytes, metadata=data["metadata"])
GET/api/v1/download/{csv_code}?exp=...&sig=...Descargar imagen (URL firmada)

Descarga el archivo original del vault (descifrado). No requiere API key — la autenticacion es via firma HMAC en la URL.

ParamTipoDescripcion
expintReqUnix timestamp de expiracion
sigstringReqFirma HMAC-SHA256 (32 chars)

Headers de respuesta utiles:

HeaderValor
X-RC-HashSHA-256 del archivo original
X-RC-Integrityintact o unknown
X-RC-Trust-Rating1-5
La URL expira en 1 hora. Si caduca, solicita una nueva via /api/v1/evidence/{code}.
POST/api/v1/evidence/{csv}/analyzeEnviar analisis IA sobre evidencia sellada

Registra los resultados de tu modelo de IA sobre una evidencia. Solo disponible si la evidencia fue creada via invitacion invertida (request-capture) pagada por tu cuenta.

CampoTipoDescripcion
provider_namestringReqNombre de tu modelo/servicio IA
analysis_typestringOptdamage_assessment, content_description, general
resultsobjectReqResultados del analisis (formato libre)
confidencefloatOptConfianza del analisis (0.0-1.0)
El analisis queda vinculado permanentemente a la evidencia. Aparece en el informe judicial PDF, en la web de verificacion y en la API.
GET/api/v1/evidence/{csv}/analysesListar analisis IA de una evidencia

Devuelve todos los analisis IA vinculados a una evidencia. Requiere derechos de analisis.

POST/api/v1/webhooksRegistrar webhook
CampoTipoDescripcion
urlstringReqURL HTTPS del receptor
eventsstring[]Reqcertify.complete, evidence.verified
// Respuesta { "status": "created", "url": "https://tu-servidor.com/webhooks/rc", "secret": "whsec_abc123..." // guardar — no se vuelve a mostrar }
GET/api/v1/webhooksListar webhooks activos

Devuelve array de webhooks registrados para tu API key.

DELETE/api/v1/webhooks/{id}Eliminar webhook

Elimina un webhook por su ID.

Endpoints — Partner B2B

API para integraciones empresariales. Base: /api/partner. Auth: X-API-Key: rc_...

GET/api/partner/plansPlanes disponibles (publico)

No requiere autenticacion. Devuelve planes B2B con precios y quotas.

POST/api/partner/onboardingRegistrar partner y obtener API key
CampoTipoDescripcion
partner_namestringReqNombre de la empresa
partner_emailstringReqEmail de contacto
plan_idstringReqID del plan (de GET /plans)
La API key solo se muestra una vez. Guardala de forma segura.
GET/api/partner/verify/{csv_code}Verificar evidencia (1 unidad de quota)

Verifica integridad y devuelve datos completos incluyendo hashes, ubicacion y trust rating.

POST/api/partner/verify/batchVerificar hasta 50 evidencias
Facturacion: Cada evidencia encontrada consume 1 unidad de quota. Un batch de 50 codigos donde 30 existen = 30 unidades consumidas. Las no encontradas no consumen quota.
// Request { "csv_codes": ["RC-001", "RC-002", "RC-003"] } // Response { "count": 3, "quota_used": 2, "results": [ { "csv": "RC-001", "found": true, "intact": true, "trust_rating": 5 }, { "csv": "RC-002", "found": false } ] }
GET/api/partner/statusQuota y uso del mes
{ "partner_name": "Acme Corp", "quota_month": 10000, "used_month": 4200, "remaining": 5800, "quota_reset": "2025-04-01" }

Widget embebible

Inserta un verificador de evidencias directamente en tu web con una sola linea de codigo.

Seguridad: El widget usa un endpoint proxy (/api/widget/verify) para que tu API key no quede expuesta en el HTML de tu pagina. La key se valida en servidor y solo devuelve datos publicos (sin PII, sin GPS exacto). El rate limit es de 30 req/min por IP.

Instalacion

<!-- 1. Contenedor --> <div id="rc-widget"></div> <!-- 2. Script con tu widget key --> <script src="https://prorealitycheck.com/static/widget.js" data-key="rc_live_YOUR_KEY" data-theme="dark" data-lang="es"> </script>

Opciones (data-attributes)

AtributoValoresDefaultDescripcion
data-keyrc_live_...Tu API key (requerida para verificar)
data-csvRC-XXXXPre-rellenar un codigo concreto
data-themelight | darklightTema visual
data-langes | enesIdioma
data-modefull | compact | badgefullModo de visualizacion
data-targetCSS selector#rc-widgetPunto de montaje
data-callbackfunctionNameFuncion global llamada con el resultado

Modos

full — Formulario completo con input, boton, resultado detallado (trust, fecha, ubicacion, hash).
compact — Input + boton en linea. Ideal para barras de herramientas.
badge — Insignia automatica que verifica un CSV fijo. Requiere data-csv. Ideal para paginas de evidencia.

Ejemplo: Badge en tu web

<!-- Muestra "Verificado" o "No verificado" automaticamente --> <div id="rc-widget"></div> <script src="https://prorealitycheck.com/static/widget.js" data-key="rc_live_YOUR_KEY" data-csv="RC-20250320-AB12" data-mode="badge"> </script>

Ejemplo: Callback personalizado

<script> function onVerification(result) { if (result.integrity_intact) { console.log('Evidencia integra:', result.csv_code); // Actualizar tu UI, guardar en tu BD, etc. } else { console.warn('Integridad comprometida'); } } </script> <div id="rc-widget"></div> <script src="https://prorealitycheck.com/static/widget.js" data-key="rc_live_YOUR_KEY" data-callback="onVerification"> </script>

Firma de webhooks

Cada webhook se firma con HMAC-SHA256. Verifica la firma antes de procesar el evento.

Cabeceras del webhook

CabeceraDescripcion
X-RC-EventNombre del evento (certify.complete, evidence.verified)
X-RC-Signaturesha256=HMAC_HEX
Content-Typeapplication/json

Verificar firma (Python)

import hmac, hashlib def verify_webhook(payload_bytes, signature_header, secret): expected = "sha256=" + hmac.new( secret.encode(), payload_bytes, hashlib.sha256 ).hexdigest() return hmac.compare_digest(expected, signature_header)

Verificar firma (Node.js)

const crypto = require('crypto'); function verifyWebhook(body, sigHeader, secret) { const expected = 'sha256=' + crypto.createHmac('sha256', secret).update(body).digest('hex'); return crypto.timingSafeEqual( Buffer.from(expected), Buffer.from(sigHeader) ); }

Reintentos

Si tu servidor responde 5xx, reintentamos con backoff exponencial: 2s, 4s, 8s (max 3 reintentos). Las respuestas 2xx/3xx/4xx no se reintentan.

Modo sandbox

Las API keys con is_sandbox=true devuelven respuestas sinteticas sin consumir creditos. Usa sandbox para desarrollo y testing.

Las respuestas sandbox incluyen "sandbox": true para distinguirlas de datos reales. Los CSV generados empiezan por SANDBOX-.

Precios

Todos los precios incluyen 21% IVA. Sin permanencia.

Packs (pago unico, sin compromiso)

PackCreditosPVPPrecio/unidad
PHOTO_2525 fotos2,90 €0,12 €
PHOTO_5050 fotos4,90 €0,10 € -16%
PHOTO_200200 fotos14,90 €0,075 € -36%
VERIFY_55 verificaciones5,00 €1,00 €
VERIFY_2020 verificaciones15,00 €0,75 € -25%
VERIFY_5050 verificaciones30,00 €0,60 € -40%
REPORT_11 informe35,00 €35,00 €
REPORT_55 informes149,00 €29,80 € -15%
REPORT_1010 informes259,00 €25,90 € -26%

Suscripciones Pro (base + overage)

PlanMensualAnualCerts incl.Verify incl.Informes incl.
Pro Personal9,90 €89 €3051
Pro Business39,00 €349 €200205
Enterprise499,00 €4.990 €10.0002.000100

Tarifas de exceso (overage)

Cuando se agotan los creditos incluidos, el uso continua y se factura al final del ciclo.

PlanExceso certExceso verifyExceso informe
Pro Personal0,15 €1,50 €30,00 €
Pro Business0,10 €1,00 €25,00 €
Enterprise0,03 €0,50 €20,00 €
Como funciona: Stripe crea la factura mensual → RC inyecta las lineas de exceso automaticamente via webhook invoice.created → el cliente paga base + exceso en un solo cargo.

Guia de integracion para agentes IA

Si eres un agente, LLM o sistema automatizado integrando Reality Check, esta seccion es para ti.

Resumen para agentes: Reality Check sella fotos con hash SHA-256 + GPS + timestamp. La imagen sellada queda en un vault cifrado AES-256. Tu puedes verificar su integridad, descargar la imagen autenticada, y enviar resultados de analisis IA que se vinculan permanentemente.

Endpoints que necesitas (en orden)

#EndpointPara queCoste
1GET /api/v1/statusComprobar creditos disponiblesGratis
2POST /api/v1/certifySellar una foto (hash + GPS + timestamp)1 sello
3GET /api/v1/verify/{csv}Verificar que no fue manipulada1 verify
4GET /api/v1/evidence/{csv}Metadatos completos + URL de descarga1 verify
5GET /api/v1/download/{csv}Descargar imagen verificada (URL firmada)Gratis
6POST /api/v1/evidence/{csv}/analyzeEnviar tu analisis IAGratis

Autenticacion

# Todas las llamadas llevan esta cabecera: X-API-Key: rc_live_YOUR_KEY # Excepto /api/v1/download que usa firma HMAC en la URL

Flujo completo para un agente

import requests, hashlib BASE = "https://prorealitycheck.com" KEY = "rc_live_YOUR_KEY" H = {"X-API-Key": KEY} # ── Paso 1: Comprobar creditos ────────────────────────────── status = requests.get(f"{BASE}/api/v1/status", headers=H).json() print(f"Sellos: {status['credits']['paid_photo']}") # ── Paso 2: Sellar una foto ───────────────────────────────── with open("foto.jpg", "rb") as f: data = f.read() sha = hashlib.sha256(data).hexdigest() r = requests.post(f"{BASE}/api/v1/certify", headers=H, files={"file": ("foto.jpg", data)}, data={"client_hash": sha, "ref_id": "agente-analisis-001"}) csv = r.json()["csv_code"] print(f"Sellada: {csv}") # ── Paso 3: Verificar integridad ──────────────────────────── v = requests.get(f"{BASE}/api/v1/verify/{csv}", headers=H).json() assert v["integrity_intact"], "Imagen manipulada" # ── Paso 4: Obtener metadatos + URL de descarga ──────────── ev = requests.get(f"{BASE}/api/v1/evidence/{csv}", headers=H).json() print(f"GPS: {ev['metadata']['lat']}, {ev['metadata']['lon']}") print(f"Trust: {ev['metadata']['trust_rating']}/5") # ── Paso 5: Descargar imagen verificada ───────────────────── img = requests.get(ev["download_url"]) img_bytes = img.content # imagen original, descifrada del vault # ── Paso 6: Ejecutar tu IA y subir resultados ────────────── # (solo disponible si la evidencia fue creada via request-capture) resultado_ia = { "tipo": "vehiculo", "dano": "impacto frontal", "severidad": "moderado", "coste_estimado": 3200, } requests.post(f"{BASE}/api/v1/evidence/{csv}/analyze", headers=H, json={ "provider_name": "Mi Agente IA v1.0", "analysis_type": "damage_assessment", "results": resultado_ia, "confidence": 0.94, })

Codigos de respuesta que tu agente debe manejar

HTTPSignificadoAccion del agente
200OKProcesar respuesta JSON
401API key invalidaParar. Verificar key. No reintentar.
402Sin creditosParar. Notificar al usuario que compre en /billing
404Evidencia no existeVerificar CSV code. No reintentar.
422Hash no coincideRecalcular SHA-256. El archivo puede estar corrupto.
429Rate limitEsperar 60 segundos. Reintentar con backoff.
500Error internoReintentar 1 vez tras 5 segundos.

Notas para agentes

Importante:
  • El client_hash en /certify es obligatorio — calcula SHA-256 del archivo ANTES de enviarlo
  • La URL de descarga (download_url) expira en 1 hora — usala inmediatamente
  • El endpoint /analyze solo funciona en evidencias creadas via /request-capture (flujo invertido)
  • Los webhooks te notifican cuando una captura solicitada se completa — no necesitas polling
  • Rate limit: 10 req/min para certify, 20 req/min para verify, 30 req/min para download