Developers

Lexible API

Every Lexible machine exposes an OpenAI-compatible API. Your data never leaves the machine: requests go straight to it, over its own TLS certificate, through the blind relay when you are off-site. Point any OpenAI client library at the machine's base URL and use a Lexible API key.

Base URL and keys

Sign in to see your machines' addresses. Addresses look like https://acme-law.on.lexible.ai.

Keys look like lxk_xxxxxxxx_…. Organization admins create them on the organization page (valid on every machine in the organization) or on one machine's Developers page (valid there only). Each key has scopes and a per-minute rate limit. Keys are stateless: they never read or write anyone's conversations.

ScopeAllows
chatPOST /chat/completions (streaming with stream: true)
modelsGET /models
embeddingsPOST /embeddings
imagesPOST /images/generations (501 until the image engine ships)
statusGET /status — load, model readiness, capacity

Examples

curl https://your-machine.on.lexible.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $LEXIBLE_API_KEY" -H "Content-Type: application/json" \
  -d '{"model": "default", "messages": [{"role": "user", "content": "Summarise this contract clause: …"}]}'
from openai import OpenAI
client = OpenAI(base_url="https://your-machine.on.lexible.ai/api/v1", api_key=os.environ["LEXIBLE_API_KEY"])
reply = client.chat.completions.create(model="default", messages=[{"role": "user", "content": "Hello"}])
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://your-machine.on.lexible.ai/api/v1", apiKey: process.env.LEXIBLE_API_KEY });
const out = await client.embeddings.create({ model: "default", input: ["invoice", "receipt"] });

Behaviour

app.lexible.ai manages access only. Conversations stay on your machine.