אינטגרציה · הגדרה תוך 60 שניות · ללא תוספת מחיר
Vercel AI SDK + OrcaRouter
The Vercel AI SDK is the de-facto way to build streaming LLM apps in Next.js, SvelteKit, and Nuxt. Its OpenAI provider accepts a custom baseURL — wire it to OrcaRouter and ship every model on the catalog with one key.
הגדרה
חמישה שלבים.
- 1.Install: npm install ai @ai-sdk/openai
- 2.Set ORCAROUTER_API_KEY in your .env.local
- 3.Use createOpenAI({ baseURL, apiKey }) with baseURL=https://api.orcarouter.ai/v1
- 4.Call streamText / generateText / generateObject as usual.
- 5.Every streaming token routes through the cheapest healthy backend.
תצורה
import { createOpenAI } from '@ai-sdk/openai';
import { streamText } from 'ai';
const orca = createOpenAI({
baseURL: 'https://api.orcarouter.ai/v1',
apiKey: process.env.ORCAROUTER_API_KEY,
});
const result = await streamText({
model: orca('claude-sonnet-4'),
prompt: 'Write a haiku about TypeScript.',
});
// In a Next.js route handler:
return result.toDataStreamResponse();למה לנתב את Vercel AI SDK דרך OrcaRouter?
The Vercel AI SDK's model abstraction already gives you portability across OpenAI, Anthropic, etc. Adding OrcaRouter on top means you don't need to manage N API keys or hit N different rate limits — one key, one bill, automatic failover under the hood.
אינטגרציות נוספות
⌘ Cursor
AI-first code editor.
🤖 Cline
Autonomous coding agent for VS Code.
➡ Continue
Open-source AI code assistant for VS Code and JetBrains.
✎ Aider
AI pair programming in your terminal.
🦜 LangChain
Compose LLM apps in Python or JS.
🦙 LlamaIndex
Data framework for LLM applications.
✳ Claude Code
Anthropic's terminal coding agent.
🖥 Open WebUI
Self-hosted ChatGPT-style interface.
⚙ n8n
Workflow automation with native AI nodes.
נתבו את Vercel AI SDK דרך OrcaRouter כבר היום.
הירשם תוך פחות מדקה, קבל מפתח sk-orca-… והדבק אותו ב-Vercel AI SDK. ללא תוספת מחיר על טוקנים. מעבר אוטומטי לגיבוי בין כל הספקים.
