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 SDK for your preferred format and language:

OpenAI SDK

npm install openai

Anthropic SDK

npm install @anthropic-ai/sdk

Make Your First Request

Start generating AI responses with a simple API call:

OpenAI Format (/v1/chat/completions)

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);

Anthropic Format (/v1/messages)

import Anthropic from "@anthropic-ai/sdk";

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

const message = await anthropic.messages.create({
  model: "unli-auto",
  max_tokens: 1024,
  messages: [
    { role: "user", content: "Hello, Claude!" }
  ],
});

console.log(message.content[0].text);

On this page