logoUNLI

Quickstart

Quick Start

Get started with our API in just a few steps:

Get Your API Key

Visit dashboard to generate your API key.

Install SDK

Install the OpenAI SDK for your preferred language:

npm install openai
pip install openai

Make Your First Request

Start generating AI responses with a simple API call:

import OpenAI from "openai";

const openai = new OpenAI({
  baseURL: "https://api.unli.dev/v1",
  apiKey: "YOUR_API_KEY",
});

const completion = await openai.chat.completions.create({
  messages: [{ role: "user", content: "Hello, AI!" }],
  model: "auto",
});

console.log(completion.choices[0].message.content);
import openai

openai.api_key = "YOUR_API_KEY"
openai.api_base = "https://api.unli.dev/v1"

response = openai.ChatCompletion.create(
  model="auto",
  messages=[{"role": "user", "content": "Hello, AI!"}]
)

print(response.choices[0].message.content)
curl -X POST https://api.unli.dev/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "auto",
    "messages": [{"role": "user", "content": "Hello, AI!"}],
    "stream": false
  }'