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 are paid from a prepaid balance.
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.
Ask Jurilia, and MCP
POST /v1/dev/preguntar is the same cited question in a shape built for integrations: encontrado: false when there is no source, and every claim with its statute, article and version. With the Jurilia MCP server, an MCP-compatible AI assistant can use it, and also legislation, citations, deadlines, calculators, companies and case law, always with your own key. TypeScript and Python SDKs are available.
The operations
- POST
/asistenteAsk the legal assistant: an answer with verified citations Details (Spanish)
Per token (see pricing) - POST
/preguntarAsk Jurilia: a cited answer, or “not found” when there is no source Details (Spanish)
Per token (see pricing) - GET
/biblioteca/buscarText search over the loaded legislation Details (Spanish)
3 cents per query - GET
/saldoCheck your balance 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 -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"}'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());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=,
)
r.raise_for_status()
print(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": , "ambares": , "rojas": ,
"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": ,
"saldoCentimos": ,
"facturacion": { "cobradoCentimos": , "saldoRestanteCentimos": , "ocrCentimos": },
"documentos": null // con archivos: { "ficheros": , "paginas": , "paginasLeidasConOcr": , "caracteresEnviados": , "recortado": false }
} // cabeceras: X-Jurilia-Coste-Centimos, X-Jurilia-Saldo-CentimosThe 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
Charged from your prepaid balance per token, with no flat fee: €22 per million input tokens, €2.20 per million cached input tokens and €110 per million output and reasoning tokens. A normal question comes to about 30 cents and a long one to about 90 cents; reading a scanned page with OCR costs 2 cents. The maximum price is set aside before the model is called and you are never charged more than that. Every response states the tokens of each type, the price applied and the total. 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?
- Per token, with no flat fee: €22 per million input tokens, €2.20 per million cached input tokens and €110 per million output and reasoning tokens. A normal question comes to about 30 cents and a long one to about 90 cents. Every response states the tokens, the price applied and the total.
- 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. From 2 cents.
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. 5 cents each.
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. 10 cents per computation.
See the API →Content reviewed on 2026-10-06