@clipwright/core 0.66.0 → 0.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/ads.d.ts +4 -0
- package/dist/ads.js +4 -1
- package/dist/assets.d.ts +25 -1
- package/dist/assets.js +19 -7
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +1 -0
- package/dist/faceless-public.d.ts +1 -0
- package/dist/film-cut.js +2 -1
- package/dist/film-guide.d.ts +4 -0
- package/dist/film-guide.js +5 -0
- package/dist/generations.d.ts +5 -1
- package/dist/generations.js +23 -6
- package/dist/mascots.d.ts +6 -0
- package/dist/mascots.js +15 -0
- package/dist/own-agent-price.d.ts +3 -0
- package/dist/own-agent-price.js +3 -0
- package/dist/own-agent-runs.d.ts +1 -0
- package/dist/own-agent-runs.js +2 -1
- package/dist/prices.js +6 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @clipwright/core
|
|
2
2
|
|
|
3
3
|
Zod schemas and the shared request/response contract of the
|
|
4
|
-
[Clipwright](https://clipwright.io/?ref=npm) UGC and faceless video API. Published because
|
|
4
|
+
[Clipwright™](https://clipwright.io/?ref=npm) UGC and faceless video API. Published because
|
|
5
5
|
the SDK and the MCP server depend on it; the API validates against these same
|
|
6
6
|
schemas, so they are the contract rather than a copy of it.
|
|
7
7
|
|
package/dist/ads.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export type AdBrief = z.infer<typeof adBrief>;
|
|
|
17
17
|
export declare const adSlot: z.ZodObject<{
|
|
18
18
|
id: z.ZodString;
|
|
19
19
|
shot: z.ZodString;
|
|
20
|
+
people_only: z.ZodOptional<z.ZodBoolean>;
|
|
20
21
|
}, z.core.$strict>;
|
|
21
22
|
export type AdSlot = z.infer<typeof adSlot>;
|
|
22
23
|
export declare const createAdInput: z.ZodObject<{
|
|
@@ -29,6 +30,7 @@ export declare const createAdInput: z.ZodObject<{
|
|
|
29
30
|
slots: z.ZodArray<z.ZodObject<{
|
|
30
31
|
id: z.ZodString;
|
|
31
32
|
shot: z.ZodString;
|
|
33
|
+
people_only: z.ZodOptional<z.ZodBoolean>;
|
|
32
34
|
}, z.core.$strict>>;
|
|
33
35
|
}, z.core.$strict>;
|
|
34
36
|
export type CreateAdInput = z.infer<typeof createAdInput>;
|
|
@@ -42,6 +44,7 @@ export declare const updateAdInput: z.ZodObject<{
|
|
|
42
44
|
slots: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
43
45
|
id: z.ZodString;
|
|
44
46
|
shot: z.ZodString;
|
|
47
|
+
people_only: z.ZodOptional<z.ZodBoolean>;
|
|
45
48
|
}, z.core.$strict>>>;
|
|
46
49
|
}, z.core.$strict>;
|
|
47
50
|
export type UpdateAdInput = z.infer<typeof updateAdInput>;
|
|
@@ -123,6 +126,7 @@ export declare const adRecord: z.ZodObject<{
|
|
|
123
126
|
slots: z.ZodArray<z.ZodObject<{
|
|
124
127
|
id: z.ZodString;
|
|
125
128
|
shot: z.ZodString;
|
|
129
|
+
people_only: z.ZodBoolean;
|
|
126
130
|
state: z.ZodEnum<{
|
|
127
131
|
checking: "checking";
|
|
128
132
|
failed: "failed";
|
package/dist/ads.js
CHANGED
|
@@ -20,6 +20,9 @@ export const adBrief = z.strictObject({
|
|
|
20
20
|
export const adSlot = z.strictObject({
|
|
21
21
|
id: adSlotId,
|
|
22
22
|
shot: z.string().trim().min(1).max(500).describe("What the shot shows, in a line: its action and the spoken line it carries"),
|
|
23
|
+
people_only: z.boolean().optional().describe("Only people in this shot, with no product, label or detail anywhere in it (a face for " +
|
|
24
|
+
"the hook, a person talking): a take made with generate_video goes into the edit without check_take. Once a slot has a check, this " +
|
|
25
|
+
"cannot be turned on"),
|
|
23
26
|
});
|
|
24
27
|
const slots = z.array(adSlot).min(1).max(AD_MAX_SLOTS)
|
|
25
28
|
.refine(list => new Set(list.map(slot => slot.id)).size === list.length, "each slot id is used once")
|
|
@@ -48,7 +51,7 @@ export const adRecord = z.strictObject({
|
|
|
48
51
|
ad_id: adId,
|
|
49
52
|
brief: adBrief,
|
|
50
53
|
guide_version: z.string(),
|
|
51
|
-
slots: z.array(z.strictObject({ id: adSlotId, shot: z.string(), state: z.enum(AD_SLOT_STATES), takes: z.array(adTake) })),
|
|
54
|
+
slots: z.array(z.strictObject({ id: adSlotId, shot: z.string(), people_only: z.boolean(), state: z.enum(AD_SLOT_STATES), takes: z.array(adTake) })),
|
|
52
55
|
edits: z.array(z.strictObject({ run_id: runId, state: z.string(), credits_charged: z.number().int().nonnegative().nullable(), created_at: z.string() })),
|
|
53
56
|
next: diyNext.nullable(),
|
|
54
57
|
blocked: diyBlocked.nullable(),
|
package/dist/assets.d.ts
CHANGED
|
@@ -23,8 +23,11 @@ export declare const ASSET_BYTES_ROUTE_VIDEO_MAX_BYTES: number;
|
|
|
23
23
|
export declare const ASSET_PROCESSING_SECONDS = 600;
|
|
24
24
|
export declare const ASSET_VIDEO_DOWNLOAD_DEADLINE_MS = 90000;
|
|
25
25
|
export declare const ASSET_INGEST_TASK_MAX_DURATION_SECONDS = 300;
|
|
26
|
-
export declare const
|
|
26
|
+
export declare const ASSET_PUT_VIDEO_TYPES: readonly ["video/mp4", "video/quicktime", "video/webm"];
|
|
27
|
+
export declare const ASSET_PUT_MEDIA_TYPES: readonly ["image/png", "image/jpeg", "video/mp4", "video/quicktime", "video/webm"];
|
|
27
28
|
export type AssetPutMediaType = (typeof ASSET_PUT_MEDIA_TYPES)[number];
|
|
29
|
+
export declare const isAssetPutVideoType: (mediaType: string) => boolean;
|
|
30
|
+
export declare const assetPutStoredType: (mediaType: AssetPutMediaType) => "image/png" | "image/jpeg" | "video/mp4";
|
|
28
31
|
export declare const INGEST_ASSET_MEDIA_TASK = "ingest-asset-media";
|
|
29
32
|
export declare const ASSET_PREVIEW_TASK = "make-asset-preview";
|
|
30
33
|
export declare const ASSET_PREVIEW_MAX_SIDE = 512;
|
|
@@ -47,6 +50,8 @@ export declare const assetPutSource: z.ZodObject<{
|
|
|
47
50
|
"image/jpeg": "image/jpeg";
|
|
48
51
|
"image/png": "image/png";
|
|
49
52
|
"video/mp4": "video/mp4";
|
|
53
|
+
"video/quicktime": "video/quicktime";
|
|
54
|
+
"video/webm": "video/webm";
|
|
50
55
|
}>;
|
|
51
56
|
bytes: z.ZodNumber;
|
|
52
57
|
sha256: z.ZodString;
|
|
@@ -73,6 +78,8 @@ export declare const assetSource: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
73
78
|
"image/jpeg": "image/jpeg";
|
|
74
79
|
"image/png": "image/png";
|
|
75
80
|
"video/mp4": "video/mp4";
|
|
81
|
+
"video/quicktime": "video/quicktime";
|
|
82
|
+
"video/webm": "video/webm";
|
|
76
83
|
}>;
|
|
77
84
|
bytes: z.ZodNumber;
|
|
78
85
|
sha256: z.ZodString;
|
|
@@ -103,6 +110,8 @@ export declare const createAssetRequest: z.ZodObject<{
|
|
|
103
110
|
"image/jpeg": "image/jpeg";
|
|
104
111
|
"image/png": "image/png";
|
|
105
112
|
"video/mp4": "video/mp4";
|
|
113
|
+
"video/quicktime": "video/quicktime";
|
|
114
|
+
"video/webm": "video/webm";
|
|
106
115
|
}>;
|
|
107
116
|
bytes: z.ZodNumber;
|
|
108
117
|
sha256: z.ZodString;
|
|
@@ -215,6 +224,7 @@ export declare const asset: z.ZodObject<{
|
|
|
215
224
|
}, z.core.$strict>>;
|
|
216
225
|
url: z.ZodString;
|
|
217
226
|
preview_url: z.ZodOptional<z.ZodString>;
|
|
227
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
218
228
|
expires_at: z.ZodString;
|
|
219
229
|
created_at: z.ZodString;
|
|
220
230
|
updated_at: z.ZodString;
|
|
@@ -227,6 +237,8 @@ export declare const assetPutUpload: z.ZodObject<{
|
|
|
227
237
|
"image/jpeg": "image/jpeg";
|
|
228
238
|
"image/png": "image/png";
|
|
229
239
|
"video/mp4": "video/mp4";
|
|
240
|
+
"video/quicktime": "video/quicktime";
|
|
241
|
+
"video/webm": "video/webm";
|
|
230
242
|
}>;
|
|
231
243
|
"content-length": z.ZodString;
|
|
232
244
|
}, z.core.$strict>;
|
|
@@ -276,6 +288,8 @@ export declare const pendingAsset: z.ZodObject<{
|
|
|
276
288
|
"image/jpeg": "image/jpeg";
|
|
277
289
|
"image/png": "image/png";
|
|
278
290
|
"video/mp4": "video/mp4";
|
|
291
|
+
"video/quicktime": "video/quicktime";
|
|
292
|
+
"video/webm": "video/webm";
|
|
279
293
|
}>;
|
|
280
294
|
"content-length": z.ZodString;
|
|
281
295
|
}, z.core.$strict>;
|
|
@@ -339,6 +353,7 @@ export declare const assetItem: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
339
353
|
}, z.core.$strict>>;
|
|
340
354
|
url: z.ZodString;
|
|
341
355
|
preview_url: z.ZodOptional<z.ZodString>;
|
|
356
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
342
357
|
expires_at: z.ZodString;
|
|
343
358
|
created_at: z.ZodString;
|
|
344
359
|
updated_at: z.ZodString;
|
|
@@ -384,6 +399,8 @@ export declare const assetItem: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
384
399
|
"image/jpeg": "image/jpeg";
|
|
385
400
|
"image/png": "image/png";
|
|
386
401
|
"video/mp4": "video/mp4";
|
|
402
|
+
"video/quicktime": "video/quicktime";
|
|
403
|
+
"video/webm": "video/webm";
|
|
387
404
|
}>;
|
|
388
405
|
"content-length": z.ZodString;
|
|
389
406
|
}, z.core.$strict>;
|
|
@@ -472,6 +489,7 @@ export declare const assetList: z.ZodObject<{
|
|
|
472
489
|
}, z.core.$strict>>;
|
|
473
490
|
url: z.ZodString;
|
|
474
491
|
preview_url: z.ZodOptional<z.ZodString>;
|
|
492
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
475
493
|
expires_at: z.ZodString;
|
|
476
494
|
created_at: z.ZodString;
|
|
477
495
|
updated_at: z.ZodString;
|
|
@@ -518,6 +536,8 @@ export declare const assetList: z.ZodObject<{
|
|
|
518
536
|
"image/jpeg": "image/jpeg";
|
|
519
537
|
"image/png": "image/png";
|
|
520
538
|
"video/mp4": "video/mp4";
|
|
539
|
+
"video/quicktime": "video/quicktime";
|
|
540
|
+
"video/webm": "video/webm";
|
|
521
541
|
}>;
|
|
522
542
|
"content-length": z.ZodString;
|
|
523
543
|
}, z.core.$strict>;
|
|
@@ -562,6 +582,7 @@ export declare const assetRead: z.ZodObject<{
|
|
|
562
582
|
}, z.core.$strict>>;
|
|
563
583
|
url: z.ZodString;
|
|
564
584
|
preview_url: z.ZodOptional<z.ZodString>;
|
|
585
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
565
586
|
expires_at: z.ZodString;
|
|
566
587
|
created_at: z.ZodString;
|
|
567
588
|
updated_at: z.ZodString;
|
|
@@ -622,6 +643,7 @@ export declare const assetItemRead: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
622
643
|
}, z.core.$strict>>;
|
|
623
644
|
url: z.ZodString;
|
|
624
645
|
preview_url: z.ZodOptional<z.ZodString>;
|
|
646
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
625
647
|
expires_at: z.ZodString;
|
|
626
648
|
created_at: z.ZodString;
|
|
627
649
|
updated_at: z.ZodString;
|
|
@@ -683,6 +705,7 @@ export declare const assetListRead: z.ZodObject<{
|
|
|
683
705
|
}, z.core.$strict>>;
|
|
684
706
|
url: z.ZodString;
|
|
685
707
|
preview_url: z.ZodOptional<z.ZodString>;
|
|
708
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
686
709
|
expires_at: z.ZodString;
|
|
687
710
|
created_at: z.ZodString;
|
|
688
711
|
updated_at: z.ZodString;
|
|
@@ -722,6 +745,7 @@ export declare const assetListRead: z.ZodObject<{
|
|
|
722
745
|
}, z.core.$loose>;
|
|
723
746
|
}, z.core.$loose>;
|
|
724
747
|
export type AssetListRead = z.infer<typeof assetListRead>;
|
|
748
|
+
export declare function transcodedClipWarning(from: string): string;
|
|
725
749
|
export declare function assetKey(accountId: string, id: string, sha256: string, mediaType: AssetMediaType): string;
|
|
726
750
|
export declare function assetCapMessage(cap: "count" | "bytes", usage: {
|
|
727
751
|
count: number;
|
package/dist/assets.js
CHANGED
|
@@ -26,7 +26,10 @@ export const ASSET_BYTES_ROUTE_VIDEO_MAX_BYTES = 32 * 1024 * 1024;
|
|
|
26
26
|
export const ASSET_PROCESSING_SECONDS = 600;
|
|
27
27
|
export const ASSET_VIDEO_DOWNLOAD_DEADLINE_MS = 90_000;
|
|
28
28
|
export const ASSET_INGEST_TASK_MAX_DURATION_SECONDS = 300;
|
|
29
|
-
export const
|
|
29
|
+
export const ASSET_PUT_VIDEO_TYPES = ["video/mp4", "video/quicktime", "video/webm"];
|
|
30
|
+
export const ASSET_PUT_MEDIA_TYPES = ["image/png", "image/jpeg", ...ASSET_PUT_VIDEO_TYPES];
|
|
31
|
+
export const isAssetPutVideoType = (mediaType) => ASSET_PUT_VIDEO_TYPES.includes(mediaType);
|
|
32
|
+
export const assetPutStoredType = (mediaType) => mediaType === "image/png" || mediaType === "image/jpeg" ? mediaType : "video/mp4";
|
|
30
33
|
export const INGEST_ASSET_MEDIA_TASK = "ingest-asset-media";
|
|
31
34
|
export const ASSET_PREVIEW_TASK = "make-asset-preview";
|
|
32
35
|
export const ASSET_PREVIEW_MAX_SIDE = 512;
|
|
@@ -46,7 +49,7 @@ export const assetPutSource = z.strictObject({
|
|
|
46
49
|
media_type: z.enum(ASSET_PUT_MEDIA_TYPES),
|
|
47
50
|
bytes: z.number().int().positive().max(ASSET_VIDEO_MAX_BYTES),
|
|
48
51
|
sha256: sha256Hex,
|
|
49
|
-
}).refine((put) => put.media_type
|
|
52
|
+
}).refine((put) => isAssetPutVideoType(put.media_type) || put.bytes <= UPLOAD_MAX_BYTES, `a picture is at most ${UPLOAD_MAX_BYTES} bytes`);
|
|
50
53
|
export const assetSource = z.union([
|
|
51
54
|
z.strictObject({ run_id: runId }),
|
|
52
55
|
z.strictObject({ upload_id: uploadId }),
|
|
@@ -106,6 +109,7 @@ export const asset = z.strictObject({
|
|
|
106
109
|
mascot: mascotSummary.optional(),
|
|
107
110
|
url: z.string().url().startsWith("https://"),
|
|
108
111
|
preview_url: z.string().url().startsWith("https://").optional(),
|
|
112
|
+
warnings: z.array(z.string().min(1)).optional(),
|
|
109
113
|
expires_at: z.string().datetime(),
|
|
110
114
|
created_at: z.string().datetime(),
|
|
111
115
|
updated_at: z.string().datetime(),
|
|
@@ -171,6 +175,11 @@ export const assetItemRead = z.union([assetRead, pendingAssetRead]);
|
|
|
171
175
|
export const assetListRead = assetList.extend({
|
|
172
176
|
assets: z.array(assetRead), pending: z.array(pendingAssetRead).optional(), usage: assetUsage.loose(),
|
|
173
177
|
}).loose();
|
|
178
|
+
export function transcodedClipWarning(from) {
|
|
179
|
+
const sdr = from.startsWith("HDR ") ? ", tone-mapped from HDR to SDR BT.709" : "";
|
|
180
|
+
return `the clip was ${from}; it was re-encoded to an 8-bit H.264 MP4 (yuv420p${sdr}) when it was saved, at its own size and frame ` +
|
|
181
|
+
"rate, so its bytes, content_digest, codec and pix_fmt are those of the re-encoded file";
|
|
182
|
+
}
|
|
174
183
|
export function assetKey(accountId, id, sha256, mediaType) {
|
|
175
184
|
const extension = { "image/png": "png", "image/jpeg": "jpg", "image/webp": "webp", "video/mp4": "mp4" }[mediaType];
|
|
176
185
|
return `assets/${accountId}/${id}/${sha256}.${extension}`;
|
|
@@ -188,11 +197,13 @@ export const ASSET_TOOL_TERMS = "Assets are free: creating, storing and using on
|
|
|
188
197
|
export const CREATE_ASSET_DESCRIPTION = "Save a picture or a clip as an asset of this account, kept until you delete it: a character, location, style, prop " +
|
|
189
198
|
"or other, with a name. source is {run_id} of a succeeded generate_image or generate_video run of this account, " +
|
|
190
199
|
"{upload_id} from upload_image or create_upload, a public https {url} the server downloads (add " +
|
|
191
|
-
`kind: "video" for
|
|
200
|
+
`kind: "video" for a clip), {base64, media_type} of a PNG or JPEG up to ${ASSET_BASE64_MAX_BYTES} bytes, or ` +
|
|
192
201
|
"{put: {media_type, bytes, sha256}} to PUT a local file: the answer carries upload.put_url and put_headers; " +
|
|
193
|
-
"run `curl -X PUT -H 'content-type: <
|
|
194
|
-
"get_asset. On a server running on your machine also {path} of a local PNG, JPEG or MP4. A clip is an MP4
|
|
195
|
-
`
|
|
202
|
+
"run `curl -X PUT -H 'content-type: <put_headers content-type>' --data-binary @<file> '<put_url>'` within 15 minutes, then call " +
|
|
203
|
+
"get_asset. On a server running on your machine also {path} of a local PNG, JPEG or MP4. A clip is an MP4, MOV or WebM " +
|
|
204
|
+
`up to ${ASSET_VIDEO_MAX_SECONDS} seconds and 100 MB; one in another codec than H.264 or HEVC (such as AV1 or VP9), or a ` +
|
|
205
|
+
"fragmented MP4, is re-encoded to an H.264 MP4 when it is saved, and so is 10-bit or HDR video, tone-mapped to SDR; get_asset " +
|
|
206
|
+
"says so in warnings. A url clip or a PUT is checked in the background " +
|
|
196
207
|
"(state \"processing\" or \"awaiting_upload\"; get_asset says ready or failed within minutes). For your own material " +
|
|
197
208
|
"pass rights_confirmed: true, stating once that you may use the people and works in it. A reference only to analyse, " +
|
|
198
209
|
"such as someone else's ad for analyze_reference, takes analysis_only: true instead: no rights claim, and no render " +
|
|
@@ -205,7 +216,8 @@ export const LIST_ASSETS_DESCRIPTION = "List the assets of this account, newest
|
|
|
205
216
|
"still awaiting their upload or processing, and those that failed today with the reason. usage says how much " +
|
|
206
217
|
`of the ${ASSET_ACCOUNT_MAX_COUNT} assets and of the storage (${STORAGE_TERMS}) is used. Free.`;
|
|
207
218
|
export const GET_ASSET_DESCRIPTION = "Read one asset by asset_id with a freshly signed url (valid for an hour), its role, name, media_type, bytes, " +
|
|
208
|
-
"width, height, content_digest and, for a clip, duration_frames, fps, codec and pix_fmt
|
|
219
|
+
"width, height, content_digest and, for a clip, duration_frames, fps, codec and pix_fmt (warnings says when it was re-encoded), " +
|
|
220
|
+
"plus a small preview " +
|
|
209
221
|
"picture of it to look at when one is ready. An asset still in " +
|
|
210
222
|
"progress answers state awaiting_upload (PUT the file, then read again) or processing (read again in a few " +
|
|
211
223
|
"seconds); a refused one answers state failed with error.code. A deleted asset answers asset_not_found. Free.";
|
package/dist/errors.d.ts
CHANGED
|
@@ -271,7 +271,7 @@ export type EditCeilingReachedError = z.infer<typeof editCeilingReachedError>;
|
|
|
271
271
|
export declare function editCeilingReachedBody(args: Omit<EditCeilingReachedError["error"], "code" | "message">, counting?: "revision" | "candidate"): EditCeilingReachedError;
|
|
272
272
|
export declare function unusableSourceMessage(errorClass: string, detail: string): string;
|
|
273
273
|
export declare const MALFORMED_BODY_MESSAGE: string;
|
|
274
|
-
declare const BARE_ERROR_CODES: readonly ["analysis_enqueue_failed", "aspect_conflict", "actor_unavailable", "actor_format_unavailable", "actor_storage_unavailable", "actor_generation_disabled", "actor_in_use", "ad_limited", "ad_not_found", "ad_slot_in_use", "ad_slot_unchecked", "asset_cap_exceeded", "asset_ingest_cap_exceeded", "asset_not_found", "asset_not_ready", "assets_disabled", "creator_profile_limited", "creator_profile_not_found", "creator_url_unsupported", "cut_limited", "cut_not_found", "cut_preview_limited", "cut_slot_in_use", "deletion_held", "editing_window_not_set", "explainer_busy", "feedback_limited", "film_draft_limited", "film_draft_not_found", "film_draft_stale", "film_run_not_found", "film_voice_not_ready", "generations_disabled", "generations_marking_pending", "idempotency_key_required", "idempotency_key_reused", "ingest_enqueue_failed", "insufficient_scope", "internal_error", "invalid_image", "invalid_request", "malformed_body", "no_changes", "not_found", "own_agent_disabled", "own_agent_marking_pending", "paid_render_disabled", "payload_too_large", "reference_analysis_disabled", "reference_analysis_limited", "reference_analysis_not_found", "reference_not_analyzable", "reference_not_usable", "reference_url_unsupported", "revision_needs_generated_unit", "rights_not_confirmed", "run_media_in_use", "run_not_finished", "run_not_found", "source_aspect_mismatch", "source_not_usable", "take_check_limited", "take_frames_limited", "trend_page_unavailable", "trend_search_limited", "trend_search_not_found", "trends_unavailable", "unauthorized", "unsupported_combination", "unsupported_media_type", "unusable_source", "upload_cap_exceeded", "upload_digest_mismatch", "upload_expired", "upload_in_use", "upload_not_finished", "upload_size_mismatch", "upstream_error", "url_fetch_busy", "url_fetch_failed", "url_fetch_rate_limited", "url_fetch_refused", "url_import_disabled"];
|
|
274
|
+
declare const BARE_ERROR_CODES: readonly ["analysis_enqueue_failed", "aspect_conflict", "actor_unavailable", "actor_format_unavailable", "actor_storage_unavailable", "actor_generation_disabled", "actor_in_use", "ad_limited", "ad_not_found", "ad_slot_in_use", "ad_slot_unchecked", "asset_cap_exceeded", "asset_ingest_cap_exceeded", "asset_not_found", "asset_not_ready", "assets_disabled", "creator_profile_limited", "creator_profile_not_found", "creator_url_unsupported", "cut_limited", "cut_not_found", "cut_preview_limited", "cut_slot_in_use", "deletion_held", "editing_window_not_set", "explainer_busy", "feedback_limited", "film_draft_limited", "film_draft_not_found", "film_draft_stale", "film_hero_limited", "film_run_not_found", "film_voice_not_ready", "generations_disabled", "generations_marking_pending", "idempotency_key_required", "idempotency_key_reused", "ingest_enqueue_failed", "insufficient_scope", "internal_error", "invalid_image", "invalid_request", "malformed_body", "no_changes", "not_found", "own_agent_disabled", "own_agent_marking_pending", "paid_render_disabled", "payload_too_large", "reference_analysis_disabled", "reference_analysis_limited", "reference_analysis_not_found", "reference_not_analyzable", "reference_not_usable", "reference_url_unsupported", "revision_needs_generated_unit", "rights_not_confirmed", "run_media_in_use", "run_not_finished", "run_not_found", "source_aspect_mismatch", "source_not_usable", "take_check_limited", "take_frames_limited", "trend_page_unavailable", "trend_search_limited", "trend_search_not_found", "trends_unavailable", "unauthorized", "unsupported_combination", "unsupported_media_type", "unusable_source", "upload_cap_exceeded", "upload_digest_mismatch", "upload_expired", "upload_in_use", "upload_not_finished", "upload_size_mismatch", "upstream_error", "url_fetch_busy", "url_fetch_failed", "url_fetch_rate_limited", "url_fetch_refused", "url_import_disabled"];
|
|
275
275
|
export type BareApiErrorCode = (typeof BARE_ERROR_CODES)[number];
|
|
276
276
|
export declare const API_ERROR_CODES: readonly string[];
|
|
277
277
|
export declare function apiErrorBody(args: {
|
package/dist/errors.js
CHANGED
|
@@ -6640,6 +6640,7 @@ export declare const facelessStoredInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
6640
6640
|
}, z.core.$strict>>;
|
|
6641
6641
|
rig: z.ZodOptional<z.ZodString>;
|
|
6642
6642
|
photo: z.ZodOptional<z.ZodLiteral<true>>;
|
|
6643
|
+
unread: z.ZodOptional<z.ZodLiteral<true>>;
|
|
6643
6644
|
}, z.core.$strict>>;
|
|
6644
6645
|
}, z.core.$strict>>;
|
|
6645
6646
|
workflow_directions: z.ZodOptional<z.ZodObject<{
|
package/dist/film-cut.js
CHANGED
|
@@ -163,6 +163,7 @@ export const filmCutCheck = z.strictObject({
|
|
|
163
163
|
live_sec: z.number().nonnegative(),
|
|
164
164
|
}).nullable(),
|
|
165
165
|
warnings: z.array(z.string()),
|
|
166
|
-
next: diyNext.optional().describe("A passed sheet: its quote_cut; a take not yet cleared to play: its check_take quote"
|
|
166
|
+
next: diyNext.optional().describe("A passed sheet: its quote_cut; a take not yet cleared to play: its check_take quote; a refused " +
|
|
167
|
+
"sheet: check_cut again, add naming the fields to fix"),
|
|
167
168
|
blocked: diyBlocked.optional().describe("Why a take of the cut cannot play yet, and what unblocks it"),
|
|
168
169
|
});
|
package/dist/film-guide.d.ts
CHANGED
|
@@ -24,6 +24,10 @@ export declare const guideCatalog: z.ZodArray<z.ZodObject<{
|
|
|
24
24
|
version: z.ZodString;
|
|
25
25
|
}, z.core.$strict>>;
|
|
26
26
|
export type GuideCatalog = z.infer<typeof guideCatalog>;
|
|
27
|
+
export declare function guideModesOf(guides: GuideCatalog | undefined): {
|
|
28
|
+
adGuide: boolean;
|
|
29
|
+
facelessDiy: boolean;
|
|
30
|
+
};
|
|
27
31
|
export declare const filmGuideQuery: z.ZodObject<{
|
|
28
32
|
format: z.ZodOptional<z.ZodEnum<{
|
|
29
33
|
cartoon: "cartoon";
|
package/dist/film-guide.js
CHANGED
|
@@ -27,6 +27,11 @@ export const guideCatalog = z.array(z.strictObject({
|
|
|
27
27
|
use_when: z.string().min(1),
|
|
28
28
|
version: z.string().regex(/^[a-f0-9]{12}$/),
|
|
29
29
|
})).describe("Every guide this account can read, each with its version: read the one that fits the video before its first tool call");
|
|
30
|
+
export function guideModesOf(guides) {
|
|
31
|
+
const listed = guides ?? [];
|
|
32
|
+
return { adGuide: listed.some(entry => entry.tool === "get_ad_guide"),
|
|
33
|
+
facelessDiy: listed.some(entry => entry.tool === "get_film_guide" && entry.format !== undefined && entry.format !== "explainer") };
|
|
34
|
+
}
|
|
30
35
|
export const filmGuideQuery = z.strictObject({
|
|
31
36
|
format: z.enum(FILM_GUIDE_FORMATS).optional().describe("The video to make: explainer (the default, a coded film), story, list (facts or " +
|
|
32
37
|
"tips), own_pictures (the user's own pictures) or cartoon (a drawn hero in generated pictures)"),
|
package/dist/generations.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const GENERATE_IMAGE_QUOTE_PATH = "/v1/skills/generate_image/quot
|
|
|
4
4
|
export declare const GENERATE_IMAGE_RUN_PATH = "/v1/skills/generate_image/run";
|
|
5
5
|
export declare const GENERATE_VIDEO_QUOTE_PATH = "/v1/skills/generate_video/quote";
|
|
6
6
|
export declare const GENERATE_VIDEO_RUN_PATH = "/v1/skills/generate_video/run";
|
|
7
|
-
export declare const GENERATION_IMAGE_MODELS: readonly ["seedream-5.0-flash", "flare", "gemini-3-pro-image", "gemini-nano-banana-2.1"];
|
|
7
|
+
export declare const GENERATION_IMAGE_MODELS: readonly ["seedream-5.0-flash", "seedream-5.5", "flare", "gemini-3-pro-image", "gemini-nano-banana-2.1"];
|
|
8
8
|
export declare const GENERATION_VIDEO_MODELS: readonly ["seedance-2.0", "seedance-2.0-mini", "seedance-2.0-fast", "seedance-2.5", "seedance-2.5-flash", "kling-3.0", "kling-4.0", "kling-4.0-flash", "gemini-omni-flash-1.1", "gemini-omni-flash-1.2"];
|
|
9
9
|
export type GenerationImageModel = (typeof GENERATION_IMAGE_MODELS)[number];
|
|
10
10
|
export type GenerationVideoModel = (typeof GENERATION_VIDEO_MODELS)[number];
|
|
@@ -44,6 +44,7 @@ export interface GenerationVideoRow {
|
|
|
44
44
|
export interface GenerationImageCapability {
|
|
45
45
|
kind: "image";
|
|
46
46
|
max_references?: number;
|
|
47
|
+
min_references?: number;
|
|
47
48
|
rows: readonly GenerationImageRow[];
|
|
48
49
|
}
|
|
49
50
|
export interface GenerationVideoCapability {
|
|
@@ -87,6 +88,7 @@ export declare const generateImageRequest: z.ZodObject<{
|
|
|
87
88
|
"gemini-3-pro-image": "gemini-3-pro-image";
|
|
88
89
|
"gemini-nano-banana-2.1": "gemini-nano-banana-2.1";
|
|
89
90
|
"seedream-5.0-flash": "seedream-5.0-flash";
|
|
91
|
+
"seedream-5.5": "seedream-5.5";
|
|
90
92
|
}>;
|
|
91
93
|
aspect_ratio: z.ZodEnum<{
|
|
92
94
|
"16:9": "16:9";
|
|
@@ -301,6 +303,7 @@ declare const listedModel: z.ZodObject<{
|
|
|
301
303
|
}, z.core.$strict>>;
|
|
302
304
|
duration_values: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
303
305
|
max_references: z.ZodNumber;
|
|
306
|
+
min_references: z.ZodOptional<z.ZodNumber>;
|
|
304
307
|
audio: z.ZodOptional<z.ZodLiteral<true>>;
|
|
305
308
|
rows: z.ZodArray<z.ZodObject<{
|
|
306
309
|
aspect_ratio: z.ZodString;
|
|
@@ -338,6 +341,7 @@ export declare const generationModels: z.ZodObject<{
|
|
|
338
341
|
}, z.core.$strict>>;
|
|
339
342
|
duration_values: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
340
343
|
max_references: z.ZodNumber;
|
|
344
|
+
min_references: z.ZodOptional<z.ZodNumber>;
|
|
341
345
|
audio: z.ZodOptional<z.ZodLiteral<true>>;
|
|
342
346
|
rows: z.ZodArray<z.ZodObject<{
|
|
343
347
|
aspect_ratio: z.ZodString;
|
package/dist/generations.js
CHANGED
|
@@ -10,7 +10,7 @@ export const GENERATE_IMAGE_QUOTE_PATH = "/v1/skills/generate_image/quote";
|
|
|
10
10
|
export const GENERATE_IMAGE_RUN_PATH = "/v1/skills/generate_image/run";
|
|
11
11
|
export const GENERATE_VIDEO_QUOTE_PATH = "/v1/skills/generate_video/quote";
|
|
12
12
|
export const GENERATE_VIDEO_RUN_PATH = "/v1/skills/generate_video/run";
|
|
13
|
-
export const GENERATION_IMAGE_MODELS = ["seedream-5.0-flash", "flare", "gemini-3-pro-image", "gemini-nano-banana-2.1"];
|
|
13
|
+
export const GENERATION_IMAGE_MODELS = ["seedream-5.0-flash", "seedream-5.5", "flare", "gemini-3-pro-image", "gemini-nano-banana-2.1"];
|
|
14
14
|
export const GENERATION_VIDEO_MODELS = [
|
|
15
15
|
"seedance-2.0", "seedance-2.0-mini", "seedance-2.0-fast", "seedance-2.5", "seedance-2.5-flash", "kling-3.0", "kling-4.0", "kling-4.0-flash",
|
|
16
16
|
"gemini-omni-flash-1.1", "gemini-omni-flash-1.2",
|
|
@@ -46,7 +46,7 @@ function draft480p(unit_credits) {
|
|
|
46
46
|
return video("480p", 496, 864, unit_credits, H264, { vertical: true, horizontal: true })
|
|
47
47
|
.map((row) => ({ ...row, warning: DRAFT_480P[row.aspect_ratio] }));
|
|
48
48
|
}
|
|
49
|
-
const OMNI_DRAFT_360P = "360p is
|
|
49
|
+
const OMNI_DRAFT_360P = "360p is softer than 720p: a draft for trying a move cheaply, or a final take the user chose for its price";
|
|
50
50
|
function only(rows, aspect, change) {
|
|
51
51
|
return rows.map((row) => (row.aspect_ratio === aspect ? { ...row, ...change } : row));
|
|
52
52
|
}
|
|
@@ -56,9 +56,14 @@ export const GENERATION_CAPABILITIES = deepFreeze({
|
|
|
56
56
|
kind: "image",
|
|
57
57
|
rows: [image("9:16", 1440, 2560, 5, true), image("16:9", 2560, 1440, 5, true), image("1:1", 2048, 2048, 5, true)],
|
|
58
58
|
},
|
|
59
|
+
"seedream-5.5": {
|
|
60
|
+
kind: "image",
|
|
61
|
+
min_references: 1,
|
|
62
|
+
rows: [image("9:16", 1440, 2560, 17, true), image("21:9", 3024, 1296, 17, true)],
|
|
63
|
+
},
|
|
59
64
|
flare: {
|
|
60
65
|
kind: "image",
|
|
61
|
-
rows: [image("9:16", 1008, 1792,
|
|
66
|
+
rows: [image("9:16", 1008, 1792, 7, true), image("16:9", 1792, 1008, 7), image("1:1", 1024, 1024, 7), image("21:9", 2352, 1008, 16, true)],
|
|
62
67
|
},
|
|
63
68
|
"gemini-3-pro-image": {
|
|
64
69
|
kind: "image",
|
|
@@ -179,19 +184,26 @@ export function withNoTextClause(promptText, options) {
|
|
|
179
184
|
return `${promptText}\n${GENERATION_NO_TEXT_CLAUSE}`;
|
|
180
185
|
}
|
|
181
186
|
const imageMaxReferences = (model) => GENERATION_CAPABILITIES[model].max_references ?? GENERATION_MAX_REFERENCES;
|
|
187
|
+
const imageMinReferences = (model) => GENERATION_CAPABILITIES[model].min_references ?? 0;
|
|
182
188
|
export const generateImageRequest = z.strictObject({
|
|
183
189
|
prompt,
|
|
184
190
|
keep_text: keepText,
|
|
185
191
|
model: z.enum(GENERATION_IMAGE_MODELS),
|
|
186
192
|
aspect_ratio: z.enum(GENERATION_IMAGE_ASPECTS),
|
|
187
193
|
references: z.array(generationReference).max(Math.max(...GENERATION_IMAGE_MODELS.map(imageMaxReferences))).optional()
|
|
188
|
-
.describe("Pictures the image is made from; each model takes up to its max_references
|
|
194
|
+
.describe("Pictures the image is made from; each model takes up to its max_references, and at least its min_references where it " +
|
|
195
|
+
"lists one (list_generation_models)."),
|
|
189
196
|
max_credits: maxCreditsField,
|
|
190
197
|
}).superRefine((request, context) => {
|
|
191
198
|
const most = imageMaxReferences(request.model);
|
|
192
|
-
|
|
199
|
+
const count = request.references?.length ?? 0;
|
|
200
|
+
if (count > most) {
|
|
193
201
|
context.addIssue({ code: z.ZodIssueCode.custom, path: ["references"], message: `${request.model} takes up to ${most} references` });
|
|
194
202
|
}
|
|
203
|
+
if (count < imageMinReferences(request.model)) {
|
|
204
|
+
context.addIssue({ code: z.ZodIssueCode.custom, path: ["references"],
|
|
205
|
+
message: `${request.model} cleans up a picture: pass the picture, and any product photos, as references` });
|
|
206
|
+
}
|
|
195
207
|
});
|
|
196
208
|
const SHOT_DESCRIPTION = "The clip as a shot, in place of prompt: framing, subject, start_state, timed beats, camera, light and " +
|
|
197
209
|
"continuity. Write every field as what the frame shows: a state reads \"her fingertips are clean\", never as an absence.";
|
|
@@ -273,6 +285,8 @@ export function findCapabilityRow(request) {
|
|
|
273
285
|
return row?.measured ? { kind: "video", model: request.model, capability, row } : null;
|
|
274
286
|
}
|
|
275
287
|
const capability = GENERATION_CAPABILITIES[request.model];
|
|
288
|
+
if ((request.references?.length ?? 0) < imageMinReferences(request.model))
|
|
289
|
+
return null;
|
|
276
290
|
const row = capability.rows.find((one) => one.aspect_ratio === request.aspect_ratio);
|
|
277
291
|
return row?.measured ? { kind: "image", model: request.model, capability, row } : null;
|
|
278
292
|
}
|
|
@@ -313,6 +327,8 @@ const listedModel = z.strictObject({
|
|
|
313
327
|
duration_s: z.strictObject({ min: z.number().int().positive(), max: z.number().int().positive() }).nullable(),
|
|
314
328
|
duration_values: z.array(z.number().int().positive()).min(1).optional(),
|
|
315
329
|
max_references: z.number().int().nonnegative(),
|
|
330
|
+
min_references: z.number().int().positive().optional()
|
|
331
|
+
.describe("Present on a picture model that only cleans up pictures it is given: the fewest references a request takes."),
|
|
316
332
|
audio: z.literal(true).optional().describe("Present on a clip model that keeps its own sound on audio: true, at the same price."),
|
|
317
333
|
rows: z.array(listedRow).min(1),
|
|
318
334
|
});
|
|
@@ -326,8 +342,9 @@ export function listGenerationModels(options = {}) {
|
|
|
326
342
|
if (capability.kind === "image") {
|
|
327
343
|
const rows = capability.rows.filter((row) => row.measured)
|
|
328
344
|
.map(({ aspect_ratio, width, height, unit_credits }) => ({ aspect_ratio, resolution: null, width, height, unit_credits }));
|
|
345
|
+
const fewest = imageMinReferences(model);
|
|
329
346
|
return rows.length === 0 ? [] : [{ model, kind: "image", unit: "image", modes: null, duration_s: null,
|
|
330
|
-
max_references: imageMaxReferences(model), rows }];
|
|
347
|
+
max_references: imageMaxReferences(model), ...(fewest > 0 ? { min_references: fewest } : {}), rows }];
|
|
331
348
|
}
|
|
332
349
|
const modes = GENERATION_VIDEO_MODES.filter((mode) => capability.modes[mode]);
|
|
333
350
|
const rows = capability.rows.filter((row) => row.measured)
|
package/dist/mascots.d.ts
CHANGED
|
@@ -24,8 +24,12 @@ export declare const mascotPose: z.ZodObject<{
|
|
|
24
24
|
}, z.core.$strict>>;
|
|
25
25
|
rig: z.ZodOptional<z.ZodString>;
|
|
26
26
|
photo: z.ZodOptional<z.ZodLiteral<true>>;
|
|
27
|
+
unread: z.ZodOptional<z.ZodLiteral<true>>;
|
|
27
28
|
}, z.core.$strict>;
|
|
28
29
|
export type MascotPose = z.infer<typeof mascotPose>;
|
|
30
|
+
export type MascotPoseFace = "works" | "still" | "faceless";
|
|
31
|
+
export declare function mascotPoseFace(pose: unknown): MascotPoseFace;
|
|
32
|
+
export declare const mascotPoseWorks: (pose: unknown) => boolean;
|
|
29
33
|
export declare const mascotPoses: z.ZodRecord<z.ZodEnum<{
|
|
30
34
|
celebrate: "celebrate";
|
|
31
35
|
neutral: "neutral";
|
|
@@ -59,6 +63,7 @@ export declare const mascotPoses: z.ZodRecord<z.ZodEnum<{
|
|
|
59
63
|
}, z.core.$strict>>;
|
|
60
64
|
rig: z.ZodOptional<z.ZodString>;
|
|
61
65
|
photo: z.ZodOptional<z.ZodLiteral<true>>;
|
|
66
|
+
unread: z.ZodOptional<z.ZodLiteral<true>>;
|
|
62
67
|
}, z.core.$strict>>;
|
|
63
68
|
export type MascotPoses = z.infer<typeof mascotPoses>;
|
|
64
69
|
export declare const pinnedMascot: z.ZodObject<{
|
|
@@ -96,6 +101,7 @@ export declare const pinnedMascot: z.ZodObject<{
|
|
|
96
101
|
}, z.core.$strict>>;
|
|
97
102
|
rig: z.ZodOptional<z.ZodString>;
|
|
98
103
|
photo: z.ZodOptional<z.ZodLiteral<true>>;
|
|
104
|
+
unread: z.ZodOptional<z.ZodLiteral<true>>;
|
|
99
105
|
}, z.core.$strict>>;
|
|
100
106
|
}, z.core.$strict>;
|
|
101
107
|
export type PinnedMascot = z.infer<typeof pinnedMascot>;
|
package/dist/mascots.js
CHANGED
|
@@ -12,7 +12,22 @@ export const mascotPose = z.strictObject({
|
|
|
12
12
|
eyes: z.strictObject({ points: z.array(z.strictObject({ x: share, y: share })).min(1).max(4), w: share, h: share, skin: z.string().min(1).max(40) }).optional(),
|
|
13
13
|
rig: z.string().min(1).max(300).optional(),
|
|
14
14
|
photo: z.literal(true).optional(),
|
|
15
|
+
unread: z.literal(true).optional(),
|
|
15
16
|
});
|
|
17
|
+
export function mascotPoseFace(pose) {
|
|
18
|
+
if (typeof pose !== "object" || pose === null)
|
|
19
|
+
return "faceless";
|
|
20
|
+
const { photo, mouth, eyes, unread } = pose;
|
|
21
|
+
if (photo === true)
|
|
22
|
+
return "works";
|
|
23
|
+
if (typeof mouth === "object" && mouth !== null) {
|
|
24
|
+
const ink = mouth.ink;
|
|
25
|
+
return typeof ink === "string" ? "works" : !Object.hasOwn(mouth, "ink") ? "still" : "faceless";
|
|
26
|
+
}
|
|
27
|
+
const points = typeof eyes === "object" && eyes !== null ? eyes.points : undefined;
|
|
28
|
+
return unread === true || (Array.isArray(points) && points.length > 0) ? "still" : "faceless";
|
|
29
|
+
}
|
|
30
|
+
export const mascotPoseWorks = (pose) => mascotPoseFace(pose) === "works";
|
|
16
31
|
export const mascotPoses = z.partialRecord(z.enum(MASCOT_POSES), mascotPose)
|
|
17
32
|
.refine((poses) => poses.neutral !== undefined, { message: "a mascot holds its neutral pose" });
|
|
18
33
|
export const pinnedMascot = z.strictObject({ asset_id: assetId, poses: mascotPoses });
|
|
@@ -14,6 +14,9 @@ export declare const OWN_EDIT_CREDITS = 10, OWN_EDIT_MAX_SECONDS = 60;
|
|
|
14
14
|
export declare const OWN_TAKE_FRAMES_MAX = 96, TAKE_FRAMES_PER_HOUR = 60, TAKE_FRAMES_WINDOW_SECONDS = 3600;
|
|
15
15
|
export declare const TAKE_PICTURE_CHECKS_PER_HOUR = 30;
|
|
16
16
|
export declare const TAKE_MOTION_CHECKS_PER_HOUR = 30;
|
|
17
|
+
export declare const HERO_RUNS_PER_HOUR = 10;
|
|
18
|
+
export declare const OWN_HERO_FREE_POSES_PER_DAY = 27;
|
|
19
|
+
export declare const OWN_HERO_FREE_POSES_WINDOW_HOURS = 24;
|
|
17
20
|
export declare const CUT_PREVIEWS_PER_HOUR = 20;
|
|
18
21
|
export declare const OWN_TAKE_CHECK_CREDITS = 10;
|
|
19
22
|
export declare const OWN_TAKE_CHECK_PICTURE_CREDITS = 20;
|
package/dist/own-agent-price.js
CHANGED
|
@@ -16,6 +16,9 @@ export const OWN_EDIT_CREDITS = 10, OWN_EDIT_MAX_SECONDS = 60;
|
|
|
16
16
|
export const OWN_TAKE_FRAMES_MAX = 96, TAKE_FRAMES_PER_HOUR = 60, TAKE_FRAMES_WINDOW_SECONDS = 3600;
|
|
17
17
|
export const TAKE_PICTURE_CHECKS_PER_HOUR = 30;
|
|
18
18
|
export const TAKE_MOTION_CHECKS_PER_HOUR = 30;
|
|
19
|
+
export const HERO_RUNS_PER_HOUR = 10;
|
|
20
|
+
export const OWN_HERO_FREE_POSES_PER_DAY = 27;
|
|
21
|
+
export const OWN_HERO_FREE_POSES_WINDOW_HOURS = 24;
|
|
19
22
|
export const CUT_PREVIEWS_PER_HOUR = 20;
|
|
20
23
|
export const OWN_TAKE_CHECK_CREDITS = 10;
|
|
21
24
|
export const OWN_TAKE_CHECK_PICTURE_CREDITS = 20;
|
package/dist/own-agent-runs.d.ts
CHANGED
|
@@ -367,6 +367,7 @@ export declare const takeCheckVerdict: z.ZodObject<{
|
|
|
367
367
|
}, z.core.$strict>;
|
|
368
368
|
export type TakeCheckVerdict = z.infer<typeof takeCheckVerdict>;
|
|
369
369
|
export declare const takeCheckPassed: (verdict: Pick<TakeCheckVerdict, "findings" | "clean">) => boolean;
|
|
370
|
+
export declare const TAKE_VOICE_MISMATCH: "VOICE_MISMATCH";
|
|
370
371
|
export declare const FILM_HERO_SOURCE_FIELDS: readonly ["character_reference", "character_details", "script", "voice_run_id"];
|
|
371
372
|
export declare const filmHeroInput: z.ZodObject<{
|
|
372
373
|
character_reference: z.ZodOptional<z.ZodString>;
|
package/dist/own-agent-runs.js
CHANGED
|
@@ -120,7 +120,7 @@ export const filmEditInput = z.strictObject({
|
|
|
120
120
|
music: editMusic.optional().describe("Music from at to the end: a library track (free) or one made for the cut (paid on delivery); " +
|
|
121
121
|
"under a voice it plays lower"),
|
|
122
122
|
ad_id: adId.optional().describe("The ad record this cut belongs to: every clip then names its slot, and a clip made with generate_video " +
|
|
123
|
-
"that has not passed check_take in its slot is refused before any credits; your own footage needs no check"),
|
|
123
|
+
"that has not passed check_take in its slot is refused before any credits, unless the slot is people_only; your own footage needs no check"),
|
|
124
124
|
max_credits: maxCreditsField,
|
|
125
125
|
}).refine(edit => edit.ad_id !== undefined || edit.clips.every(clip => clip.slot === undefined), "a clip's slot needs ad_id")
|
|
126
126
|
.refine(edit => edit.ad_id === undefined || edit.clips.every(clip => clip.slot !== undefined), "with ad_id, every clip names its slot");
|
|
@@ -230,6 +230,7 @@ export const takeCheckVerdict = z.strictObject({ duration_sec: z.number().positi
|
|
|
230
230
|
subject: z.strictObject({ x: z.number().min(0).max(1), y: z.number().min(0).max(1), w: z.number().min(0).max(1), h: z.number().min(0).max(1) })
|
|
231
231
|
.nullable().optional().describe("Against picture: the main subject's box at that second, shares of the frame from its top-left corner") });
|
|
232
232
|
export const takeCheckPassed = (verdict) => verdict.clean.length > 0 && !verdict.findings.some(finding => finding.whole_take);
|
|
233
|
+
export const TAKE_VOICE_MISMATCH = "VOICE_MISMATCH";
|
|
233
234
|
export const FILM_HERO_SOURCE_FIELDS = ["character_reference", "character_details", "script", "voice_run_id"];
|
|
234
235
|
export const filmHeroInput = z.strictObject({
|
|
235
236
|
character_reference: qualifiedImageUrl.optional().describe("https image of the character the poses are drawn after: a public picture, your upload, a " +
|
package/dist/prices.js
CHANGED
|
@@ -11,7 +11,7 @@ import { REFERENCE_ANALYSIS_CREDITS, REFERENCE_DATA_CREDITS } from "./reference-
|
|
|
11
11
|
import { CREATOR_PROFILE_CREDITS, CREATOR_PROFILE_VIDEOS } from "./creator-profile.js";
|
|
12
12
|
import { TREND_FREE_PAGES_PER_DAY, TREND_FREE_SEARCHES_PER_MONTH, TREND_PAGE_PAID_CREDITS, TREND_PAGE_WINDOW_SECONDS, TREND_SEARCH_CREDITS, TREND_SEARCH_MAX_PAGES, TREND_SEARCH_REELS, } from "./trend-search.js";
|
|
13
13
|
import { isMusicEnabled, MUSIC_BED_CREDITS } from "./music.js";
|
|
14
|
-
import { isOwnAgentEnabled, OWN_FILM_EXTRA_SECOND_CREDITS, OWN_FILM_INCLUDED_SECONDS, OWN_FILM_RENDER_CREDITS, OWN_HERO_POSE_CREDITS, OWN_HERO_POSES, OWN_FREE_STILLS, OWN_FREE_STILLS_WINDOW_HOURS, OWN_STILL_CREDITS, OWN_STILLS_MAX_PER_CALL, OWN_VOICE_CREDITS_PER_SECOND, OWN_EDIT_CREDITS, OWN_EDIT_MAX_SECONDS, OWN_TAKE_CHECK_CREDITS, OWN_CUT_BED_CREDITS, OWN_CUT_CREDITS, OWN_CUT_EXTRA_SECOND_CREDITS, OWN_CUT_INCLUDED_SECONDS, OWN_CUT_MAX_NEW_SOUNDS, OWN_CUT_MAX_SECONDS, OWN_CUT_MIN_SECONDS, OWN_CUT_TAKE_SOUND_CREDITS_PER_SECOND, OWN_TAKE_CHECK_PICTURE_CREDITS, OWN_TAKE_CHECK_PICTURE_LONG_CREDITS, TAKE_PICTURE_SHORT_TIER_SECONDS } from "./own-agent-price.js";
|
|
14
|
+
import { HERO_RUNS_PER_HOUR, isOwnAgentEnabled, OWN_FILM_EXTRA_SECOND_CREDITS, OWN_FILM_INCLUDED_SECONDS, OWN_FILM_RENDER_CREDITS, OWN_HERO_POSE_CREDITS, OWN_HERO_POSES, OWN_HERO_FREE_POSES_PER_DAY, OWN_HERO_FREE_POSES_WINDOW_HOURS, OWN_FREE_STILLS, OWN_FREE_STILLS_WINDOW_HOURS, OWN_STILL_CREDITS, OWN_STILLS_MAX_PER_CALL, OWN_VOICE_CREDITS_PER_SECOND, OWN_EDIT_CREDITS, OWN_EDIT_MAX_SECONDS, OWN_TAKE_CHECK_CREDITS, OWN_CUT_BED_CREDITS, OWN_CUT_CREDITS, OWN_CUT_EXTRA_SECOND_CREDITS, OWN_CUT_INCLUDED_SECONDS, OWN_CUT_MAX_NEW_SOUNDS, OWN_CUT_MAX_SECONDS, OWN_CUT_MIN_SECONDS, OWN_CUT_TAKE_SOUND_CREDITS_PER_SECOND, OWN_TAKE_CHECK_PICTURE_CREDITS, OWN_TAKE_CHECK_PICTURE_LONG_CREDITS, TAKE_PICTURE_SHORT_TIER_SECONDS } from "./own-agent-price.js";
|
|
15
15
|
import { CUT_PREVIEW_MAX_STILLS } from "./film-cut.js";
|
|
16
16
|
export const PRICES_PATH = "/v1/public/prices";
|
|
17
17
|
export const PRICE_UNITS = ["call", "second", "face_second", "image", "clip", "clip_second", "still", "scene", "track"];
|
|
@@ -215,7 +215,7 @@ function buildPriceList(liveShots, scenes, facelessShots = false, facelessScenes
|
|
|
215
215
|
notes: `tier ${tier}${tier === "standard" ? " (the default)" : ""}. A drawn explainer film, made in about half an hour and charged only when ` +
|
|
216
216
|
"delivered, by its length. A mascot is the hero for free; a character you name, or one we draw to fit the script, adds its " +
|
|
217
217
|
`${FACELESS_EXPLAINER_POSE_PICTURES} pose pictures, ${FACELESS_IMAGE_CREDITS} credits each for the pictures made, charged only with a ` +
|
|
218
|
-
"delivered video." })) : []),
|
|
218
|
+
"delivered video; a drawn pose whose mouth cannot move with the voice is shown with a warning and not charged." })) : []),
|
|
219
219
|
...(ownAgent ? [
|
|
220
220
|
paid({ tool: "preview_stills", route: "POST /v1/film-stills", quote_tool: "quote_stills", unit: "still", credits: OWN_STILL_CREDITS,
|
|
221
221
|
notes: `Up to ${OWN_STILLS_MAX_PER_CALL} stills of a film draft per call. The first ${OWN_FREE_STILLS} stills drawn of each draft in any ` +
|
|
@@ -228,7 +228,10 @@ function buildPriceList(liveShots, scenes, facelessShots = false, facelessScenes
|
|
|
228
228
|
{ label: `each second over ${OWN_FILM_INCLUDED_SECONDS} s`, unit: "second", credits: OWN_FILM_EXTRA_SECOND_CREDITS }],
|
|
229
229
|
notes: "Charged only for a delivered film, by its length; a render that fails costs nothing." }),
|
|
230
230
|
paid({ tool: "make_film_hero", route: "POST /v1/film-heroes", quote_tool: "quote_film_hero", unit: "image", credits: OWN_HERO_POSE_CREDITS,
|
|
231
|
-
notes: `A hero in up to ${OWN_HERO_POSES} pose pictures, saved as a mascot of your assets; each pose is charged once it is published,
|
|
231
|
+
notes: `A hero in up to ${OWN_HERO_POSES} pose pictures, saved as a mascot of your assets; each pose is charged once it is published, except ` +
|
|
232
|
+
"a drawn pose whose face shows but whose mouth cannot move with the voice, or whose face could not be read, which is published " +
|
|
233
|
+
`with a warning and not charged (a pose with no face to animate is charged); at most ${HERO_RUNS_PER_HOUR} heroes an hour, and ` +
|
|
234
|
+
`none while the account has received ${OWN_HERO_FREE_POSES_PER_DAY} such uncharged poses in the last ${OWN_HERO_FREE_POSES_WINDOW_HOURS} hours; a ` +
|
|
232
235
|
"film that uses the mascot makes and charges none again. Completing a saved mascot charges only the poses it adds. A hero that " +
|
|
233
236
|
"publishes no pose costs nothing." }),
|
|
234
237
|
] : []),
|