Preview: these APIs are still being designed and aren't available yet.
Skip to Content
UpskyDocs

Overview

One API key for every AI model.

Upsky AI lets you call models from every major lab with your team's Upsky API key, the same key every Upsky product uses. It speaks OpenAI's API, so any OpenAI client or SDK works once you change its base URL. Text models use Chat Completions, and there are also image and speech models.

Connect

Point your client at https://api.upsky.dev/v1/ai and use your API key:

import OpenAI from "openai"

const ai = new OpenAI({
  apiKey: process.env.UPSKY_API_KEY,
  baseURL: "https://api.upsky.dev/v1/ai",
})

const reply = await ai.chat.completions.create({
  model: "anthropic/claude-sonnet-5",
  messages: [{ role: "user", content: "Hello" }],
})

console.log(reply.choices[0].message.content)

Or with cURL:

curl https://api.upsky.dev/v1/ai/chat/completions \
  -H "Authorization: Bearer $UPSKY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-5",
    "messages": [{ "role": "user", "content": "Hello" }]
  }'

Choose a model

Get the current list from the models endpoint. Model IDs always include the provider, as provider/model-name. Each model says its type, which is text, image or speech, and lists its price: per million tokens for text, per image for images and per million characters for speech. Add ?type=text to list one type only.

Streaming

Set "stream": true to receive the reply as server-sent events while it's written. The last event before data: [DONE] reports the tokens used and what the request cost.

Test keys

A test key gets a sample reply in the same format as a real one, streamed or not, so you can build and test your integration end to end. It never calls a model and is never charged. The model you name still has to exist.

What it costs

Each request is paid from your team's credits at the price on the models list. Live keys need an active Pro plan.

  • Before a request starts, Upsky sets aside the most it could cost: the prompt plus the longest reply allowed. Only what the request actually used is kept.
  • Set max_completion_tokens to cap a reply. Without it, a team that doesn't have auto top-up on gets a lower limit that its credits cover, rather than being refused.
  • If your credits don't cover a request and auto top-up can't add more, you get 402 with insufficient_credits.
  • If you close a stream early, you're charged for what the model wrote until then.
  • usage.cost on every reply says what it was charged, in US dollars.

Limits

  • One choice per request: n must be 1.
  • Function tools only. Built-in tools, such as a provider's web search, are refused.
  • The default service tier only, with no priority tier or fast mode.
  • Request bodies up to 4 MB, images and files included.
  • Idempotency-Key is ignored: every request asks the model again.
  • user is dropped. To tell your own users apart, send safety_identifier.

Errors use the same format as the rest of the API. See errors.

Usage

The AI page in the dashboard shows what your team spent this month, day by day, which models it uses most, and its latest requests, text, image and speech alike.

On this page