Migration Guide
Seamlessly migrate from OpenAI, Anthropic, or other providers to SkyAIApp.
Migrate from OpenAI
Before: OpenAI SDK
import OpenAI from "openai";
const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY
});
const response = await openai.chat.completions.create({
model: "gpt-4",
messages: [
{ role: "user", content: "Hello" }
]
});After: SkyAIApp SDK
import { SkyAI } from "@skyaiapp/sdk";
const sky = new SkyAI({
apiKey: process.env.SKYAIAPP_API_KEY
});
const response = await sky.route({
goal: "quality", // Auto-select best model
messages: [
{ role: "user", content: "Hello" }
]
});Migration Steps
- 1
Get API Key
Create API key in SkyAIApp dashboard
- 2
Install SDK
npm install @skyaiapp/sdk
- 3
Update Code
Replace API calls (see examples below)
- 4
Test
Thoroughly test in development
- 5
Gradual Rollout
Gradually switch production traffic
API Mapping
| OpenAI | SkyAIApp |
|---|---|
chat.completions.create() | route() |
model: "gpt-4" | goal: "quality" |
stream: true | stream: true |
max_tokens | max_tokens |
Migration Benefits
Smart Routing
Auto-select optimal models
Cost Savings
Reduce costs by 18-35% on average
Auto Fallback
Auto-switch when primary unavailable
Unified API
One API for all major models
Need Migration Help?
Our expert team is here to help
Was this page helpful?
Let us know how we can improve