Conclusion
- Most setup failures are wrong base_url, wrong model name, disabled model permission, or a client still pointing at OpenAI.
- Use official docs for endpoints because compatible-mode URLs and model names can change.
- Test curl or SDK first, then test the exact app/tool path.
- A gateway helps when multiple tools need shared routing, logs, and budget caps.
What to do next
- Create separate dev and production keys in the official provider console.
- Copy the compatible endpoint, model name, and auth format from current provider docs.
- Run a minimal chat request and save the provider, model, status, latency, and error body if any.
- Move the key into server-side environment variables or secrets manager.
- Add DeepSeek or another fallback route before customer-facing launch.
Recommended paths
| Provider | Free / credits | Best for |
|---|---|---|
| Qwen DashScope | Signup credits vary | Alibaba ecosystem, Chinese, coding, and long-context apps |
| Zhipu GLM | Signup tokens vary | Domestic GLM workflows and Chinese app fallback |
| DeepSeek | Verify current pricing | Low-cost reasoning/coding fallback |
| SiliconFlow | Free/open routes vary | Multi-model China-direct experiments |
| OpenLLMAPI | Trial varies | One compatible route across Qwen, GLM, DeepSeek, and more |
Global developer checklist
- Confirm whether signup, billing, and API keys work from your country before writing production code.
- Prefer OpenAI-compatible endpoints when you may need to switch models, regions, or providers later.
- Test free credits with a real smoke prompt and record latency, error shape, streaming behavior, and quota burn.
- Keep at least one fallback route for provider outages, model deprecations, and regional access changes.
Production handoff
Use Qwen and GLM behind one clean endpoint
Keep official provider keys server-side, then add shared routing, fallback, logs, and budget caps through one OpenAI-compatible route.
FAQ
Why do I get invalid API key or unauthorized?
Check that the key belongs to the right account/project, the model is enabled, the base_url is current, and Authorization headers are set correctly.
Can I use the OpenAI SDK?
Usually yes when the provider supports compatible mode, but set baseURL/base_url explicitly and test streaming or tool calls separately.
Should I choose Qwen or GLM first?
Pick by workload: Qwen for Alibaba/DashScope ecosystem and long-context tests; GLM for domestic GLM workflows and fallback coverage.
When does OpenLLMAPI help?
When you do not want every app, agent, or teammate to manage separate provider keys and fallback rules.