https://vietrouter.com.vn/v1

← All applications · Connect apps section on /docs

OpenAIManual setup

LlamaIndex

OpenAILike trỏ Vietrouter /v1.

Base URL to paste

Paste exactly one of two formats — wrong URL yields 404 (not 401).

https://vietrouter.com.vn/v1

Prerequisites

  1. pip install llama-index-llms-openai-like

Recommended model: claude-fable-5

Quick way — command / config

from llama_index.llms.openai_like import OpenAILike

llm = OpenAILike(
    model="claude-fable-5",
    api_base="https://vietrouter.com.vn/v1",
    api_key="sk-mtm-...",
    context_window=1000000,
    is_chat_model=True,
)
print(llm.complete("Hello!"))

Where to place file / fill Settings

Environment variableany
.env
OPENAI_API_KEY=sk-mtm-…

Verify connection

  1. complete() trả text

Troubleshooting

SymptomReasonHow to handle
Connection errorapi_base thiếu /v1.api_base="https://vietrouter.com.vn/v1"

Related

LangChain

Zalo groupWhatsApp