logoUNLI

Base URLhttps://api.unli.dev/v1

Overview

UNLI serves unlimited tokens through OpenAI- and Anthropic-compatible endpoints. Ask for the auto model and each request is routed to a suitable model. The rest of your code stays the same.

import OpenAI from "openai";
​
const client = new OpenAI({
Removed: baseURL: "https://api.openai.com/v1",
Added: baseURL: "https://api.unli.dev/v1",
Removed: apiKey: process.env.OPENAI_API_KEY,
Added: apiKey: process.env.UNLI_API_KEY,
});
​
const completion = await client.chat.completions.create({
Removed: model: "gpt-4o",
Added: model: "auto",
messages: [{ role: "user", content: "Hello, AI!" }],
});

Endpoints

UNLI exposes two conversation endpoints, one per API format, plus a model listing.

What you get

Unlimited tokens
Build without tracking usage limits.
Automatic model routing
Set model to auto (or unli-auto on Messages) and UNLI picks a model for each request.
Drop-in compatibility
Works with the official OpenAI and Anthropic SDKs. Change the base URL and API key.
Streaming
Real-time responses over Server-Sent Events (SSE).
Vision
Analyze and describe images sent by URL or base64.
Tool calling
Function calling and structured outputs.
Multi-turn context
Conversation context carries across turns.
Sampling controls
Tune output with temperature, top_p and top_k.
Low latency
Optimized for fast response times.

On this page