Skip to content
Open
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/y-api/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions providers/y-api/models/deepseek/deepseek-v4-flash-0731.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Toggle: thinking.type = enabled|disabled
# Effort: reasoning_effort = low|high|max
base_model = "deepseek/deepseek-v4-flash-0731"
reasoning_options = [
{ type = "toggle" },
{ type = "effort", values = ["low", "high", "max"] },
]

[interleaved]
field = "reasoning_content"

[cost]
input = 0.0075
output = 0.015
15 changes: 15 additions & 0 deletions providers/y-api/models/deepseek/deepseek-v4-flash.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Toggle: thinking.type = enabled|disabled
# Effort: reasoning_effort = low|high|max
# Cost: free tier — no credit is deducted (https://y-api.bestvirtualgoods.com/pricing).
base_model = "deepseek/deepseek-v4-flash"
reasoning_options = [
{ type = "toggle" },
{ type = "effort", values = ["low", "high", "max"] },
]

[interleaved]
field = "reasoning_content"

[cost]
input = 0
output = 0
22 changes: 22 additions & 0 deletions providers/y-api/models/deepseek/deepseek-v4-pro.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Toggle: thinking.type = enabled|disabled
# Effort: reasoning_effort = high|max
#
# Interleaved field: this host does NOT emit reasoning_content for this model
# (0 of 14 samples, 2026-09-16). It emits reasoning (string) plus
# reasoning_details (list of one {type: "reasoning.text"}) on all 14 samples,
# which is why the field below is reasoning_details and not the lab's
# reasoning_content. The first-party DeepSeek V4 Pro entry uses
# reasoning_content; this host's response shape differs, so the override
# describes the host.
base_model = "deepseek/deepseek-v4-pro"
reasoning_options = [
{ type = "toggle" },
{ type = "effort", values = ["high", "max"] },
]

[interleaved]
field = "reasoning_details"

[cost]
input = 0.025
output = 0.05
33 changes: 33 additions & 0 deletions providers/y-api/models/deepseek/deepseek-v4.1-flash.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Toggle: thinking.type = enabled|disabled
# Effort: reasoning_effort = low|high|max
#
# This host ACCEPTS medium and xhigh (no 400) but does not act on them
# distinctly, so they are not authored. Measured on this host, 2026-09-16:
#
# this model, usage.completion_tokens_details.reasoning_tokens, n=3/level
# low 84/116/78 medium 108/108/104 high 109/139/104
# xhigh 131/87/132 max 140/134/128
# Adjacent levels overlap: medium's whole range (104-108) sits inside
# high's (104-139), and xhigh's (87-132) is wider than the gap to either
# neighbour. Nothing here separates medium from high, or xhigh from high.
#
# control, sibling deepseek-v4-flash-0731 (same family, same host),
# reasoning_content length, n=5/level, means
# low 826 / medium 442 / high 453 / xhigh 648 / max 1801
# which is not monotonic at all (max ranged 414-6790).
#
# An effort level a caller cannot observe is worse than not offering it, so
# this file authors the lab baseline set, matching the other Y-API DeepSeek
# Flash entries.
base_model = "deepseek/deepseek-v4.1-flash"
reasoning_options = [
{ type = "toggle" },
{ type = "effort", values = ["low", "high", "max"] },
]

[interleaved]
field = "reasoning_content"

[cost]
input = 0.01
output = 0.05
15 changes: 15 additions & 0 deletions providers/y-api/models/moonshotai/kimi-k3.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Toggle: thinking.type = enabled|disabled
# Effort: reasoning_effort = low|high|max
# Reasoning text arrives as reasoning_details, not reasoning_content (live API, 2026-09-16).
base_model = "moonshotai/kimi-k3"
reasoning_options = [
{ type = "toggle" },
{ type = "effort", values = ["low", "high", "max"] },
]

[interleaved]
field = "reasoning_details"

[cost]
input = 0.15
output = 0.75
8 changes: 8 additions & 0 deletions providers/y-api/models/openai/gpt-5.6-luna.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Effort: reasoning_effort = none|low|medium|high|xhigh
# The live API rejects `max` for this model; no reasoning text is exposed.
base_model = "openai/gpt-5.6-luna"
reasoning_options = [{ type = "effort", values = ["none", "low", "medium", "high", "xhigh"] }]

[cost]
input = 0.015
output = 0.065
8 changes: 8 additions & 0 deletions providers/y-api/models/openai/gpt-5.6-sol.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Effort: reasoning_effort = none|low|medium|high|xhigh
# The live API rejects `max` for this model; no reasoning text is exposed.
base_model = "openai/gpt-5.6-sol"
reasoning_options = [{ type = "effort", values = ["none", "low", "medium", "high", "xhigh"] }]

[cost]
input = 0.25
output = 1.5
8 changes: 8 additions & 0 deletions providers/y-api/models/openai/gpt-5.6-terra.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Effort: reasoning_effort = none|low|medium|high|xhigh
# The live API rejects `max` for this model; no reasoning text is exposed.
base_model = "openai/gpt-5.6-terra"
reasoning_options = [{ type = "effort", values = ["none", "low", "medium", "high", "xhigh"] }]

