Skip to main content

Overview

LexiSaaS is an AI API proxy that uses STONE (Semantic Token Optimization and Natural Encoding) to restructure your requests and reduce token costs by 50-95%.

It is a drop-in replacement for OpenAI, Anthropic, Google, and other APIs. Change the base URL, keep the rest of your code.

Quickstart

Get started in under 5 minutes.

Create Account & Get API Key

Sign up and generate an API key from your dashboard.

Sign Upor log in

Change Base URL

Point your SDK at api.lexisaas.com instead of the provider URL.

# OpenAI-compatible format
curl https://api.lexisaas.com/v1/chat/completions \
  -H "Authorization: Bearer lx_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Send Requests

Use your existing code. STONE optimizes automatically.

Authentication

All requests require an API key in the Authorization header.

Authorization: Bearer lx_your_key_here

Use Bearer token format: Authorization: Bearer lxs_your_key

Authorization: Bearer lx_your_key:sk-your-openai-key

Keys start with lxs_ and are hashed with SHA-256. Never share your key.

Endpoints

Chat Completions

POST https://api.lexisaas.com/v1/chat/completions

OpenAI-compatible chat completions endpoint. Supports streaming.

Messages

POST https://api.lexisaas.com/v1/messages

Anthropic-compatible messages endpoint. Supports streaming.

List Models

GET https://api.lexisaas.com/v1/models

Returns all available models with pricing and provider information.

Models & Pricing

OpenAI

ModelInput (per 1M)Output (per 1M)
gpt-4o$2.50$10.00
gpt-4o-mini$0.15$0.60
gpt-4-turbo$10.00$30.00
o1$15.00$60.00
o3$10.00$40.00
o4-mini$1.10$4.40

Anthropic

ModelInput (per 1M)Output (per 1M)
claude-3.5-sonnet$3.00$15.00
claude-3.5-haiku$0.80$4.00
claude-3-opus$15.00$75.00

Google

ModelInput (per 1M)Output (per 1M)
gemini-2.0-flash$0.10$0.40
gemini-1.5-pro$1.25$5.00

xAI / DeepSeek / Meta

ModelInput (per 1M)Output (per 1M)
grok-3$3.00$15.00
grok-3-mini$0.30$0.50
deepseek-chat$0.14$0.28
deepseek-reasoner$0.55$2.19
llama-4$0.20$0.60

Response Headers

Every response includes detailed headers with cost and savings information.

HeaderDescription
X-Lexi-Request-IdUnique request ID
X-Lexi-ModelAI model used
X-Lexi-ProviderProvider (openai, anthropic, google)
X-Lexi-Tokens-InputInput tokens after STONE optimization
X-Lexi-Tokens-OutputOutput tokens
X-Lexi-Tokens-SavedTokens saved by STONE
X-Lexi-CostProvider cost (USD)
X-Lexi-SavingsMoney saved (USD)
X-Lexi-BalanceRemaining balance (USD)
X-Lexi-TSP-ConfidenceResponse time (ms)

Billing

LexiSaaS uses a prepaid credit system. Purchase credits via the dashboard.

The Lexi fee is 40% of the savings STONE generates. No savings = no fee.

Credits never expire. You can check your balance and usage in the dashboard at any time.