Base URL
Laalaa Gateway exposes two base URL shapes — one for OpenAI-shaped clients and one for Anthropic-shaped clients.
The values
OpenAI-compatible(expects)
/v1/...https://api.laalaa.me/v1Anthropic-compatible(expects)
/v1/messageshttps://api.laalaa.meWhich one do I use?
- OpenAI SDK, OpenAI-shaped tools — use
https://api.laalaa.me/v1because these SDKs do not add /v1 themselves. - Anthropic SDK, Claude Code — use
https://api.laalaa.me— the SDK appends /v1/messages itself.
The common mistake: /v1/v1
If a tool's field already includes /v1, don't add another one. The double prefix 404s.
python
# ❌ WRONG — double /v1 (404 not found)
client = OpenAI(base_url="https://api.laalaa.me/v1/v1", ...)python
# ✅ RIGHT
client = OpenAI(base_url="https://api.laalaa.me/v1", ...)Getting 404s?
Test in a browser: /v1/v1/models returns 404. The correct path is /v1/models.
Details
- The values above resolve from the domain you're visiting right now —
api.laalaa.me - Trailing slashes are optional and stripped.
- Switching providers means changing only the base URL.
ទំព័រនេះមានប្រយោជន៍?