Skip to main content
  1. Sign up — Create an account at platform.respan.ai
  2. Create an API key — Generate one on the API keys page
  3. Add credits or a provider key — Add credits on the Credits page or connect your own provider key on the Integrations page
Add the Docs MCP to your AI coding tool to get help building with Respan. No API key needed.
{
  "mcpServers": {
    "respan-docs": {
      "url": "https://docs.respan.ai/mcp"
    }
  }
}
This integration is for the Respan gateway.

What is AI SDK?

The AI SDK (by Vercel) is a TypeScript toolkit for building AI-powered applications with Next.js, React, and other frameworks. Route LLM calls through the Respan gateway to access 250+ models with a single API key.

Quickstart

Step 1: Install packages

npm install ai @ai-sdk/openai

Step 2: Set environment variables

export RESPAN_API_KEY="YOUR_RESPAN_API_KEY"

Step 3: Point the provider to the Respan gateway

import { createOpenAI } from '@ai-sdk/openai';
import { generateText } from 'ai';

const openai = createOpenAI({
  apiKey: process.env.RESPAN_API_KEY!,
  baseURL: 'https://api.respan.ai/api',
});

const result = await generateText({
  model: openai('gpt-4o-mini'),
  prompt: 'Tell me a joke',
});

Step 4: Verify

Open the Logs page to see your gateway requests.
Looking for tracing integration? See Tracing > Vercel AI SDK.