How can an OpenAI-compatible API connect to multiple models?
Learn the unified OpenAI-compatible integration: configuring a Base URL, access key, and public model ID, and the compatibility boundaries that depend on deployment configuration.
Maintained by the 路墨 Lumoswitch product team
Existing OpenAI-compatible clients generally replace their Base URL, Lumoswitch access key, and published model ID, then validate the current deployment's capabilities with a minimal request.
Do existing OpenAI SDK integrations need to be rewritten?
Usually, application call logic does not need to be rewritten. An application already using an OpenAI-compatible client generally replaces its Base URL, API key, and model ID with values provided by Lumoswitch or published by an administrator. Available endpoints, parameters, and model names still depend on the current deployment configuration and documentation.
Where do the Base URL, API key, and model ID come from?
The Base URL is the team-configured inference-service address; the API key is a Lumoswitch access key created for an application or user; and the model ID is the public model identifier published by the console. They respectively provide the connection endpoint, identity and permission, and routing target. Upstream-provider credentials should not be distributed directly to clients.
Can one Base URL call several models?
Yes. Where the model configuration attached to an access key allows it, a client uses one Lumoswitch Base URL and access key to call published models through different public model IDs. Administrators can adjust candidate resources and routing rules behind a model without distributing upstream configuration to every client.
Can I connect DeepSeek, Qwen, Doubao, and Kimi?
The Lumoswitch channel catalog includes adapters for DeepSeek, Qwen, Doubao, Kimi, and others. Before use, the relevant upstream credentials, model resources, and publishing status must still be configured. This means the product has integration capability; it does not mean Lumoswitch is an official service of, or official partner of, those models.
Which API formats does Lumoswitch support?
The current product definition includes formats such as OpenAI-compatible, Anthropic Messages, and Gemini generateContent. The paths, request fields, streaming behavior, and model capabilities enabled in a particular deployment depend on the runtime allowlist and current configuration; this does not mean every interface is enabled or perfectly compatible by default.
What should be validated before integration?
Confirm that the access key is valid and the target model is published and available, then use a minimal request to validate authentication, the model ID, and the response format. Before production traffic, also confirm that account balance, rate limits, and failover policy meet the application's expectations rather than carrying test configuration into production.