[cost]
input = 0.1
output = 0.6
9 changes: 9 additions & 0 deletions providers/y-api/models/openai/gpt-6-astra.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Effort: reasoning_effort = low|medium|high|xhigh — no `none` and no `max`, per the
# live API error text; no reasoning text is exposed.
# This model also rejects `max_tokens` and requires `max_completion_tokens`.
base_model = "openai/gpt-6-astra"
reasoning_options = [{ type = "effort", values = ["low", "medium", "high", "xhigh"] }]

[cost]
input = 0.5
output = 2.5
26 changes: 26 additions & 0 deletions providers/y-api/models/qwen/qwen3.8-flash.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Effort: reasoning_effort accepts low|medium|xhigh. An unlisted value returns the
# supported set verbatim, so this is read off the wire rather than from Alibaba's docs:
# "Unexpected reasoning effort minimal. Supported types are xhigh (default),
# medium, and low."
# `none` also answered 200 on this host (5/5), but it is not in that enumeration, so
# it is not authored here.
#
# No [interleaved]: this host returns the trace as a plain `reasoning` string
# (`message` keys are content/reasoning/role/tool_calls), which is not a
# schema-valid interleaved.field. Same reason the four OpenAI models omit it.
#
# [limit] is overridden. The Alibaba Cloud entry advertises a 1M context, but this
# host caps this model well below that:
# "The input (2000052 tokens) is longer than the model's context length (262144 tokens)."
# 262144 = 256K, so inheriting the base limit would overstate the window by ~4x.
#
# Cost: USD cash price (credit / 20), per the header in provider.toml.
base_model = "alibaba/qwen3.8-flash"
reasoning_options = [{ type = "effort", values = ["low", "medium", "xhigh"] }]

[limit]
context = 262_144

[cost]
input = 0.01
output = 0.025
11 changes: 11 additions & 0 deletions providers/y-api/models/tencent/hy3.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Effort: reasoning_effort = none|low|high
# Cost: free tier — no credit is deducted (https://y-api.bestvirtualgoods.com/pricing).
base_model = "tencent/hy3"
reasoning_options = [{ type = "effort", values = ["none", "low", "high"] }]

[interleaved]
field = "reasoning_content"

[cost]
input = 0
output = 0
11 changes: 11 additions & 0 deletions providers/y-api/models/xiaomi/mimo-v2.5.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Toggle: thinking.type = enabled|disabled
# Cost: free tier — no credit is deducted (https://y-api.bestvirtualgoods.com/pricing).
base_model = "xiaomi/mimo-v2.5"
reasoning_options = [{ type = "toggle" }]

[interleaved]
field = "reasoning_content"

[cost]
input = 0
output = 0
15 changes: 15 additions & 0 deletions providers/y-api/models/z-ai/glm-5.2.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Effort: reasoning_effort = high|max; thinking is always on.
#
# Interleaved field: reasoning_details, not the lab's reasoning_content. This
# host returned reasoning_content on 0 of 10 calls (2026-09-16); it returned
# reasoning_details ({type: "reasoning.text"}) on 8 of 10, the other 2 carrying
# no side channel at all. The field that exists is the one authored.
base_model = "zhipuai/glm-5.2"
reasoning_options = [{ type = "effort", values = ["high", "max"] }]

[interleaved]
field = "reasoning_details"

[cost]
input = 0.07
output = 0.22
10 changes: 10 additions & 0 deletions providers/y-api/models/z-ai/glm-5.3-flash.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Effort: reasoning_effort = low|high|max; thinking is always on.
base_model = "zhipuai/glm-5.3-flash"
reasoning_options = [{ type = "effort", values = ["low", "high", "max"] }]

[interleaved]
field = "reasoning_content"

[cost]
input = 0.0075
output = 0.025
10 changes: 10 additions & 0 deletions providers/y-api/models/z-ai/glm-5.3.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Effort: reasoning_effort = low|high|max; thinking is always on.
base_model = "zhipuai/glm-5.3"
reasoning_options = [{ type = "effort", values = ["low", "high", "max"] }]

[interleaved]
field = "reasoning_content"

[cost]
input = 0.07
output = 0.25
20 changes: 20 additions & 0 deletions providers/y-api/provider.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Cost basis: USD cash price. The published catalog quotes account credit, and
# credit is topped up at a promotional 20x rate, so every cost value here is
# the credit price / 20.
#
# The 20x rate is stated by the service itself, in two places, both read
# 2026-09-16:
# https://y-api.bestvirtualgoods.com/about
# "Top up $1 to receive $20 of account credit (limited-time rate; reverts
# to 1:10 afterwards)."
# https://y-api.bestvirtualgoods.com/pricing
# "limited-time top up $1 for $20 in credit (reverts to 1:10 afterwards)"
#
# Both pages also say the rate is limited-time and reverts to 1:10. When it
# does, every cost below doubles. The service is not reachable from mainland
# China and quotes no non-USD price, so no FX conversion is involved.
name = "Y-API"
env = ["Y_API_API_KEY"]
npm = "@ai-sdk/openai-compatible"
api = "https://api.y-api.bestvirtualgoods.com/v1"
doc = "https://y-api.bestvirtualgoods.com/docs"
Loading