@omnichar/contracts 0.0.0-01d940d

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.
Files changed (113) hide show
  1. package/dist/errors.d.ts +39 -0
  2. package/dist/errors.d.ts.map +1 -0
  3. package/dist/errors.js +42 -0
  4. package/dist/errors.js.map +1 -0
  5. package/dist/index.d.ts +5 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +5 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/manifest/index.d.ts +18 -0
  10. package/dist/manifest/index.d.ts.map +1 -0
  11. package/dist/manifest/index.js +13 -0
  12. package/dist/manifest/index.js.map +1 -0
  13. package/dist/result.d.ts +12 -0
  14. package/dist/result.d.ts.map +1 -0
  15. package/dist/result.js +7 -0
  16. package/dist/result.js.map +1 -0
  17. package/dist/v1/accessRequests.d.ts +11 -0
  18. package/dist/v1/accessRequests.d.ts.map +1 -0
  19. package/dist/v1/accessRequests.js +12 -0
  20. package/dist/v1/accessRequests.js.map +1 -0
  21. package/dist/v1/apiKeys.d.ts +38 -0
  22. package/dist/v1/apiKeys.d.ts.map +1 -0
  23. package/dist/v1/apiKeys.js +28 -0
  24. package/dist/v1/apiKeys.js.map +1 -0
  25. package/dist/v1/assets.d.ts +47 -0
  26. package/dist/v1/assets.d.ts.map +1 -0
  27. package/dist/v1/assets.js +24 -0
  28. package/dist/v1/assets.js.map +1 -0
  29. package/dist/v1/capacity.d.ts +48 -0
  30. package/dist/v1/capacity.d.ts.map +1 -0
  31. package/dist/v1/capacity.js +18 -0
  32. package/dist/v1/capacity.js.map +1 -0
  33. package/dist/v1/characterListings.d.ts +75 -0
  34. package/dist/v1/characterListings.d.ts.map +1 -0
  35. package/dist/v1/characterListings.js +68 -0
  36. package/dist/v1/characterListings.js.map +1 -0
  37. package/dist/v1/characters.d.ts +171 -0
  38. package/dist/v1/characters.d.ts.map +1 -0
  39. package/dist/v1/characters.js +111 -0
  40. package/dist/v1/characters.js.map +1 -0
  41. package/dist/v1/common.d.ts +13 -0
  42. package/dist/v1/common.d.ts.map +1 -0
  43. package/dist/v1/common.js +12 -0
  44. package/dist/v1/common.js.map +1 -0
  45. package/dist/v1/credits.d.ts +124 -0
  46. package/dist/v1/credits.d.ts.map +1 -0
  47. package/dist/v1/credits.js +82 -0
  48. package/dist/v1/credits.js.map +1 -0
  49. package/dist/v1/datasets.d.ts +153 -0
  50. package/dist/v1/datasets.d.ts.map +1 -0
  51. package/dist/v1/datasets.js +93 -0
  52. package/dist/v1/datasets.js.map +1 -0
  53. package/dist/v1/featureRequests.d.ts +29 -0
  54. package/dist/v1/featureRequests.d.ts.map +1 -0
  55. package/dist/v1/featureRequests.js +36 -0
  56. package/dist/v1/featureRequests.js.map +1 -0
  57. package/dist/v1/guest.d.ts +154 -0
  58. package/dist/v1/guest.d.ts.map +1 -0
  59. package/dist/v1/guest.js +91 -0
  60. package/dist/v1/guest.js.map +1 -0
  61. package/dist/v1/health.d.ts +13 -0
  62. package/dist/v1/health.d.ts.map +1 -0
  63. package/dist/v1/health.js +10 -0
  64. package/dist/v1/health.js.map +1 -0
  65. package/dist/v1/index.d.ts +24 -0
  66. package/dist/v1/index.d.ts.map +1 -0
  67. package/dist/v1/index.js +24 -0
  68. package/dist/v1/index.js.map +1 -0
  69. package/dist/v1/me.d.ts +30 -0
  70. package/dist/v1/me.d.ts.map +1 -0
  71. package/dist/v1/me.js +22 -0
  72. package/dist/v1/me.js.map +1 -0
  73. package/dist/v1/plans.d.ts +30 -0
  74. package/dist/v1/plans.d.ts.map +1 -0
  75. package/dist/v1/plans.js +19 -0
  76. package/dist/v1/plans.js.map +1 -0
  77. package/dist/v1/purchases.d.ts +40 -0
  78. package/dist/v1/purchases.d.ts.map +1 -0
  79. package/dist/v1/purchases.js +56 -0
  80. package/dist/v1/purchases.js.map +1 -0
  81. package/dist/v1/runs.d.ts +791 -0
  82. package/dist/v1/runs.d.ts.map +1 -0
  83. package/dist/v1/runs.js +257 -0
  84. package/dist/v1/runs.js.map +1 -0
  85. package/dist/v1/sessions.d.ts +486 -0
  86. package/dist/v1/sessions.d.ts.map +1 -0
  87. package/dist/v1/sessions.js +89 -0
  88. package/dist/v1/sessions.js.map +1 -0
  89. package/dist/v1/studio.d.ts +279 -0
  90. package/dist/v1/studio.d.ts.map +1 -0
  91. package/dist/v1/studio.js +309 -0
  92. package/dist/v1/studio.js.map +1 -0
  93. package/dist/v1/terms.d.ts +8 -0
  94. package/dist/v1/terms.d.ts.map +1 -0
  95. package/dist/v1/terms.js +15 -0
  96. package/dist/v1/terms.js.map +1 -0
  97. package/dist/v1/uploads.d.ts +60 -0
  98. package/dist/v1/uploads.d.ts.map +1 -0
  99. package/dist/v1/uploads.js +77 -0
  100. package/dist/v1/uploads.js.map +1 -0
  101. package/dist/v1/usernames.d.ts +35 -0
  102. package/dist/v1/usernames.d.ts.map +1 -0
  103. package/dist/v1/usernames.js +67 -0
  104. package/dist/v1/usernames.js.map +1 -0
  105. package/dist/v1/videoPricing.d.ts +70 -0
  106. package/dist/v1/videoPricing.d.ts.map +1 -0
  107. package/dist/v1/videoPricing.js +131 -0
  108. package/dist/v1/videoPricing.js.map +1 -0
  109. package/dist/v1/workflows.d.ts +201 -0
  110. package/dist/v1/workflows.d.ts.map +1 -0
  111. package/dist/v1/workflows.js +104 -0
  112. package/dist/v1/workflows.js.map +1 -0
  113. package/package.json +34 -0
