# LlamaIndex setup

LlamaIndex reaches OpenAI-compatible APIs through the `OpenAILike` class. Configure it with the Claudech base URL and a model id.

## Before you start

- **A Claudech API key** from [API keys](https://claudech.com/api-keys), stored as `CLAUDECH_API_KEY`. API access unlocks after your first purchase.

## Configuration

```python
# pip install llama-index-llms-openai-like
import os
from llama_index.core import Settings
from llama_index.llms.openai_like import OpenAILike

llm = OpenAILike(
    model="claude-opus-5-5",
    api_base="https://api.claudech.com/v1",
    api_key=os.environ["CLAUDECH_API_KEY"],
    is_chat_model=True,
    is_function_calling_model=True,
    context_window=1_000_000,
)
Settings.llm = llm

print(llm.complete("Give me three names for a bakery."))
```

`is_chat_model=True` sends requests to `/v1/chat/completions`, and `is_function_calling_model=True` lets agents use tool calling. `context_window` matches the 1M-token window of every Claudech model.

## Things to know

- **Embeddings.** Claudech does not offer an embeddings endpoint. Set `Settings.embed_model` to another provider or a local embedding model; queries and answers still run on Claudech.

See [all integrations](https://claudech.com/docs/integrations) for other frameworks. Claudech is an independent service and is not affiliated with the makers of LlamaIndex.

---

Source: https://claudech.com/docs/integrations/llamaindex
