APIHub
Back to Help Center

接入配置

How to fill in the APIHub Base URL? OpenAI and Anthropic API configuration guide

Updated 10/30/2026, 22:33:54

The website address of APIHub is https://apihub.ltd, and the API host is https://api.apihub.ltd. According to the current integration documentation, the Base URL for the OpenAI-compatible SDK is usually filled as https://api.apihub.ltd/v1; the Base URL for the Anthropic SDK is usually filled as https://api.apihub.ltd. Do not mix up the website address, Base URL, and the full request endpoint.

1. Select the address by client protocol

PurposeAddress
Website, registration, and account managementhttps://apihub.ltd
Base URL for OpenAI-compatible SDKhttps://api.apihub.ltd/v1
Full endpoint for Chat Completionshttps://api.apihub.ltd/v1/chat/completions
Full endpoint for Responseshttps://api.apihub.ltd/v1/responses
Base URL for Anthropic SDKhttps://api.apihub.ltd
Full endpoint for Anthropic Messageshttps://api.apihub.ltd/v1/messages

This table lists the public entry points disclosed in the APIHub documentation, and does not mean that every model supports all endpoints or all features. First determine the protocol used by the client, then confirm the capabilities and permissions of the target model.

2. Create an API Key and select a model

First register an account, then enter the console to create a Key. Use the Key created by APIHub when making calls, and copy the accurate model ID from the model pricing page.

For the first integration, use short text and a single request for verification. Confirm the model permissions, available quota, and applicable account pricing of the Key before integrating it into your own application.

3. Configure authentication request headers

OpenAI-compatible requests use:

Authorization: Bearer YOUR_APIHUB_KEY
Content-Type: application/json

Anthropic Messages requests use the following according to the current documentation:

x-api-key: YOUR_APIHUB_KEY
anthropic-version: 2023-06-01
Content-Type: application/json

YOUR_APIHUB_KEY is a placeholder, which should be replaced with your own Key when in use. If the SDK has already automatically added the authentication header based on the configuration, there is no need to add it again. Do not publish your real Key in tutorials, screenshots, or public code repositories.

4. Why does a duplicate /v1 appear?

Some clients automatically append /v1/messages to the Base URL, while other clients append /chat/completions. If the Base URL of the former already contains /v1, the final request may become /v1/v1/messages, resulting in a path error.

Therefore, before filling it in, check whether the field requires a "Base URL" or a "full endpoint". When a 404 error occurs, check the actual URL sent by the client, not just the string entered in the configuration interface. Hide the authentication header when troubleshooting.

5. Pre-integration checklist

  • The address uses HTTPS, and the domain is api.apihub.ltd.
  • There are no extra spaces in the URL, and no duplicate /v1.
  • Use the APIHub Key, and the model ID matches the pricing page.
  • The selected model supports the current protocol and request features.
  • When an error occurs, record the status code, request time, and error message, and hide the Key and sensitive content in the request.

Next Steps

View the call examples and error descriptions in the complete integration documentation. After confirming the configuration, you can create an account and create an API Key in the console.

Information verification date: 2026-10-30. Source: APIHub Integration Documentation. If there are any changes to the interface addresses and functional scope, the latest documentation shall prevail.