@@ -0,0 +1,279 @@
1
+ import { z } from 'zod';
2
+ import { type VideoResolution } from './videoPricing.js';
3
+ export declare const STUDIO_MODES: readonly ["video", "image"];
4
+ export type StudioMode = (typeof STUDIO_MODES)[number];
5
+ export declare const STUDIO_RESOLUTIONS: readonly ["0.5k", "1k", "2k", "4k"];
6
+ export type StudioResolution = (typeof STUDIO_RESOLUTIONS)[number];
7
+ export declare const STUDIO_RATIOS: readonly ["1:1", "3:4", "4:5", "9:16", "16:9"];
8
+ export type StudioRatio = (typeof STUDIO_RATIOS)[number];
9
+ export declare const VIDEO_STUDIO_RATIOS: readonly StudioRatio[];
10
+ export declare const IMAGE_STUDIO_RESOLUTIONS: readonly StudioResolution[];
11
+ /**
12
+ * The renderers a caller may pick, by the name they are offered under.
13
+ *
14
+ * Two of these ids spell the same string as a character arch because they name the same renderer.
15
+ * They are not the same thing: an arch is a payload compiled inside a `.char` at build time, and a
16
+ * model id is a choice made per run. Nothing reads one as the other.
17
+ */
18
+ export declare const STUDIO_MODELS: readonly ["flux2-klein", "krea3", "flux3", "minimax-h3", "seedance25"];
19
+ export type StudioModel = (typeof STUDIO_MODELS)[number];
20
+ export declare const DEFAULT_MODEL_FOR: Record<StudioMode, StudioModel>;
21
+ export type StudioModelSpec = {
22
+ mode: StudioMode;
23
+ label: string;
24
+ ratios: readonly StudioRatio[];
25
+ resolutions: readonly StudioResolution[];
26
+ /** Whether it refuses a prompt with no reference image, so the dock can say why it is greyed. */
27
+ needsCharacter: boolean;
28
+ };
29
+ /**
30
+ * What each renderer will actually serve.
31
+ *
32
+ * Measured against each supplier's own schema rather than assumed, because a tier offered here and
33
+ * refused there is a run held for credits and then rejected. Krea stops at 2K because its schema
34
+ * caps a request at 4,220,160 pixels of area; Seedance stops at 2K because 1080p is its top tier;
35
+ * Flux 3 sells every tier our card does, priced per megapixel from the rate its pricing API reports
36
+ * rather than the single 1K figure its model page shows.
37
+ */
38
+ export declare const STUDIO_MODEL_SPECS: Record<StudioModel, StudioModelSpec>;
39
+ /** The models offered for a mode, in the order they are listed. */
40
+ export declare const modelsFor: (mode: StudioMode) => readonly StudioModel[];
41
+ export declare const ratiosFor: (mode: StudioMode, model?: StudioModel) => readonly StudioRatio[];
42
+ export declare const resolutionsFor: (mode: StudioMode, model?: StudioModel) => readonly StudioResolution[];
43
+ export declare const IMAGE_MICRO_BY_RESOLUTION: Record<StudioResolution, number>;
44
+ export declare const CAST_IMAGE_MICRO_BY_RESOLUTION: Record<StudioResolution, number>;
45
+ /**
46
+ * The card, per renderer.
47
+ *
48
+ * Per model rather than per mode because the suppliers do not price alike: Krea bills the output
49
+ * and every reference by the megapixel, so one tier step more than triples it, while Flux 3 bills
50
+ * one flat figure however many references it is sent. A single column would either lose money on
51
+ * one of them or overcharge for the other. `pricing/imageCost.ts` recomputes every cell from the
52
+ * supplier rates in a test, so the card and the cost cannot drift.
53
+ */
54
+ export declare const IMAGE_CARD: Record<StudioModel, {
55
+ plain: Partial<Record<StudioResolution, number>>;
56
+ cast: Partial<Record<StudioResolution, number>>;
57
+ }>;
58
+ /** Micro-credits per second of output, per renderer. */
59
+ export declare const VIDEO_CARD: Record<StudioModel, Partial<Record<VideoResolution, number>>>;
60
+ /** The flat price of one image, in micro-credits. */
61
+ export declare function imageRunMicro(model: StudioModel, resolution: StudioResolution, hasCharacter: boolean): number;
62
+ export declare const IMAGE_LONG_EDGE: Record<StudioResolution, number>;
63
+ export declare const VIDEO_RESOLUTION_FOR: Record<StudioResolution, VideoResolution>;
64
+ /** Width and height for an image at this tier and shape. */
65
+ export declare function imageDimensions(resolution: StudioResolution, ratio: StudioRatio): {
66
+ width: number;
67
+ height: number;
68
+ };
69
+ export type StudioQuote = {
70
+ mode: StudioMode;
71
+ resolution: StudioResolution;
72
+ seconds?: number | undefined;
73
+ hasCharacter: boolean;
74
+ /** Which renderer this is quoted for; the mode's default when the caller did not choose. */
75
+ model?: StudioModel | undefined;
76
+ };
77
+ /** What one generate costs, in micro-credits. The same function the server charges by. */
78
+ export declare function studioRunMicro(quote: StudioQuote): number;
79
+ export declare const studioRunCredits: (quote: StudioQuote) => number;
80
+ export declare const castSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
81
+ kind: z.ZodLiteral<"own">;
82
+ characterId: z.ZodUUID;
83
+ }, z.core.$strip>, z.ZodObject<{
84
+ kind: z.ZodLiteral<"community">;
85
+ slug: z.ZodString;
86
+ }, z.core.$strip>], "kind">;
87
+ export declare const MAX_CAST = 4;
88
+ export declare const MAX_CAST_FOR: Record<StudioMode, number>;
89
+ /** Whether two casts name the same character. */
90
+ export declare const sameCast: (a: Cast | null | undefined, b: Cast | null | undefined) => boolean;
91
+ export declare const generateBodySchema: z.ZodPipe<z.ZodObject<{
92
+ mode: z.ZodEnum<{
93
+ image: "image";
94
+ video: "video";
95
+ }>;
96
+ prompt: z.ZodString;
97
+ ratio: z.ZodEnum<{
98
+ "16:9": "16:9";
99
+ "1:1": "1:1";
100
+ "3:4": "3:4";
101
+ "9:16": "9:16";
102
+ "4:5": "4:5";
103
+ }>;
104
+ resolution: z.ZodEnum<{
105
+ "0.5k": "0.5k";
106
+ "1k": "1k";
107
+ "2k": "2k";
108
+ "4k": "4k";
109
+ }>;
110
+ seconds: z.ZodOptional<z.ZodNumber>;
111
+ model: z.ZodOptional<z.ZodEnum<{
112
+ "flux2-klein": "flux2-klein";
113
+ krea3: "krea3";
114
+ flux3: "flux3";
115
+ "minimax-h3": "minimax-h3";
116
+ seedance25: "seedance25";
117
+ }>>;
118
+ casts: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
119
+ kind: z.ZodLiteral<"own">;
120
+ characterId: z.ZodUUID;
121
+ }, z.core.$strip>, z.ZodObject<{
122
+ kind: z.ZodLiteral<"community">;
123
+ slug: z.ZodString;
124
+ }, z.core.$strip>], "kind">>>;
125
+ cast: z.ZodDefault<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
126
+ kind: z.ZodLiteral<"own">;
127
+ characterId: z.ZodUUID;
128
+ }, z.core.$strip>, z.ZodObject<{
129
+ kind: z.ZodLiteral<"community">;
130
+ slug: z.ZodString;
131
+ }, z.core.$strip>], "kind">>>;
132
+ continueFrom: z.ZodDefault<z.ZodNullable<z.ZodUUID>>;
133
+ reference: z.ZodDefault<z.ZodNullable<z.ZodObject<{
134
+ key: z.ZodString;
135
+ kind: z.ZodEnum<{
136
+ image: "image";
137
+ video: "video";
138
+ }>;
139
+ name: z.ZodDefault<z.ZodString>;
140
+ seconds: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
141
+ }, z.core.$strip>>>;
142
+ sessionId: z.ZodOptional<z.ZodUUID>;
143
+ }, z.core.$strip>, z.ZodTransform<{
144
+ casts: ({
145
+ kind: "own";
146
+ characterId: string;
147
+ } | {
148
+ kind: "community";
149
+ slug: string;
150
+ })[];
151
+ mode: "image" | "video";
152
+ prompt: string;
153
+ ratio: "16:9" | "1:1" | "3:4" | "9:16" | "4:5";
154
+ resolution: "0.5k" | "1k" | "2k" | "4k";
155
+ continueFrom: string | null;
156
+ reference: {
157
+ key: string;
158
+ kind: "image" | "video";
159
+ name: string;
160
+ seconds: number | null;
161
+ } | null;
162
+ seconds?: number | undefined;
163
+ model?: "flux2-klein" | "krea3" | "flux3" | "minimax-h3" | "seedance25" | undefined;
164
+ sessionId?: string | undefined;
165
+ }, {
166
+ mode: "image" | "video";
167
+ prompt: string;
168
+ ratio: "16:9" | "1:1" | "3:4" | "9:16" | "4:5";
169
+ resolution: "0.5k" | "1k" | "2k" | "4k";
170
+ casts: ({
171
+ kind: "own";
172
+ characterId: string;
173
+ } | {
174
+ kind: "community";
175
+ slug: string;
176
+ })[];
177
+ cast: {
178
+ kind: "own";
179
+ characterId: string;
180
+ } | {
181
+ kind: "community";
182
+ slug: string;
183
+ } | null;
184
+ continueFrom: string | null;
185
+ reference: {
186
+ key: string;
187
+ kind: "image" | "video";
188
+ name: string;
189
+ seconds: number | null;
190
+ } | null;
191
+ seconds?: number | undefined;
192
+ model?: "flux2-klein" | "krea3" | "flux3" | "minimax-h3" | "seedance25" | undefined;
193
+ sessionId?: string | undefined;
194
+ }>>;
195
+ export declare const generateResponseSchema: z.ZodObject<{
196
+ runId: z.ZodUUID;
197
+ sessionId: z.ZodNullable<z.ZodUUID>;
198
+ credits: z.ZodNumber;
199
+ }, z.core.$strip>;
200
+ export declare const studioSettingsSchema: z.ZodObject<{
201
+ mode: z.ZodEnum<{
202
+ image: "image";
203
+ video: "video";
204
+ }>;
205
+ prompt: z.ZodString;
206
+ ratio: z.ZodEnum<{
207
+ "16:9": "16:9";
208
+ "1:1": "1:1";
209
+ "3:4": "3:4";
210
+ "9:16": "9:16";
211
+ "4:5": "4:5";
212
+ }>;
213
+ resolution: z.ZodEnum<{
214
+ "0.5k": "0.5k";
215
+ "1k": "1k";
216
+ "2k": "2k";
217
+ "4k": "4k";
218
+ }>;
219
+ seconds: z.ZodNullable<z.ZodNumber>;
220
+ model: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
221
+ "flux2-klein": "flux2-klein";
222
+ krea3: "krea3";
223
+ flux3: "flux3";
224
+ "minimax-h3": "minimax-h3";
225
+ seedance25: "seedance25";
226
+ }>>>;
227
+ characterName: z.ZodNullable<z.ZodString>;
228
+ cast: z.ZodDefault<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
229
+ kind: z.ZodLiteral<"own">;
230
+ characterId: z.ZodUUID;
231
+ }, z.core.$strip>, z.ZodObject<{
232
+ kind: z.ZodLiteral<"community">;
233
+ slug: z.ZodString;
234
+ }, z.core.$strip>], "kind">>>;
235
+ characterNames: z.ZodDefault<z.ZodArray<z.ZodString>>;
236
+ casts: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
237
+ kind: z.ZodLiteral<"own">;
238
+ characterId: z.ZodUUID;
239
+ }, z.core.$strip>, z.ZodObject<{
240
+ kind: z.ZodLiteral<"community">;
241
+ slug: z.ZodString;
242
+ }, z.core.$strip>], "kind">>>;
243
+ continueFrom: z.ZodDefault<z.ZodNullable<z.ZodUUID>>;
244
+ reference: z.ZodDefault<z.ZodNullable<z.ZodObject<{
245
+ key: z.ZodString;
246
+ kind: z.ZodEnum<{
247
+ image: "image";
248
+ video: "video";
249
+ }>;
250
+ name: z.ZodString;
251
+ seconds: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
252
+ }, z.core.$strip>>>;
253
+ }, z.core.$strip>;
254
+ /** The characters a run was made with, whether it was recorded before or after `casts`. */
255
+ export declare function settingsCasts(settings: StudioSettings): Cast[];
256
+ /** The names of those characters, in the same order. */
257
+ export declare function settingsNames(settings: StudioSettings): string[];
258
+ export declare const communityCharacterSchema: z.ZodObject<{
259
+ slug: z.ZodString;
260
+ name: z.ZodString;
261
+ summary: z.ZodString;
262
+ archs: z.ZodArray<z.ZodString>;
263
+ coverUrl: z.ZodNullable<z.ZodURL>;
264
+ }, z.core.$strip>;
265
+ export declare const communityCharacterListSchema: z.ZodObject<{
266
+ items: z.ZodArray<z.ZodObject<{
267
+ slug: z.ZodString;
268
+ name: z.ZodString;
269
+ summary: z.ZodString;
270
+ archs: z.ZodArray<z.ZodString>;
271
+ coverUrl: z.ZodNullable<z.ZodURL>;
272
+ }, z.core.$strip>>;
273
+ }, z.core.$strip>;
274
+ export type GenerateBody = z.input<typeof generateBodySchema>;
275
+ export type GenerateResponse = z.infer<typeof generateResponseSchema>;
276
+ export type StudioSettings = z.infer<typeof studioSettingsSchema>;
277
+ export type Cast = z.infer<typeof castSchema>;
278
+ export type CommunityCharacter = z.infer<typeof communityCharacterSchema>;
279
+ //# sourceMappingURL=studio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"studio.d.ts","sourceRoot":"","sources":["../../src/v1/studio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAML,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAA;AAK1B,eAAO,MAAM,YAAY,6BAA8B,CAAA;AACvD,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAA;AAEtD,eAAO,MAAM,kBAAkB,qCAAsC,CAAA;AACrE,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAA;AAElE,eAAO,MAAM,aAAa,gDAAiD,CAAA;AAC3E,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAA;AAGxD,eAAO,MAAM,mBAAmB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ICRO_PER_SECOND, billedVideoReferences, videoRunMicro, } from './videoPricing.js';
4
+ // The studio's one-box generate: a prompt, a mode and three presets. The server maps each preset
5
+ // onto a workflow's own fields, so the browser never learns a node id or a width.
6
+ export const STUDIO_MODES = ['video', 'image'];
7
+ export const STUDIO_RESOLUTIONS = ['0.5k', '1k', '2k', '4k'];
8
+ export const STUDIO_RATIOS = ['1:1', '3:4', '4:5', '9:16', '16:9'];
9
+ // MiniMax H3 offers no 4:5, so video leaves it out rather than rounding it to a shape nobody chose.
10
+ export const VIDEO_STUDIO_RATIOS = ['1:1', '3:4', '9:16', '16:9'];
11
+ // An image under a megapixel is billed as a whole one, so 0.5K would cost what 1K costs for less
12
+ // picture. Video keeps it, where 480p really is cheaper.
13
+ export const IMAGE_STUDIO_RESOLUTIONS = ['1k', '2k', '4k'];
14
+ /**
15
+ * The renderers a caller may pick, by the name they are offered under.
16
+ *
17
+ * Two of these ids spell the same string as a character arch because they name the same renderer.
18
+ * They are not the same thing: an arch is a payload compiled inside a `.char` at build time, and a
19
+ * model id is a choice made per run. Nothing reads one as the other.
20
+ */
21
+ export const STUDIO_MODELS = ['flux2-klein', 'krea3', 'flux3', 'minimax-h3', 'seedance25'];
22
+ // What runs when the caller has not chosen, which is what ran before the choice existed.
23
+ export const DEFAULT_MODEL_FOR = {
24
+ image: 'flux2-klein',
25
+ video: 'minimax-h3',
26
+ };
27
+ /**
28
+ * What each renderer will actually serve.
29
+ *
30
+ * Measured against each supplier's own schema rather than assumed, because a tier offered here and
31
+ * refused there is a run held for credits and then rejected. Krea stops at 2K because its schema
32
+ * caps a request at 4,220,160 pixels of area; Seedance stops at 2K because 1080p is its top tier;
33
+ * Flux 3 sells every tier our card does, priced per megapixel from the rate its pricing API reports
34
+ * rather than the single 1K figure its model page shows.
35
+ */
36
+ export const STUDIO_MODEL_SPECS = {
37
+ 'flux2-klein': {
38
+ mode: 'image',
39
+ label: 'FLUX.2 Klein',
40
+ ratios: STUDIO_RATIOS,
41
+ resolutions: IMAGE_STUDIO_RESOLUTIONS,
42
+ needsCharacter: false,
43
+ },
44
+ krea3: {
45
+ mode: 'image',
46
+ label: 'Krea 3',
47
+ ratios: STUDIO_RATIOS,
48
+ resolutions: ['1k', '2k'],
49
+ // `image_urls` is minItems 1 on this endpoint, so there is nothing to send without a character.
50
+ needsCharacter: true,
51
+ },
52
+ flux3: {
53
+ mode: 'image',
54
+ label: 'FLUX.3',
55
+ ratios: STUDIO_RATIOS,
56
+ resolutions: IMAGE_STUDIO_RESOLUTIONS,
57
+ needsCharacter: false,
58
+ },
59
+ 'minimax-h3': {
60
+ mode: 'video',
61
+ label: 'MiniMax H3',
62
+ ratios: VIDEO_STUDIO_RATIOS,
63
+ resolutions: STUDIO_RESOLUTIONS,
64
+ needsCharacter: false,
65
+ },
66
+ seedance25: {
67
+ mode: 'video',
68
+ label: 'Seedance 2.5',
69
+ ratios: VIDEO_STUDIO_RATIOS,
70
+ resolutions: ['0.5k', '1k', '2k'],
71
+ needsCharacter: false,
72
+ },
73
+ };
74
+ /** The models offered for a mode, in the order they are listed. */
75
+ export const modelsFor = (mode) => STUDIO_MODELS.filter((model) => STUDIO_MODEL_SPECS[model].mode === mode);
76
+ // A model from the other mode cannot describe this one, so the default answers for it rather than
77
+ // returning a shape the mode does not offer.
78
+ const specFor = (mode, model) => {
79
+ const spec = model ? STUDIO_MODEL_SPECS[model] : undefined;
80
+ return spec && spec.mode === mode ? spec : STUDIO_MODEL_SPECS[DEFAULT_MODEL_FOR[mode]];
81
+ };
82
+ export const ratiosFor = (mode, model) => specFor(mode, model).ratios;
83
+ export const resolutionsFor = (mode, model) => specFor(mode, model).resolutions;
84
+ // What an image costs a caller: twice the renderer's own rate, the same margin video carries. A
85
+ // cast character is sent as up to four reference images, each billed as a megapixel of input, so it
86
+ // is priced as its own column rather than a flat add-on. The server recomputes both columns from the
87
+ // supplier's rates in a test, so the card and the cost cannot drift.
88
+ export const IMAGE_MICRO_BY_RESOLUTION = {
89
+ '0.5k': 2_000_000,
90
+ '1k': 2_000_000,
91
+ '2k': 5_000_000,
92
+ '4k': 20_000_000,
93
+ };
94
+ export const CAST_IMAGE_MICRO_BY_RESOLUTION = {
95
+ '0.5k': 11_000_000,
96
+ '1k': 11_000_000,
97
+ '2k': 18_000_000,
98
+ '4k': 44_000_000,
99
+ };
100
+ /**
101
+ * The card, per renderer.
102
+ *
103
+ * Per model rather than per mode because the suppliers do not price alike: Krea bills the output
104
+ * and every reference by the megapixel, so one tier step more than triples it, while Flux 3 bills
105
+ * one flat figure however many references it is sent. A single column would either lose money on
106
+ * one of them or overcharge for the other. `pricing/imageCost.ts` recomputes every cell from the
107
+ * supplier rates in a test, so the card and the cost cannot drift.
108
+ */
109
+ export const IMAGE_CARD = {
110
+ 'flux2-klein': { plain: IMAGE_MICRO_BY_RESOLUTION, cast: CAST_IMAGE_MICRO_BY_RESOLUTION },
111
+ // Cast only, so `plain` stays empty rather than carrying a price nothing can be charged at.
112
+ krea3: { plain: {}, cast: { '1k': 10_000_000, '2k': 40_000_000 } },
113
+ // Per megapixel, so its tiers climb steeply: cheapest of the three for a cast at 1K, dearest of
114
+ // them at 4K, where sixteen megapixels are billed at the rate Klein charges for one.
115
+ flux3: {
116
+ plain: { '1k': 9_600_000, '2k': 38_400_000, '4k': 153_600_000 },
117
+ cast: { '1k': 9_600_000, '2k': 38_400_000, '4k': 153_600_000 },
118
+ },
119
+ 'minimax-h3': { plain: {}, cast: {} },
120
+ seedance25: { plain: {}, cast: {} },
121
+ };
122
+ /** Micro-credits per second of output, per renderer. */
123
+ export const VIDEO_CARD = {
124
+ 'flux2-klein': {},
125
+ krea3: {},
126
+ flux3: {},
127
+ 'minimax-h3': VIDEO_MICRO_PER_SECOND,
128
+ // No 4K row: 1080p is this renderer's top tier, and a missing rate is refused rather than guessed.
129
+ seedance25: { '480p': 52_920_000, '768p': 113_520_000, '2K': 279_255_600 },
130
+ };
131
+ /** The flat price of one image, in micro-credits. */
132
+ export function imageRunMicro(model, resolution, hasCharacter) {
133
+ const column = hasCharacter ? IMAGE_CARD[model].cast : IMAGE_CARD[model].plain;
134
+ const micro = column[resolution];
135
+ // An unpriced cell is a shape this renderer was never meant to be offered at, so it is refused
136
+ // here rather than charged at a neighbouring tier's rate.
137
+ if (micro === undefined) {
138
+ throw new Error(`No price for ${model} at ${resolution}${hasCharacter ? ' with a character' : ''}.`);
139
+ }
140
+ return micro;
141
+ }
142
+ // Pixels on the long edge. The short edge follows from the ratio.
143
+ export const IMAGE_LONG_EDGE = {
144
+ '0.5k': 512,
145
+ '1k': 1024,
146
+ '2k': 2048,
147
+ '4k': 4096,
148
+ };
149
+ export const VIDEO_RESOLUTION_FOR = {
150
+ '0.5k': '480p',
151
+ '1k': '768p',
152
+ '2k': '2K',
153
+ '4k': '4K',
154
+ };
155
+ // Latent models need both edges on a 16px grid; anything else is cropped or rejected downstream.
156
+ const onGrid = (px) => Math.max(16, Math.round(px / 16) * 16);
157
+ /** Width and height for an image at this tier and shape. */
158
+ export function imageDimensions(resolution, ratio) {
159
+ const [w, h] = ratio.split(':').map(Number);
160
+ const long = IMAGE_LONG_EDGE[resolution];
161
+ return w >= h
162
+ ? { width: onGrid(long), height: onGrid((long * h) / w) }
163
+ : { width: onGrid((long * w) / h), height: onGrid(long) };
164
+ }
165
+ /** What one generate costs, in micro-credits. The same function the server charges by. */
166
+ export function studioRunMicro(quote) {
167
+ const model = quote.model ?? DEFAULT_MODEL_FOR[quote.mode];
168
+ if (quote.mode === 'image')
169
+ return imageRunMicro(model, quote.resolution, quote.hasCharacter);
170
+ return videoRunMicro({
171
+ resolution: VIDEO_RESOLUTION_FOR[quote.resolution],
172
+ seconds: quote.seconds ?? MIN_VIDEO_SECONDS,
173
+ referenceImages: billedVideoReferences({ uploads: 0, hasCharacter: quote.hasCharacter }),
174
+ }, VIDEO_CARD[model]);
175
+ }
176
+ export const studioRunCredits = (quote) => Math.ceil(studioRunMicro(quote) / MICRO_PER_CREDIT);
177
+ // A community character is named by its gallery slug; the server imports it on first use.
178
+ export const castSchema = z.discriminatedUnion('kind', [
179
+ z.object({ kind: z.literal('own'), characterId: z.uuid() }),
180
+ z.object({ kind: z.literal('community'), slug: z.string().min(1).max(120) }),
181
+ ]);
182
+ // Characters in one shot. Images fit them into FLUX.2 Klein's four reference slots with sheets;
183
+ // video gives each at least two of MiniMax H3's nine.
184
+ export const MAX_CAST = 4;
185
+ export const MAX_CAST_FOR = { image: MAX_CAST, video: MAX_CAST };
186
+ const castKey = (cast) => cast.kind === 'own' ? `own:${cast.characterId}` : `community:${cast.slug}`;
187
+ /** Whether two casts name the same character. */
188
+ export const sameCast = (a, b) => !!a && !!b && castKey(a) === castKey(b);
189
+ export const generateBodySchema = z
190
+ .object({
191
+ mode: z.enum(STUDIO_MODES),
192
+ prompt: z.string().trim().min(1).max(4000),
193
+ ratio: z.enum(STUDIO_RATIOS),
194
+ resolution: z.enum(STUDIO_RESOLUTIONS),
195
+ seconds: z.number().int().min(MIN_VIDEO_SECONDS).max(MAX_VIDEO_SECONDS).optional(),
196
+ // Which renderer to use. Optional, so a Studio that predates the choice still sends a body the
197
+ // server accepts and gets the mode's default.
198
+ model: z.enum(STUDIO_MODELS).optional(),
199
+ // In cast order: the first is Image 1 in the prompt the server writes.
200
+ casts: castSchema.array().max(MAX_CAST).default([]),
201
+ // The single-character form a Studio older than `casts` sends. Read as a one-item list.
202
+ cast: castSchema.nullable().default(null),
203
+ // A finished clip of the caller's whose last frame opens this one, as Image 1.
204
+ continueFrom: z.uuid().nullable().default(null),
205
+ // An uploaded clip or picture the shot should move or pose like. The kind travels with the key
206
+ // because a storage key alone does not say which, and the two are bound into different fields.
207
+ reference: z
208
+ .object({
209
+ key: z.string().min(1),
210
+ kind: z.enum(['image', 'video']),
211
+ // Carried so Edit can put the chip back: a storage key is not a thing to show a caller,
212
+ // and the object URL that previewed the file belonged to the browser that uploaded it.
213
+ name: z.string().min(1).max(200).default('reference'),
214
+ seconds: z.number().int().nullable().default(null),
215
+ })
216
+ .nullable()
217
+ .default(null),
218
+ sessionId: z.uuid().optional(),
219
+ })
220
+ .transform(({ cast, ...body }) => ({
221
+ ...body,
222
+ casts: body.casts.length > 0 ? body.casts : cast ? [cast] : [],
223
+ }))
224
+ .refine((body) => body.casts.length <= MAX_CAST_FOR[body.mode], {
225
+ message: 'Too many characters for this mode.',
226
+ path: ['casts'],
227
+ })
228
+ .refine((body) => new Set(body.casts.map(castKey)).size === body.casts.length, {
229
+ message: 'The same character is cast twice.',
230
+ path: ['casts'],
231
+ })
232
+ .refine((body) => !body.model || STUDIO_MODEL_SPECS[body.model].mode === body.mode, {
233
+ message: 'That model does not make this kind of shot.',
234
+ path: ['model'],
235
+ })
236
+ .refine((body) => ratiosFor(body.mode, body.model).includes(body.ratio), {
237
+ message: 'That shape is not available here.',
238
+ path: ['ratio'],
239
+ })
240
+ .refine((body) => resolutionsFor(body.mode, body.model).includes(body.resolution), {
241
+ message: 'That size is not available here.',
242
+ path: ['resolution'],
243
+ })
244
+ // Krea reads an image and edits it, so with nothing to edit there is no request to send.
245
+ .refine((body) => !body.model || !STUDIO_MODEL_SPECS[body.model].needsCharacter || body.casts.length > 0, { message: 'This model needs a character to work from.', path: ['casts'] })
246
+ .refine((body) => body.continueFrom === null || body.mode === 'video', {
247
+ message: 'Only a video can continue from a clip.',
248
+ path: ['continueFrom'],
249
+ });
250
+ export const generateResponseSchema = z.object({
251
+ runId: z.uuid(),
252
+ sessionId: z.uuid().nullable(),
253
+ credits: z.number().int().nonnegative(),
254
+ });
255
+ // What the studio recorded about a run it started, read back by the run list.
256
+ export const studioSettingsSchema = z.object({
257
+ mode: z.enum(STUDIO_MODES),
258
+ prompt: z.string(),
259
+ ratio: z.enum(STUDIO_RATIOS),
260
+ resolution: z.enum(STUDIO_RESOLUTIONS),
261
+ seconds: z.number().int().nullable(),
262
+ // Which renderer the caller chose, so Run again and Edit prompt use the same one. Null for a run
263
+ // recorded before the choice existed, which reads as the mode's default.
264
+ model: z.enum(STUDIO_MODELS).nullable().default(null),
265
+ // The first character, kept for runs recorded before `casts`.
266
+ characterName: z.string().nullable(),
267
+ cast: castSchema.nullable().default(null),
268
+ // Every character cast, in order, so Run again and Edit prompt can cast the same ones.
269
+ characterNames: z.array(z.string()).default([]),
270
+ casts: castSchema.array().default([]),
271
+ // The clip whose last frame this one opened on, or null for a fresh shot.
272
+ continueFrom: z.uuid().nullable().default(null),
273
+ // The reference attached to this run, so Edit can put the same one back. The name travels with
274
+ // the key because a storage key is not something to show a caller, and the object URL that
275
+ // previewed it belonged to the browser that uploaded it.
276
+ reference: z
277
+ .object({
278
+ key: z.string().min(1),
279
+ kind: z.enum(['image', 'video']),
280
+ name: z.string(),
281
+ seconds: z.number().int().nullable().default(null),
282
+ })
283
+ .nullable()
284
+ .default(null),
285
+ });
286
+ /** The characters a run was made with, whether it was recorded before or after `casts`. */
287
+ export function settingsCasts(settings) {
288
+ if (settings.casts.length > 0)
289
+ return settings.casts;
290
+ return settings.cast ? [settings.cast] : [];
291
+ }
292
+ /** The names of those characters, in the same order. */
293
+ export function settingsNames(settings) {
294
+ if (settings.characterNames.length > 0)
295
+ return settings.characterNames;
296
+ return settings.characterName ? [settings.characterName] : [];
297
+ }
298
+ // A published character anyone may cast. `coverUrl` is on the media gateway's public route.
299
+ export const communityCharacterSchema = z.object({
300
+ slug: z.string(),
301
+ name: z.string(),
302
+ summary: z.string(),
303
+ archs: z.array(z.string()),
304
+ coverUrl: z.url().nullable(),
305
+ });
306
+ export const communityCharacterListSchema = z.object({
307
+ items: z.array(communityCharacterSchema),
308
+ });
309
+ //# sourceMappingURL=studio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"studio.js","sourceRoot":"","sources":["../../src/v1/studio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,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F,MAAM,UAAU,aAAa,CAAC,QAAwB;IACpD,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,QAAQ,CAAC,KAAK,CAAA;IACpD,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;AAC7C,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,aAAa,CAAC,QAAwB;IACpD,IAAI,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,QAAQ,CAAC,cAAc,CAAA;IACtE,OAAO,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;AAC/D,CAAC;AAED,4FAA4F;AAC5F,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC;CACzC,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export declare const termsAcceptanceSchema: z.ZodObject<{
3
+ version: z.ZodNullable<z.ZodString>;
4
+ acceptedAt: z.ZodNullable<z.ZodISODateTime>;
5
+ previousVersion: z.ZodNullable<z.ZodString>;
6
+ }, z.core.$strip>;
7
+ export type TermsAcceptance = z.infer<typeof termsAcceptanceSchema>;
8
+ //# sourceMappingURL=terms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terms.d.ts","sourceRoot":"","sources":["../../src/v1/terms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAOvB,eAAO,MAAM,qBAAqB;;;;iBAOhC,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ // What this service has recorded about someone agreeing to the Terms of Service.
3
+ //
4
+ // Every field is written server-side from the verified session and the server's own TERMS_VERSION.
5
+ // Nothing here is ever read from a request body, so a client cannot backdate an acceptance or
6
+ // claim one that did not happen.
7
+ export const termsAcceptanceSchema = z.object({
8
+ // The Terms version on record, as an ISO date. Null before anyone has signed in through the UI.
9
+ version: z.string().nullable(),
10
+ acceptedAt: z.iso.datetime().nullable(),
11
+ // The version this call replaced, so the dashboard can say the Terms changed. Null on a first
12
+ // acceptance, and on every later call that changed nothing.
13
+ previousVersion: z.string().nullable(),
14
+ });
15
+ //# sourceMappingURL=terms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terms.js","sourceRoot":"","sources":["../../src/v1/terms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,iFAAiF;AACjF,EAAE;AACF,mGAAmG;AACnG,8FAA8F;AAC9F,iCAAiC;AACjC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,gGAAgG;IAChG,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACvC,8FAA8F;IAC9F,4DAA4D;IAC5D,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAA"}