Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions providers/cheapaimodel/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions providers/cheapaimodel/models/deepseek-v4-1-flash.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Price: https://cheapaimodel.ai/api/models (fetched 2026-11-02) lists the peak rate
# (input $0.2100153, output $0.8400612, cache read $0.004200306 per 1M tokens).
# Billing follows DeepSeek's peak/off-peak split: weekdays (Asia/Shanghai) 09:00-12:00 and
# 14:00-18:00 Beijing time (01:00-04:00, 06:00-10:00 UTC) bill 2x the off-peak base below.
# Unlike DeepSeek's own API, Chinese public holidays are not exempted.
# Toggle: thinking.type = enabled|disabled
# Effort: reasoning_effort = low|high|max (mapped from providers/deepseek)
# Cache: automatic upstream prefix cache, no write price.
# Live 2026-10-27: reasoning returned in reasoning_content; thinking.type = disabled gives 0 reasoning tokens.
schema = 2
base_model = "deepseek/deepseek-v4.1-flash"

[capabilities]
reasoning = { supported = true, toggle = true, effort = ["low", "high", "max"] }
structured_output = true
cache = { implicit = true }

[api.chat-completions]
compatibility = { reasoning_field = "reasoning_content" }

[cost.text.input]
price = 0.10500765
cache = { read = 0.002100153 }

[cost.text.output]
price = 0.4200306

[[cost.multipliers]]
when = { utc_days = { in = ["mon", "tue", "wed", "thu", "fri"] }, any = [{ all = [{ utc_hours = { gte = "01:00" } }, { utc_hours = { lt = "04:00" } }] }, { all = [{ utc_hours = { gte = "06:00" } }, { utc_hours = { lt = "10:00" } }] }] }
factor = 2
21 changes: 21 additions & 0 deletions providers/cheapaimodel/models/glm-5.3-flash.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Price: https://cheapaimodel.ai/api/models (fetched 2026-11-02).
# Effort: reasoning_effort = low|high|max (mapped from providers/zai)
# Cache: automatic upstream prefix cache, no write price.
# Live 2026-10-27: reasoning returned in reasoning_content.
schema = 2
base_model = "zhipuai/glm-5.3-flash"

[capabilities]
reasoning = { supported = true, effort = ["low", "high", "max"] }
structured_output = true
cache = { implicit = true }

[api.chat-completions]
compatibility = { reasoning_field = "reasoning_content" }

[cost.text.input]
price = 0.10500765
cache = { read = 0.02100153 }

[cost.text.output]
price = 0.3500255
21 changes: 21 additions & 0 deletions providers/cheapaimodel/models/glm-5.3.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Price: https://cheapaimodel.ai/api/models (fetched 2026-11-02).
# Effort: reasoning_effort = low|high|max (mapped from providers/zai)
# Cache: automatic upstream prefix cache, no write price.
# Live 2026-10-27: reasoning returned in reasoning_content.
schema = 2
base_model = "zhipuai/glm-5.3"

[capabilities]
reasoning = { supported = true, effort = ["low", "high", "max"] }
structured_output = true
cache = { implicit = true }

[api.chat-completions]
compatibility = { reasoning_field = "reasoning_content" }

[cost.text.input]
price = 0.9800714
cache = { read = 0.18201326 }

[cost.text.output]
price = 3.0802244
20 changes: 20 additions & 0 deletions providers/cheapaimodel/models/grok-4.7.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Price: https://cheapaimodel.ai/api/models (fetched 2026-11-02). One flat rate at every
# context length (no long-context tier) and no priority tier on this host.
# Effort: reasoning_effort = low|medium|high|xhigh (mapped from providers/xai)
# Live 2026-10-27 on /v1/chat/completions: reasoning text is not returned (reasoning_content is
# null), only usage.completion_tokens_details.reasoning_tokens, which rises with effort (low 546, high 680).
# APIs: Chat Completions only on this host.
schema = 2
base_model = "xai/grok-4.7"

[capabilities]
reasoning = { supported = true, effort = ["low", "medium", "high", "xhigh"] }
structured_output = true
cache = { implicit = true }

[cost.text.input]
price = 0.199588
cache = { read = 0.049897 }

[cost.text.output]
price = 0.598764
21 changes: 21 additions & 0 deletions providers/cheapaimodel/models/kimi-k3.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Price: https://cheapaimodel.ai/api/models (fetched 2026-11-02).
# Effort: reasoning_effort = low|high|max (mapped from providers/moonshotai); always thinks.
# Cache: automatic upstream prefix cache; the catalog lists a cache-write price.
# Live 2026-10-27: reasoning returned in reasoning_content.
schema = 2
base_model = "moonshotai/kimi-k3"

[capabilities]
reasoning = { supported = true, effort = ["low", "high", "max"] }
structured_output = true
cache = { implicit = true }

[api.chat-completions]
compatibility = { reasoning_field = "reasoning_content" }

[cost.text.input]
price = 2.100153
cache = { read = 0.2100153, write = 2.100153 }

[cost.text.output]
price = 10.500765
14 changes: 14 additions & 0 deletions providers/cheapaimodel/provider.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# cheapaimodel is an OpenAI-compatible relay: it resells first-party models
# (DeepSeek, Z.ai, xAI, Moonshot) through one key, billed in USD per token.
# Public catalog with prices, limits and modalities (no auth):
# https://cheapaimodel.ai/api/models (fetched 2026-10-27)
# Prices are list price times a per-group discount and move with the monthly
# USD/CNY fixing used by the upstream, so they can shift slightly month to month.
# Reasoning controls are passed through to the lab and mapped from each lab's
# first-party entry (not probed per host).
name = "cheapaimodel"
npm = "@ai-sdk/openai-compatible"
opencodeai = "@opencode/ai/providers/openai-compatible"
env = ["CHEAPAIMODEL_API_KEY"]
api = "https://api.cheapaimodel.ai/v1"
doc = "https://cheapaimodel.ai/docs"
Loading