/v3 endpoint is OpenAI-compatible, so LangChain’s ChatOpenAI talks to it once you change base_url and the model id. Every chat model in the catalog is then available through the same LangChain chat model interface, in Python and in TypeScript.
Overview
LangChain is a framework for developing applications powered by language models. LangChain’sChatOpenAI class (langchain-openai for Python, @langchain/openai for TypeScript) sends OpenAI-style chat completion requests to any base URL you give it, and Eden AI’s /v3/chat/completions accepts them.
Installation
Python needs 3.10 or later, and the TypeScript package needs Node.js 22 or later.Quick Start
await, so run it as an ES module: save it as a .mts file, or set "type": "module" in package.json.
Model naming
Pass anyprovider/model id as model, for example openai/gpt-latest, anthropic/claude-sonnet-latest or vertex/gemini-flash-latest. Browse the catalog in List LLM Models.
Environment Variables
Next Steps
- List LLM Models - Browse available providers and models
- OpenAI SDK (Python) - Direct SDK usage
- Haystack - Another framework that talks to Eden AI
- LangChain documentation - Prompt templates, chains and agents