Skip to main content
idapt
AccueilModèles IATarifs
Sign inStart free

Vercel AI SDK with idapt

Point the AI SDK's OpenAI provider at idapt and route 200+ models through one key.

Last reviewed 2026-07-17

Install

bash
npm i ai @ai-sdk/openai-compatible

Point it at idapt

ts
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";

const idapt = createOpenAICompatible({
  name: "idapt",
  baseURL: "https://idapt.app/api/openai/v1",
  apiKey: process.env.IDAPT_API_KEY,
});

const model = idapt("anthropic/claude-sonnet-5");

Model ids are author/model slugs from the catalog; every catalog model routes through the same key.

Streaming

ts
import { streamText } from "ai";

const result = streamText({
  model,
  prompt: "Summarize this repo's README in three bullets.",
});
for await (const chunk of result.textStream) process.stdout.write(chunk);

Pitfalls

Use the openai-compatible provider, not the OpenAI one

The first-party @ai-sdk/openai provider pins OpenAI-only auth behavior. The openai-compatible provider accepts any base URL and passes model ids through unchanged.

Keep the /v1 suffix

The base URL ends in /v1. Dropping it produces 404s on /chat/completions.

References

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

More quickstarts

OpenAI SDK (JS)LangChain (JS)LiteLLM
  • Accueil
  • Tarifs
  • Modèles IA
  • Modèles d'image
  • Modèles de voix
  • Modèles vidéo
  • Classements
  • New models
  • Model status
  • Multi-Model Chat
  • Voice Mode
  • Voice HUD
  • Web Search
  • Image Generation
  • Video Generation
  • Audio Generation
  • Transcription
  • Drive
  • Secrets
  • Sharing
  • Workspaces
  • Tasks
  • Memory
  • Agents
  • Subagents
  • Automations
  • Skills
  • Code Execution
  • Computers
  • Computer Use
  • Cloud Computers
  • Local AI
  • AI Gateway
  • API & SDK
  • CLI
  • MCP
  • Tunnels
  • All features →
  • Blog
  • Cas d'usage
  • Comparisons
  • Best of
  • Learn
  • Free tools
  • Prompts
  • Templates
  • Changelog
  • Centre d'aide
  • FAQ
  • Confidentialité
  • Comparer tous les modèles
  • Support
  • Développeurs
  • Quickstarts
  • Référence API
  • Tarifs API
  • CLI
  • MCP
  • Downloads
  • Desktop
  • Badges and embeds
© idapt[email protected]ConditionsPolitique de confidentialitéMentions légalesSignaler un contenu
X (Twitter)