SkyAIApp Documentation
Learn how to run smart routing, agent orchestration, observability, and enterprise governance in production — from your first call in 5 minutes to passing a regulated-workload compliance review.
About the numbers in these docs
We're in private beta. Every savings / latency / success-rate range below is an expected range based on internal benchmarks and typical workloads — actual numbers depend on your prompt distribution, model mix, and cache hit rate. Audited production benchmarks ship alongside public beta.
What's new this month
Pro / Default / Instant / mini / nano — 1M-token context, list price $5 / $30 per 1M tokens.
AnthropicOpus 4.7 / Sonnet 4.6 / Haiku 4.5; the new advisor tool delivers Opus-level reasoning at lower cost.
Google77.1% on ARC-AGI-2 reasoning; 2M-token context; native multimodal.
Quick access
Learning paths
Three paths organized around the question you have today — not the features we want to show off.
🚀 First integration
From zero to your first routed request; pick this if you just got an API key.
≈ 30 min
⚡ Tune for production
Already integrated; squeezing cost and latency. Pick this 1–3 weeks post-launch.
≈ 2 hours
🏢 Enterprise rollout
Regulated workload, SSO, audit, SLA. Pick this when running a compliance review.
≈ 1 day
Popular pages
Core capabilities
30-second preview
Full quickstartimport { SkyAI, isRouterError } from "@skyaiapp/sdk";
// One client, reused across requests. The SDK handles connection pooling,
// retry budgets, and trace propagation under the hood.
const sky = new SkyAI({
apiKey: process.env.SKYAIAPP_API_KEY!,
// Optional: pin a routing policy (created in console) instead of inline goal/strategy.
// policyId: "policy_prod_v3",
});
async function planTrip(query: string) {
try {
const res = await sky.route({
// Goal answers "what do you want?" — cost / quality / stability.
goal: "quality",
// Strategy answers "how aggressively?" — balanced / cost-optimized / quality-first.
strategy: "quality-first",
messages: [
{ role: "system", content: "You are a senior travel planner." },
{ role: "user", content: query },
],
// Explicit fallback chain — used only if the primary fails or budget is exceeded.
fallback: {
models: ["claude-opus-4.7", "gemini-3.1-pro"],
maxRetries: 2,
},
// Per-request budget hint — router will avoid pricier models if possible.
budget: { maxCostUsd: 0.05 },
// 30-second hard cap — surfaces as RouterTimeoutError.
timeoutMs: 30_000,
});
return {
output: res.output,
// Inspect routing decision — useful for analytics and debugging.
model: res.routing.selectedModel, // e.g. "gpt-5.5-pro"
cost: res.routing.costUsd, // e.g. 0.00321
latencyMs: res.routing.latencyMs, // e.g. 940
cached: res.routing.cacheHit, // boolean
traceId: res.traceId, // open in console for full span tree
};
} catch (err) {
if (isRouterError(err)) {
console.error("Routing failed:", err.code, err.message);
// err.retryAfterMs is set on rate limits; err.upstreamProvider on provider failures.
}
throw err;
}
}
const result = await planTrip("Plan a 7-day European city-hopping trip in October.");
console.log(result);Need help?
During private beta, email the founding team (1-business-day response). Discord community opens at public beta.
Was this page helpful?
Let us know how we can improve