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.

DocsAuthentication
API Reference

Authentication

All API requests require an API key. OpenAI-compatible requests use a Bearer token, while Anthropic-compatible requests use the x-api-key header.

Your API Key

API keys are created in the LinkHarbor workspace under API Keys. The exact key prefix may vary by environment, so treat the full value as a secret password.

Never expose your API key in client-side code, public repos, or logs. Rotate it immediately if compromised.

Authentication Headers

Use the header format that matches the interface you are calling. Do not mix OpenAI-compatible and Anthropic-compatible authentication headers.

Authorization: Bearer YOUR_API_KEY

Using Environment Variables

Store your API key and the matching endpoint in environment variables to keep them out of source code.

export OPENAI_API_KEY="YOUR_API_KEY"
export OPENAI_BASE_URL="https://api.linkharbor.ai/v1"

Authenticating with the SDK

When using official SDKs, pass both the LinkHarbor base URL and the environment variable expected by that SDK or tool.

import os
from openai import OpenAI

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

Use OPENAI_API_KEY with the OpenAI-compatible endpoint and ANTHROPIC_API_KEY with the Anthropic-compatible endpoint. LINKHARBOR_API_KEY is not used in these standard SDK examples.