Skip to Content
unii.docs

Introduction

Unii — Unified Interface for Intelligence — provides a unified API for authentication, grounded chat completions, knowledge retrieval, and streaming responses.

What is Unii?

Unii — Unified Interface for Intelligence — provides a unified API for AI and retrieval-augmented generation (RAG) workloads. Instead of integrating with multiple models and data sources separately, you use a single API to authenticate, send chat completions, query knowledge bases, and stream responses.

Core capabilities

  • Authentication — Secure your API requests with API keys. Manage permissions and access control from the developer console.
  • Grounded chat completions — Send conversational requests that are grounded in your own knowledge base content, reducing hallucinations and improving accuracy.
  • Knowledge retrieval — Index your documents and query them with built-in RAG. Unii handles chunking, embedding, and retrieval automatically.
  • Streaming — Receive responses in real time with Server-Sent Events (SSE) support, so your users see results as they arrive.

How it works

Unii sits between your application and AI models. You send requests through the Unii API, and Unii handles authentication, knowledge base lookup, model selection, and response formatting.

The typical flow is: authenticate with an API key, create a knowledge base with your documents, then send chat completion requests that reference that knowledge base.

Quick example

Here's a minimal example that sends a chat completion request:

example.ts
import { Unii } from "@unii/sdk";const client = new Unii({apiKey: process.env.UNII_API_KEY,});const response = await client.chat.completions.create({model: "unii-latest",messages: [{ role: "user", content: "Hello, Unii!" }],});console.log(response.choices[0].message.content);

Next steps

  • Follow the Quickstart to get up and running in minutes.
  • Learn how to authenticate your API requests.
  • Browse the SDKs for TypeScript, React, Python, Go, Java, Rust, C#, and Ruby.
  • Read the API Reference for complete endpoint documentation.

On this page