Skip to main content
The langchain-runcrate package gives LangChain a ChatRuncrate chat model. It works with every chat model in Runcrate’s model catalog through the same OpenAI-compatible API, so chains, tools, structured output and LangGraph agents work as they do with any other LangChain chat model.

Installation

Requires Python 3.10+ and LangChain 1.x (langchain-core and langchain-openai 1.x are installed with it). Create an API key in the Dashboard (how) and export it:

Quick Start

Any chat model id from GET /v1/models works as model.

Configuration

ChatRuncrate extends LangChain’s OpenAI chat model, so the usual settings (temperature, max_tokens, timeout, max_retries, model_kwargs) are available.

Streaming

Async works the same way with ainvoke and astream.

Tool calling

Use a model that supports tool calling: in GET /v1/models, its supported_features includes tools (both models on this page do).

Structured output

Agents

ChatRuncrate drops into LangChain’s create_agent and LangGraph like any other chat model:

Pricing

Requests are billed per token from your workspace balance, at the prices on Inference pricing. There is no separate LangChain plan.