Introducing Virtual MCP Servers
LogoLogo
GithubJoin SlackSignupBook a Demo
  • Documentation
  • Self Hosted
  • Integrations
  • Guides
  • Enterprise
  • Examples
  • OpenAI
  • Vercel AI SDK
  • DeepSeek
  • Anthropic
  • LangChain
  • CrewAI
  • Gemini
  • Bedrock
  • xAI
  • TogetherAI
  • FireworksAI
  • DeepInfra
  • OpenRouter
  • Smithery
  • LlamaIndex
  • Supabase
  • Mem0
Powered by GitBook
LogoLogo

Social

  • LinkedIn
  • X
  • Youtube
  • Github

Platform

  • Pricing
  • Documentation
  • Blog

Company

  • Home
  • About

Legal

  • Privacy Policy
  • Terms of Service

2025 LangDB. All rights reserved.

On this page

Was this helpful?

Export as PDF

Vercel AI SDK

Connect LangDB to your Vercel AI projects using simple setup and start generating text with powerful LLM models instantl

LangDB integrates with applications built Vercel AI SDK.

1

Install Vercel AI SDK

npm i ai
npm i @langdb/vercel-provider
2

Add LangDB to your Code

import { generateText } from 'ai';
import { createLangDB } from '@langdb/vercel-provider';

const langdb = createLangDB({
  apiKey: process.env.LANGDB_API_KEY,
  projectId: 'your-project-id',
});

export async function generateTextExample() {
  const { text } = await generateText({
    model: langdb('openai/gpt-4o-mini'),
    prompt: 'Write a Python function that sorts a list:',
  });

  console.log(text);
}

PreviousOpenAINextDeepSeek

Was this helpful?