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.
Authentication Headers
Use the header format that matches the interface you are calling. Do not mix OpenAI-compatible and Anthropic-compatible authentication headers.
Using Environment Variables
Store your API key and the matching endpoint in environment variables to keep them out of source code.
Authenticating with the SDK
When using official SDKs, pass both the LinkHarbor base URL and the environment variable expected by that SDK or tool.
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.