Gateway Guides

What Is a Multi-model API Gateway?

Understand how a gateway connects applications that support custom endpoints to model services.

What Problem Does a Multi-model API Gateway Solve?

A multi-model API gateway 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.

Gateway access 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.

How a Request Is Routed

The gateway 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 URL

Request Endpoint

Determines where requests are sent. Do not confuse it with the website homepage.

API Key

Account Authentication

Identifies the account and its permissions. Never put it on a public page, in a repository, or in a screenshot.

Model

Model Name

Determines which model the request uses. Use the current name listed in Model Plaza.

How Does Direct Model Access Differ from a Multi-model API Gateway?

Direct access uses the provider's account and official endpoint. KHaiXAPI provides a unified endpoint; review available models, routing groups, and reference prices in Model Plaza, and manage API keys and review usage records and final charges in the console.

Models and APIs: Available capabilities depend on the selected model and API support. Requests are transmitted over encrypted connections, and keys and data are handled according to platform security rules.

ComparisonDirect Model AccessMulti-model API Gateway
API endpointUses the official URL provided by the model providerUses the unified URL provided by the gateway service
Model rangeUsually focuses on models from one providerMay provide multiple model brands through one account
Request priceSet by the model providerReference prices are shown in Model Plaza; final charges are reviewed in the console
Model qualityDepends on the provider's APIDepends on the selected model and supported protocol
Keys and usageManaged in the corresponding provider's portalReviewed together in the gateway service console
CompatibilityDefined by the official API specificationDepends on the gateway service's protocol compatibility

Which AI Applications Are Suitable?

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 gateway endpoint.

Chat, Writing, and Translation Apps

For users who need to switch models, process long text, or manage multiple configurations.

AI Coding Tools

Includes command-line tools, editor extensions, and coding applications that support custom APIs.

Knowledge Bases and Customer Support

For document Q&A, internal knowledge retrieval, customer-service responses, and content organization.

Automation and Internal Tools

For model calls in workflows, spreadsheet processing, batch tasks, and business systems.

Six Things to Check When Choosing a Multi-model API Gateway

Along with price, review API compatibility, usage records, data-handling boundaries, and customer support.

  • Model information: Use Model Plaza to confirm model names, routing groups, availability, billing units, and prices.
  • API compatibility: Does it support your existing application, and do the setup documentation and error messages make troubleshooting practical?
  • Billing records: Can you review the model, token usage, cost, time, and request status?
  • Data scope: Is it clear how prompts, responses, and billing records are handled?
  • Policy boundaries: Are Terms of Service, a Usage Policy, a Privacy Policy, supported countries and regions, and Service-Specific Terms provided?
  • Support channels: Is customer support available for setup, billing, or API issues?

How Are Model API Calls Billed?

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. Review the current model and reference price in Model Plaza, then use the request record in the console to verify the final charge.

After a request, review the model name, input and output tokens, final charge, and request status in the console. Separate API keys for different applications make usage easier to distinguish.

For details about tokens, input and output unit prices, and multiplier conventions, continue to the Billing Guides.

Where Does Data Go When You Use a Multi-model API Gateway?

When you use a gateway service, request content passes through the gateway endpoint before reaching the selected model service. Normal request bodies are not written to KHaiXAPI's business storage or business backups. The platform processes request bodies in transit and retains necessary request and billing records; diagnostic, security, user-submitted support material, and legal exceptions are described in the Privacy Policy.

Do not submit passwords, private keys, access tokens, or unnecessary personal information. Review the policies of the model service that processes the request.

For specific usage boundaries, see the Terms of Service, Usage Policy, Privacy Policy, Supported Countries and Regions, and Service-Specific Terms.

Complete API Integration in Four Steps

  1. Confirm that the application supports a custom Base URL, API key, and model name.
  2. Confirm the model name, routing group, and reference price in Model Plaza, then open the console and create an API key.
  3. Follow the documentation to enter the API URL, key, and model name.
  4. Send a short test request, then review the request record and final charge in the console.

Frequently Asked Questions

How does a multi-model API gateway differ from direct model access?

Direct access uses the provider's account and official endpoint. KHaiXAPI provides a unified endpoint; available models, groups, and reference prices are listed in Model Plaza, while API keys, usage records, and final charges are managed and reviewed in the console.

Where can I find available models, groups, and prices?

Open Model Plaza to review available models, routing groups, billing units, and reference prices. After signing in, you can view the exclusive groups and personal multipliers available to the current account; after a call, review the request record and final charge in the console.

Is there any difference in model quality between gateway access and direct access to the same model?

Gateway calls use the same official model as direct access, so the model quality is exactly the same.

Can every AI application use a multi-model API gateway?

Yes. Any application that supports a custom Base URL, API key, and model name can use the multi-model API gateway once those settings are configured.

Will changing the Base URL change the application's features?

No. As long as you keep using the same model, changing the Base URL does not change the application's features or the model quality.

What data is processed by the gateway service and the model provider?

Requests pass through KHaiXAPI before they reach the selected model service. Normal request bodies are not written to KHaiXAPI's business storage or business backups. In-transit processing, necessary request and billing records, and diagnostic, security, user-submitted support material, or legal exceptions are handled as described in the Privacy Policy. The model service's own processing rules also apply.

How can I verify that API request billing is accurate?

Confirm the model reference price and billing unit in Model Plaza, then review the model, input and output tokens, final charge, and request status in the console. Using a different API key for each application is recommended.

What should I check if requests fail after setup?

Check the Base URL and API key, verify the model name in Model Plaza, and check account status in the console, then compare your setup with the documentation. if the issue remains unresolved.