@apicity/cost 0.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +157 -0
- package/dist/src/compute.d.ts +3 -0
- package/dist/src/compute.d.ts.map +1 -0
- package/dist/src/compute.js +144 -0
- package/dist/src/compute.js.map +1 -0
- package/dist/src/cost.d.ts +3 -0
- package/dist/src/cost.d.ts.map +1 -0
- package/dist/src/cost.js +7 -0
- package/dist/src/cost.js.map +1 -0
- package/dist/src/extract/anthropic.d.ts +3 -0
- package/dist/src/extract/anthropic.d.ts.map +1 -0
- package/dist/src/extract/anthropic.js +26 -0
- package/dist/src/extract/anthropic.js.map +1 -0
- package/dist/src/extract/chat.d.ts +3 -0
- package/dist/src/extract/chat.d.ts.map +1 -0
- package/dist/src/extract/chat.js +29 -0
- package/dist/src/extract/chat.js.map +1 -0
- package/dist/src/extract/messages.d.ts +6 -0
- package/dist/src/extract/messages.d.ts.map +1 -0
- package/dist/src/extract/messages.js +46 -0
- package/dist/src/extract/messages.js.map +1 -0
- package/dist/src/extract/openai.d.ts +3 -0
- package/dist/src/extract/openai.d.ts.map +1 -0
- package/dist/src/extract/openai.js +31 -0
- package/dist/src/extract/openai.js.map +1 -0
- package/dist/src/extract/types.d.ts +13 -0
- package/dist/src/extract/types.d.ts.map +1 -0
- package/dist/src/extract/types.js +2 -0
- package/dist/src/extract/types.js.map +1 -0
- package/dist/src/extract/xai.d.ts +3 -0
- package/dist/src/extract/xai.d.ts.map +1 -0
- package/dist/src/extract/xai.js +30 -0
- package/dist/src/extract/xai.js.map +1 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +5 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/pricing/alibaba.d.ts +3 -0
- package/dist/src/pricing/alibaba.d.ts.map +1 -0
- package/dist/src/pricing/alibaba.js +16 -0
- package/dist/src/pricing/alibaba.js.map +1 -0
- package/dist/src/pricing/anthropic.d.ts +3 -0
- package/dist/src/pricing/anthropic.d.ts.map +1 -0
- package/dist/src/pricing/anthropic.js +56 -0
- package/dist/src/pricing/anthropic.js.map +1 -0
- package/dist/src/pricing/elevenlabs.d.ts +3 -0
- package/dist/src/pricing/elevenlabs.d.ts.map +1 -0
- package/dist/src/pricing/elevenlabs.js +24 -0
- package/dist/src/pricing/elevenlabs.js.map +1 -0
- package/dist/src/pricing/fireworks.d.ts +3 -0
- package/dist/src/pricing/fireworks.d.ts.map +1 -0
- package/dist/src/pricing/fireworks.js +22 -0
- package/dist/src/pricing/fireworks.js.map +1 -0
- package/dist/src/pricing/helpers.d.ts +5 -0
- package/dist/src/pricing/helpers.d.ts.map +1 -0
- package/dist/src/pricing/helpers.js +33 -0
- package/dist/src/pricing/helpers.js.map +1 -0
- package/dist/src/pricing/index.d.ts +14 -0
- package/dist/src/pricing/index.d.ts.map +1 -0
- package/dist/src/pricing/index.js +30 -0
- package/dist/src/pricing/index.js.map +1 -0
- package/dist/src/pricing/kie.d.ts +3 -0
- package/dist/src/pricing/kie.d.ts.map +1 -0
- package/dist/src/pricing/kie.js +271 -0
- package/dist/src/pricing/kie.js.map +1 -0
- package/dist/src/pricing/kimicoding.d.ts +3 -0
- package/dist/src/pricing/kimicoding.d.ts.map +1 -0
- package/dist/src/pricing/kimicoding.js +15 -0
- package/dist/src/pricing/kimicoding.js.map +1 -0
- package/dist/src/pricing/openai.d.ts +3 -0
- package/dist/src/pricing/openai.d.ts.map +1 -0
- package/dist/src/pricing/openai.js +24 -0
- package/dist/src/pricing/openai.js.map +1 -0
- package/dist/src/pricing/types.d.ts +28 -0
- package/dist/src/pricing/types.d.ts.map +1 -0
- package/dist/src/pricing/types.js +9 -0
- package/dist/src/pricing/types.js.map +1 -0
- package/dist/src/pricing/xai.d.ts +3 -0
- package/dist/src/pricing/xai.d.ts.map +1 -0
- package/dist/src/pricing/xai.js +12 -0
- package/dist/src/pricing/xai.js.map +1 -0
- package/dist/src/slugs.d.ts +231 -0
- package/dist/src/slugs.d.ts.map +1 -0
- package/dist/src/slugs.js +278 -0
- package/dist/src/slugs.js.map +1 -0
- package/dist/src/types.d.ts +30 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +2 -0
- package/dist/src/types.js.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9E,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3D,YAAY,EACV,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,YAAY,GACb,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EACV,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,eAAe,GAChB,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alibaba.d.ts","sourceRoot":"","sources":["../../../src/pricing/alibaba.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAM5C,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAWhD,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const source = {
|
|
2
|
+
url: "https://www.alibabacloud.com/help/en/model-studio/model-pricing",
|
|
3
|
+
};
|
|
4
|
+
export const alibaba = {
|
|
5
|
+
"qwen3.6-plus": {
|
|
6
|
+
kind: "tokens",
|
|
7
|
+
rate: { input: 0.325, output: 1.95 },
|
|
8
|
+
source,
|
|
9
|
+
},
|
|
10
|
+
"qwen3.5-0.8b": {
|
|
11
|
+
kind: "tokens",
|
|
12
|
+
rate: { input: 0.01, output: 0.04 },
|
|
13
|
+
source,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=alibaba.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alibaba.js","sourceRoot":"","sources":["../../../src/pricing/alibaba.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG;IACb,GAAG,EAAE,iEAAiE;CACvE,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAiC;IACnD,cAAc,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE;QACpC,MAAM;KACP;IACD,cAAc,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;QACnC,MAAM;KACP;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anthropic.d.ts","sourceRoot":"","sources":["../../../src/pricing/anthropic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAM5C,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAmDlD,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
const source = {
|
|
2
|
+
url: "https://platform.claude.com/docs/en/about-claude/pricing",
|
|
3
|
+
};
|
|
4
|
+
export const anthropic = {
|
|
5
|
+
"claude-opus-4-7": {
|
|
6
|
+
kind: "tokens",
|
|
7
|
+
rate: { input: 5, output: 25, cacheRead: 0.5, cacheWrite5m: 6.25 },
|
|
8
|
+
source,
|
|
9
|
+
},
|
|
10
|
+
"claude-opus-4-6": {
|
|
11
|
+
kind: "tokens",
|
|
12
|
+
rate: { input: 5, output: 25, cacheRead: 0.5, cacheWrite5m: 6.25 },
|
|
13
|
+
source,
|
|
14
|
+
},
|
|
15
|
+
"claude-opus-4-5": {
|
|
16
|
+
kind: "tokens",
|
|
17
|
+
rate: { input: 5, output: 25, cacheRead: 0.5, cacheWrite5m: 6.25 },
|
|
18
|
+
source,
|
|
19
|
+
},
|
|
20
|
+
"claude-opus-4-1": {
|
|
21
|
+
kind: "tokens",
|
|
22
|
+
rate: { input: 15, output: 75, cacheRead: 1.5, cacheWrite5m: 18.75 },
|
|
23
|
+
source,
|
|
24
|
+
},
|
|
25
|
+
"claude-opus-4": {
|
|
26
|
+
kind: "tokens",
|
|
27
|
+
rate: { input: 15, output: 75, cacheRead: 1.5, cacheWrite5m: 18.75 },
|
|
28
|
+
source,
|
|
29
|
+
},
|
|
30
|
+
"claude-sonnet-4-6": {
|
|
31
|
+
kind: "tokens",
|
|
32
|
+
rate: { input: 3, output: 15, cacheRead: 0.3, cacheWrite5m: 3.75 },
|
|
33
|
+
source,
|
|
34
|
+
},
|
|
35
|
+
"claude-sonnet-4-5": {
|
|
36
|
+
kind: "tokens",
|
|
37
|
+
rate: { input: 3, output: 15, cacheRead: 0.3, cacheWrite5m: 3.75 },
|
|
38
|
+
source,
|
|
39
|
+
},
|
|
40
|
+
"claude-sonnet-4": {
|
|
41
|
+
kind: "tokens",
|
|
42
|
+
rate: { input: 3, output: 15, cacheRead: 0.3, cacheWrite5m: 3.75 },
|
|
43
|
+
source,
|
|
44
|
+
},
|
|
45
|
+
"claude-haiku-4-5": {
|
|
46
|
+
kind: "tokens",
|
|
47
|
+
rate: { input: 1, output: 5, cacheRead: 0.1, cacheWrite5m: 1.25 },
|
|
48
|
+
source,
|
|
49
|
+
},
|
|
50
|
+
"claude-haiku-3-5": {
|
|
51
|
+
kind: "tokens",
|
|
52
|
+
rate: { input: 0.8, output: 4, cacheRead: 0.08, cacheWrite5m: 1 },
|
|
53
|
+
source,
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=anthropic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anthropic.js","sourceRoot":"","sources":["../../../src/pricing/anthropic.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG;IACb,GAAG,EAAE,0DAA0D;CAChE,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAiC;IACrD,iBAAiB,EAAE;QACjB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE;QAClE,MAAM;KACP;IACD,iBAAiB,EAAE;QACjB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE;QAClE,MAAM;KACP;IACD,iBAAiB,EAAE;QACjB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,YAAY,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AS,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,EAAE;QACjE,MAAM;KACP;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elevenlabs.d.ts","sourceRoot":"","sources":["../../../src/pricing/elevenlabs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAsB5C,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAKnD,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { asString } from "./helpers.js";
|
|
2
|
+
const source = { url: "https://elevenlabs.io/pricing/api" };
|
|
3
|
+
// ElevenLabs TTS bills per character of `payload.text`. Both `model_id` (the
|
|
4
|
+
// canonical upstream field) and `model` (some callers' shorthand) are used to
|
|
5
|
+
// look up the entry; the units function reads payload.text directly.
|
|
6
|
+
function characters(p) {
|
|
7
|
+
const t = asString(p.text);
|
|
8
|
+
return t ? t.length : undefined;
|
|
9
|
+
}
|
|
10
|
+
const flat = (perUnit) => ({
|
|
11
|
+
kind: "perUnit",
|
|
12
|
+
unit: "characters",
|
|
13
|
+
units: characters,
|
|
14
|
+
select: [],
|
|
15
|
+
rates: { "": perUnit },
|
|
16
|
+
source,
|
|
17
|
+
});
|
|
18
|
+
export const elevenlabs = {
|
|
19
|
+
eleven_flash_v2_5: flat(0.00006),
|
|
20
|
+
eleven_turbo_v2_5: flat(0.00006),
|
|
21
|
+
eleven_multilingual_v2: flat(0.00012),
|
|
22
|
+
eleven_multilingual_v3: flat(0.00012),
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=elevenlabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elevenlabs.js","sourceRoot":"","sources":["../../../src/pricing/elevenlabs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,MAAM,MAAM,GAAG,EAAE,GAAG,EAAE,mCAAmC,EAAE,CAAC;AAE5D,6EAA6E;AAC7E,8EAA8E;AAC9E,qEAAqE;AACrE,SAAS,UAAU,CAAC,CAA0B;IAC5C,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC3B,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AAClC,CAAC;AAED,MAAM,IAAI,GAAG,CAAC,OAAe,EAAgB,EAAE,CAAC,CAAC;IAC/C,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE;IACtB,MAAM;CACP,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,UAAU,GAAiC;IACtD,iBAAiB,EAAE,IAAI,CAAC,OAAO,CAAC;IAChC,iBAAiB,EAAE,IAAI,CAAC,OAAO,CAAC;IAChC,sBAAsB,EAAE,IAAI,CAAC,OAAO,CAAC;IACrC,sBAAsB,EAAE,IAAI,CAAC,OAAO,CAAC;CACtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fireworks.d.ts","sourceRoot":"","sources":["../../../src/pricing/fireworks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAmBlD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const source = { url: "https://fireworks.ai/pricing" };
|
|
2
|
+
export const fireworks = {
|
|
3
|
+
"deepseek-v4-pro": {
|
|
4
|
+
kind: "tokens",
|
|
5
|
+
rate: { input: 1.74, output: 3.48 },
|
|
6
|
+
source,
|
|
7
|
+
},
|
|
8
|
+
"deepseek-v3": {
|
|
9
|
+
kind: "tokens",
|
|
10
|
+
rate: { input: 0.56, output: 1.68 },
|
|
11
|
+
source,
|
|
12
|
+
},
|
|
13
|
+
"glm-5": { kind: "tokens", rate: { input: 1, output: 3.2 }, source },
|
|
14
|
+
"glm-5.1": { kind: "tokens", rate: { input: 1.4, output: 4.4 }, source },
|
|
15
|
+
"kimi-k2.6": { kind: "tokens", rate: { input: 0.95, output: 4 }, source },
|
|
16
|
+
"qwen3-vl-30b": {
|
|
17
|
+
kind: "tokens",
|
|
18
|
+
rate: { input: 0.15, output: 0.6 },
|
|
19
|
+
source,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=fireworks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fireworks.js","sourceRoot":"","sources":["../../../src/pricing/fireworks.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG,EAAE,GAAG,EAAE,8BAA8B,EAAE,CAAC;AAEvD,MAAM,CAAC,MAAM,SAAS,GAAiC;IACrD,iBAAiB,EAAE;QACjB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;QACnC,MAAM;KACP;IACD,aAAa,EAAE;QACb,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;QACnC,MAAM;KACP;IACD,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE;IACpE,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE;IACxE,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE;IACzE,cAAc,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE;QAClC,MAAM;KACP;CACF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function asString(x: unknown): string | undefined;
|
|
2
|
+
export declare function asNumber(x: unknown): number | undefined;
|
|
3
|
+
export declare function asObject(x: unknown): Record<string, unknown> | undefined;
|
|
4
|
+
export declare function coerceSeconds(d: unknown): number | undefined;
|
|
5
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/pricing/helpers.ts"],"names":[],"mappings":"AAIA,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAEvD;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAEvD;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAIxE;AAKD,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAY5D"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Coercion helpers used by per-provider pricing entries to read upstream
|
|
2
|
+
// payload values. Promoted from extract/messages.ts and extract/kie.ts so
|
|
3
|
+
// pricing entries can stand alone without depending on the extract module.
|
|
4
|
+
export function asString(x) {
|
|
5
|
+
return typeof x === "string" ? x : undefined;
|
|
6
|
+
}
|
|
7
|
+
export function asNumber(x) {
|
|
8
|
+
return typeof x === "number" && Number.isFinite(x) ? x : undefined;
|
|
9
|
+
}
|
|
10
|
+
export function asObject(x) {
|
|
11
|
+
return x !== null && typeof x === "object" && !Array.isArray(x)
|
|
12
|
+
? x
|
|
13
|
+
: undefined;
|
|
14
|
+
}
|
|
15
|
+
// Coerces durations published by kie schemas. Most use a number of seconds,
|
|
16
|
+
// kling uses "5s"/"10s" strings, grok-imagine/image-to-video uses bare
|
|
17
|
+
// "6"-"30" digit strings.
|
|
18
|
+
export function coerceSeconds(d) {
|
|
19
|
+
const n = asNumber(d);
|
|
20
|
+
if (n !== undefined)
|
|
21
|
+
return n;
|
|
22
|
+
const s = asString(d);
|
|
23
|
+
if (s) {
|
|
24
|
+
const m = s.match(/^(\d+(?:\.\d+)?)/);
|
|
25
|
+
if (m) {
|
|
26
|
+
const v = Number(m[1]);
|
|
27
|
+
if (Number.isFinite(v))
|
|
28
|
+
return v;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/pricing/helpers.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,0EAA0E;AAC1E,2EAA2E;AAE3E,MAAM,UAAU,QAAQ,CAAC,CAAU;IACjC,OAAO,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,CAAU;IACjC,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACrE,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,CAAU;IACjC,OAAO,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7D,CAAC,CAAE,CAA6B;QAChC,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,4EAA4E;AAC5E,uEAAuE;AACvE,0BAA0B;AAC1B,MAAM,UAAU,aAAa,CAAC,CAAU;IACtC,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtB,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,CAAC,CAAC;IAC9B,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtB,IAAI,CAAC,EAAE,CAAC;QACN,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QACtC,IAAI,CAAC,EAAE,CAAC;YACN,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACvB,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAAE,OAAO,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const PRICING_AS_OF = "2026-04-30";
|
|
2
|
+
export declare const PRICING: {
|
|
3
|
+
readonly openai: Record<string, import("./types").ModelPricing>;
|
|
4
|
+
readonly anthropic: Record<string, import("./types").ModelPricing>;
|
|
5
|
+
readonly xai: Record<string, import("./types").ModelPricing>;
|
|
6
|
+
readonly kimicoding: Record<string, import("./types").ModelPricing>;
|
|
7
|
+
readonly fireworks: Record<string, import("./types").ModelPricing>;
|
|
8
|
+
readonly alibaba: Record<string, import("./types").ModelPricing>;
|
|
9
|
+
readonly elevenlabs: Record<string, import("./types").ModelPricing>;
|
|
10
|
+
readonly kie: Record<string, import("./types").ModelPricing>;
|
|
11
|
+
};
|
|
12
|
+
export type PricedProviderId = keyof typeof PRICING;
|
|
13
|
+
export type { CostUnit, ModelPricing, PerUnitPricing, RateSource, TokenPricing, } from "./types";
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pricing/index.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,aAAa,eAAe,CAAC;AAE1C,eAAO,MAAM,OAAO;;;;;;;;;CASV,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,OAAO,CAAC;AAEpD,YAAY,EACV,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,UAAU,EACV,YAAY,GACb,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Single source of truth for bundled pricing rates. Each provider lives in
|
|
2
|
+
// its own file under pricing/ — adding or updating a model means editing
|
|
3
|
+
// exactly one file.
|
|
4
|
+
//
|
|
5
|
+
// Refresh procedure: re-fetch the upstream pricing page named in the
|
|
6
|
+
// affected entry's `source.url`, update the rate, set `source.asOf` if
|
|
7
|
+
// you want a per-entry stamp; otherwise the global PRICING_AS_OF applies.
|
|
8
|
+
//
|
|
9
|
+
// FAL is intentionally absent: it has no bundled rates because the
|
|
10
|
+
// dispatcher in compute.ts asks the upstream pricing endpoint at runtime.
|
|
11
|
+
import { alibaba } from "./alibaba.js";
|
|
12
|
+
import { anthropic } from "./anthropic.js";
|
|
13
|
+
import { elevenlabs } from "./elevenlabs.js";
|
|
14
|
+
import { fireworks } from "./fireworks.js";
|
|
15
|
+
import { kie } from "./kie.js";
|
|
16
|
+
import { kimicoding } from "./kimicoding.js";
|
|
17
|
+
import { openai } from "./openai.js";
|
|
18
|
+
import { xai } from "./xai.js";
|
|
19
|
+
export const PRICING_AS_OF = "2026-04-30";
|
|
20
|
+
export const PRICING = {
|
|
21
|
+
openai,
|
|
22
|
+
anthropic,
|
|
23
|
+
xai,
|
|
24
|
+
kimicoding,
|
|
25
|
+
fireworks,
|
|
26
|
+
alibaba,
|
|
27
|
+
elevenlabs,
|
|
28
|
+
kie,
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pricing/index.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,yEAAyE;AACzE,oBAAoB;AACpB,EAAE;AACF,qEAAqE;AACrE,uEAAuE;AACvE,0EAA0E;AAC1E,EAAE;AACF,mEAAmE;AACnE,0EAA0E;AAE1E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC;AAE1C,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM;IACN,SAAS;IACT,GAAG;IACH,UAAU;IACV,SAAS;IACT,OAAO;IACP,UAAU;IACV,GAAG;CACK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kie.d.ts","sourceRoot":"","sources":["../../../src/pricing/kie.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAkF5C,eAAO,MAAM,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAiQ5C,CAAC"}
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { asNumber, asObject, asString, coerceSeconds } from "./helpers.js";
|
|
2
|
+
// Source URL is the kie marketplace page for the relevant model. Rates
|
|
3
|
+
// verified 2026-04-30. Rate keys mirror the upstream payload values verbatim
|
|
4
|
+
// (kling: payload.input.mode is "std"|"pro"|"4K"; seedance: payload.input.
|
|
5
|
+
// resolution is "480p"|"720p"|"1080p"; etc.) — there is no internal
|
|
6
|
+
// translation layer between the caller's payload and the rate selector.
|
|
7
|
+
const src = (slug) => ({ url: `https://kie.ai/market/${slug}` });
|
|
8
|
+
// Most kie video models read seconds from input.duration (top-level duration
|
|
9
|
+
// is accepted as a fallback for veo, whose schema has no duration field).
|
|
10
|
+
const seconds = (p) => coerceSeconds(asObject(p.input)?.duration ?? p.duration);
|
|
11
|
+
const inputResolution = (p) => asString(asObject(p.input)?.resolution);
|
|
12
|
+
const inputMode = (p) => asString(asObject(p.input)?.mode);
|
|
13
|
+
// Image models price per image; units = input.n when present (only
|
|
14
|
+
// wan/2-7-image* uses batch generation today), otherwise 1.
|
|
15
|
+
const imageCount = (p) => asNumber(asObject(p.input)?.n) ?? 1;
|
|
16
|
+
const flatVideo = (perUnit, slug) => ({
|
|
17
|
+
kind: "perUnit",
|
|
18
|
+
unit: "seconds",
|
|
19
|
+
units: seconds,
|
|
20
|
+
select: [],
|
|
21
|
+
rates: { "": perUnit },
|
|
22
|
+
source: src(slug),
|
|
23
|
+
});
|
|
24
|
+
const flatImage = (perUnit, slug) => ({
|
|
25
|
+
kind: "perUnit",
|
|
26
|
+
unit: "images",
|
|
27
|
+
units: imageCount,
|
|
28
|
+
select: [],
|
|
29
|
+
rates: { "": perUnit },
|
|
30
|
+
source: src(slug),
|
|
31
|
+
});
|
|
32
|
+
// Flat per-call rate for endpoints that bill once per request regardless
|
|
33
|
+
// of input shape (Suno endpoints, sora-watermark-remover, etc.).
|
|
34
|
+
const flatGen = (perUnit, slug) => ({
|
|
35
|
+
kind: "perUnit",
|
|
36
|
+
unit: "generations",
|
|
37
|
+
units: () => 1,
|
|
38
|
+
select: [],
|
|
39
|
+
rates: { "": perUnit },
|
|
40
|
+
source: src(slug),
|
|
41
|
+
});
|
|
42
|
+
// Image entry tiered by input.resolution (e.g. "1K"|"2K"|"4K").
|
|
43
|
+
const tieredImage = (rates, slug) => ({
|
|
44
|
+
kind: "perUnit",
|
|
45
|
+
unit: "images",
|
|
46
|
+
units: imageCount,
|
|
47
|
+
select: [{ name: "resolution", pick: inputResolution }],
|
|
48
|
+
rates,
|
|
49
|
+
source: src(slug),
|
|
50
|
+
});
|
|
51
|
+
// Video entry tiered by input.resolution (grok-imagine, happyhorse).
|
|
52
|
+
const tieredResolutionVideo = (rates, slug) => ({
|
|
53
|
+
kind: "perUnit",
|
|
54
|
+
unit: "seconds",
|
|
55
|
+
units: seconds,
|
|
56
|
+
select: [{ name: "resolution", pick: inputResolution }],
|
|
57
|
+
rates,
|
|
58
|
+
source: src(slug),
|
|
59
|
+
});
|
|
60
|
+
export const kie = {
|
|
61
|
+
// veo3 / veo3_fast — flat per-second rate. Veo schema has no duration
|
|
62
|
+
// field, so callers must pass duration as a top-level hint.
|
|
63
|
+
veo3: flatVideo(0.3, "google/veo3"),
|
|
64
|
+
veo3_fast: flatVideo(0.1, "google/veo3-fast"),
|
|
65
|
+
// Kling 3.0 video: 6 rates, mode × sound. mode ∈ {"std","pro","4K"}.
|
|
66
|
+
// 4K rate is the same with or without sound.
|
|
67
|
+
"kling-3.0/video": {
|
|
68
|
+
kind: "perUnit",
|
|
69
|
+
unit: "seconds",
|
|
70
|
+
units: seconds,
|
|
71
|
+
select: [
|
|
72
|
+
{ name: "mode", pick: inputMode },
|
|
73
|
+
{
|
|
74
|
+
name: "sound",
|
|
75
|
+
pick: (p) => (asObject(p.input)?.sound === true ? "sound" : undefined),
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
rates: {
|
|
79
|
+
std: 0.07,
|
|
80
|
+
"std|sound": 0.1,
|
|
81
|
+
pro: 0.09,
|
|
82
|
+
"pro|sound": 0.135,
|
|
83
|
+
"4K": 0.335,
|
|
84
|
+
"4K|sound": 0.335,
|
|
85
|
+
},
|
|
86
|
+
source: src("kwaivgi/kling-3.0"),
|
|
87
|
+
},
|
|
88
|
+
// Kling 3.0 motion-control: 2 tiers by mode ("720p"|"1080p"). Audio is
|
|
89
|
+
// not separately priced for motion-control.
|
|
90
|
+
"kling-3.0/motion-control": {
|
|
91
|
+
kind: "perUnit",
|
|
92
|
+
unit: "seconds",
|
|
93
|
+
units: seconds,
|
|
94
|
+
select: [{ name: "mode", pick: inputMode }],
|
|
95
|
+
rates: { "720p": 0.1, "1080p": 0.135 },
|
|
96
|
+
source: src("kwaivgi/kling-3.0"),
|
|
97
|
+
},
|
|
98
|
+
// wan/2.7 video — all four variants share a flat $0.10/s rate.
|
|
99
|
+
"wan/2-7-text-to-video": flatVideo(0.1, "alibaba/wan-2.7"),
|
|
100
|
+
"wan/2-7-image-to-video": flatVideo(0.1, "alibaba/wan-2.7"),
|
|
101
|
+
"wan/2-7-r2v": flatVideo(0.1, "alibaba/wan-2.7"),
|
|
102
|
+
"wan/2-7-videoedit": flatVideo(0.1, "alibaba/wan-2.7"),
|
|
103
|
+
// grok-imagine: 2 tiers by resolution. Audio is always on (no toggle in
|
|
104
|
+
// the kie input schema).
|
|
105
|
+
"grok-imagine/text-to-video": tieredResolutionVideo({ "480p": 0.008, "720p": 0.015 }, "xai/grok-imagine"),
|
|
106
|
+
"grok-imagine/image-to-video": tieredResolutionVideo({ "480p": 0.008, "720p": 0.015 }, "xai/grok-imagine"),
|
|
107
|
+
// grok-imagine images — kie returns a fixed bundle per call (6 default,
|
|
108
|
+
// 4 with input.enable_pro=true for t2i; 2 for i2i). The caller can't
|
|
109
|
+
// request n=1, so price is flat per generation.
|
|
110
|
+
"grok-imagine/text-to-image": {
|
|
111
|
+
kind: "perUnit",
|
|
112
|
+
unit: "generations",
|
|
113
|
+
units: () => 1,
|
|
114
|
+
select: [
|
|
115
|
+
{
|
|
116
|
+
name: "enable_pro",
|
|
117
|
+
pick: (p) => asObject(p.input)?.enable_pro === true ? "pro" : undefined,
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
rates: { "": 0.02, pro: 0.025 },
|
|
121
|
+
source: src("xai/grok-imagine"),
|
|
122
|
+
},
|
|
123
|
+
"grok-imagine/image-to-image": {
|
|
124
|
+
kind: "perUnit",
|
|
125
|
+
unit: "generations",
|
|
126
|
+
units: () => 1,
|
|
127
|
+
select: [],
|
|
128
|
+
rates: { "": 0.02 },
|
|
129
|
+
source: src("xai/grok-imagine"),
|
|
130
|
+
},
|
|
131
|
+
// grok-imagine/extend: flat per-generation, 4 rates indexed by
|
|
132
|
+
// (extend_times, resolution). The kie schema only carries extend_times
|
|
133
|
+
// and task_id — resolution is inherited from the source video. Callers
|
|
134
|
+
// must pass a top-level `resolution` hint (mirrors veo3's top-level
|
|
135
|
+
// `duration` hint), otherwise the lookup misses with a clear warning.
|
|
136
|
+
"grok-imagine/extend": {
|
|
137
|
+
kind: "perUnit",
|
|
138
|
+
unit: "generations",
|
|
139
|
+
units: () => 1,
|
|
140
|
+
select: [
|
|
141
|
+
{
|
|
142
|
+
name: "extend_times",
|
|
143
|
+
pick: (p) => asString(asObject(p.input)?.extend_times),
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: "resolution",
|
|
147
|
+
pick: (p) => asString(asObject(p.input)?.resolution) ?? asString(p.resolution),
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
rates: {
|
|
151
|
+
"6|480p": 0.05,
|
|
152
|
+
"6|720p": 0.1,
|
|
153
|
+
"10|480p": 0.1,
|
|
154
|
+
"10|720p": 0.15,
|
|
155
|
+
},
|
|
156
|
+
source: src("xai/grok-imagine"),
|
|
157
|
+
},
|
|
158
|
+
// grok-imagine/upscale: marketplace lists only the 360p→720p tier at
|
|
159
|
+
// $0.05 flat. Schema has no tier selector (only task_id).
|
|
160
|
+
"grok-imagine/upscale": {
|
|
161
|
+
kind: "perUnit",
|
|
162
|
+
unit: "generations",
|
|
163
|
+
units: () => 1,
|
|
164
|
+
select: [],
|
|
165
|
+
rates: { "": 0.05 },
|
|
166
|
+
source: src("xai/grok-imagine"),
|
|
167
|
+
},
|
|
168
|
+
// happyhorse: 2 tiers by resolution. Audio always on for t2v/i2v/r2v.
|
|
169
|
+
"happyhorse/text-to-video": tieredResolutionVideo({ "720p": 0.155, "1080p": 0.265 }, "happyhorse/image-to-video"),
|
|
170
|
+
"happyhorse/image-to-video": tieredResolutionVideo({ "720p": 0.155, "1080p": 0.265 }, "happyhorse/image-to-video"),
|
|
171
|
+
"happyhorse/reference-to-video": tieredResolutionVideo({ "720p": 0.155, "1080p": 0.265 }, "happyhorse/image-to-video"),
|
|
172
|
+
// happyhorse/video-edit: same tiered rates as the other happyhorse video
|
|
173
|
+
// entries. Schema has no duration field — output duration matches the
|
|
174
|
+
// source video_url, so callers must pass a top-level `duration` hint
|
|
175
|
+
// (the seconds picker already falls back to p.duration).
|
|
176
|
+
"happyhorse/video-edit": tieredResolutionVideo({ "720p": 0.155, "1080p": 0.265 }, "happyhorse/image-to-video"),
|
|
177
|
+
// bytedance/seedance-2: 6 rates, resolution × videoInput (i2v when
|
|
178
|
+
// input.first_frame_url is present, t2v otherwise).
|
|
179
|
+
"bytedance/seedance-2": {
|
|
180
|
+
kind: "perUnit",
|
|
181
|
+
unit: "seconds",
|
|
182
|
+
units: seconds,
|
|
183
|
+
select: [
|
|
184
|
+
{ name: "resolution", pick: inputResolution },
|
|
185
|
+
{
|
|
186
|
+
name: "videoInput",
|
|
187
|
+
pick: (p) => (asObject(p.input)?.first_frame_url ? "i2v" : "t2v"),
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
rates: {
|
|
191
|
+
"480p|i2v": 0.0575,
|
|
192
|
+
"480p|t2v": 0.095,
|
|
193
|
+
"720p|i2v": 0.125,
|
|
194
|
+
"720p|t2v": 0.205,
|
|
195
|
+
"1080p|i2v": 0.31,
|
|
196
|
+
"1080p|t2v": 0.51,
|
|
197
|
+
},
|
|
198
|
+
source: src("bytedance/seedance-2"),
|
|
199
|
+
},
|
|
200
|
+
// bytedance/seedance-2-fast: 4 rates (no 1080p tier).
|
|
201
|
+
"bytedance/seedance-2-fast": {
|
|
202
|
+
kind: "perUnit",
|
|
203
|
+
unit: "seconds",
|
|
204
|
+
units: seconds,
|
|
205
|
+
select: [
|
|
206
|
+
{ name: "resolution", pick: inputResolution },
|
|
207
|
+
{
|
|
208
|
+
name: "videoInput",
|
|
209
|
+
pick: (p) => (asObject(p.input)?.first_frame_url ? "i2v" : "t2v"),
|
|
210
|
+
},
|
|
211
|
+
],
|
|
212
|
+
rates: {
|
|
213
|
+
"480p|i2v": 0.045,
|
|
214
|
+
"480p|t2v": 0.0775,
|
|
215
|
+
"720p|i2v": 0.1,
|
|
216
|
+
"720p|t2v": 0.165,
|
|
217
|
+
},
|
|
218
|
+
source: src("bytedance/seedance-2-fast"),
|
|
219
|
+
},
|
|
220
|
+
// Image models — per-image USD. Resolution-tiered families
|
|
221
|
+
// (nano-banana-2, gpt-image-2) require input.resolution; flat-rate
|
|
222
|
+
// families (qwen2, seedream/5-lite) only need the model string.
|
|
223
|
+
// wan/2-7-image accepts an `n` field for batch generation.
|
|
224
|
+
"nano-banana-2": tieredImage({ "1K": 0.04, "2K": 0.06, "4K": 0.09 }, "google/nano-banana-2"),
|
|
225
|
+
// nano-banana-pro: 1K and 2K share the $0.09 rate per the marketplace
|
|
226
|
+
// ("1/2K"), 4K is $0.12.
|
|
227
|
+
"nano-banana-pro": tieredImage({ "1K": 0.09, "2K": 0.09, "4K": 0.12 }, "google/nano-banana-pro"),
|
|
228
|
+
"gpt-image-2-text-to-image": tieredImage({ "1K": 0.03, "2K": 0.05, "4K": 0.08 }, "openai/gpt-image-2"),
|
|
229
|
+
"gpt-image-2-image-to-image": tieredImage({ "1K": 0.03, "2K": 0.05, "4K": 0.08 }, "openai/gpt-image-2"),
|
|
230
|
+
"wan/2-7-image": flatImage(0.024, "alibaba/wan-2.7"),
|
|
231
|
+
"wan/2-7-image-pro": flatImage(0.06, "alibaba/wan-2.7"),
|
|
232
|
+
"qwen2/text-to-image": flatImage(0.028, "alibaba/qwen-image-2"),
|
|
233
|
+
"qwen2/image-edit": flatImage(0.028, "alibaba/qwen-image-2"),
|
|
234
|
+
"seedream/5-lite-text-to-image": flatImage(0.0275, "bytedance/seedream-5"),
|
|
235
|
+
"seedream/5-lite-image-to-image": flatImage(0.0275, "bytedance/seedream-5"),
|
|
236
|
+
// sora-watermark-remover: flat $0.05 per removal (only published rate
|
|
237
|
+
// on the marketplace). Schema has no tier selector.
|
|
238
|
+
"sora-watermark-remover": flatGen(0.05, "openai/sora-2"),
|
|
239
|
+
// Suno: keyed by endpoint, NOT by audio model version. The kie payload's
|
|
240
|
+
// `model` field is V3_5/.../V5_5 (audio version), but pricing is the
|
|
241
|
+
// same across versions and varies per endpoint. Callers pass the
|
|
242
|
+
// synthetic key via EstimateRequest.endpoint (e.g. "suno/generate"), and
|
|
243
|
+
// the upstream payload stays untouched. Flat rates unless noted.
|
|
244
|
+
"suno/generate": flatGen(0.06, "suno/suno"),
|
|
245
|
+
"suno/extend": flatGen(0.06, "suno/suno"),
|
|
246
|
+
"suno/upload-cover": flatGen(0.06, "suno/suno"),
|
|
247
|
+
"suno/upload-extend": flatGen(0.06, "suno/suno"),
|
|
248
|
+
"suno/wav-generate": flatGen(0.002, "suno/suno"),
|
|
249
|
+
"suno/mp4-generate": flatGen(0.01, "suno/suno"),
|
|
250
|
+
"suno/lyrics": flatGen(0.002, "suno/suno"),
|
|
251
|
+
"suno/style-generate": flatGen(0.002, "suno/suno"),
|
|
252
|
+
// suno/vocal-removal-generate: 2 rates by `payload.type`.
|
|
253
|
+
// "separate_vocal" → $0.05 (Vocal Separation)
|
|
254
|
+
// "split_stem" → $0.25 (Multi-Stem Separation)
|
|
255
|
+
// Schema marks `type` optional; we don't assume a default.
|
|
256
|
+
"suno/vocal-removal-generate": {
|
|
257
|
+
kind: "perUnit",
|
|
258
|
+
unit: "generations",
|
|
259
|
+
units: () => 1,
|
|
260
|
+
select: [{ name: "type", pick: (p) => asString(p.type) }],
|
|
261
|
+
rates: { separate_vocal: 0.05, split_stem: 0.25 },
|
|
262
|
+
source: src("suno/suno"),
|
|
263
|
+
},
|
|
264
|
+
// New Suno endpoints (5 missing from marketplace)
|
|
265
|
+
"suno/mashup-generate": flatGen(0.06, "suno/suno"),
|
|
266
|
+
"suno/replace-music-section-generate": flatGen(0.025, "suno/suno"),
|
|
267
|
+
"suno/sounds-generate": flatGen(0.0125, "suno/suno"),
|
|
268
|
+
"suno/add-instrumental-generate": flatGen(0.06, "suno/suno"),
|
|
269
|
+
"suno/add-vocals-generate": flatGen(0.06, "suno/suno"),
|
|
270
|
+
};
|
|
271
|
+
//# sourceMappingURL=kie.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kie.js","sourceRoot":"","sources":["../../../src/pricing/kie.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAExE,uEAAuE;AACvE,6EAA6E;AAC7E,2EAA2E;AAC3E,oEAAoE;AACpE,wEAAwE;AAExE,MAAM,GAAG,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,yBAAyB,IAAI,EAAE,EAAE,CAAC,CAAC;AAEzE,6EAA6E;AAC7E,0EAA0E;AAC1E,MAAM,OAAO,GAAG,CAAC,CAA0B,EAAsB,EAAE,CACjE,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;AAE3D,MAAM,eAAe,GAAG,CAAC,CAA0B,EAAsB,EAAE,CACzE,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC;AAE1C,MAAM,SAAS,GAAG,CAAC,CAA0B,EAAsB,EAAE,CACnE,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;AAEpC,mEAAmE;AACnE,4DAA4D;A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AAW,CAAC;KACzB;IAED,kDAAkD;IAClD,sBAAsB,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC;IAClD,qCAAqC,EAAE,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC;IAClE,sBAAsB,EAAE,OAAO,CAAC,MAAM,EAAE,WAAW,CAAC;IACpD,gCAAgC,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC;IAC5D,0BAA0B,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC;CACvD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kimicoding.d.ts","sourceRoot":"","sources":["../../../src/pricing/kimicoding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAYnD,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const source = { url: "https://platform.moonshot.ai" };
|
|
2
|
+
export const kimicoding = {
|
|
3
|
+
"kimi-k2.6": {
|
|
4
|
+
kind: "tokens",
|
|
5
|
+
rate: { input: 0.95, output: 4, cacheRead: 0.16 },
|
|
6
|
+
source,
|
|
7
|
+
},
|
|
8
|
+
"kimi-k2.5": {
|
|
9
|
+
kind: "tokens",
|
|
10
|
+
rate: { input: 0.6, output: 2.5 },
|
|
11
|
+
source,
|
|
12
|
+
},
|
|
13
|
+
"kimi-k2": { kind: "tokens", rate: { input: 0.55, output: 2.2 }, source },
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=kimicoding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kimicoding.js","sourceRoot":"","sources":["../../../src/pricing/kimicoding.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG,EAAE,GAAG,EAAE,8BAA8B,EAAE,CAAC;AAEvD,MAAM,CAAC,MAAM,UAAU,GAAiC;IACtD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE;QACjD,MAAM;KACP;IACD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;QACjC,MAAM;KACP;IACD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE;CAC1E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../../src/pricing/openai.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAqB/C,CAAC"}
|