Skip to content

Models

The model catalogue is the set of models your deployment's admin has imported and activated.

The model catalogue is the set of models your deployment's admin has imported and activated. It changes as models are added, disabled, or repriced — always read it live from GET /v1/models or sleepyai.org/models rather than hardcoding ids.

List the models you can run

curl https://www.sleepyai.org/api/v1/models \
  -H "Authorization: Bearer ork_..."

The response is OpenAI's list shape, but each entry carries extra fields the gateway needs for billing and gating:

{
  "object": "list",
  "data": [
    {
      "id": "gpt-4o",
      "object": "model",
      "owned_by": "sleepy",
      "contextWindow": 128000,
      "maxOutputLimit": 4096,
      "inputPrice": 2.5,        // $ per 1M tokens (token-billed models)
      "outputPrice": 10.0,
      "cacheReadPrice": 0.25,
      "modelType": "chat-completion",   // or image / video / tts / stt / …
      "priceUnit": "token",             // or image / second / character / request
      "runnable": true
      // ...
    }
  ]
}

Which models are "runnable" for me?

GET /v1/models answers "which models can I run right now", not "what does the gateway have". A model is omitted (or flagged runnable: false with a reason) when a gate would refuse it:

reasonMeaning
planYour plan restricts access to a specific model list and this model isn't on it
daily_limitThe plan's daily free allowance for this modality (or the free-model daily token budget) is spent
creditsYour monthly allowance is spent and you have no usable extra credits

These are account-level gates: once your monthly allowance and credits are both spent, every paid model is unrunnable at once, not just one.

Add ?all=true to see the whole catalogue with locked models annotated instead of removed — useful for UIs that want to show an "upgrade to unlock" prompt.

Model types & how each is billed

A model's type decides which endpoint serves it and what its price means:

modelTypeServed viaBilled as
chat-completionPOST /v1/chat/completions, POST /v1/messagestokens (input/output/cache, $ per 1M)
anthropic-responsessame chat routestokens
systemonePOST /v1/systemonetokens
imagePOST /v1/images/generationsper image
videoPOST /v1/videosper rendered second
ttsPOST /v1/audio/speechper character
sttPOST /v1/audio/transcriptionsper transcribed second

A model's priceUnit tells you what outputPrice means. For token models it's dollars per 1M tokens; for the rest it's dollars per one native unit (per image, per second, per character). Don't multiply a per-image price by 1M.

Pricing details

  • Three token prices per model: inputPrice, outputPrice, cacheReadPrice. Cached prompt tokens are billed at cacheReadPrice, which is lower — repeated prefixes get cheaper over time. See Context caching.
  • Variant pricing (images): a model can carry a per-size/quality price map (e.g. 1024x1024 vs 1024x1792). The gateway matches the most specific variant key first and falls back to the flat outputPrice.
  • Free models: a model with all three token prices at $0 is a "free model". It doesn't touch your dollar allowance, but it is capped by the plan's daily free-token budget (5M tokens/day out of the box) plus any referral bonus tokens. See Daily free-model budget.
  • Max output clamp: maxOutputLimit caps max_tokens / max_completion_tokens to the lesser of your request and the model's limit.

Model ids

  • Ids are case-insensitive and a sleepy/ prefix is optional (stripped either way).
  • Use the id (or modelId) field as-is. For Claude Code / Anthropic clients, ANTHROPIC_MODEL must be a chat model id (chat-completion or anthropic-responses) — an image/video/TTS/STT id will 404 on that path.

Next: Endpoint reference · Usage limits

Models | SleepyAI - Your Coding Agent and Unified AI GateWay