Assistant API
Legal AI assistant API that cites its sources
Send a legal question and get an answer built only from the public library, with every citation checked against the article. If there is no source it answers sin_fuentes: it does not answer from memory. The answer is born “proposed”: it is not advice until a lawyer validates it.
Access status
Access is open
Create your developer account, confirm your email and enable two-factor authentication (mandatory) to create your key. The library, calculators and deadlines do not use balance; companies and assistant come with 100 trial queries, no card needed.
Access will be for verified businesses worldwide.
Who it is for
- Legal tech and practice-management software that wants a legal assistant inside its product without training or maintaining one.
- Teams building workflows with language models that need answers with verifiable citations.
- Anyone who wants to ask about a document (PDF, Word, image) without it being stored.
What you can do
Answers with verified citations
It answers only from the public library, citing article, statute and version, and checks every citation (verificacion: green, amber or red). If there is no source, desenlace: "sin_fuentes".
Questions about a document
It accepts PDF (text or scanned), Word (.docx), JPEG and PNG in a multipart request: up to 5 files, 10 MiB each and 20 MiB in total. They are read in memory and not stored.
Personal data covered
What you write is pseudonymised before it reaches the model; with ocultar you add names or addresses that are not recognised on their own.
Spend under control
Before calling the model the worst case is reserved; with maxCosteCentimos you set a cap and the response states what was charged. If it fails, nothing is charged.
The operations
- POST
/asistenteAsk the legal assistant: an answer with verified citations Details (Spanish)
Real model cost ×5 - GET
/biblioteca/buscarText search over the loaded legislation Details (Spanish)
Free - GET
/saldoCheck your balance and remaining trial queries Details (Spanish)
Free
Request and response examples
The examples read your key from the JURILIA_API_KEY environment variable.
Ask a question
orden brings the search closer to civil, criminal, labour or administrative law. It only answers in fast mode.
curl
curl -X POST https://api.jurilia.com/v1/dev/asistente \
-H "Authorization: Bearer $JURILIA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"pregunta":"¿Cuánto tiempo hay para reclamar tras un despido?","orden":"social"}'Python
import os
import requests
r = requests.post(
"https://api.jurilia.com/v1/dev/asistente",
headers={"Authorization": f"Bearer {os.environ['JURILIA_API_KEY']}"},
json={"pregunta":"¿Cuánto tiempo hay para reclamar tras un despido?","orden":"social"},
timeout=30,
)
r.raise_for_status()
print(r.json())JavaScript
const r = await fetch("https://api.jurilia.com/v1/dev/asistente", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.JURILIA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"pregunta":"¿Cuánto tiempo hay para reclamar tras un despido?","orden":"social"}),
});
if (!r.ok) throw new Error(`HTTP ${r.status}`);
console.log(await r.json());Response (the shape; the values are examples)
{
"desenlace": "respondido",
"texto": "…respuesta con sus citas…",
"fuentes": [
{ "boeId": "BOE-A-…", "bloqueId": "…", "tituloNorma": "…", "abreviatura": "ET",
"articulo": "59", "tituloBloque": "…", "vigenciaDesde": "AAAA-MM-DD",
"vigenciaHasta": null, "urlOficial": "https://www.boe.es/…" }
],
"verificacion": {
"resultado": "verde", "verdes": 1, "ambares": 0, "rojas": 0,
"citas": [{ "referencia": "ET:59.2", "resultado": "verde", "motivo": "…", "fuenteUrl": "https://www.boe.es/…" }]
},
"truncado": false,
"estado": "propuesto",
"aviso": "Respuesta generada por inteligencia artificial … debe validarla un abogado antes de usarla.",
"cobradoCentimos": 3,
"saldoCentimos": 9997,
"facturacion": { "cobradoCentimos": 3, "deLaPrueba": false, "saldoRestanteCentimos": 9997, "pruebaRestante": 0, "ocrCentimos": 0 },
"documentos": null // con archivos: { "ficheros": 1, "paginas": 12, "paginasLeidasConOcr": 0, "caracteresEnviados": 21840, "recortado": false }
} // cabeceras: X-Jurilia-Coste-Centimos, X-Jurilia-Saldo-Centimos, X-Jurilia-Prueba-RestanteThe values are illustrative so you can see the exact shape of the response; they are not data from a real query.
Why you can trust what it returns
Cite or stay silent
Every legal claim carries its linked source; if there is none, sin_fuentes.
Every citation verified
The verification result (green, amber or red) travels with the answer: you do not have to trust unchecked text.
The lawyer validates
The answer is born propuesto and carries the notice that an AI generated it.
Your files are not stored
Files are processed in memory and discarded when the request ends.
Limits and what it does not do
- It answers only from the public library: it does not accept case files or law-firm data, and a request with extra fields is rejected.
- Fast mode only.
- Files: up to 5 per request, 50 pages per PDF and 100 per request; reading scanned pages (OCR) is capped at 20 pages per request.
- The answer is not advice until a lawyer validates it.
- 120 calls per minute per key.
Price
The first 100 company and assistant queries are a one-time trial, shared between the two. After that the real model cost is charged multiplied by 5, with a minimum of 1 euro cent; the exact amount depends on the question and every response states what was charged. If the model fails, nothing is charged.
Authentication and errors
Every call carries the key of your developer account in the header Authorization: Bearer iuris_sk_…. The base address is https://api.jurilia.com. There is a limit of 120 calls per minute per key, with the headers X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset on every response. A key can carry an allow-list of IPs or networks (CIDR).
Failures come as JSON with a stable code: 401 (missing or invalid key), 402 (no balance: not served and not charged), 403 (IP not allowed), 409 (a datum that decides the calculation is missing: not charged) and 429 (too many calls in a row).
Frequently asked questions
- What does the assistant do when it finds no source?
- It answers
desenlace: "sin_fuentes"and does not answer from memory: with no linked source there is no legal answer. - How much does a query cost?
- After the trial, the real model cost multiplied by 5, with a minimum of 1 euro cent. There is no flat rate per query: it depends on the question, and the response states what was charged.
- Can I send documents?
- Yes: PDF, Word (.docx), JPEG or PNG in a
multipart/form-datarequest. They are read in memory, not stored, and personal data is pseudonymised before the model. - Can I use the answer directly in a filing?
- Not without reviewing it: it is born
propuestoand carries the notice that an AI generated it. A lawyer validates it.
More APIs and use cases
Spanish legislation API
Ask for an article by citation (“ET 59”) on a date; get the consolidated text with its validity and official link. Versions and search. Free.
See the API →Legal calculators API
Twenty legal calculators by API: dismissal severance, final settlement, child support by CPI, traffic scale… With trace and legal basis. Free.
See the API →Court deadlines API
Calculate a Spanish procedural deadline’s due date in working days with the right official calendar, with trace and warnings. Free.
See the API →Content reviewed on 2026-10-06