BazaarLinkBazaarLink
Sign in
DocsAPI ReferenceSDK ReferenceAgentic UsageAI Skills
Contents

Vercel AI SDK

Vercel AI SDK

Integrate the Vercel AI SDK with BazaarLink in your Next.js app. Supports streaming, tool calling, and structured output.

Installation

npm install ai @ai-sdk/openai
import { createOpenAI } from "@ai-sdk/openai";
import { generateText } from "ai";

const bazaarlink = createOpenAI({
  baseURL: "https://api.bazaarlink.ai/v1",
  apiKey: "sk-bl-YOUR_API_KEY",
});

const { text } = await generateText({
  model: bazaarlink("openai/gpt-4o"),
  prompt: "Write a haiku about programming",
});

console.log(text);
Support
Hi! How can we help you?
Send a message and we'll get back to you soon.
Vercel AI SDK | BazaarLink