LangChain
Using OpenRouter with LangChain
Using LangChain
LangChain provides a standard interface for working with chat models. You can use OpenRouter with LangChain using the dedicated ChatOpenRouter integration packages. For more details on LangChain’s model interface, see the LangChain Models documentation.
Resources:
- LangChain Python integration: langchain-openrouter on PyPI
- LangChain JavaScript integration: @langchain/openrouter on npm
For full documentation — including streaming, tool calling, structured output, reasoning, multimodal inputs, provider routing, and more — see the LangChain integration guides: