Using LangChain
LangChain provides a standard interface for working with chat models. You can use OpenRouter with LangChain using the dedicatedChatOpenRouter 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