Skip to content
HomeModels
DocsGuides

Authentication

API keys, base URLs, and protocol configuration.

Use a platform API key to call model endpoints. The same key can access different models supported by your account group; you do not need a separate key for each model.

Authorization: Bearer sk-your-api-key

Native Anthropic endpoints also accept x-api-key; native Gemini endpoints also accept x-goog-api-key. In both cases, use your platform API key.

ClientBase URLEndpoint
OpenAI SDKhttps://api.linkinfra.ai/v1/chat/completions
Anthropic SDKhttps://api.linkinfra.ai/v1/messages
Gemini HTTPhttps://api.linkinfra.ai/v1beta/models/…

The API and console may use different hosts. Use the API address provided by the platform and avoid duplicating /v1.

  • Store keys in server-side environment variables. Do not commit them to source control or bundle them into browser code.
  • Create separate keys for different applications, with suitable spending limits and expiration dates.
  • If a key is exposed, disable it in the console and create a replacement.
Manage API keys