> ## Documentation Index
> Fetch the complete documentation index at: https://docs.asklethe.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# LangChain

> Point LangChain's ChatOpenAI at LETHE's base URL.

```python agent.py theme={null}
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    base_url="https://asklethe.ai/v1",
    api_key="$LETHE_API_KEY",
    model="lethe",
)
```

Get `$LETHE_API_KEY` from [Authentication](/api-reference/authentication). This routes through LETHE's OpenAI-compatible [Chat Completions](/api-reference/chat-completions) endpoint, tool calling and streaming pass straight through.
