LinkHarborLinkHarbor
ModelsPricingDocsContactStudioChat
Log inStart free
⌘K

Getting Started

  • Quick Start
  • Authentication

API Reference

  • List Models
  • Chat Completions
  • Error Codes

Advanced

  • OpenClaw
  • OpenAI-Compatible
  • Anthropic-Compatible
LinkHarborLinkHarbor

Unified AI model API gateway — access the world's leading LLMs in one place

Product

  • Models
  • Pricing

Resources

  • Docs
  • Contact

Legal

  • Privacy Policy
  • Terms of Service

© 2026 Future Intelligence Pte. Ltd. All rights reserved.

DocsQuick Start

Quick Start

Get up and running with the LinkHarbor API in minutes. Make your first AI-powered request with just a few lines of code.

Prerequisites: A LinkHarbor API key from the workspace

Create Your Account

Sign up for a free LinkHarbor account to get your API key. Your key grants access to models from OpenAI, Anthropic, Google, and more.

Install the SDK

Choose the interface you want to use and install the matching SDK.

Anthropic standard interface

pip install anthropic

OpenAI-compatible interface

pip install openai

Set Your API Key

Export your API key as an environment variable. Never hard-code it in your source code.

export OPENAI_API_KEY="YOUR_API_KEY"
export OPENAI_BASE_URL="https://api.linkharbor.ai/v1"
Keep your API key secure. Add it to .env and add .env to .gitignore to avoid accidentally exposing it.

Make Your First Request

Use either the Anthropic Messages API or the OpenAI-compatible chat completions endpoint with models from the LinkHarbor catalog.

Anthropic standard interface

from anthropic import Anthropic
import os

client = Anthropic(
    base_url="https://api.linkharbor.ai/anthropic",
    api_key=os.environ["ANTHROPIC_AUTH_TOKEN"]
)

message = client.messages.create(
    model="your-model-name",
    max_tokens=1024,
    messages=[{"role": "user", "content": "What is the capital of France?"}]
)

print(message.content[0].text)

OpenAI-compatible interface

from openai import OpenAI
import os

client = OpenAI(
    base_url="https://api.linkharbor.ai/v1",
    api_key=os.environ["OPENAI_API_KEY"]
)

response = client.chat.completions.create(
    model="your-model-name",
    messages=[{"role": "user", "content": "What is the capital of France?"}]
)

print(response.choices[0].message.content)
Expected output
The capital of France is Paris.

Try Streaming

Enable streaming to receive tokens as they're generated — ideal for chat interfaces with real-time feedback.

Python
stream = client.chat.completions.create(
    model="your-model-name",
    messages=[{"role": "user", "content": "Write a haiku about APIs"}],
    stream=True
)

for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
Expected output
Endpoints respond,Data flows in gentle streams —Models shape the world.

What's next

You've made your first request. Explore the full API capabilities below.

OpenAI-Compatible Setup

Use LinkHarbor with the official OpenAI SDK, Cursor, Cline, OpenWebUI, and other compatible tools.

View setup

Anthropic-Compatible Setup

Use Claude Code, OpenClaw, Cline, and other Anthropic-compatible tools with LinkHarbor.

View setup

Chat Completions

Deep dive into parameters, message roles, token limits, and response formats.

Read the docs

Explore Models

Browse the models from OpenAI, Anthropic, Google, and open-source providers available through LinkHarbor.

Browse models

Error Handling

Understand error codes, rate limits, and how to implement robust retry logic.

See error codes