Skip to main content
Try Lexiel for freeTry now →
For developers

Lexiel API

Integrate the most accurate legal AI for Spanish-speaking markets into your own applications.

OpenAPI Documentation

Explore all endpoints in Swagger UI

Request API access

Get your API Key for B2B integrations

Authentication

All API routes require a Bearer token in the Authorization header. You can use a session JWT or an lxl_* API Key for server-to-server integrations.

Authorization: Bearer lxl_xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Usage example

Query Lexiel legal AI from any environment that supports HTTP.

// Authenticate with Bearer token
const response = await fetch('https://api.lexiel.ai/v1/chat', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <your_api_key>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    message: 'What does Article 1902 of the Civil Code say?',
  }),
});

const { answer, sources } = await response.json();
console.log(answer);
// → "Article 1902 CC establishes non-contractual liability..."

What can you build?

Outbound webhooks

Receive events (new invoice, upcoming deadline, document processed) in your system.

Legal chat widget

Embed the Lexiel assistant on your website with our JavaScript SDK.

Automated legal queries

Integrate Spanish and Latin American law queries into your business flows.

Case management

Create, update and query cases from your own applications.

View documentationRequest access

Weekly legal updates

Legislative changes, relevant case law, and Lexiel news. No spam. Unsubscribe anytime.

GDPR compliant. We never share your email with third parties.