Recommended order
- Create a project and a restricted API key.
- Run a non-streaming text request.
- Confirm usage and cost in the console.
- Add streaming, tools or agent orchestration only after the basic path works.
Production checklist
- Keep API keys on the server.
- Set request timeouts and bounded retries.
- Log request identifiers, not secrets.
- Set project and key budgets before opening traffic.
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.
Are Alipay and USDT recharge active?
They are planned for the international version, but the collection module is not enabled in this phase. The site must not ask users to transfer funds until a real order and crediting workflow is available.
Can I limit spending by project or API key?
The existing product supports project and key controls, including budget and rate constraints. Exact fields and enforcement behavior are documented in the console and API documentation.