Beta docs: the shipped API is POST /api/v1/generate for gemini and sarvam. Some pages below describe planned features. See the shipped quick start.

Introduction

OpenLink Documentation

One API for multiple AI providers. OpenLink gives your application a single, provider-agnostic interface for talking to any supported model — without rewriting logic when you switch.

OpenLink is a unified AI gateway. Claude, Gemini, and Sarvam speak different SDKs, different schemas, and different dialects of JSON. OpenLink sits in front of all of them and exposes one endpoint, one key, and one response shape that your code targets once.

Your application keeps talking to a single API. Which provider answers is a decision the gateway makes — on latency, availability, cost, and language — decided per request, not per release.

Installation

terminal
npm install @openlink/sdk

The SDK is in private beta. Once you have a key, it installs like any other package and needs no further configuration beyond the key itself.

Minimal API example

index.ts
import { OpenLink } from "@openlink/sdk";

const client = new OpenLink({
  apiKey: process.env.OPENLINK_API_KEY,
});

const response = await client.chat({
  provider: "anthropic",
  model: "claude",
  messages: [
    {
      role: "user",
      content: "Hello OpenLink",
    },
  ],
});

console.log(response.choices[0].message.content);

That is the whole interface: an api key, an array of messages, an answer. The provider field is how you hint where the request goes — omit it and the gateway routes automatically.

How a request flows

  1. Your app calls POST /v1/chat once, with one key.
  2. OpenLink picks a provider based on availability, latency, cost, and the language of the message.
  3. The provider's response is normalized into the OpenLink schema before it reaches you.
  4. Every hop — model, timing, token counts, cost — lands in your dashboard as a single log line.

Supported providers

ProviderModelRegionWhat it's good at
AnthropicClaudeusCareful general reasoning
GoogleGeminiglobalLong context, multimodal
SarvamSarvam AIin-1Hindi and 22 more Indian languages, speech

Providers are enable/disable switches in the dashboard, not code. Adding a provider later never touches your application.

What this documentation covers

Scope

This docs site documents the v1 interface as it exists today, plus the near-term roadmap we commit to. Anything marked "planned" is not shipped yet.