Skip to main content
idapt
HomeCodeAI ModelsPricing
Sign inStart free trial

LangChain (JS) with idapt

ChatOpenAI against idapt's compatible API: one configuration block, 200+ models.

Last reviewed 2026-07-17

Install

bash
npm i @langchain/openai

Point it at idapt

ts
import { ChatOpenAI } from "@langchain/openai";

const model = new ChatOpenAI({
  model: "openai/gpt-5.6-sol",
  apiKey: process.env.IDAPT_API_KEY,
  configuration: { baseURL: "https://idapt.app/api/openai/v1" },
});

Going further

ts
const withTools = model.bindTools([myTool]);
const reply = await withTools.invoke("What is 23 * 17? Use the calculator.");

Tool calling passes through for every tool-capable catalog model.

Pitfalls

baseURL goes inside configuration

ChatOpenAI nests the base URL under the configuration object; a top-level baseURL field is silently ignored.

References

  • API keys and scopes
  • OpenAI-compatible API reference
  • Rate limits and errors

More quickstarts

LangChain (Python)Vercel AI SDKLlamaIndex
  • Home
  • Pricing
  • AI Models
  • Image models
  • Voice models
  • Video models
  • Rankings
  • New models
  • Model status
  • Multi-Model Chat
  • Agents
  • Computers
  • Drive
  • Automations
  • AI Gateway
  • All features →
  • LLM cost calculator
  • Token counter
  • All free tools →
  • Blog
  • Use cases
  • Comparisons
  • Best of
  • Benchmarks
  • Demos
  • Changelog
  • Help center
  • FAQ
  • Privacy
  • Compare all models
  • Support
  • idapt Code
  • Developers
  • Quickstarts
  • API reference
  • API pricing
  • CLI
  • MCP
  • Downloads
  • Desktop
  • Badges and embeds
© idapt[email protected]TermsPrivacy PolicyLegal noticeReport content
X (Twitter)