Integrations / LlamaIndex
L

LlamaIndex

Framework · Verified setup guide

The data/agent framework. Use its OpenAI-like LLM for any OpenAI-compatible endpoint.

Setup steps

  1. 1
    Installpip install llama-index-llms-openai-like
  2. 2
    Create the LLMOpenAILike with model, api_base and api_key below.
  3. 3
    Run itCall .complete("Hello").

Configuration example

python
from llama_index.llms.openai_like import OpenAILike

llm = OpenAILike(
    model="YOUR_MODEL_ID",                 # any model id from the /models page
    api_base="https://api.luxechain.si/v1",
    api_key="lxc_live_YOUR_KEY",
    is_chat_model=True,
)

print(llm.complete("Hello"))

Replace YOUR_MODEL_ID with any model from the catalogue. Never paste a real API key into a shared document.

Troubleshooting

OpenAILike is the right class for a non-OpenAI endpoint; it skips the strict OpenAI model check.

If the tool rejects the endpoint, confirm the base URL exactly matches the value on the right, and that the key is active in your account.