Topic
- Stream Mode: how to use SSE with the OpenAI SDK, Python
requests, and curl. - Common errors: 401, 402, 404, 422, 429, and 503.
- Rate limit: quota,
Retry-Afterheader, and backoff. - Billing & Top-Up: balance, key limit, and error 402.
- Model not available: 404 vs. 503, deprecated, and Service Mode.
Can the official OpenAI SDK be used?
Yes, without any code changes. Setbase_url/baseURL to https://api.hostlinku.com/v1 and use your Hostlinku API key starting with sk-… as the api_key. A complete example is available at Chat Completions.
What endpoints are available?
Currently, the gateway prioritizes two core OpenAI-compatible endpoints:POST /v1/chat/completions: Chat CompletionsGET /v1/models: Model
/v1 public catalog (for sites) is available at /api/public/models. The console page uses the /api/* endpoint with a session cookie instead of an API key.
What models can I use?
See Models: the official list is retrieved fromGET /v1/models or the Models menu in the console. The catalog includes models from OpenAI, Anthropic, Google, DeepSeek, Qwen, and others, each with a unique slug.
Why was my request rejected with a 401 error?
Most common causes: TheAuthorization header is missing or not in Bearer format; the API key was copied incorrectly, has been revoked, or has expired. Create or check your API key at console.hostlinku.com. Full details: Authentication.
Why am I getting a 402 error even though I have a balance?
Check the error message. A 402 error has two possible causes: insufficient account balance (available is less than the estimated cost of the request), or the API key credit limit has been reached. If the message mentions “API key credit limit,” wait for the reset window (daily/weekly/monthly) or change the limit in the console. For more details, see Billing & Balance.
How much does a single request cost?
Cost = input tokens × input price + output tokens × output price (per token, depending on the model). Prices for each model are listed in the catalog; the actual cost of each request appears inhostlinku.cost and in the console log. Details are available at Billing & Balance.
Is there a rate limit?
Yes: 600 requests per minute per API key for chat completions, plus a per-IP limit for the console endpoint. Full details and backoff strategies are available at Usage & Limits.How do I send an image or multimodal message?
Populatemessages[].content with an array of content in the OpenAI format (e.g., one object of type image_url followed by one object of type text) and select a model with vision/image-input capabilities from the catalog. The level of support depends on the model provider.
How can I stop the use of a leaked API key?
Immediately revoke the API key in the console, under the API Keys menu. Revoked API keys will be immediately rejected (401) for all subsequent requests. To permanently delete an API key, use purge. Usage history prior to revocation remains recorded for auditing purposes.Do request logs store the content of my conversations?
Request logs store technical metadata: model, status, number of tokens, cost, latency, and request ID. This data is required for billing and monitoring. For questions regarding data retention in accordance with your compliance requirements, please contact halo@hostlinku.com.How do I contact support?
See Support: email halo@hostlinku.com; please include thex-request-id from the problematic response.

