vidspotai-shared 1.0.130 → 1.0.132
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 +6 -0
- package/lib/globals/aiModels/enums.d.ts.map +1 -1
- package/lib/globals/aiModels/enums.js +31 -1
- package/lib/globals/aiModels/index.d.ts.map +1 -1
- package/lib/globals/aiModels/index.js +2 -0
- package/lib/globals/aiModels/providers/bytedance.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/bytedance.js +4 -0
- package/lib/globals/aiModels/providers/fal.d.ts +20 -0
- package/lib/globals/aiModels/providers/fal.d.ts.map +1 -0
- package/lib/globals/aiModels/providers/fal.js +100 -0
- package/lib/globals/aiModels/providers/google.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/google.js +229 -177
- package/lib/globals/aiModels/tierHelpers.d.ts +3 -1
- package/lib/globals/aiModels/tierHelpers.d.ts.map +1 -1
- package/lib/globals/aiModels/tierHelpers.js +7 -1
- package/lib/globals/aiModels/types.d.ts +10 -1
- package/lib/globals/aiModels/types.d.ts.map +1 -1
- package/lib/globals/creditUnit.d.ts +9 -0
- package/lib/globals/creditUnit.d.ts.map +1 -1
- package/lib/globals/creditUnit.js +10 -1
- package/lib/globals/index.d.ts +2 -0
- package/lib/globals/index.d.ts.map +1 -1
- package/lib/globals/index.js +2 -0
- package/lib/globals/posterExport.d.ts +34 -0
- package/lib/globals/posterExport.d.ts.map +1 -0
- package/lib/globals/posterExport.js +50 -0
- package/lib/globals/types.d.ts +9 -1
- package/lib/globals/types.d.ts.map +1 -1
- package/lib/globals/types.js +9 -0
- package/lib/globals/videoTools.d.ts +24 -0
- package/lib/globals/videoTools.d.ts.map +1 -0
- package/lib/globals/videoTools.js +31 -0
- package/lib/libs/storage/MediaStorage.d.ts.map +1 -1
- package/lib/libs/storage/MediaStorage.js +37 -10
- package/lib/libs/storage/cdnUrl.d.ts +7 -0
- package/lib/libs/storage/cdnUrl.d.ts.map +1 -1
- package/lib/libs/storage/cdnUrl.js +26 -0
- package/lib/models/index.d.ts +2 -0
- package/lib/models/index.d.ts.map +1 -1
- package/lib/models/index.js +2 -0
- package/lib/models/organization.model.d.ts +23 -0
- package/lib/models/organization.model.d.ts.map +1 -1
- package/lib/models/organization.model.js +17 -0
- package/lib/models/posterExport.model.d.ts +29 -0
- package/lib/models/posterExport.model.d.ts.map +1 -0
- package/lib/models/posterExport.model.js +2 -0
- package/lib/models/videoTool.model.d.ts +59 -0
- package/lib/models/videoTool.model.d.ts.map +1 -0
- package/lib/models/videoTool.model.js +2 -0
- package/lib/services/agent/planner/Planner.d.ts.map +1 -1
- package/lib/services/agent/planner/Planner.js +9 -0
- package/lib/services/agent/planner/structuralRules.js +2 -2
- package/lib/services/agent/planner/validators.js +1 -1
- package/lib/services/agent/providerFallback/chains.d.ts.map +1 -1
- package/lib/services/agent/providerFallback/chains.js +18 -5
- package/lib/services/agent/tools/animateImage.tool.js +1 -1
- package/lib/services/agent/tools/generateVideo.tool.js +3 -3
- package/lib/services/agent/tools/searchUserLibrary.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/searchUserLibrary.tool.js +7 -1
- package/lib/services/aiGen/aiGenFactory.service.d.ts.map +1 -1
- package/lib/services/aiGen/aiGenFactory.service.js +6 -0
- package/lib/services/aiGen/helpers.d.ts.map +1 -1
- package/lib/services/aiGen/helpers.js +5 -0
- package/lib/services/aiGen/providers/alibaba/alibaba.d.ts.map +1 -1
- package/lib/services/aiGen/providers/alibaba/alibaba.js +27 -0
- package/lib/services/aiGen/providers/bytedance/bytedance.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/bytedance/bytedance.service.js +6 -0
- package/lib/services/aiGen/providers/fal/falImageTools.service.d.ts +37 -0
- package/lib/services/aiGen/providers/fal/falImageTools.service.d.ts.map +1 -0
- package/lib/services/aiGen/providers/fal/falImageTools.service.js +278 -0
- package/lib/services/aiGen/providers/fal/falUpscale.service.d.ts +8 -0
- package/lib/services/aiGen/providers/fal/falUpscale.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/fal/falUpscale.service.js +1 -0
- package/lib/services/aiGen/providers/fal/falVideoMatting.service.d.ts +36 -0
- package/lib/services/aiGen/providers/fal/falVideoMatting.service.d.ts.map +1 -0
- package/lib/services/aiGen/providers/fal/falVideoMatting.service.js +119 -0
- package/lib/services/aiGen/providers/fal/index.d.ts +2 -0
- package/lib/services/aiGen/providers/fal/index.d.ts.map +1 -1
- package/lib/services/aiGen/providers/fal/index.js +2 -0
- package/lib/services/aiGen/providers/google/googleMusic.d.ts.map +1 -1
- package/lib/services/aiGen/providers/google/googleMusic.js +14 -1
- package/lib/services/aiGen/providers/runway/runway.service.d.ts +2 -2
- package/lib/services/aiGen/providers/runway/runway.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/runway/runway.service.js +81 -3
- package/lib/services/aiGen/textFallback.d.ts +19 -0
- package/lib/services/aiGen/textFallback.d.ts.map +1 -0
- package/lib/services/aiGen/textFallback.js +76 -0
- package/lib/services/brandKit.service.d.ts +22 -0
- package/lib/services/brandKit.service.d.ts.map +1 -0
- package/lib/services/brandKit.service.js +59 -0
- package/lib/services/bullmq.service.d.ts +11 -0
- package/lib/services/bullmq.service.d.ts.map +1 -1
- package/lib/services/bullmq.service.js +79 -18
- package/lib/services/firestore.service.d.ts +7 -1
- package/lib/services/firestore.service.d.ts.map +1 -1
- package/lib/services/firestore.service.js +10 -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/translation/index.d.ts +1 -1
- package/lib/services/translation/index.d.ts.map +1 -1
- package/lib/services/translation/index.js +2 -1
- package/lib/services/translation/outputLanguage.d.ts +9 -0
- package/lib/services/translation/outputLanguage.d.ts.map +1 -1
- package/lib/services/translation/outputLanguage.js +53 -1
- package/lib/services/translation/translation.service.d.ts +16 -0
- package/lib/services/translation/translation.service.d.ts.map +1 -1
- package/lib/services/translation/translation.service.js +60 -2
- package/lib/utils/errors.d.ts +11 -0
- package/lib/utils/errors.d.ts.map +1 -1
- package/lib/utils/errors.js +29 -0
- package/lib/utils/helpers.d.ts.map +1 -1
- package/lib/utils/helpers.js +7 -4
- package/package.json +1 -1
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.googleConfigs = void 0;
|
|
4
|
+
/** Gemini Omni Flash config — shared by its own key and the retired Veo 3.1 keys repointed to it. */
|
|
5
|
+
const GEMINI_OMNI_FLASH = {
|
|
6
|
+
modelId: "gemini-omni-1.1-flash",
|
|
7
|
+
type: ["text-to-video", "image-to-video"],
|
|
8
|
+
tier: "T3",
|
|
9
|
+
fields: {
|
|
10
|
+
prompt: { required: true },
|
|
11
|
+
aspectRatio: { allowedValues: ["16:9", "9:16"] },
|
|
12
|
+
// 1080p + 4k are upscaled from the native generation.
|
|
13
|
+
resolution: { allowedValues: ["360p", "720p", "1080p", "4k"] },
|
|
14
|
+
// Output is 3–10s. `response_format.duration` exists but its string
|
|
15
|
+
// format is undocumented, so the service steers length via the prompt
|
|
16
|
+
// and bills the DELIVERED length (read from the MP4 → durationSec).
|
|
17
|
+
duration: { allowedValues: [3, 4, 5, 6, 7, 8, 9, 10] },
|
|
18
|
+
imageUrl: {},
|
|
19
|
+
// Two input images = first/last-frame interpolation.
|
|
20
|
+
lastFrameImageUrl: {},
|
|
21
|
+
// Several input images = subject references (sent with task=reference_to_video).
|
|
22
|
+
referenceImageUrls: { max: 3 },
|
|
23
|
+
// No `audio` field: audio is always generated (no toggle).
|
|
24
|
+
// No negative_prompt / seed: unsupported ("put your negatives in the
|
|
25
|
+
// regular prompt") — the service folds a negative prompt into the text.
|
|
26
|
+
},
|
|
27
|
+
// Not yet published in the rate-limit table; mirror the Veo 3.1 Tier-2
|
|
28
|
+
// baseline until AI Studio shows real numbers for this key.
|
|
29
|
+
requestPerMin: 4,
|
|
30
|
+
requestPerDay: 50,
|
|
31
|
+
cost: {
|
|
32
|
+
// $17.50 / 1M output video tokens × 5,792 tokens per second of 720p video
|
|
33
|
+
// ≈ $0.10/s (ai.google.dev pricing, 2026-09-29). 1080p/4k are upscales;
|
|
34
|
+
// Google quotes no separate rate, so they bill at the same estimate.
|
|
35
|
+
perSecond: 0.10,
|
|
36
|
+
},
|
|
37
|
+
guidance: {
|
|
38
|
+
quality: 5,
|
|
39
|
+
speed: 3,
|
|
40
|
+
bestFor: "Google's newest all-round video model: text/image-to-video, first-last-frame, subject references, native audio.",
|
|
41
|
+
notes: "3–10s, 16:9 or 9:16. Audio is always on. No negative prompt or seed. 1080p/4k are upscaled.",
|
|
42
|
+
},
|
|
43
|
+
};
|
|
4
44
|
exports.googleConfigs = {
|
|
5
45
|
// ───────────────────────────────────────────────────────────────────────
|
|
6
46
|
// Text-gen — Gemini (aiGen text factory; @google/genai generateContent).
|
|
@@ -88,193 +128,205 @@ exports.googleConfigs = {
|
|
|
88
128
|
// Veo model: served by the Interactions API (POST /v1beta/interactions), so
|
|
89
129
|
// google.service.ts routes it through generateOmniVideo(), not generateVideos.
|
|
90
130
|
// Docs: ai.google.dev/gemini-api/docs/omni (fetched 2026-09-29).
|
|
91
|
-
"google-gemini-omni-flash":
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
lastFrameImageUrl: {},
|
|
107
|
-
// Several input images = subject references (sent with task=reference_to_video).
|
|
108
|
-
referenceImageUrls: { max: 3 },
|
|
109
|
-
// No `audio` field: audio is always generated (no toggle).
|
|
110
|
-
// No negative_prompt / seed: unsupported ("put your negatives in the
|
|
111
|
-
// regular prompt") — the service folds a negative prompt into the text.
|
|
112
|
-
},
|
|
113
|
-
// Not yet published in the rate-limit table; mirror the Veo 3.1 Tier-2
|
|
114
|
-
// baseline until AI Studio shows real numbers for this key.
|
|
115
|
-
requestPerMin: 4,
|
|
116
|
-
requestPerDay: 50,
|
|
117
|
-
cost: {
|
|
118
|
-
// $17.50 / 1M output video tokens × 5,792 tokens per second of 720p video
|
|
119
|
-
// ≈ $0.10/s (ai.google.dev pricing, 2026-09-29). 1080p/4k are upscales;
|
|
120
|
-
// Google quotes no separate rate, so they bill at the same estimate.
|
|
121
|
-
perSecond: 0.10,
|
|
131
|
+
"google-gemini-omni-flash": GEMINI_OMNI_FLASH,
|
|
132
|
+
// ⚰️ END OF LIFE — Veo 3.1 / 3.1 Fast / 3.1 Lite (*-generate-preview). Prod
|
|
133
|
+
// calls started 404ing 2026-10-22 ("no longer available … use
|
|
134
|
+
// models/gemini-omni-1.1-flash") and models.list for our keys holds no Veo
|
|
135
|
+
// model at all (checked 2026-10-23). Same treatment as Imagen 4: the keys are
|
|
136
|
+
// kept (saved requests, agent/MCP callers, old jobs, credit reconciliation)
|
|
137
|
+
// but REPOINTED to Gemini Omni Flash — its modelId routes google.service.ts
|
|
138
|
+
// to generateOmniVideo(). Omni's fields are a superset of Veo 3.1's (3-10s,
|
|
139
|
+
// 360p-4k, FLF, ≤3 refs), so every previously-valid request stays valid.
|
|
140
|
+
"google-veo-3.1": {
|
|
141
|
+
...GEMINI_OMNI_FLASH,
|
|
142
|
+
deprecated: {
|
|
143
|
+
on: "2026-10-23",
|
|
144
|
+
reason: "Veo 3.1 (veo-3.1-generate-preview) was shut down by Google; this key is served by Gemini Omni Flash.",
|
|
145
|
+
replacement: "google-gemini-omni-flash",
|
|
122
146
|
},
|
|
123
147
|
guidance: {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
notes: "3–10s, 16:9 or 9:16. Audio is always on. No negative prompt or seed. 1080p/4k are upscaled.",
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
"google-veo-3.1": {
|
|
131
|
-
modelId: "veo-3.1-generate-preview",
|
|
132
|
-
type: ["text-to-video", "image-to-video"],
|
|
133
|
-
tier: "T3",
|
|
134
|
-
fields: {
|
|
135
|
-
prompt: { required: true },
|
|
136
|
-
aspectRatio: { allowedValues: ["16:9", "9:16"] },
|
|
137
|
-
// 4k requires durationSeconds=8 and is incompatible with referenceImages.
|
|
138
|
-
resolution: { allowedValues: ["720p", "1080p", "4k"] },
|
|
139
|
-
duration: { allowedValues: [4, 6, 8] },
|
|
140
|
-
imageUrl: {},
|
|
141
|
-
lastFrameImageUrl: {},
|
|
142
|
-
// Up to 3 reference images for character/scene consistency. Forces duration=8.
|
|
143
|
-
referenceImageUrls: { max: 3 },
|
|
144
|
-
// Video extension — Gemini API restriction: input MUST be a Veo-generated
|
|
145
|
-
// Video reference from a prior generate_videos operation (not an arbitrary
|
|
146
|
-
// uploaded MP4 / GCS URI / videoBytes). Source TTL is 2 days, resets on
|
|
147
|
-
// each extend. Output capped at 720p, +~7s per call, max cumulative 141s.
|
|
148
|
-
inputVideoUrl: {},
|
|
149
|
-
negative_prompt: {},
|
|
150
|
-
audio: {},
|
|
151
|
-
// REMOVED — `seed` is Vertex-AI-only. On the Gemini Developer API the SDK
|
|
152
|
-
// throws "seed parameter is not supported in Gemini API" client-side.
|
|
153
|
-
// Kept for reference; restore only under a Vertex (vertexai:true) client.
|
|
154
|
-
// seed: {},
|
|
155
|
-
// NOTE (applies to all Veo 3.x): the legal value is MODE-dependent on the
|
|
156
|
-
// Gemini API — "allow_all" for text-to-video and extension, "allow_adult"
|
|
157
|
-
// for image-to-video / interpolation / reference images. "dont_allow" is
|
|
158
|
-
// Veo-2 legacy and returns 400 "<value> for personGeneration is currently
|
|
159
|
-
// not supported". allowedValues is kept as the union so validateParams
|
|
160
|
-
// doesn't hard-throw on a planner-emitted value; google.service.ts picks
|
|
161
|
-
// the value legal for the request's mode and drops the rest.
|
|
162
|
-
// (Regional caveat: in EU/UK/CH/MENA, Veo 3.x allows "allow_adult" ONLY,
|
|
163
|
-
// for every mode — so an EU-billed key would reject allow_all outright.)
|
|
164
|
-
personGeneration: { allowedValues: ["allow_all", "allow_adult", "dont_allow"] },
|
|
165
|
-
promptOptimizer: {},
|
|
166
|
-
},
|
|
167
|
-
// Gemini API cross-constraint: 1080p and 4k ONLY support an 8s duration
|
|
168
|
-
// (the API rejects e.g. 1080p@6s with "1080p is not supported for a
|
|
169
|
-
// duration of 6 seconds"). 720p supports the full 4/6/8 range. Encoded here
|
|
170
|
-
// so validateParams fails fast with a clear message instead of a wasted
|
|
171
|
-
// provider call + opaque 400.
|
|
172
|
-
durationRules: {
|
|
173
|
-
4: ["720p"],
|
|
174
|
-
6: ["720p"],
|
|
175
|
-
8: ["720p", "1080p", "4k"],
|
|
176
|
-
},
|
|
177
|
-
// SINGLE-KEY Tier-2 baseline (verified 2026-06-09 via
|
|
178
|
-
// aistudio.google.com/rate-limit): 4 req/min, ~50/day per Veo model on the
|
|
179
|
-
// shared `predict_long_running_requests_per_model` quota. The DAILY cap is
|
|
180
|
-
// enforced (requestPerDay) — the limiter's day-gate fast-fails
|
|
181
|
-
// (VIDEO_PROVIDER_RATE_LIMITED) rather than blocking for hours, so a
|
|
182
|
-
// daily-exhausted job silently spills to another model in the tier chain.
|
|
183
|
-
// NOTE: these are per-key Tier-2 numbers. The multi-key pool (googleKeyPool)
|
|
184
|
-
// scales the model-level limiter to the SUM across keys (each tier-scaled) —
|
|
185
|
-
// e.g. a Tier-1 + Tier-2 pool → 6/min, 60/day. See googleApiKeys.ts for the
|
|
186
|
-
// decision record.
|
|
187
|
-
requestPerMin: 4,
|
|
188
|
-
requestPerDay: 50,
|
|
189
|
-
cost: {
|
|
190
|
-
// Vertex: $0.40/s @ 720p/1080p, $0.60/s @ 4k.
|
|
191
|
-
perResolution: { "720p": 0.40, "1080p": 0.40, "4k": 0.60 },
|
|
148
|
+
...GEMINI_OMNI_FLASH.guidance,
|
|
149
|
+
bestFor: "Replacement for Veo 3.1 — served by Gemini Omni Flash.",
|
|
150
|
+
notes: "Veo 3.1 was shut down by Google (models.list empty of Veo, 2026-10-23); served by gemini-omni-1.1-flash.",
|
|
192
151
|
},
|
|
193
152
|
},
|
|
194
153
|
"google-veo-3.1-fast": {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
imageUrl: {},
|
|
206
|
-
lastFrameImageUrl: {},
|
|
207
|
-
// Up to 3 reference images for character/scene consistency. Forces duration=8.
|
|
208
|
-
referenceImageUrls: { max: 3 },
|
|
209
|
-
// Video extension — Gemini API restriction: input MUST be a Veo-generated
|
|
210
|
-
// Video reference from a prior generate_videos operation (not an arbitrary
|
|
211
|
-
// uploaded MP4 / GCS URI / videoBytes). Source TTL 2 days, resets on each
|
|
212
|
-
// extend. Output capped at 720p, +~7s per call, max cumulative 141s.
|
|
213
|
-
inputVideoUrl: {},
|
|
214
|
-
negative_prompt: {},
|
|
215
|
-
audio: {},
|
|
216
|
-
// REMOVED — `seed` is Vertex-AI-only; the Gemini API SDK throws
|
|
217
|
-
// "seed parameter is not supported in Gemini API" client-side. See veo-3.1.
|
|
218
|
-
// seed: {},
|
|
219
|
-
personGeneration: { allowedValues: ["allow_all", "allow_adult", "dont_allow"] },
|
|
220
|
-
promptOptimizer: {},
|
|
221
|
-
},
|
|
222
|
-
// 1080p only supports 8s on the Gemini API (no 4k for fast). See veo-3.1.
|
|
223
|
-
durationRules: {
|
|
224
|
-
4: ["720p"],
|
|
225
|
-
6: ["720p"],
|
|
226
|
-
8: ["720p", "1080p", "4k"],
|
|
227
|
-
},
|
|
228
|
-
// Tier 2 ceiling: 4 RPM / ~50 RPD per model (see veo-3.1 note above).
|
|
229
|
-
requestPerMin: 4,
|
|
230
|
-
requestPerDay: 50,
|
|
231
|
-
cost: {
|
|
232
|
-
// ai.google.dev pricing (2026-09-29): $0.10 720p, $0.12 1080p, $0.30 4k.
|
|
233
|
-
perResolution: { "720p": 0.10, "1080p": 0.12, "4k": 0.30 },
|
|
154
|
+
...GEMINI_OMNI_FLASH,
|
|
155
|
+
deprecated: {
|
|
156
|
+
on: "2026-10-23",
|
|
157
|
+
reason: "Veo 3.1 Fast (veo-3.1-fast-generate-preview) was shut down by Google; this key is served by Gemini Omni Flash.",
|
|
158
|
+
replacement: "google-gemini-omni-flash",
|
|
159
|
+
},
|
|
160
|
+
guidance: {
|
|
161
|
+
...GEMINI_OMNI_FLASH.guidance,
|
|
162
|
+
bestFor: "Replacement for Veo 3.1 Fast — served by Gemini Omni Flash.",
|
|
163
|
+
notes: "Veo 3.1 Fast was shut down by Google (models.list empty of Veo, 2026-10-23); served by gemini-omni-1.1-flash.",
|
|
234
164
|
},
|
|
235
165
|
},
|
|
236
166
|
"google-veo-3.1-lite": {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
// first+last frames returns Gemini 400 "Your use case is currently not
|
|
248
|
-
// supported." Per the Gemini API video docs, `lastFrame` is offered only
|
|
249
|
-
// for veo-3.1 and veo-3.1-fast. Kept commented for reference.
|
|
250
|
-
// lastFrameImageUrl: {},
|
|
251
|
-
// Lite also does NOT support reference images or video extension per the
|
|
252
|
-
// Gemini API spec — only 3.1 and 3.1-fast do.
|
|
253
|
-
// REMOVED — veo-3.1-lite returns 400 "negativePrompt isn't supported by
|
|
254
|
-
// this model" (unlike veo-3.1 / veo-3.1-fast, which accept it). The request
|
|
255
|
-
// builder gates negativePrompt on this field being declared, so leaving it
|
|
256
|
-
// out is what stops the param from being forwarded. Kept for reference.
|
|
257
|
-
// negative_prompt: {},
|
|
258
|
-
audio: {},
|
|
259
|
-
// REMOVED — `seed` is Vertex-AI-only; the Gemini API SDK throws
|
|
260
|
-
// "seed parameter is not supported in Gemini API" client-side. See veo-3.1.
|
|
261
|
-
// seed: {},
|
|
262
|
-
personGeneration: { allowedValues: ["allow_all", "allow_adult", "dont_allow"] },
|
|
263
|
-
promptOptimizer: {},
|
|
264
|
-
},
|
|
265
|
-
// 1080p only supports 8s on the Gemini API (no 4k for lite). See veo-3.1.
|
|
266
|
-
durationRules: {
|
|
267
|
-
4: ["720p"],
|
|
268
|
-
6: ["720p"],
|
|
269
|
-
8: ["720p", "1080p"],
|
|
270
|
-
},
|
|
271
|
-
// Tier 2 ceiling: 4 RPM / ~50 RPD per model (see veo-3.1 note above).
|
|
272
|
-
requestPerMin: 4,
|
|
273
|
-
requestPerDay: 50,
|
|
274
|
-
cost: {
|
|
275
|
-
perResolution: { "720p": 0.05, "1080p": 0.08 },
|
|
167
|
+
...GEMINI_OMNI_FLASH,
|
|
168
|
+
deprecated: {
|
|
169
|
+
on: "2026-10-23",
|
|
170
|
+
reason: "Veo 3.1 Lite (veo-3.1-lite-generate-preview) was shut down by Google; this key is served by Gemini Omni Flash.",
|
|
171
|
+
replacement: "google-gemini-omni-flash",
|
|
172
|
+
},
|
|
173
|
+
guidance: {
|
|
174
|
+
...GEMINI_OMNI_FLASH.guidance,
|
|
175
|
+
bestFor: "Replacement for Veo 3.1 Lite — served by Gemini Omni Flash.",
|
|
176
|
+
notes: "Veo 3.1 Lite was shut down by Google (models.list empty of Veo, 2026-10-23); served by gemini-omni-1.1-flash.",
|
|
276
177
|
},
|
|
277
178
|
},
|
|
179
|
+
// REMOVED FOR v1 — kept for reference: original Veo 3.1 configs.
|
|
180
|
+
// "google-veo-3.1": {
|
|
181
|
+
// modelId: "veo-3.1-generate-preview",
|
|
182
|
+
// type: ["text-to-video", "image-to-video"],
|
|
183
|
+
// tier: "T3",
|
|
184
|
+
// fields: {
|
|
185
|
+
// prompt: { required: true },
|
|
186
|
+
// aspectRatio: { allowedValues: ["16:9", "9:16"] },
|
|
187
|
+
// // 4k requires durationSeconds=8 and is incompatible with referenceImages.
|
|
188
|
+
// resolution: { allowedValues: ["720p", "1080p", "4k"] },
|
|
189
|
+
// duration: { allowedValues: [4, 6, 8] },
|
|
190
|
+
// imageUrl: {},
|
|
191
|
+
// lastFrameImageUrl: {},
|
|
192
|
+
// // Up to 3 reference images for character/scene consistency. Forces duration=8.
|
|
193
|
+
// referenceImageUrls: { max: 3 },
|
|
194
|
+
// // Video extension — Gemini API restriction: input MUST be a Veo-generated
|
|
195
|
+
// // Video reference from a prior generate_videos operation (not an arbitrary
|
|
196
|
+
// // uploaded MP4 / GCS URI / videoBytes). Source TTL is 2 days, resets on
|
|
197
|
+
// // each extend. Output capped at 720p, +~7s per call, max cumulative 141s.
|
|
198
|
+
// inputVideoUrl: {},
|
|
199
|
+
// negative_prompt: {},
|
|
200
|
+
// audio: {},
|
|
201
|
+
// // REMOVED — `seed` is Vertex-AI-only. On the Gemini Developer API the SDK
|
|
202
|
+
// // throws "seed parameter is not supported in Gemini API" client-side.
|
|
203
|
+
// // Kept for reference; restore only under a Vertex (vertexai:true) client.
|
|
204
|
+
// // seed: {},
|
|
205
|
+
// // NOTE (applies to all Veo 3.x): the legal value is MODE-dependent on the
|
|
206
|
+
// // Gemini API — "allow_all" for text-to-video and extension, "allow_adult"
|
|
207
|
+
// // for image-to-video / interpolation / reference images. "dont_allow" is
|
|
208
|
+
// // Veo-2 legacy and returns 400 "<value> for personGeneration is currently
|
|
209
|
+
// // not supported". allowedValues is kept as the union so validateParams
|
|
210
|
+
// // doesn't hard-throw on a planner-emitted value; google.service.ts picks
|
|
211
|
+
// // the value legal for the request's mode and drops the rest.
|
|
212
|
+
// // (Regional caveat: in EU/UK/CH/MENA, Veo 3.x allows "allow_adult" ONLY,
|
|
213
|
+
// // for every mode — so an EU-billed key would reject allow_all outright.)
|
|
214
|
+
// personGeneration: { allowedValues: ["allow_all", "allow_adult", "dont_allow"] },
|
|
215
|
+
// promptOptimizer: {},
|
|
216
|
+
// },
|
|
217
|
+
// // Gemini API cross-constraint: 1080p and 4k ONLY support an 8s duration
|
|
218
|
+
// // (the API rejects e.g. 1080p@6s with "1080p is not supported for a
|
|
219
|
+
// // duration of 6 seconds"). 720p supports the full 4/6/8 range. Encoded here
|
|
220
|
+
// // so validateParams fails fast with a clear message instead of a wasted
|
|
221
|
+
// // provider call + opaque 400.
|
|
222
|
+
// durationRules: {
|
|
223
|
+
// 4: ["720p"],
|
|
224
|
+
// 6: ["720p"],
|
|
225
|
+
// 8: ["720p", "1080p", "4k"],
|
|
226
|
+
// },
|
|
227
|
+
// // SINGLE-KEY Tier-2 baseline (verified 2026-06-09 via
|
|
228
|
+
// // aistudio.google.com/rate-limit): 4 req/min, ~50/day per Veo model on the
|
|
229
|
+
// // shared `predict_long_running_requests_per_model` quota. The DAILY cap is
|
|
230
|
+
// // enforced (requestPerDay) — the limiter's day-gate fast-fails
|
|
231
|
+
// // (VIDEO_PROVIDER_RATE_LIMITED) rather than blocking for hours, so a
|
|
232
|
+
// // daily-exhausted job silently spills to another model in the tier chain.
|
|
233
|
+
// // NOTE: these are per-key Tier-2 numbers. The multi-key pool (googleKeyPool)
|
|
234
|
+
// // scales the model-level limiter to the SUM across keys (each tier-scaled) —
|
|
235
|
+
// // e.g. a Tier-1 + Tier-2 pool → 6/min, 60/day. See googleApiKeys.ts for the
|
|
236
|
+
// // decision record.
|
|
237
|
+
// requestPerMin: 4,
|
|
238
|
+
// requestPerDay: 50,
|
|
239
|
+
// cost: {
|
|
240
|
+
// // Vertex: $0.40/s @ 720p/1080p, $0.60/s @ 4k.
|
|
241
|
+
// perResolution: { "720p": 0.40, "1080p": 0.40, "4k": 0.60 },
|
|
242
|
+
// },
|
|
243
|
+
// },
|
|
244
|
+
//
|
|
245
|
+
// "google-veo-3.1-fast": {
|
|
246
|
+
// modelId: "veo-3.1-fast-generate-preview",
|
|
247
|
+
// type: ["text-to-video", "image-to-video"],
|
|
248
|
+
// tier: "T3",
|
|
249
|
+
// fields: {
|
|
250
|
+
// prompt: { required: true },
|
|
251
|
+
// aspectRatio: { allowedValues: ["16:9", "9:16"] },
|
|
252
|
+
// // 4k added 2026-09-29 — the Veo parameter table gives 3.1 and 3.1 Fast
|
|
253
|
+
// // the same 720p / 1080p / 4k set (1080p + 4k: 8s only; 4k not with refs).
|
|
254
|
+
// resolution: { allowedValues: ["720p", "1080p", "4k"] },
|
|
255
|
+
// duration: { allowedValues: [4, 6, 8] },
|
|
256
|
+
// imageUrl: {},
|
|
257
|
+
// lastFrameImageUrl: {},
|
|
258
|
+
// // Up to 3 reference images for character/scene consistency. Forces duration=8.
|
|
259
|
+
// referenceImageUrls: { max: 3 },
|
|
260
|
+
// // Video extension — Gemini API restriction: input MUST be a Veo-generated
|
|
261
|
+
// // Video reference from a prior generate_videos operation (not an arbitrary
|
|
262
|
+
// // uploaded MP4 / GCS URI / videoBytes). Source TTL 2 days, resets on each
|
|
263
|
+
// // extend. Output capped at 720p, +~7s per call, max cumulative 141s.
|
|
264
|
+
// inputVideoUrl: {},
|
|
265
|
+
// negative_prompt: {},
|
|
266
|
+
// audio: {},
|
|
267
|
+
// // REMOVED — `seed` is Vertex-AI-only; the Gemini API SDK throws
|
|
268
|
+
// // "seed parameter is not supported in Gemini API" client-side. See veo-3.1.
|
|
269
|
+
// // seed: {},
|
|
270
|
+
// personGeneration: { allowedValues: ["allow_all", "allow_adult", "dont_allow"] },
|
|
271
|
+
// promptOptimizer: {},
|
|
272
|
+
// },
|
|
273
|
+
// // 1080p only supports 8s on the Gemini API (no 4k for fast). See veo-3.1.
|
|
274
|
+
// durationRules: {
|
|
275
|
+
// 4: ["720p"],
|
|
276
|
+
// 6: ["720p"],
|
|
277
|
+
// 8: ["720p", "1080p", "4k"],
|
|
278
|
+
// },
|
|
279
|
+
// // Tier 2 ceiling: 4 RPM / ~50 RPD per model (see veo-3.1 note above).
|
|
280
|
+
// requestPerMin: 4,
|
|
281
|
+
// requestPerDay: 50,
|
|
282
|
+
// cost: {
|
|
283
|
+
// // ai.google.dev pricing (2026-09-29): $0.10 720p, $0.12 1080p, $0.30 4k.
|
|
284
|
+
// perResolution: { "720p": 0.10, "1080p": 0.12, "4k": 0.30 },
|
|
285
|
+
// },
|
|
286
|
+
// },
|
|
287
|
+
//
|
|
288
|
+
// "google-veo-3.1-lite": {
|
|
289
|
+
// modelId: "veo-3.1-lite-generate-preview",
|
|
290
|
+
// type: ["text-to-video", "image-to-video"],
|
|
291
|
+
// tier: "T2",
|
|
292
|
+
// fields: {
|
|
293
|
+
// prompt: { required: true },
|
|
294
|
+
// aspectRatio: { allowedValues: ["16:9", "9:16"] },
|
|
295
|
+
// resolution: { allowedValues: ["720p", "1080p"] },
|
|
296
|
+
// duration: { allowedValues: [4, 6, 8] },
|
|
297
|
+
// imageUrl: {},
|
|
298
|
+
// // REMOVED — veo-3.1-lite does NOT support last-frame interpolation. Sending
|
|
299
|
+
// // first+last frames returns Gemini 400 "Your use case is currently not
|
|
300
|
+
// // supported." Per the Gemini API video docs, `lastFrame` is offered only
|
|
301
|
+
// // for veo-3.1 and veo-3.1-fast. Kept commented for reference.
|
|
302
|
+
// // lastFrameImageUrl: {},
|
|
303
|
+
// // Lite also does NOT support reference images or video extension per the
|
|
304
|
+
// // Gemini API spec — only 3.1 and 3.1-fast do.
|
|
305
|
+
// // REMOVED — veo-3.1-lite returns 400 "negativePrompt isn't supported by
|
|
306
|
+
// // this model" (unlike veo-3.1 / veo-3.1-fast, which accept it). The request
|
|
307
|
+
// // builder gates negativePrompt on this field being declared, so leaving it
|
|
308
|
+
// // out is what stops the param from being forwarded. Kept for reference.
|
|
309
|
+
// // negative_prompt: {},
|
|
310
|
+
// audio: {},
|
|
311
|
+
// // REMOVED — `seed` is Vertex-AI-only; the Gemini API SDK throws
|
|
312
|
+
// // "seed parameter is not supported in Gemini API" client-side. See veo-3.1.
|
|
313
|
+
// // seed: {},
|
|
314
|
+
// personGeneration: { allowedValues: ["allow_all", "allow_adult", "dont_allow"] },
|
|
315
|
+
// promptOptimizer: {},
|
|
316
|
+
// },
|
|
317
|
+
// // 1080p only supports 8s on the Gemini API (no 4k for lite). See veo-3.1.
|
|
318
|
+
// durationRules: {
|
|
319
|
+
// 4: ["720p"],
|
|
320
|
+
// 6: ["720p"],
|
|
321
|
+
// 8: ["720p", "1080p"],
|
|
322
|
+
// },
|
|
323
|
+
// // Tier 2 ceiling: 4 RPM / ~50 RPD per model (see veo-3.1 note above).
|
|
324
|
+
// requestPerMin: 4,
|
|
325
|
+
// requestPerDay: 50,
|
|
326
|
+
// cost: {
|
|
327
|
+
// perResolution: { "720p": 0.05, "1080p": 0.08 },
|
|
328
|
+
// },
|
|
329
|
+
// },
|
|
278
330
|
// ⚰️ END OF LIFE: shut down by Google 2026-06-30 (veo-3.0-generate-001,
|
|
279
331
|
// veo-3.0-fast-generate-001, veo-2.0-generate-001). Recommended replacement:
|
|
280
332
|
// veo-3.1-generate-preview / veo-3.1-fast-generate-preview (configs above).
|
|
@@ -10,7 +10,9 @@ export interface ModelMatch {
|
|
|
10
10
|
}
|
|
11
11
|
/** False for retired (shut down) and deprecated (still served, no longer
|
|
12
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;
|
|
13
|
+
export declare function isModelOffered(config: Pick<IModelSchema, "retired" | "deprecated" | "gatedByEnv"> | undefined): boolean;
|
|
14
|
+
/** False while the model's `gatedByEnv` flag is set but not `"true"`. */
|
|
15
|
+
export declare function isModelEnvEnabled(config: Pick<IModelSchema, "gatedByEnv"> | undefined): boolean;
|
|
14
16
|
/** Return every model whose tier matches. Optionally filter by GenerationType. */
|
|
15
17
|
export declare function getModelsByTier(tier: Tier, type?: GenerationType): ModelMatch[];
|
|
16
18
|
/** Return the cheapest model satisfying (tier, type). Uses cost.fixed → cost.perSecond → 0. */
|
|
@@ -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;2EAC2E;AAC3E,wBAAgB,cAAc,
|
|
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,CAC5B,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,YAAY,GAAG,YAAY,CAAC,GAAG,SAAS,GAC9E,OAAO,CAET;AAED,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,GAAG,SAAS,GAAG,OAAO,CAG/F;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"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isModelOffered = isModelOffered;
|
|
4
|
+
exports.isModelEnvEnabled = isModelEnvEnabled;
|
|
4
5
|
exports.getModelsByTier = getModelsByTier;
|
|
5
6
|
exports.getCheapestModel = getCheapestModel;
|
|
6
7
|
exports.getModelsByType = getModelsByType;
|
|
@@ -13,7 +14,12 @@ const creditUnit_1 = require("../creditUnit");
|
|
|
13
14
|
/** False for retired (shut down) and deprecated (still served, no longer
|
|
14
15
|
* offered) models — the gate for every "which models can I pick" list. */
|
|
15
16
|
function isModelOffered(config) {
|
|
16
|
-
return !!config && !config.retired && !config.deprecated;
|
|
17
|
+
return !!config && !config.retired && !config.deprecated && isModelEnvEnabled(config);
|
|
18
|
+
}
|
|
19
|
+
/** False while the model's `gatedByEnv` flag is set but not `"true"`. */
|
|
20
|
+
function isModelEnvEnabled(config) {
|
|
21
|
+
const flag = config?.gatedByEnv;
|
|
22
|
+
return !flag || process.env[flag] === "true";
|
|
17
23
|
}
|
|
18
24
|
/** Return every model whose tier matches. Optionally filter by GenerationType. */
|
|
19
25
|
function getModelsByTier(tier, type) {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { TtsProvider } from "../ttsModels/types";
|
|
2
2
|
import type { Tier } from "../../schemas/project.schema";
|
|
3
|
-
export type GenerationType = "text-to-video" | "image-to-video" | "video-to-video" | "audio-to-video" | "avatar-video" | "motion-control" | "lip-sync" | "text-to-text" | "image-to-text" | "text-to-image" | "image-to-image" | "stock-video" | "stock-image" | "stock-music" | "text-to-music" | "sound-effects" | "image-upscale" | "video-upscale"
|
|
3
|
+
export type GenerationType = "text-to-video" | "image-to-video" | "video-to-video" | "audio-to-video" | "avatar-video" | "motion-control" | "lip-sync" | "text-to-text" | "image-to-text" | "text-to-image" | "image-to-image" | "stock-video" | "stock-image" | "stock-music" | "text-to-music" | "sound-effects" | "image-upscale" | "video-upscale"
|
|
4
|
+
/** Deterministic photo utility (background removal, erase, staging) — not a prompt-led generator. */
|
|
5
|
+
| "image-tool";
|
|
4
6
|
/**
|
|
5
7
|
* Config block present on every avatar-video type model.
|
|
6
8
|
* Encapsulates all avatar-specific constraints and provider defaults
|
|
@@ -92,6 +94,13 @@ export interface IModelSchema {
|
|
|
92
94
|
reason: string;
|
|
93
95
|
replacement?: string;
|
|
94
96
|
};
|
|
97
|
+
/**
|
|
98
|
+
* Env flag that must be `"true"` for this model to be offered — for models
|
|
99
|
+
* integrated ahead of provider-side activation (e.g. BytePlus ModelNotOpen).
|
|
100
|
+
* While unset: validateParams rejects it (non-paging), and the planner,
|
|
101
|
+
* fallback chains, capacity spill, repair and MCP list_models skip it.
|
|
102
|
+
*/
|
|
103
|
+
gatedByEnv?: string;
|
|
95
104
|
fields: Record<string, ISchemaField>;
|
|
96
105
|
resolutionRules?: Record<string, string[]>;
|
|
97
106
|
durationRules?: Record<number, string[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/globals/aiModels/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAEzD,MAAM,MAAM,cAAc,GACtB,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,GACd,gBAAgB,GAChB,UAAU,GACV,cAAc,GACd,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,aAAa,GACb,aAAa,GACb,eAAe,GACf,eAAe,GACf,eAAe,GACf,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/globals/aiModels/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -41,6 +41,15 @@ export declare const MIN_CREDITS_PER_PAID_OP = 10;
|
|
|
41
41
|
* MIN_CREDITS_PER_PAID_OP.
|
|
42
42
|
*/
|
|
43
43
|
export declare const MIN_CREDITS_PER_IMAGE_OP = 2;
|
|
44
|
+
/**
|
|
45
|
+
* Per-op floor for sub-cent photo UTILITIES (fal BiRefNet background removal,
|
|
46
|
+
* ~$0.001/image). Applied by the model config itself (`cost.creditFloor`), for
|
|
47
|
+
* free AND paid users, so "remove a background" isn't billed as a 2–10 credit
|
|
48
|
+
* generation: at 1 credit ($0.10 of cost basis) the margin is still ~100×, and
|
|
49
|
+
* the 10-credit signup grant covers 10 removals instead of one. Only models
|
|
50
|
+
* that opt in via `cost.creditFloor` use it — see providers/fal.ts.
|
|
51
|
+
*/
|
|
52
|
+
export declare const MIN_CREDITS_PER_UTILITY_OP = 1;
|
|
44
53
|
/**
|
|
45
54
|
* Credits granted on SIGNUP — one full floored generation ($1.00 of provider
|
|
46
55
|
* cost), no card required. This is the top of the funnel: a new account can try
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditUnit.d.ts","sourceRoot":"","sources":["../../src/globals/creditUnit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,iDAAiD;AACjD,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,0EAA0E;AAC1E,eAAO,MAAM,eAAe,QAAqB,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,mBAAmB,KAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"creditUnit.d.ts","sourceRoot":"","sources":["../../src/globals/creditUnit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,iDAAiD;AACjD,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,0EAA0E;AAC1E,eAAO,MAAM,eAAe,QAAqB,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,mBAAmB,KAA0B,CAAC"}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* underlying cost. Both now derive from the values below.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.TRIAL_GRANT_CREDITS = exports.SIGNUP_GRANT_CREDITS = exports.MIN_CREDITS_PER_IMAGE_OP = exports.MIN_CREDITS_PER_PAID_OP = exports.CREDITS_PER_USD = exports.USD_PER_CREDIT = void 0;
|
|
19
|
+
exports.TRIAL_GRANT_CREDITS = exports.SIGNUP_GRANT_CREDITS = exports.MIN_CREDITS_PER_UTILITY_OP = exports.MIN_CREDITS_PER_IMAGE_OP = exports.MIN_CREDITS_PER_PAID_OP = exports.CREDITS_PER_USD = exports.USD_PER_CREDIT = void 0;
|
|
20
20
|
/** Provider cost (USD) covered by one credit. */
|
|
21
21
|
exports.USD_PER_CREDIT = 0.1;
|
|
22
22
|
/** Credits per USD of provider cost. Equals 1 / USD_PER_CREDIT (= 10). */
|
|
@@ -44,6 +44,15 @@ exports.MIN_CREDITS_PER_PAID_OP = 10;
|
|
|
44
44
|
* MIN_CREDITS_PER_PAID_OP.
|
|
45
45
|
*/
|
|
46
46
|
exports.MIN_CREDITS_PER_IMAGE_OP = 2;
|
|
47
|
+
/**
|
|
48
|
+
* Per-op floor for sub-cent photo UTILITIES (fal BiRefNet background removal,
|
|
49
|
+
* ~$0.001/image). Applied by the model config itself (`cost.creditFloor`), for
|
|
50
|
+
* free AND paid users, so "remove a background" isn't billed as a 2–10 credit
|
|
51
|
+
* generation: at 1 credit ($0.10 of cost basis) the margin is still ~100×, and
|
|
52
|
+
* the 10-credit signup grant covers 10 removals instead of one. Only models
|
|
53
|
+
* that opt in via `cost.creditFloor` use it — see providers/fal.ts.
|
|
54
|
+
*/
|
|
55
|
+
exports.MIN_CREDITS_PER_UTILITY_OP = 1;
|
|
47
56
|
/**
|
|
48
57
|
* Credits granted on SIGNUP — one full floored generation ($1.00 of provider
|
|
49
58
|
* cost), no card required. This is the top of the funnel: a new account can try
|
package/lib/globals/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/globals/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/globals/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
package/lib/globals/index.js
CHANGED
|
@@ -22,3 +22,5 @@ __exportStar(require("./schemas"), exports);
|
|
|
22
22
|
__exportStar(require("./ttsModels"), exports);
|
|
23
23
|
__exportStar(require("./types"), exports);
|
|
24
24
|
__exportStar(require("./unlimitedPlanFairUse"), exports);
|
|
25
|
+
__exportStar(require("./videoTools"), exports);
|
|
26
|
+
__exportStar(require("./posterExport"), exports);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Poster Studio export — server-side Remotion render of the poster's Project
|
|
3
|
+
* JSON (the same `ProjectComposition` the editor preview uses, so the file
|
|
4
|
+
* matches the canvas pixel-for-pixel). Stills go through `renderStill`;
|
|
5
|
+
* animated formats through `renderMedia`. Rides RENDER_JOBS with
|
|
6
|
+
* `kind: "poster-export"` so it shares the render worker's concurrency and
|
|
7
|
+
* memory caps.
|
|
8
|
+
*/
|
|
9
|
+
export declare const POSTER_STILL_FORMATS: readonly ["png", "jpeg", "webp", "pdf"];
|
|
10
|
+
export declare const POSTER_ANIMATED_FORMATS: readonly ["mp4", "gif"];
|
|
11
|
+
export declare const POSTER_EXPORT_FORMATS: readonly ["png", "jpeg", "webp", "pdf", "mp4", "gif"];
|
|
12
|
+
export type PosterStillFormat = (typeof POSTER_STILL_FORMATS)[number];
|
|
13
|
+
export type PosterAnimatedFormat = (typeof POSTER_ANIMATED_FORMATS)[number];
|
|
14
|
+
export type PosterExportFormat = (typeof POSTER_EXPORT_FORMATS)[number];
|
|
15
|
+
export declare function isPosterStillFormat(format: PosterExportFormat): format is PosterStillFormat;
|
|
16
|
+
export declare const POSTER_EXPORT_LIMITS: {
|
|
17
|
+
/** Animated exports are trimmed to this many seconds. */
|
|
18
|
+
readonly maxAnimatedSec: 30;
|
|
19
|
+
/** GIFs are capped harder — every frame is a full palette image. */
|
|
20
|
+
readonly maxGifSec: 10;
|
|
21
|
+
/** Longest edge of a GIF (px); larger canvases are scaled down. */
|
|
22
|
+
readonly gifMaxEdgePx: 720;
|
|
23
|
+
/** GIF frame rate divisor (30 fps project → 15 fps GIF). */
|
|
24
|
+
readonly gifEveryNthFrame: 2;
|
|
25
|
+
/** Longest edge of an MP4 (px); print-size canvases are scaled to 4K. */
|
|
26
|
+
readonly mp4MaxEdgePx: 3840;
|
|
27
|
+
/** In-flight exports per user before new ones are refused (429). */
|
|
28
|
+
readonly maxInFlightPerUser: 2;
|
|
29
|
+
/** A queued/in-progress export older than this no longer counts as in flight. */
|
|
30
|
+
readonly staleAfterMs: number;
|
|
31
|
+
};
|
|
32
|
+
export declare const POSTER_EXPORT_CONTENT_TYPES: Record<PosterExportFormat, string>;
|
|
33
|
+
export declare const POSTER_EXPORT_EXTENSIONS: Record<PosterExportFormat, string>;
|
|
34
|
+
//# sourceMappingURL=posterExport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"posterExport.d.ts","sourceRoot":"","sources":["../../src/globals/posterExport.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,yCAA0C,CAAC;AAC5E,eAAO,MAAM,uBAAuB,yBAA0B,CAAC;AAC/D,eAAO,MAAM,qBAAqB,uDAAiE,CAAC;AAEpG,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AACtE,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC5E,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,IAAI,iBAAiB,CAE3F;AAED,eAAO,MAAM,oBAAoB;IAC/B,yDAAyD;;IAEzD,oEAAoE;;IAEpE,mEAAmE;;IAEnE,4DAA4D;;IAE5D,yEAAyE;;IAEzE,oEAAoE;;IAEpE,iFAAiF;;CAEzE,CAAC;AAEX,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAO1E,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAOvE,CAAC"}
|