← All applications · Connect apps section on /docs
OpenAIManual setup
Python (openai)
SDK OpenAI với base_url …/v1.
Base URL to paste
Paste exactly one of two formats — wrong URL yields 404 (not 401).
https://vietrouter.com.vn/v1Prerequisites
- pip install openai
- API key
Recommended model: gpt-5.6-sol
Quick way — command / config
from openai import OpenAI
client = OpenAI(api_key="sk-mtm-...", base_url="https://vietrouter.com.vn/v1")
res = client.chat.completions.create(
model="gpt-5.6-sol",
messages=[{"role": "user", "content": "Hello!"}],
)
print(res.choices[0].message.content)Where to place file / fill Settings
Environment variableany
.env
OPENAI_API_KEY=sk-mtm-... OPENAI_BASE_URL=https://vietrouter.com.vn/v1
Verify connection
- Chạy script Python
Troubleshooting
| Symptom | Reason | How to handle |
|---|---|---|
| 404 | base_url thiếu /v1. | Phải là https://vietrouter.com.vn/v1. |