Skip to main content

API documentation

Get started with LexiSaaS Proxy in 5 minutes. Drop-in compatible with OpenAI SDK.

Get started in 5 minutes

1. Get your API key

Register an account on lexico.no and go to your customer dashboard. Your API keys are under ProxyKeys.

2. Switch base URL

LexiSaaS is drop-in compatible with OpenAI SDK. You only need to change the base_url:

from openai import OpenAI

client = OpenAI(
    api_key="lsk_your_lexico_key",
    base_url="https://api.lexisaas.com/v1"
)

response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello!"}]
)

3. STONE compression activates automatically

You don't need to do anything. LexiSaaS automatically compresses all calls to save tokens. See /benchmarks for expected savings.

SDKs and languages

LexiSaaS Proxy is compatible with all OpenAI SDKs and follows the standard REST API.

Python

pip install openai. Use the OpenAI client with LexiCo base_url. 100% compatible.

JavaScript / TypeScript

npm install openai. Works in Node.js, Deno, Bun and modern browsers.

C# / .NET

dotnet add package OpenAI. Use OpenAIClient with custom endpoint.

REST / HTTP

Direct HTTP calls to /v1/chat/completions. Works from any language and tools like curl, Postman, Insomnia.

Endpoints

Method Path Description
POST/v1/chat/completionsChat completions (GPT, Claude, Llama etc.)
POST/v1/embeddingsVector embeddings for search and RAG
GET/v1/modelsList available models
GET/v1/usageToken usage and costs
TSP@lexico/tspTrust Standard Protocol npm package for verification

Need help?

Full API reference, webhook documentation and code examples are coming on developer.lexico.no. Contact us for early access.