Configuration
- API key: a restricted Qingheng server key
- Base URL: the configured compatible endpoint
- Model: a public name from the live catalog
Do not put the key in browser code
A public front end cannot protect a long-lived API secret. Route calls through your server and apply user-level authorization there.
openai-sdk.pypython
from openai import OpenAI
client = OpenAI(
api_key="qh_live_...",
base_url="http://localhost:4000/v1",
)
response = client.chat.completions.create(
model="qwen3.7-plus",
messages=[{"role": "user", "content": "Explain this error log."}],
)
print(response.choices[0].message.content)Common questions
Is the API compatible with the OpenAI SDK?
The public gateway follows the OpenAI-compatible chat completions pattern. Confirm model-specific features in the live catalog and documentation before production rollout.
Where do model availability and prices come from?
Public model pages read the active catalog exposed by the service. A model is not presented as available merely because its name appears in an article.