Skip to content

Introduction

The Lexcel public API lets you work with your workspaces programmatically: ask the Lexcel agent questions grounded in your documents, upload files into a workspace, and read its document and project structure.

It’s a REST API over HTTPS, authenticated with API keys, with JSON responses. Every resource is versioned under /v1.

https://api.lexcel.ai/public

Authenticate

Create an API key, send it as a Bearer token, and pick the right scopes. See Authentication.

API Reference

Explore every endpoint, with request/response schemas and a “Try it” console, in the API Reference.

Terminal window
# 1. Find the workspace your key is bound to
curl https://api.lexcel.ai/public/v1/workspaces \
-H "Authorization: Bearer lxcl_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# 2. Ask a question grounded in that workspace
curl -X POST https://api.lexcel.ai/public/v1/workspaces/123/query \
-H "Authorization: Bearer lxcl_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"question": "What is the indemnity cap in the purchase agreement?"}'

The answer may include <<file_id = N>> citation tags pointing at the source documents.