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.
chat.ts
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.
POST
/v1/chat/completionsChat Completions · OpenAI formatPOST/v1/messagesMessages · Anthropic formatGET/v1/modelsModels · Available models and their capabilitiesWhat you get
- Unlimited tokens
- Build without tracking usage limits.
- Automatic model routing
- Set
modeltoauto(orunli-autoon 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_pandtop_k. - Low latency
- Optimized for fast response times.