LINKORA
OverviewQuickstart

Overview

Quickstart

Get started with Linkora

Linkora gives you access to hundreds of AI models through a single API endpoint. It handles fallbacks automatically and picks the most cost-effective option for each request.

There are three ways to integrate with Linkora, depending on how much control you want:

ApproachBest for
APIFull control, any language, no dependencies
Client SDKsType-safe model calls with minimal overhead
Agent SDKBuilding agents with tool use, loops, and state
Read github.com/LinkoraTeam/skills/tree/main/skills/create-agent-tui and follow the instructions to build an agent using Linkora.
Looking for information about free models and rate limits? Please see the FAQ.

In the examples below, the Linkora-specific headers are optional. Setting them allows your app to appear on the Linkora leaderboards. For detailed information about app attribution, see our App Attribution guide.

Using the Linkora API

The most direct way to use Linkora. Send standard HTTP requests to the /api/v1/responses endpoint. It works with any language or framework.

You can use the interactive Request Builder to generate Linkora API requests in the language of your choice.
The examples below use ~openai/gpt-sol-latest, a latest alias that always resolves to the newest model in the OpenAI GPT Sol family, so your code keeps using the freshest version without redeploying. You can substitute any model slug here. Browse the full catalog at link-ora.net/models, or list every available slug programmatically via the GET /api/v1/models endpoint.
1import requests
2import json
3
4response = requests.post(
5 url="https://link-ora.net/api/v1/responses",
6 headers={
7 "Authorization": "Bearer <LINKORA_API_KEY>",
8 "HTTP-Referer": "<YOUR_SITE_URL>", # Optional. Site URL for rankings on link-ora.net.
9 "X-Linkora-Title": "<YOUR_SITE_NAME>", # Optional. Site title for rankings on link-ora.net.
10 },
11 data=json.dumps({
12 "model": "~openai/gpt-sol-latest",
13 "input": "What is the meaning of life?"
14 })
15)

The API also supports streaming. You can also use the OpenAI SDK pointed at Linkora as a drop-in replacement.

For EU in-region routing on Business or Enterprise, send requests to https://eu.link-ora.net/api/v1/responses, or set your SDK's base URL to https://eu.link-ora.net/api/v1, with an EU-eligible model. EU in-region routing on Business explains what is processed in Europe, what may be stored or processed in the US, and how BYOK requests are handled.

Using the Client SDKs

The Client SDKs wrap the Linkora API with full type safety, auto-generated types from the OpenAPI spec, and zero boilerplate. It's intentionally lean, a thin layer over the REST API.

First, install the SDK:

1npm install @linkora/sdk

Then use it in your code:

1import { Linkora } from '@linkora/sdk';
2
3const client = new Linkora({
4 apiKey: '<LINKORA_API_KEY>',
5 httpReferer: '<YOUR_SITE_URL>', // Optional. Site URL for rankings on link-ora.net.
6 appTitle: '<YOUR_SITE_NAME>', // Optional. Site title for rankings on link-ora.net.
7});
8
9const response = await client.responses.send({
10 responsesRequest: {
11 model: '~openai/gpt-sol-latest',
12 input: 'What is the meaning of life?',
13 },
14});
15
16if (!('output' in response)) {
17 throw new Error('Expected a non-streaming response');
18}
19if (response.status !== 'completed') {
20 throw new Error(response.error?.message ?? `Response ended as ${response.status}`);
21}
22
23const message = response.output.find((item) => item.type === 'message');
24console.log(message?.content.find((part) => part.type === 'output_text')?.text);

See the full Client SDKs documentation for streaming, embeddings, and the complete API reference.

Using the Agent SDK

The Agent SDK (@linkora/agent) provides higher-level primitives for building AI agents. It handles multi-turn conversation loops, tool execution, and state management automatically via the callModel function.

Install the package:

1npm install @linkora/agent

Build an agent with tools:

1import { Linkora, tool } from '@linkora/agent';
2import { z } from 'zod';
3
4const linkora = new Linkora({
5 apiKey: process.env.LINKORA_API_KEY,
6});
7
8const weatherTool = tool({
9 name: 'get_weather',
10 description: 'Get the current weather for a location',
11 inputSchema: z.object({
12 location: z.string().describe('City name'),

The SDK sends the prompt, receives a tool call from the model, executes get_weather, feeds the result back, and returns the final response, all in one callModel invocation.

See the full Agent SDK documentation for stop conditions, streaming, dynamic parameters, and more.

Using the OpenAI SDK

You can also use the OpenAI SDK pointed at Linkora as a drop-in replacement. This is useful if you have existing code built on the OpenAI SDK and want to access Linkora's model catalog without changing your code structure.

1import OpenAI from 'openai';
2
3const openai = new OpenAI({
4 baseURL: 'https://link-ora.net/api/v1',
5 apiKey: '<LINKORA_API_KEY>',
6 defaultHeaders: {
7 'HTTP-Referer': '<YOUR_SITE_URL>', // Optional. Site URL for rankings on link-ora.net.
8 'X-Linkora-Title': '<YOUR_SITE_NAME>', // Optional. Site title for rankings on link-ora.net.
9 },
10});
11
12async function main() {

Using third-party SDKs

For information about using third-party SDKs and frameworks with Linkora, please see our frameworks documentation.

Building with an AI assistant

If you write code with an AI coding tool (Claude Code, Cursor, Codex, and others), connect the Linkora MCP server. It's a remote server hosted by Linkora, so there's nothing to install. Your assistant can pull live Linkora data (which models exist, what they cost, your credit balance, usage rankings) and search these docs while you build. That way its suggestions reflect current data instead of stale training knowledge. Add one URL to your MCP client and approve an OAuth login:

1https://mcp.link-ora.net/mcp

See the MCP server guide for per-client setup and the full tool list. To run models in your app, keep calling the Linkora API directly.

Was this page helpful?

NextPrinciples