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:
| Approach | Best for |
|---|---|
| API | Full control, any language, no dependencies |
| Client SDKs | Type-safe model calls with minimal overhead |
| Agent SDK | Building agents with tool use, loops, and state |
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.
~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.import requestsimport json response = requests.post( url="https://link-ora.net/api/v1/responses", headers={ "Authorization": "Bearer <LINKORA_API_KEY>", "HTTP-Referer": "<YOUR_SITE_URL>", # Optional. Site URL for rankings on link-ora.net. "X-Linkora-Title": "<YOUR_SITE_NAME>", # Optional. Site title for rankings on link-ora.net. }, data=json.dumps({ "model": "~openai/gpt-sol-latest", "input": "What is the meaning of life?" }))The API also supports streaming. You can also use the OpenAI SDK pointed at Linkora as a drop-in replacement.
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:
npm install @linkora/sdkThen use it in your code:
import { Linkora } from '@linkora/sdk'; const client = new Linkora({ apiKey: '<LINKORA_API_KEY>', httpReferer: '<YOUR_SITE_URL>', // Optional. Site URL for rankings on link-ora.net. appTitle: '<YOUR_SITE_NAME>', // Optional. Site title for rankings on link-ora.net.}); const response = await client.responses.send({ responsesRequest: { model: '~openai/gpt-sol-latest', input: 'What is the meaning of life?', },}); if (!('output' in response)) { throw new Error('Expected a non-streaming response');}if (response.status !== 'completed') { throw new Error(response.error?.message ?? `Response ended as ${response.status}`);} const message = response.output.find((item) => item.type === 'message');console.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:
npm install @linkora/agentBuild an agent with tools:
import { Linkora, tool } from '@linkora/agent';import { z } from 'zod'; const linkora = new Linkora({ apiKey: process.env.LINKORA_API_KEY,}); const weatherTool = tool({ name: 'get_weather', description: 'Get the current weather for a location', inputSchema: z.object({ 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.
import OpenAI from 'openai'; const openai = new OpenAI({ baseURL: 'https://link-ora.net/api/v1', apiKey: '<LINKORA_API_KEY>', defaultHeaders: { 'HTTP-Referer': '<YOUR_SITE_URL>', // Optional. Site URL for rankings on link-ora.net. 'X-Linkora-Title': '<YOUR_SITE_NAME>', // Optional. Site title for rankings on link-ora.net. },}); async 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:
https://mcp.link-ora.net/mcpSee 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