Base URLRequest Endpoint
Determines where requests are sent. Do not confuse it with the website homepage.
Relay Guide
Understand how a relay API connects AI applications to model services.
An AI API relay sits between applications that support custom APIs and model services. After you enter a Base URL, API Key, and model name, the application can call the corresponding model through that endpoint.
A relay changes the request endpoint and how keys and usage are managed. Model capabilities, context length, and tool support still depend on the model actually called and the level of API compatibility.
The relay service authenticates with an API Key, routes the request by model name, and returns the response to the application. Confirm these three items when connecting.
Base URLDetermines where requests are sent. Do not confuse it with the website homepage.
API KeyIdentifies the account and its permissions. Never put it on a public page, in a repository, or in a screenshot.
ModelDetermines which model the request uses. Use the name shown in the console.
Direct access through a model provider is billed at the provider's official price, which is higher than the relay price offered here. KHaiXAPI obtains a cost advantage through dedicated model-access channels and provides the same model's full capabilities at a lower price.
No model downgrades: KHaiXAPI relays the full specification of the selected model without using a lower-tier, reduced, or substitute model. Requests travel over encrypted connections, and keys and data are handled under the platform's security rules.
| Comparison | Direct Model Access | API Relay |
|---|---|---|
| API endpoint | Uses the official URL provided by the model provider | Uses the unified URL provided by the relay service |
| Model range | Usually focuses on models from one provider | May provide multiple model brands through one account |
| Request price | Billed at the model provider's official published price | Uses dedicated channels to reduce request costs and prices |
| Model quality | Uses the full model provided by the vendor | The same model has the same quality and capabilities, with no relay or downgraded edition |
| Keys and usage | Managed in the corresponding provider's portal | Reviewed together in the relay service console |
| Compatibility | Defined by the official API specification | Depends on the relay service's protocol compatibility |
Whether an application can connect depends on whether it lets you enter an API URL, key, and model name. Applications that support only built-in services usually cannot use an external relay API.
For users who need to switch models, process long text, or manage multiple configurations.
Includes command-line tools, editor extensions, and coding applications that support custom APIs.
For document Q&A, internal knowledge retrieval, customer-service responses, and content organization.
For model calls in workflows, spreadsheet processing, batch tasks, and business systems.
In addition to multipliers, review API compatibility, usage records, data-handling boundaries, and customer support.
Model requests are typically billed by actual usage, such as input and output tokens. Unit prices, billing units, multipliers, and availability can vary by model. The live information and request records in the console are authoritative.
When you first use the service, send a small number of test requests, then review the model name, input and output tokens, cost, and request status. Separate API Keys for different applications also make it easier to distinguish usage and locate anomalies.
For details about tokens, input and output unit prices, and multiplier conventions, continue to the billing guide.
When you use a relay service, request content passes through the relay API before reaching the model service. KHaiXAPI does not write user prompts or model responses to business storage. It retains only data required to complete requests and billing, such as request time, model, token usage, cost, and request status.
This does not mean you can disregard the sensitivity of your input. Whether you use direct access or a relay, avoid submitting passwords, private keys, access tokens, or unnecessary sensitive personal information, and understand the policies of the model service that ultimately processes the request.
For specific usage boundaries, see the Terms of Service, Usage Policy, Privacy Policy, Supported Countries and Regions, and Service-Specific Terms.
Direct access through a model provider is billed at the provider's official price. KHaiXAPI obtains cost advantages through dedicated model-access channels and provides unified key, request-log, and usage management.
When the same model is used, its quality and capabilities are the same through the relay and the official service. There is no separate relay edition, reduced edition, or downgraded edition.
No. The application must support a custom Base URL and API Key and let you enter a model name that is available from the service.
It usually does not change the application interface, but available models, API compatibility, and some advanced features may vary by service.
The relay service forwards requests and handles authentication, routing, and billing, while the upstream model provider processes requests to generate responses. KHaiXAPI does not write prompts or model responses to business storage and retains only the data required for requests and billing. Upstream processing is governed by the relevant model service's policies.
Review the model, input and output tokens, cost, and request status in the console. Using a different API Key for each application is recommended.
Check the Base URL, API Key, model name, and account status in order, then compare your setup with the documentation. if the issue remains unresolved.