vidspotai-shared 1.0.124 → 1.0.125
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/lib/globals/aiModels/enums.d.ts +38 -0
- package/lib/globals/aiModels/enums.d.ts.map +1 -1
- package/lib/globals/aiModels/enums.js +49 -1
- package/lib/globals/aiModels/index.d.ts.map +1 -1
- package/lib/globals/aiModels/index.js +2 -0
- package/lib/globals/aiModels/providers/alibaba.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/alibaba.js +460 -53
- package/lib/globals/aiModels/providers/bytedance.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/bytedance.js +221 -39
- package/lib/globals/aiModels/providers/google.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/google.js +178 -32
- package/lib/globals/aiModels/providers/kling.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/kling.js +86 -12
- package/lib/globals/aiModels/providers/minimax.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/minimax.js +77 -0
- package/lib/globals/aiModels/providers/openai.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/openai.js +12 -0
- package/lib/globals/aiModels/providers/pixverse.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/pixverse.js +101 -28
- package/lib/globals/aiModels/providers/runway.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/runway.js +450 -24
- package/lib/globals/aiModels/providers/xai.d.ts +4 -0
- package/lib/globals/aiModels/providers/xai.d.ts.map +1 -0
- package/lib/globals/aiModels/providers/xai.js +72 -0
- package/lib/globals/aiModels/tierHelpers.d.ts +10 -0
- package/lib/globals/aiModels/tierHelpers.d.ts.map +1 -1
- package/lib/globals/aiModels/tierHelpers.js +48 -7
- package/lib/globals/aiModels/types.d.ts +21 -0
- package/lib/globals/aiModels/types.d.ts.map +1 -1
- package/lib/models/image.model.d.ts +24 -0
- package/lib/models/image.model.d.ts.map +1 -1
- package/lib/models/image.model.js +12 -0
- package/lib/models/index.d.ts +1 -0
- package/lib/models/index.d.ts.map +1 -1
- package/lib/models/index.js +1 -0
- package/lib/models/klingElement.model.d.ts +52 -0
- package/lib/models/klingElement.model.d.ts.map +1 -0
- package/lib/models/klingElement.model.js +24 -0
- package/lib/models/video.model.d.ts +11 -0
- package/lib/models/video.model.d.ts.map +1 -1
- package/lib/schemas/videoPlan.schema.d.ts +88 -0
- package/lib/schemas/videoPlan.schema.d.ts.map +1 -1
- package/lib/schemas/videoPlan.schema.js +27 -1
- package/lib/services/agent/executor/visual.d.ts.map +1 -1
- package/lib/services/agent/executor/visual.js +40 -2
- package/lib/services/agent/mentionedRefs.d.ts.map +1 -1
- package/lib/services/agent/mentionedRefs.js +4 -1
- package/lib/services/agent/planner/structuralRules.d.ts.map +1 -1
- package/lib/services/agent/planner/structuralRules.js +8 -3
- package/lib/services/agent/poster/posterAgent.schema.d.ts +3 -3
- package/lib/services/agent/providerFallback/chains.d.ts +25 -0
- package/lib/services/agent/providerFallback/chains.d.ts.map +1 -1
- package/lib/services/agent/providerFallback/chains.js +59 -5
- package/lib/services/agent/repair/strategies/llmRepair.strategy.d.ts.map +1 -1
- package/lib/services/agent/repair/strategies/llmRepair.strategy.js +2 -0
- package/lib/services/agent/tools/animateImage.tool.d.ts +31 -0
- package/lib/services/agent/tools/animateImage.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/animateImage.tool.js +10 -3
- package/lib/services/agent/tools/generateImage.tool.d.ts +8 -4
- package/lib/services/agent/tools/generateImage.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/generateImage.tool.js +24 -7
- package/lib/services/agent/tools/generateVideo.tool.d.ts +32 -0
- package/lib/services/agent/tools/generateVideo.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/generateVideo.tool.js +37 -9
- package/lib/services/agent/tools/planVideo.tool.d.ts +19 -0
- package/lib/services/agent/tools/planVideo.tool.d.ts.map +1 -1
- package/lib/services/aiGen/aiGenFactory.service.d.ts.map +1 -1
- package/lib/services/aiGen/aiGenFactory.service.js +40 -0
- package/lib/services/aiGen/canonicalAdapters/cameraControl.types.d.ts +6 -3
- package/lib/services/aiGen/canonicalAdapters/cameraControl.types.d.ts.map +1 -1
- package/lib/services/aiGen/canonicalAdapters/cameraControl.types.js +35 -0
- package/lib/services/aiGen/canonicalAdapters/cameraDirection.d.ts +36 -0
- package/lib/services/aiGen/canonicalAdapters/cameraDirection.d.ts.map +1 -0
- package/lib/services/aiGen/canonicalAdapters/cameraDirection.js +168 -0
- package/lib/services/aiGen/canonicalAdapters/index.d.ts +1 -0
- package/lib/services/aiGen/canonicalAdapters/index.d.ts.map +1 -1
- package/lib/services/aiGen/canonicalAdapters/index.js +1 -0
- package/lib/services/aiGen/canonicalAdapters/multiShot.types.d.ts +3 -2
- package/lib/services/aiGen/canonicalAdapters/multiShot.types.d.ts.map +1 -1
- package/lib/services/aiGen/helpers.d.ts +40 -0
- package/lib/services/aiGen/helpers.d.ts.map +1 -1
- package/lib/services/aiGen/helpers.js +48 -2
- package/lib/services/aiGen/index.d.ts +1 -0
- package/lib/services/aiGen/index.d.ts.map +1 -1
- package/lib/services/aiGen/index.js +3 -0
- package/lib/services/aiGen/providers/alibaba/alibaba.d.ts +13 -1
- package/lib/services/aiGen/providers/alibaba/alibaba.d.ts.map +1 -1
- package/lib/services/aiGen/providers/alibaba/alibaba.js +313 -33
- package/lib/services/aiGen/providers/bytedance/bytedance.service.d.ts +29 -1
- package/lib/services/aiGen/providers/bytedance/bytedance.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/bytedance/bytedance.service.js +371 -54
- package/lib/services/aiGen/providers/google/google.service.d.ts +16 -0
- package/lib/services/aiGen/providers/google/google.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/google/google.service.js +331 -114
- package/lib/services/aiGen/providers/google/googleKeyPool.d.ts +6 -0
- package/lib/services/aiGen/providers/google/googleKeyPool.d.ts.map +1 -1
- package/lib/services/aiGen/providers/google/googleKeyPool.js +8 -0
- package/lib/services/aiGen/providers/kling/kling.service.d.ts +17 -1
- package/lib/services/aiGen/providers/kling/kling.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/kling/kling.service.js +59 -3
- package/lib/services/aiGen/providers/kling/klingCredits.d.ts +1 -1
- package/lib/services/aiGen/providers/kling/klingCredits.d.ts.map +1 -1
- package/lib/services/aiGen/providers/kling/klingCredits.js +19 -1
- package/lib/services/aiGen/providers/kling/klingRequests.d.ts +37 -7
- package/lib/services/aiGen/providers/kling/klingRequests.d.ts.map +1 -1
- package/lib/services/aiGen/providers/kling/klingRequests.js +191 -13
- package/lib/services/aiGen/providers/kling/types.d.ts +78 -0
- package/lib/services/aiGen/providers/kling/types.d.ts.map +1 -1
- package/lib/services/aiGen/providers/minimax/minimax.service.d.ts +11 -2
- package/lib/services/aiGen/providers/minimax/minimax.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/minimax/minimax.service.js +168 -2
- package/lib/services/aiGen/providers/minimax/types.d.ts +63 -0
- package/lib/services/aiGen/providers/minimax/types.d.ts.map +1 -1
- package/lib/services/aiGen/providers/pixverse/pixverse.service.d.ts +12 -0
- package/lib/services/aiGen/providers/pixverse/pixverse.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/pixverse/pixverse.service.js +131 -17
- package/lib/services/aiGen/providers/runway/hostedModels.d.ts +84 -0
- package/lib/services/aiGen/providers/runway/hostedModels.d.ts.map +1 -0
- package/lib/services/aiGen/providers/runway/hostedModels.js +266 -0
- package/lib/services/aiGen/providers/runway/index.d.ts +1 -0
- package/lib/services/aiGen/providers/runway/index.d.ts.map +1 -1
- package/lib/services/aiGen/providers/runway/index.js +1 -0
- package/lib/services/aiGen/providers/runway/runway.service.d.ts +1 -1
- package/lib/services/aiGen/providers/runway/runway.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/runway/runway.service.js +118 -21
- package/lib/services/aiGen/providers/runway/types.d.ts +18 -3
- package/lib/services/aiGen/providers/runway/types.d.ts.map +1 -1
- package/lib/services/aiGen/providers/runway/types.js +31 -3
- package/lib/services/aiGen/providers/types.d.ts +55 -0
- package/lib/services/aiGen/providers/types.d.ts.map +1 -1
- package/lib/services/aiGen/providers/xai/xai.service.d.ts +19 -0
- package/lib/services/aiGen/providers/xai/xai.service.d.ts.map +1 -0
- package/lib/services/aiGen/providers/xai/xai.service.js +205 -0
- package/lib/services/firestore.service.d.ts +4 -0
- package/lib/services/firestore.service.d.ts.map +1 -1
- package/lib/services/firestore.service.js +5 -0
- package/lib/services/index.d.ts +1 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +1 -0
- package/lib/services/klingElements/klingElementLibrary.service.d.ts +37 -0
- package/lib/services/klingElements/klingElementLibrary.service.d.ts.map +1 -0
- package/lib/services/klingElements/klingElementLibrary.service.js +179 -0
- package/lib/utils/helpers.d.ts.map +1 -1
- package/lib/utils/helpers.js +5 -1
- package/package.json +1 -1
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.runwayConfigs = void 0;
|
|
4
4
|
const types_1 = require("../../../services/aiGen/providers/runway/types");
|
|
5
|
+
/** Inclusive integer range, for per-second duration lists. */
|
|
6
|
+
const range = (min, max) => Array.from({ length: max - min + 1 }, (_, i) => min + i);
|
|
5
7
|
exports.runwayConfigs = {
|
|
6
8
|
"runway-gen4.5": {
|
|
7
9
|
modelId: "gen4.5",
|
|
@@ -25,9 +27,17 @@ exports.runwayConfigs = {
|
|
|
25
27
|
publicFigureThreshold: { allowedValues: ["auto", "low"] },
|
|
26
28
|
cameraControl: {},
|
|
27
29
|
},
|
|
30
|
+
// 12 credits/s at $0.01/credit (Runway pricing page). Pro / HDR
|
|
31
|
+
// outputFormat surcharges aren't exposed, so plain mp4 is always billed.
|
|
28
32
|
cost: {
|
|
29
33
|
perSecond: 0.12,
|
|
30
34
|
},
|
|
35
|
+
guidance: {
|
|
36
|
+
quality: 5,
|
|
37
|
+
speed: 3,
|
|
38
|
+
bestFor: "Runway's flagship: cinematic motion and physics, 2–10s clips, text or first-frame input",
|
|
39
|
+
notes: "No audio and no last frame. Text-to-video only renders 16:9 or 9:16; other ratios are coerced to the nearest of those.",
|
|
40
|
+
},
|
|
31
41
|
},
|
|
32
42
|
"runway-gen4-turbo": {
|
|
33
43
|
modelId: "gen4_turbo",
|
|
@@ -44,7 +54,9 @@ exports.runwayConfigs = {
|
|
|
44
54
|
duration: {
|
|
45
55
|
allowedValues: types_1.GEN4_TURBO_DURATIONS,
|
|
46
56
|
}, // in seconds
|
|
47
|
-
|
|
57
|
+
// REMOVED FOR v2 — kept for reference: the API only accepts
|
|
58
|
+
// promptImage position "first" for gen4_turbo, so first+last frames 400.
|
|
59
|
+
// lastFrameImageUrl: {}, // promptImage position:"last" for first-last interpolation
|
|
48
60
|
seed: {},
|
|
49
61
|
publicFigureThreshold: { allowedValues: ["auto", "low"] },
|
|
50
62
|
cameraControl: {},
|
|
@@ -53,30 +65,72 @@ exports.runwayConfigs = {
|
|
|
53
65
|
cost: {
|
|
54
66
|
perSecond: 0.05,
|
|
55
67
|
},
|
|
68
|
+
guidance: {
|
|
69
|
+
quality: 3,
|
|
70
|
+
speed: 4,
|
|
71
|
+
bestFor: "Cheap, fast image-to-video from a start frame, 2–10s",
|
|
72
|
+
notes: "Needs a start image; no text-only mode, no last frame, no audio.",
|
|
73
|
+
},
|
|
56
74
|
},
|
|
75
|
+
// REMOVED FOR v2 — kept for reference: Runway retired gen4_aleph (it no
|
|
76
|
+
// longer appears among the video_to_video models) in favor of aleph2, which
|
|
77
|
+
// takes timed keyframes instead of references[] and costs 28 credits/s.
|
|
78
|
+
// "runway-gen4-aleph": {
|
|
79
|
+
// modelId: "gen4_aleph",
|
|
80
|
+
// type: ["video-to-video"],
|
|
81
|
+
// tier: "T3",
|
|
82
|
+
// fields: {
|
|
83
|
+
// prompt: { required: true },
|
|
84
|
+
// inputVideoUrl: { required: true },
|
|
85
|
+
// aspectRatio: {
|
|
86
|
+
// // Canonical ratios (validated against the incoming param). The service
|
|
87
|
+
// // maps these → Runway pixel ratios (GEN4_ALEPH_RATIOS) at request time.
|
|
88
|
+
// allowedValues: RUNWAY_VIDEO_CANONICAL_RATIOS,
|
|
89
|
+
// },
|
|
90
|
+
// duration: { allowedValues: GEN4_ALEPH_DURATIONS }, // in seconds
|
|
91
|
+
// // Aleph references[] — image refs for character/style consistency. Runway
|
|
92
|
+
// // caps Gen4 references at 3 per call.
|
|
93
|
+
// referenceImageUrls: { max: 3 },
|
|
94
|
+
// seed: {},
|
|
95
|
+
// publicFigureThreshold: { allowedValues: ["auto", "low"] },
|
|
96
|
+
// cameraControl: {},
|
|
97
|
+
// },
|
|
98
|
+
// // parallelRequests: 1,
|
|
99
|
+
// cost: {
|
|
100
|
+
// perSecond: 0.15,
|
|
101
|
+
// },
|
|
102
|
+
// },
|
|
103
|
+
// Key kept so saved jobs / presets still resolve; it now serves Aleph 2.0.
|
|
57
104
|
"runway-gen4-aleph": {
|
|
58
|
-
modelId: "
|
|
105
|
+
modelId: "aleph2",
|
|
59
106
|
type: ["video-to-video"],
|
|
60
107
|
tier: "T3",
|
|
61
108
|
fields: {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
duration: { allowedValues: types_1.GEN4_ALEPH_DURATIONS }, //
|
|
70
|
-
//
|
|
71
|
-
//
|
|
72
|
-
referenceImageUrls: { max:
|
|
109
|
+
// Optional on aleph2 — keyframes alone can drive the edit.
|
|
110
|
+
prompt: {},
|
|
111
|
+
inputVideoUrl: { required: true }, // at most 30s; output length matches it
|
|
112
|
+
// Not declared: aleph2's only ratio control is targetAspectRatio, which
|
|
113
|
+
// letterboxes and OUTPAINTS the input; output otherwise follows the
|
|
114
|
+
// source framing. Wire it only behind an explicit "expand to" control.
|
|
115
|
+
// aspectRatio: { allowedValues: ALEPH2_TARGET_ASPECT_RATIOS },
|
|
116
|
+
duration: { allowedValues: types_1.GEN4_ALEPH_DURATIONS }, // billing only; follows the input
|
|
117
|
+
// Sent as keyframes[] (max 5), spread evenly across the clip. Guidance
|
|
118
|
+
// images — typically an edited first frame the model propagates.
|
|
119
|
+
referenceImageUrls: { max: 5 },
|
|
73
120
|
seed: {},
|
|
74
121
|
publicFigureThreshold: { allowedValues: ["auto", "low"] },
|
|
75
122
|
cameraControl: {},
|
|
76
123
|
},
|
|
77
|
-
//
|
|
124
|
+
// 28 credits/s, 56-credit minimum per generation ($0.01/credit).
|
|
78
125
|
cost: {
|
|
79
|
-
perSecond: 0.
|
|
126
|
+
perSecond: 0.28,
|
|
127
|
+
minimum: 0.56,
|
|
128
|
+
},
|
|
129
|
+
guidance: {
|
|
130
|
+
quality: 5,
|
|
131
|
+
speed: 2,
|
|
132
|
+
bestFor: "Editing an existing clip: restyle, relight, swap objects, change weather or angle",
|
|
133
|
+
notes: "Video in, video out (up to 30s, no audio generated). Billed per second of the input clip with a 2-second minimum.",
|
|
80
134
|
},
|
|
81
135
|
},
|
|
82
136
|
// --- Image models ---
|
|
@@ -86,34 +140,406 @@ exports.runwayConfigs = {
|
|
|
86
140
|
tier: "T2",
|
|
87
141
|
fields: {
|
|
88
142
|
prompt: { required: true },
|
|
143
|
+
// REMOVED FOR v2 — kept for reference: 768:1360 is not a Gen-4 Image
|
|
144
|
+
// ratio, so 3:4 requests 400'd.
|
|
145
|
+
// aspectRatio: {
|
|
146
|
+
// allowedValues: ["1920:1080", "1080:1920", "1024:1024", "1360:768", "768:1360"],
|
|
147
|
+
// },
|
|
89
148
|
aspectRatio: {
|
|
90
|
-
|
|
149
|
+
// Canonical ratios (what the dashboard / agent send) are mapped to
|
|
150
|
+
// pixel ratios by the service; raw pixel ratios pass straight through.
|
|
151
|
+
allowedValues: [
|
|
152
|
+
...types_1.GEN4_IMAGE_CANONICAL_RATIOS,
|
|
153
|
+
...types_1.GEN4_IMAGE_RATIOS_1080P,
|
|
154
|
+
...types_1.GEN4_IMAGE_RATIOS_720P,
|
|
155
|
+
],
|
|
91
156
|
},
|
|
92
157
|
inputImageUrls: { max: 3 }, // referenceImages[] — up to 3 tagged refs
|
|
93
158
|
seed: {},
|
|
159
|
+
publicFigureThreshold: { allowedValues: ["auto", "low"] },
|
|
94
160
|
},
|
|
95
|
-
// Runway:
|
|
161
|
+
// Runway: 5 credits per 720p image, 8 per 1080p image. Canonical ratios
|
|
162
|
+
// map to the 1080p tier (see mapAspectToRunwayRatio).
|
|
163
|
+
// REMOVED FOR v2 — kept for reference:
|
|
164
|
+
// cost: {
|
|
165
|
+
// perAspect: {
|
|
166
|
+
// "1920:1080": 0.08, "1080:1920": 0.08,
|
|
167
|
+
// "1360:768": 0.05, "768:1360": 0.05,
|
|
168
|
+
// "1024:1024": 0.05,
|
|
169
|
+
// },
|
|
170
|
+
// fixed: 0.05, // fallback when aspect not supplied
|
|
171
|
+
// },
|
|
96
172
|
cost: {
|
|
97
173
|
perAspect: {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
174
|
+
...Object.fromEntries(types_1.GEN4_IMAGE_RATIOS_1080P.map((r) => [r, 0.08])),
|
|
175
|
+
...Object.fromEntries(types_1.GEN4_IMAGE_RATIOS_720P.map((r) => [r, 0.05])),
|
|
176
|
+
...Object.fromEntries(types_1.GEN4_IMAGE_CANONICAL_RATIOS.map((r) => [r, 0.08])),
|
|
101
177
|
},
|
|
102
|
-
fixed: 0.
|
|
178
|
+
fixed: 0.08, // no aspect → 1:1 → 1080:1080
|
|
179
|
+
},
|
|
180
|
+
guidance: {
|
|
181
|
+
quality: 4,
|
|
182
|
+
speed: 3,
|
|
183
|
+
bestFor: "Cinematic stills and character/object consistency from up to 3 tagged references",
|
|
184
|
+
notes: "Tag references in the prompt as @ref1..@ref3.",
|
|
103
185
|
},
|
|
104
186
|
},
|
|
105
187
|
"runwayml-gen4-image-turbo": {
|
|
106
188
|
modelId: "gen4_image_turbo",
|
|
107
|
-
|
|
189
|
+
// REMOVED FOR v2 — kept for reference: no text-only mode (refs required).
|
|
190
|
+
// type: ["text-to-image", "image-to-image"],
|
|
191
|
+
type: ["image-to-image"],
|
|
108
192
|
tier: "T1",
|
|
109
193
|
fields: {
|
|
110
194
|
prompt: { required: true },
|
|
111
195
|
aspectRatio: {
|
|
112
|
-
|
|
196
|
+
// Canonical ratios (what the dashboard / agent send) are mapped to
|
|
197
|
+
// pixel ratios by the service; raw pixel ratios pass straight through.
|
|
198
|
+
allowedValues: [
|
|
199
|
+
...types_1.GEN4_IMAGE_CANONICAL_RATIOS,
|
|
200
|
+
...types_1.GEN4_IMAGE_RATIOS_1080P,
|
|
201
|
+
...types_1.GEN4_IMAGE_RATIOS_720P,
|
|
202
|
+
],
|
|
113
203
|
},
|
|
114
|
-
|
|
204
|
+
// Runway requires 1–3 referenceImages for gen4_image_turbo (min 1).
|
|
205
|
+
inputImageUrls: { max: 3, required: true },
|
|
115
206
|
seed: {},
|
|
207
|
+
publicFigureThreshold: { allowedValues: ["auto", "low"] },
|
|
116
208
|
},
|
|
117
209
|
cost: { fixed: 0.02 },
|
|
210
|
+
guidance: {
|
|
211
|
+
quality: 3,
|
|
212
|
+
speed: 5,
|
|
213
|
+
bestFor: "Very cheap reference-driven edits and variations ($0.02, any resolution)",
|
|
214
|
+
notes: "Needs at least one reference image; it cannot generate from text alone.",
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
// ─── Third-party models hosted by Runway ─────────────────────────────────
|
|
218
|
+
// Same underlying models we also reach directly (BytePlus, Google, Alibaba,
|
|
219
|
+
// MiniMax, xAI), billed through our Runway account instead. Useful as a
|
|
220
|
+
// second route when a direct provider is down, rate-limited or geo-blocked,
|
|
221
|
+
// and for the few models we have no direct access to (Grok Imagine Video
|
|
222
|
+
// 1.5). Request vocabulary per model: services/aiGen/providers/runway/
|
|
223
|
+
// hostedModels.ts. Prices: docs.dev.runwayml.com/guides/pricing, fetched
|
|
224
|
+
// 2026-09-29, Runway credits at $0.01. `perSecondByResolution` is USD per
|
|
225
|
+
// output second; RunwayService.getCreditUsed adds the listed extras.
|
|
226
|
+
// Not wired: wan3_prime and gemini_omni_flash_1.1 (no published price yet).
|
|
227
|
+
"runway-wan3": {
|
|
228
|
+
modelId: "wan3",
|
|
229
|
+
type: ["text-to-video", "image-to-video"],
|
|
230
|
+
tier: "T2",
|
|
231
|
+
fields: {
|
|
232
|
+
prompt: { required: true },
|
|
233
|
+
aspectRatio: { allowedValues: ["16:9", "9:16", "1:1", "4:3", "3:4"] },
|
|
234
|
+
resolution: { allowedValues: ["480p", "720p", "1080p"], default: "720p" },
|
|
235
|
+
duration: { allowedValues: range(2, 30) },
|
|
236
|
+
inputImageUrl: {},
|
|
237
|
+
lastFrameImageUrl: {},
|
|
238
|
+
referenceImageUrls: { max: 10 },
|
|
239
|
+
referenceVideoUrls: { max: 5 },
|
|
240
|
+
referenceAudioUrls: { max: 5 },
|
|
241
|
+
audio: {},
|
|
242
|
+
},
|
|
243
|
+
// 5 / 10 / 20 credits per second; references not billed separately.
|
|
244
|
+
cost: { perSecondByResolution: { "480p": 0.05, "720p": 0.1, "1080p": 0.2 } },
|
|
245
|
+
guidance: {
|
|
246
|
+
quality: 4,
|
|
247
|
+
speed: 3,
|
|
248
|
+
bestFor: "Wan 3.0 through Runway: long (up to 30s) clips with image, video and audio references, first/last frames",
|
|
249
|
+
notes: "Same model as alibaba-wan-3.0 but with no input-video charge; no document or web-page references on this route.",
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
"runway-seedance2.5": {
|
|
253
|
+
modelId: "seedance2_5",
|
|
254
|
+
type: ["text-to-video", "image-to-video", "video-to-video"],
|
|
255
|
+
tier: "T3",
|
|
256
|
+
fields: {
|
|
257
|
+
prompt: { required: true },
|
|
258
|
+
aspectRatio: { allowedValues: ["21:9", "16:9", "4:3", "1:1", "3:4", "9:16"] },
|
|
259
|
+
resolution: { allowedValues: ["480p", "720p", "1080p"], default: "720p" },
|
|
260
|
+
duration: { allowedValues: range(4, 30) },
|
|
261
|
+
inputImageUrl: {},
|
|
262
|
+
lastFrameImageUrl: {},
|
|
263
|
+
inputVideoUrl: {}, // promptVideo; endpoint "edit" → mode edit, else reference
|
|
264
|
+
referenceImageUrls: { max: 30 },
|
|
265
|
+
referenceVideoUrls: { max: 10 },
|
|
266
|
+
referenceAudioUrls: { max: 10 },
|
|
267
|
+
audio: {},
|
|
268
|
+
seed: {},
|
|
269
|
+
},
|
|
270
|
+
// 20 / 30 / 68 credits per output second, plus 10 / 15 / 34 per second of
|
|
271
|
+
// input + reference video (combined, capped at 30s); 80-credit minimum.
|
|
272
|
+
cost: {
|
|
273
|
+
perSecondByResolution: { "480p": 0.2, "720p": 0.3, "1080p": 0.68 },
|
|
274
|
+
inputVideoPerSecondByResolution: { "480p": 0.1, "720p": 0.15, "1080p": 0.34 },
|
|
275
|
+
inputVideoBillableMaxSec: 30,
|
|
276
|
+
minimum: 0.8,
|
|
277
|
+
},
|
|
278
|
+
guidance: {
|
|
279
|
+
quality: 5,
|
|
280
|
+
speed: 2,
|
|
281
|
+
bestFor: "Seedance 2.5 through Runway: fallback route for bytedance-seedance-2.5, incl. video reference/edit",
|
|
282
|
+
notes: "Priced above the direct BytePlus route; prefer bytedance-seedance-2.5 unless it is unavailable. 80-credit minimum per clip.",
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
"runway-seedance2": {
|
|
286
|
+
modelId: "seedance2",
|
|
287
|
+
type: ["text-to-video", "image-to-video", "video-to-video"],
|
|
288
|
+
tier: "T3",
|
|
289
|
+
fields: {
|
|
290
|
+
prompt: { required: true },
|
|
291
|
+
aspectRatio: { allowedValues: ["21:9", "16:9", "4:3", "1:1", "3:4", "9:16"] },
|
|
292
|
+
resolution: { allowedValues: ["480p", "720p", "1080p", "4k"], default: "720p" },
|
|
293
|
+
duration: { allowedValues: range(4, 15) },
|
|
294
|
+
inputImageUrl: {},
|
|
295
|
+
lastFrameImageUrl: {},
|
|
296
|
+
inputVideoUrl: {},
|
|
297
|
+
referenceImageUrls: { max: 9 },
|
|
298
|
+
referenceVideoUrls: { max: 3 },
|
|
299
|
+
referenceAudioUrls: { max: 3 },
|
|
300
|
+
audio: {},
|
|
301
|
+
seed: {},
|
|
302
|
+
},
|
|
303
|
+
// 36 credits/s at 480p/720p, 40 at 1080p, 150 at 4K.
|
|
304
|
+
cost: { perSecondByResolution: { "480p": 0.36, "720p": 0.36, "1080p": 0.4, "4k": 1.5 } },
|
|
305
|
+
guidance: {
|
|
306
|
+
quality: 5,
|
|
307
|
+
speed: 2,
|
|
308
|
+
bestFor: "Seedance 2.0 through Runway, the only route to Seedance 2.0 at 4K",
|
|
309
|
+
notes: "Fallback for bytedance-seedance-2.0 otherwise. Reference images can't be mixed with first/last frames.",
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
"runway-seedance2-fast": {
|
|
313
|
+
modelId: "seedance2_fast",
|
|
314
|
+
type: ["text-to-video", "image-to-video", "video-to-video"],
|
|
315
|
+
tier: "T2",
|
|
316
|
+
fields: {
|
|
317
|
+
prompt: { required: true },
|
|
318
|
+
aspectRatio: { allowedValues: ["21:9", "16:9", "4:3", "1:1", "3:4", "9:16"] },
|
|
319
|
+
resolution: { allowedValues: ["480p", "720p"], default: "720p" },
|
|
320
|
+
duration: { allowedValues: range(4, 15) },
|
|
321
|
+
inputImageUrl: {},
|
|
322
|
+
lastFrameImageUrl: {},
|
|
323
|
+
inputVideoUrl: {},
|
|
324
|
+
referenceImageUrls: { max: 9 },
|
|
325
|
+
referenceVideoUrls: { max: 3 },
|
|
326
|
+
referenceAudioUrls: { max: 3 },
|
|
327
|
+
audio: {},
|
|
328
|
+
seed: {},
|
|
329
|
+
},
|
|
330
|
+
cost: { perSecondByResolution: { "480p": 0.29, "720p": 0.29 } }, // 29 credits/s
|
|
331
|
+
guidance: {
|
|
332
|
+
quality: 4,
|
|
333
|
+
speed: 3,
|
|
334
|
+
bestFor: "Seedance 2.0 Fast through Runway: fallback for bytedance-seedance-2.0-fast",
|
|
335
|
+
notes: "480p/720p only.",
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
"runway-seedance2-mini": {
|
|
339
|
+
modelId: "seedance2_mini",
|
|
340
|
+
type: ["text-to-video", "image-to-video", "video-to-video"],
|
|
341
|
+
tier: "T2",
|
|
342
|
+
fields: {
|
|
343
|
+
prompt: { required: true },
|
|
344
|
+
aspectRatio: { allowedValues: ["21:9", "16:9", "4:3", "1:1", "3:4", "9:16"] },
|
|
345
|
+
resolution: { allowedValues: ["480p", "720p"], default: "720p" },
|
|
346
|
+
duration: { allowedValues: range(4, 15) },
|
|
347
|
+
inputImageUrl: {},
|
|
348
|
+
lastFrameImageUrl: {},
|
|
349
|
+
inputVideoUrl: {},
|
|
350
|
+
referenceImageUrls: { max: 9 },
|
|
351
|
+
referenceVideoUrls: { max: 3 },
|
|
352
|
+
referenceAudioUrls: { max: 3 },
|
|
353
|
+
audio: {},
|
|
354
|
+
seed: {},
|
|
355
|
+
},
|
|
356
|
+
// 16 credits/s, 64-credit minimum per generation.
|
|
357
|
+
cost: { perSecondByResolution: { "480p": 0.16, "720p": 0.16 }, minimum: 0.64 },
|
|
358
|
+
guidance: {
|
|
359
|
+
quality: 3,
|
|
360
|
+
speed: 4,
|
|
361
|
+
bestFor: "Seedance 2.0 Mini through Runway: cheap Seedance route that needs no BytePlus activation",
|
|
362
|
+
notes: "480p/720p only; 64-credit minimum means clips under 4s cost the same as 4s.",
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
"runway-grok-imagine-1.5": {
|
|
366
|
+
modelId: "grok_imagine_1_5",
|
|
367
|
+
type: ["text-to-video", "image-to-video"],
|
|
368
|
+
tier: "T2",
|
|
369
|
+
fields: {
|
|
370
|
+
prompt: { required: true },
|
|
371
|
+
aspectRatio: { allowedValues: ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"] },
|
|
372
|
+
resolution: { allowedValues: ["480p", "720p", "1080p"], default: "720p" },
|
|
373
|
+
duration: { allowedValues: range(1, 15) },
|
|
374
|
+
inputImageUrl: {},
|
|
375
|
+
referenceImageUrls: { max: 7 }, // text-to-video only; cite as [Image 1]…
|
|
376
|
+
referenceAudioUrls: { max: 3 }, // needs ≥1 image reference
|
|
377
|
+
},
|
|
378
|
+
// 10 / 16 / 29 credits/s, plus 1 credit per image or audio reference
|
|
379
|
+
// (including a start frame). Verified 2026-09-29, docs.dev.runwayml.com/guides/pricing.
|
|
380
|
+
cost: {
|
|
381
|
+
perSecondByResolution: { "480p": 0.1, "720p": 0.16, "1080p": 0.29 },
|
|
382
|
+
perInputImage: 0.01,
|
|
383
|
+
perInputAudio: 0.01,
|
|
384
|
+
},
|
|
385
|
+
guidance: {
|
|
386
|
+
quality: 4,
|
|
387
|
+
speed: 4,
|
|
388
|
+
bestFor: "xAI Grok Imagine Video 1.5 (Runway-only route): 1–15s clips, up to 7 image references",
|
|
389
|
+
notes: "Image references cap output at 720p. Start-frame clips follow the image's aspect ratio.",
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
"runway-h3-max": {
|
|
393
|
+
modelId: "h3_max",
|
|
394
|
+
type: ["text-to-video", "image-to-video"],
|
|
395
|
+
tier: "T1",
|
|
396
|
+
fields: {
|
|
397
|
+
prompt: { required: true },
|
|
398
|
+
resolution: { allowedValues: ["480p", "768p"], default: "768p" },
|
|
399
|
+
duration: { allowedValues: range(5, 15) },
|
|
400
|
+
inputImageUrl: {},
|
|
401
|
+
lastFrameImageUrl: {},
|
|
402
|
+
promptOptimizer: {}, // → promptExpansionMode balanced / disabled
|
|
403
|
+
seed: {},
|
|
404
|
+
},
|
|
405
|
+
cost: { perSecondByResolution: { "480p": 0.05, "768p": 0.08 } }, // 5 / 8 credits/s
|
|
406
|
+
guidance: {
|
|
407
|
+
quality: 3,
|
|
408
|
+
speed: 3,
|
|
409
|
+
bestFor: "MiniMax H3 Max through Runway: cheapest 768p clips, no per-image or reference charges",
|
|
410
|
+
notes: "No aspect-ratio control and no references on this route (minimax-h3-max has them).",
|
|
411
|
+
},
|
|
412
|
+
},
|
|
413
|
+
"runway-hailuo3": {
|
|
414
|
+
modelId: "hailuo3",
|
|
415
|
+
type: ["text-to-video", "image-to-video", "video-to-video"],
|
|
416
|
+
tier: "T2",
|
|
417
|
+
fields: {
|
|
418
|
+
prompt: { required: true },
|
|
419
|
+
aspectRatio: { allowedValues: ["21:9", "16:9", "4:3", "1:1", "3:4", "9:16"] },
|
|
420
|
+
resolution: { allowedValues: ["768p", "2k"], default: "768p" },
|
|
421
|
+
duration: { allowedValues: range(5, 15) },
|
|
422
|
+
inputImageUrl: {},
|
|
423
|
+
lastFrameImageUrl: {},
|
|
424
|
+
inputVideoUrl: {},
|
|
425
|
+
referenceImageUrls: { max: 9 },
|
|
426
|
+
referenceVideoUrls: { max: 3 },
|
|
427
|
+
referenceAudioUrls: { max: 3 },
|
|
428
|
+
},
|
|
429
|
+
// 10 / 15 credits/s, plus 2 credits per reference image, plus reference
|
|
430
|
+
// video at the output rate (capped at 15s). Frames are counted as images
|
|
431
|
+
// too — at most 2 credits over.
|
|
432
|
+
cost: {
|
|
433
|
+
perSecondByResolution: { "768p": 0.1, "2k": 0.15 },
|
|
434
|
+
inputVideoPerSecondByResolution: { "768p": 0.1, "2k": 0.15 },
|
|
435
|
+
inputVideoBillableMaxSec: 15,
|
|
436
|
+
perInputImage: 0.02,
|
|
437
|
+
},
|
|
438
|
+
guidance: {
|
|
439
|
+
quality: 4,
|
|
440
|
+
speed: 3,
|
|
441
|
+
bestFor: "MiniMax Hailuo 3.0 (H3) through Runway: fallback for minimax-h3, incl. 2K and video references",
|
|
442
|
+
notes: "Reference images can't be mixed with first/last frames.",
|
|
443
|
+
},
|
|
444
|
+
},
|
|
445
|
+
"runway-veo3.1": {
|
|
446
|
+
modelId: "veo3.1",
|
|
447
|
+
type: ["text-to-video", "image-to-video"],
|
|
448
|
+
tier: "T3",
|
|
449
|
+
fields: {
|
|
450
|
+
prompt: { required: true },
|
|
451
|
+
aspectRatio: { allowedValues: ["16:9", "9:16"] },
|
|
452
|
+
resolution: { allowedValues: ["720p", "1080p"], default: "720p" },
|
|
453
|
+
duration: { allowedValues: [4, 6, 8] },
|
|
454
|
+
inputImageUrl: {},
|
|
455
|
+
lastFrameImageUrl: {},
|
|
456
|
+
audio: {},
|
|
457
|
+
negativePrompt: {},
|
|
458
|
+
seed: {},
|
|
459
|
+
},
|
|
460
|
+
// 40 credits/s with audio, 20 without, at either resolution.
|
|
461
|
+
cost: {
|
|
462
|
+
perSecondByResolution: { "720p": 0.4, "1080p": 0.4 },
|
|
463
|
+
silentPerSecondByResolution: { "720p": 0.2, "1080p": 0.2 },
|
|
464
|
+
},
|
|
465
|
+
guidance: {
|
|
466
|
+
quality: 5,
|
|
467
|
+
speed: 2,
|
|
468
|
+
bestFor: "Veo 3.1 through Runway: fallback when Google's Veo quota (2–10 RPM) is exhausted",
|
|
469
|
+
notes: "Same price as google-veo-3.1; audio on by default and billed at double the silent rate.",
|
|
470
|
+
},
|
|
471
|
+
},
|
|
472
|
+
"runway-veo3.1-fast": {
|
|
473
|
+
modelId: "veo3.1_fast",
|
|
474
|
+
type: ["text-to-video", "image-to-video"],
|
|
475
|
+
tier: "T2",
|
|
476
|
+
fields: {
|
|
477
|
+
prompt: { required: true },
|
|
478
|
+
aspectRatio: { allowedValues: ["16:9", "9:16"] },
|
|
479
|
+
resolution: { allowedValues: ["720p", "1080p"], default: "720p" },
|
|
480
|
+
duration: { allowedValues: [4, 6, 8] },
|
|
481
|
+
inputImageUrl: {},
|
|
482
|
+
lastFrameImageUrl: {},
|
|
483
|
+
audio: {},
|
|
484
|
+
negativePrompt: {},
|
|
485
|
+
seed: {},
|
|
486
|
+
},
|
|
487
|
+
cost: {
|
|
488
|
+
perSecondByResolution: { "720p": 0.15, "1080p": 0.15 },
|
|
489
|
+
silentPerSecondByResolution: { "720p": 0.1, "1080p": 0.1 },
|
|
490
|
+
},
|
|
491
|
+
guidance: {
|
|
492
|
+
quality: 4,
|
|
493
|
+
speed: 4,
|
|
494
|
+
bestFor: "Veo 3.1 Fast through Runway: fallback when Google's Veo quota is exhausted",
|
|
495
|
+
notes: "15 credits/s with audio, 10 without.",
|
|
496
|
+
},
|
|
497
|
+
},
|
|
498
|
+
"runway-happyhorse-1.0": {
|
|
499
|
+
modelId: "happyhorse_1_0",
|
|
500
|
+
type: ["text-to-video", "image-to-video"],
|
|
501
|
+
tier: "T2",
|
|
502
|
+
fields: {
|
|
503
|
+
prompt: { required: true },
|
|
504
|
+
aspectRatio: { allowedValues: ["16:9", "9:16", "1:1", "4:3", "3:4"] },
|
|
505
|
+
resolution: { allowedValues: ["720p", "1080p"], default: "720p" },
|
|
506
|
+
duration: { allowedValues: range(3, 15) },
|
|
507
|
+
inputImageUrl: {},
|
|
508
|
+
},
|
|
509
|
+
cost: { perSecondByResolution: { "720p": 0.15, "1080p": 0.3 } }, // 15 / 30 credits/s
|
|
510
|
+
guidance: {
|
|
511
|
+
quality: 4,
|
|
512
|
+
speed: 3,
|
|
513
|
+
bestFor: "HappyHorse 1.0 through Runway: fallback for alibaba-happyhorse-1.0-t2v / -i2v",
|
|
514
|
+
notes: "Slightly pricier than the direct Alibaba route; no references or video edit here.",
|
|
515
|
+
},
|
|
516
|
+
},
|
|
517
|
+
"runway-gemini-omni-flash": {
|
|
518
|
+
modelId: "gemini_omni_flash",
|
|
519
|
+
type: ["text-to-video", "image-to-video", "video-to-video"],
|
|
520
|
+
tier: "T2",
|
|
521
|
+
fields: {
|
|
522
|
+
prompt: { required: true },
|
|
523
|
+
aspectRatio: { allowedValues: ["16:9", "9:16"] },
|
|
524
|
+
resolution: { allowedValues: ["720p"], default: "720p" },
|
|
525
|
+
duration: { allowedValues: range(3, 10) },
|
|
526
|
+
inputImageUrl: {},
|
|
527
|
+
inputVideoUrl: {}, // edit: ≤10s, output length/orientation follow it
|
|
528
|
+
referenceImageUrls: { max: 5 }, // edit only
|
|
529
|
+
},
|
|
530
|
+
// 10 credits/s (+1 for a start frame); edits are 11 credits per INPUT
|
|
531
|
+
// second (capped at 10s) + 1 per reference image.
|
|
532
|
+
cost: {
|
|
533
|
+
perSecondByResolution: { "720p": 0.1 },
|
|
534
|
+
videoToVideoPerInputSecond: 0.11,
|
|
535
|
+
inputVideoBillableMaxSec: 10,
|
|
536
|
+
perInputImage: 0.01,
|
|
537
|
+
},
|
|
538
|
+
guidance: {
|
|
539
|
+
quality: 4,
|
|
540
|
+
speed: 4,
|
|
541
|
+
bestFor: "Gemini Omni Flash through Runway: 720p generation and instruction-based edits of short (≤10s) clips",
|
|
542
|
+
notes: "Fallback for google-gemini-omni-flash. Edits keep the input's length and orientation.",
|
|
543
|
+
},
|
|
118
544
|
},
|
|
119
545
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xai.d.ts","sourceRoot":"","sources":["../../../../src/globals/aiModels/providers/xai.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAkBxC,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,CAsDjE,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.xaiConfigs = void 0;
|
|
4
|
+
// xAI Grok Imagine image models. Specs, prices and limits verified against
|
|
5
|
+
// docs.x.ai on 2026-09-29: /developers/models/grok-imagine-image{,-2.0},
|
|
6
|
+
// /developers/pricing (Imagine), /developers/rest-api-reference/inference/images,
|
|
7
|
+
// /developers/model-capabilities/images/{generation,editing,multi-image-editing}.
|
|
8
|
+
//
|
|
9
|
+
// Both models: POST /v1/images/generations (T2I) and /v1/images/edits (JSON,
|
|
10
|
+
// `image` or `images[]` up to 5), n 1–10, resolution 1k/2k, 6 requests/sec.
|
|
11
|
+
// Pricing is flat per output image; edits are also billed per input image at
|
|
12
|
+
// a rate xAI doesn't publish, so getCreditUsed counts each input like an
|
|
13
|
+
// output (conservative) and the service logs xAI's `cost_in_usd_ticks` so the
|
|
14
|
+
// estimate can be checked against the real charge.
|
|
15
|
+
const XAI_IMAGE_ASPECTS_V1 = [
|
|
16
|
+
"1:1", "3:4", "4:3", "9:16", "16:9", "2:3", "3:2",
|
|
17
|
+
"9:19.5", "19.5:9", "9:20", "20:9", "1:2", "2:1",
|
|
18
|
+
];
|
|
19
|
+
exports.xaiConfigs = {
|
|
20
|
+
"xai-grok-imagine-image-2.0": {
|
|
21
|
+
modelId: "grok-imagine-image-2.0",
|
|
22
|
+
type: ["text-to-image", "image-to-image"],
|
|
23
|
+
tier: "T1",
|
|
24
|
+
acceptedImageFormats: ["image/jpeg", "image/jpg", "image/png", "image/webp"],
|
|
25
|
+
fields: {
|
|
26
|
+
prompt: { required: true },
|
|
27
|
+
// 2.0 adds 21:9 and 5:2 over 1.0.
|
|
28
|
+
aspectRatio: { allowedValues: [...XAI_IMAGE_ASPECTS_V1, "21:9", "5:2"] },
|
|
29
|
+
imageSize: { allowedValues: ["1k", "2k"], default: "1k" },
|
|
30
|
+
inputImageUrl: {},
|
|
31
|
+
inputImageUrls: { max: 5 },
|
|
32
|
+
numImages: { default: 1 },
|
|
33
|
+
// Only 2.0 takes `quality`. We pin "low" when unset: xAI's "auto" serves
|
|
34
|
+
// medium for edits and bills at the quality served.
|
|
35
|
+
quality: { allowedValues: ["low", "medium"], default: "low" },
|
|
36
|
+
},
|
|
37
|
+
requestPerMin: 360, // 6 RPS
|
|
38
|
+
cost: {
|
|
39
|
+
fixed: 0.04, // $0.04 / image at "low" (docs.x.ai pricing)
|
|
40
|
+
// "medium" isn't priced publicly ("billed at the quality served"); bill
|
|
41
|
+
// 2× until the logged cost_in_usd_ticks shows the real rate.
|
|
42
|
+
qualityMultiplier: { low: 1, medium: 2 },
|
|
43
|
+
},
|
|
44
|
+
guidance: {
|
|
45
|
+
quality: 5,
|
|
46
|
+
speed: 4,
|
|
47
|
+
bestFor: "Photoreal and stylized stills, text rendering, multi-image composites (up to 5 refs); #2 on Arena image edit at low quality.",
|
|
48
|
+
notes: "Replaces grok-imagine-image-quality (retired 2026-11-02).",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
"xai-grok-imagine-image": {
|
|
52
|
+
modelId: "grok-imagine-image",
|
|
53
|
+
type: ["text-to-image", "image-to-image"],
|
|
54
|
+
tier: "T1",
|
|
55
|
+
acceptedImageFormats: ["image/jpeg", "image/jpg", "image/png", "image/webp"],
|
|
56
|
+
fields: {
|
|
57
|
+
prompt: { required: true },
|
|
58
|
+
aspectRatio: { allowedValues: XAI_IMAGE_ASPECTS_V1 },
|
|
59
|
+
imageSize: { allowedValues: ["1k", "2k"], default: "1k" },
|
|
60
|
+
inputImageUrl: {},
|
|
61
|
+
inputImageUrls: { max: 5 },
|
|
62
|
+
numImages: { default: 1 },
|
|
63
|
+
},
|
|
64
|
+
requestPerMin: 360,
|
|
65
|
+
cost: { fixed: 0.02 },
|
|
66
|
+
guidance: {
|
|
67
|
+
quality: 3,
|
|
68
|
+
speed: 5,
|
|
69
|
+
bestFor: "Cheap, fast drafts and bulk variations.",
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
};
|
|
@@ -8,12 +8,22 @@ export interface ModelMatch {
|
|
|
8
8
|
modelKey: string;
|
|
9
9
|
config: IModelSchema;
|
|
10
10
|
}
|
|
11
|
+
/** False for retired (shut down) and deprecated (still served, no longer
|
|
12
|
+
* offered) models — the gate for every "which models can I pick" list. */
|
|
13
|
+
export declare function isModelOffered(config: Pick<IModelSchema, "retired" | "deprecated"> | undefined): boolean;
|
|
11
14
|
/** Return every model whose tier matches. Optionally filter by GenerationType. */
|
|
12
15
|
export declare function getModelsByTier(tier: Tier, type?: GenerationType): ModelMatch[];
|
|
13
16
|
/** Return the cheapest model satisfying (tier, type). Uses cost.fixed → cost.perSecond → 0. */
|
|
14
17
|
export declare function getCheapestModel(tier: Tier, type: GenerationType): ModelMatch | undefined;
|
|
15
18
|
/** Return all models supporting a generation type, regardless of tier. */
|
|
16
19
|
export declare function getModelsByType(type: GenerationType): ModelMatch[];
|
|
20
|
+
/**
|
|
21
|
+
* Representative USD/second for a model, covering the per-resolution shapes
|
|
22
|
+
* (`perSecondByResolution` — Alibaba/MiniMax; `perResolution` — Veo) as well
|
|
23
|
+
* as flat `perSecond`. Per-resolution rates use the model's default
|
|
24
|
+
* resolution, else the average across tiers. Undefined when not per-second.
|
|
25
|
+
*/
|
|
26
|
+
export declare function representativePerSecond(c: IModelSchema): number | undefined;
|
|
17
27
|
/**
|
|
18
28
|
* Build a compact, planner-readable summary of the model catalog grouped by
|
|
19
29
|
* tier. Injected into the planner system prompt so the LLM can pick a concrete
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tierHelpers.d.ts","sourceRoot":"","sources":["../../../src/globals/aiModels/tierHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAGzD,OAAO,KAAK,EAAE,cAAc,EAAc,YAAY,EAAE,MAAM,SAAS,CAAC;AAExE;;;GAGG;AAEH,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,kFAAkF;AAClF,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"tierHelpers.d.ts","sourceRoot":"","sources":["../../../src/globals/aiModels/tierHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAGzD,OAAO,KAAK,EAAE,cAAc,EAAc,YAAY,EAAE,MAAM,SAAS,CAAC;AAExE;;;GAGG;AAEH,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;CACtB;AAED;2EAC2E;AAC3E,wBAAgB,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,YAAY,CAAC,GAAG,SAAS,GAAG,OAAO,CAExG;AAED,kFAAkF;AAClF,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,UAAU,EAAE,CAS/E;AAED,+FAA+F;AAC/F,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,cAAc,GACnB,UAAU,GAAG,SAAS,CAIxB;AAED,0EAA0E;AAC1E,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,UAAU,EAAE,CAMlE;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAc3E;AAWD;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,GAAE,cAAgC,GACrC,MAAM,CAeR;AAgCD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,eAAe,EAAE,MAAM,GACtB,MAAM,GAAG,IAAI,CASf;AA8DD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAU1E"}
|