@nodaro/shared 3.63.0 → 3.65.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/dist/{chunk-3K24DWOH.js → chunk-222QM7CO.js} +3 -3
- package/dist/{chunk-3K24DWOH.js.map → chunk-222QM7CO.js.map} +1 -1
- package/dist/chunk-27HA6YOL.cjs +377 -0
- package/dist/chunk-27HA6YOL.cjs.map +1 -0
- package/dist/{chunk-4DVWXEB6.js → chunk-2NKF476Z.js} +3 -3
- package/dist/{chunk-4DVWXEB6.js.map → chunk-2NKF476Z.js.map} +1 -1
- package/dist/chunk-3AU52TSW.js +143 -0
- package/dist/chunk-3AU52TSW.js.map +1 -0
- package/dist/{chunk-F6WGGYQW.cjs → chunk-5NVGKXJV.cjs} +68 -29
- package/dist/chunk-5NVGKXJV.cjs.map +1 -0
- package/dist/{chunk-HWQ2SYNA.js → chunk-5SSMPYE5.js} +99 -9
- package/dist/chunk-5SSMPYE5.js.map +1 -0
- package/dist/{chunk-WRSWH7US.cjs → chunk-6BRWPJPP.cjs} +17 -2
- package/dist/chunk-6BRWPJPP.cjs.map +1 -0
- package/dist/{chunk-KHH54GRP.cjs → chunk-6ET3KDO4.cjs} +15 -338
- package/dist/chunk-6ET3KDO4.cjs.map +1 -0
- package/dist/{chunk-TM5JYSJF.cjs → chunk-6OSIOVF7.cjs} +98 -37
- package/dist/chunk-6OSIOVF7.cjs.map +1 -0
- package/dist/{chunk-YUER7TJG.js → chunk-6X5PBAC4.js} +13 -4
- package/dist/chunk-6X5PBAC4.js.map +1 -0
- package/dist/chunk-7BN4EDIC.cjs +185 -0
- package/dist/chunk-7BN4EDIC.cjs.map +1 -0
- package/dist/{chunk-6M563QE6.js → chunk-7OWXHW7Z.js} +78 -28
- package/dist/chunk-7OWXHW7Z.js.map +1 -0
- package/dist/{chunk-FXGNRYQQ.js → chunk-AT53ZQUC.js} +3 -3
- package/dist/{chunk-FXGNRYQQ.js.map → chunk-AT53ZQUC.js.map} +1 -1
- package/dist/{chunk-HSHCCBIV.js → chunk-BQYCZLMF.js} +16 -3
- package/dist/chunk-BQYCZLMF.js.map +1 -0
- package/dist/{chunk-34QLPTSA.js → chunk-BSTAAGLY.js} +3 -3
- package/dist/{chunk-34QLPTSA.js.map → chunk-BSTAAGLY.js.map} +1 -1
- package/dist/{chunk-PSKZKLDG.js → chunk-CW6MMQNO.js} +562 -26
- package/dist/chunk-CW6MMQNO.js.map +1 -0
- package/dist/{chunk-EPXGG27L.js → chunk-D5Y3EYRM.js} +5 -5
- package/dist/{chunk-EPXGG27L.js.map → chunk-D5Y3EYRM.js.map} +1 -1
- package/dist/{chunk-XGVJGNZW.cjs → chunk-DQ2PARNH.cjs} +15 -5
- package/dist/chunk-DQ2PARNH.cjs.map +1 -0
- package/dist/{chunk-6BZC2ZHC.cjs → chunk-E66HSC2E.cjs} +9 -9
- package/dist/{chunk-6BZC2ZHC.cjs.map → chunk-E66HSC2E.cjs.map} +1 -1
- package/dist/{chunk-NIAFR5EE.js → chunk-FGBGKBML.js} +32 -3
- package/dist/chunk-FGBGKBML.js.map +1 -0
- package/dist/{chunk-M5OCFGHF.cjs → chunk-FI3HJZWM.cjs} +588 -25
- package/dist/chunk-FI3HJZWM.cjs.map +1 -0
- package/dist/{chunk-L2TVY6XN.cjs → chunk-FJZTQTF4.cjs} +4 -4
- package/dist/{chunk-L2TVY6XN.cjs.map → chunk-FJZTQTF4.cjs.map} +1 -1
- package/dist/{chunk-XGGZWA4A.cjs → chunk-GJ3D5X4X.cjs} +52 -49
- package/dist/chunk-GJ3D5X4X.cjs.map +1 -0
- package/dist/{chunk-Q6IES3U2.js → chunk-H5KHWTAE.js} +5 -2
- package/dist/chunk-H5KHWTAE.js.map +1 -0
- package/dist/{chunk-MD4XHED4.js → chunk-H745DQ6V.js} +3 -3
- package/dist/{chunk-MD4XHED4.js.map → chunk-H745DQ6V.js.map} +1 -1
- package/dist/{chunk-KCZHQH2O.js → chunk-HAH2F7LT.js} +4 -4
- package/dist/{chunk-KCZHQH2O.js.map → chunk-HAH2F7LT.js.map} +1 -1
- package/dist/{chunk-V5EEQR2U.cjs → chunk-JQMFJAYU.cjs} +21 -21
- package/dist/{chunk-V5EEQR2U.cjs.map → chunk-JQMFJAYU.cjs.map} +1 -1
- package/dist/{chunk-WZVIBAKN.cjs → chunk-JYU5EIRM.cjs} +12 -12
- package/dist/{chunk-WZVIBAKN.cjs.map → chunk-JYU5EIRM.cjs.map} +1 -1
- package/dist/{chunk-Y35JQPT6.cjs → chunk-K6RIN3LW.cjs} +142 -45
- package/dist/chunk-K6RIN3LW.cjs.map +1 -0
- package/dist/{chunk-BLJUCPMV.cjs → chunk-KSHAAPQF.cjs} +5 -2
- package/dist/chunk-KSHAAPQF.cjs.map +1 -0
- package/dist/{chunk-2PU3AGGS.cjs → chunk-KTCEKGBJ.cjs} +7 -7
- package/dist/{chunk-2PU3AGGS.cjs.map → chunk-KTCEKGBJ.cjs.map} +1 -1
- package/dist/{chunk-LH72PQO2.cjs → chunk-KWYS4IIM.cjs} +165 -50
- package/dist/chunk-KWYS4IIM.cjs.map +1 -0
- package/dist/{chunk-GSKLPI3J.cjs → chunk-MIT2USTS.cjs} +118 -61
- package/dist/chunk-MIT2USTS.cjs.map +1 -0
- package/dist/{chunk-Y4GCJJPF.cjs → chunk-NYZQOIXJ.cjs} +35 -2
- package/dist/chunk-NYZQOIXJ.cjs.map +1 -0
- package/dist/{chunk-A2PX5IRC.cjs → chunk-PERUFUVH.cjs} +13 -13
- package/dist/{chunk-A2PX5IRC.cjs.map → chunk-PERUFUVH.cjs.map} +1 -1
- package/dist/{chunk-X5BAFW3Q.cjs → chunk-PGDR7CO3.cjs} +8 -8
- package/dist/{chunk-X5BAFW3Q.cjs.map → chunk-PGDR7CO3.cjs.map} +1 -1
- package/dist/{chunk-OV3JTKBY.js → chunk-PL7AQQV7.js} +123 -22
- package/dist/chunk-PL7AQQV7.js.map +1 -0
- package/dist/chunk-Q4YOLT4M.js +164 -0
- package/dist/chunk-Q4YOLT4M.js.map +1 -0
- package/dist/{chunk-GMBDLNLD.cjs → chunk-R5ILCNCC.cjs} +197 -60
- package/dist/chunk-R5ILCNCC.cjs.map +1 -0
- package/dist/chunk-RP4KQUNU.cjs +168 -0
- package/dist/chunk-RP4KQUNU.cjs.map +1 -0
- package/dist/{chunk-77WU3V3J.cjs → chunk-SPU7MUWE.cjs} +6 -6
- package/dist/{chunk-77WU3V3J.cjs.map → chunk-SPU7MUWE.cjs.map} +1 -1
- package/dist/{chunk-XBTYGQ6Z.js → chunk-ST7OBB5J.js} +8 -5
- package/dist/chunk-ST7OBB5J.js.map +1 -0
- package/dist/{chunk-2QKF7M2Z.js → chunk-TAPBDT47.js} +3 -3
- package/dist/{chunk-2QKF7M2Z.js.map → chunk-TAPBDT47.js.map} +1 -1
- package/dist/{chunk-BMJVKYVB.js → chunk-V5NLQ4L5.js} +123 -7
- package/dist/chunk-V5NLQ4L5.js.map +1 -0
- package/dist/{chunk-KMGCHV6O.js → chunk-V6OXSXIX.js} +63 -30
- package/dist/chunk-V6OXSXIX.js.map +1 -0
- package/dist/{chunk-LMAQUR55.cjs → chunk-WQMPIURW.cjs} +6 -6
- package/dist/{chunk-LMAQUR55.cjs.map → chunk-WQMPIURW.cjs.map} +1 -1
- package/dist/{chunk-ZPE2ZTJ4.cjs → chunk-WZG6GZIL.cjs} +4 -4
- package/dist/{chunk-ZPE2ZTJ4.cjs.map → chunk-WZG6GZIL.cjs.map} +1 -1
- package/dist/{chunk-AE3AAJ4O.js → chunk-XJANKTIL.js} +3 -3
- package/dist/{chunk-AE3AAJ4O.js.map → chunk-XJANKTIL.js.map} +1 -1
- package/dist/{chunk-O7RZRUMZ.js → chunk-XJWED257.js} +14 -309
- package/dist/chunk-XJWED257.js.map +1 -0
- package/dist/chunk-XSSLNINL.js +346 -0
- package/dist/chunk-XSSLNINL.js.map +1 -0
- package/dist/{chunk-6TGB7ECA.cjs → chunk-YD4XY74W.cjs} +12 -8
- package/dist/chunk-YD4XY74W.cjs.map +1 -0
- package/dist/{chunk-YX6TFX7H.js → chunk-YMZUE2IX.js} +66 -11
- package/dist/chunk-YMZUE2IX.js.map +1 -0
- package/dist/{chunk-4MMZD63H.js → chunk-Z77M7Q2R.js} +3 -3
- package/dist/{chunk-4MMZD63H.js.map → chunk-Z77M7Q2R.js.map} +1 -1
- package/dist/{chunk-CZ5IQB3L.js → chunk-ZSRXY5YT.js} +8 -5
- package/dist/chunk-ZSRXY5YT.js.map +1 -0
- package/dist/entries/apps.cjs +43 -42
- package/dist/entries/apps.js +8 -7
- package/dist/entries/captions.cjs +38 -30
- package/dist/entries/captions.d.cts +48 -2
- package/dist/entries/captions.d.ts +48 -2
- package/dist/entries/captions.js +1 -1
- package/dist/entries/credits.cjs +319 -191
- package/dist/entries/credits.d.cts +260 -19
- package/dist/entries/credits.d.ts +260 -19
- package/dist/entries/credits.js +11 -11
- package/dist/entries/entities.cjs +202 -193
- package/dist/entries/entities.d.cts +44 -9
- package/dist/entries/entities.d.ts +44 -9
- package/dist/entries/entities.js +2 -1
- package/dist/entries/llm-models.cjs +86 -62
- package/dist/entries/llm-models.d.cts +73 -20
- package/dist/entries/llm-models.d.ts +73 -20
- package/dist/entries/llm-models.js +2 -2
- package/dist/entries/media.cjs +79 -63
- package/dist/entries/media.d.cts +154 -1
- package/dist/entries/media.d.ts +154 -1
- package/dist/entries/media.js +1 -1
- package/dist/entries/model-catalog.cjs +205 -109
- package/dist/entries/model-catalog.d.cts +65 -58
- package/dist/entries/model-catalog.d.ts +65 -58
- package/dist/entries/model-catalog.js +4 -4
- package/dist/entries/models.cjs +527 -346
- package/dist/entries/models.d.cts +86 -7
- package/dist/entries/models.d.ts +86 -7
- package/dist/entries/models.js +6 -5
- package/dist/entries/nodes.cjs +220 -211
- package/dist/entries/nodes.d.cts +46 -3
- package/dist/entries/nodes.d.ts +46 -3
- package/dist/entries/nodes.js +10 -9
- package/dist/entries/pipeline.cjs +156 -152
- package/dist/entries/pipeline.d.cts +14 -4
- package/dist/entries/pipeline.d.ts +14 -4
- package/dist/entries/pipeline.js +3 -3
- package/dist/entries/social.cjs +177 -177
- package/dist/entries/social.js +2 -2
- package/dist/entries/ugc.cjs +71 -71
- package/dist/entries/ugc.js +4 -4
- package/dist/entries/video.cjs +174 -145
- package/dist/entries/video.d.cts +114 -2
- package/dist/entries/video.d.ts +114 -2
- package/dist/entries/video.js +7 -6
- package/dist/entries/workflow.cjs +150 -150
- package/dist/entries/workflow.d.cts +1 -1
- package/dist/entries/workflow.d.ts +1 -1
- package/dist/entries/workflow.js +2 -2
- package/dist/index.cjs +2430 -1929
- package/dist/index.d.cts +13 -12
- package/dist/index.d.ts +13 -12
- package/dist/index.js +28 -27
- package/dist/{model-catalog-C_Eo35tL.d.cts → model-catalog-BoUKGFNl.d.cts} +182 -3
- package/dist/{model-catalog-C_Eo35tL.d.ts → model-catalog-BoUKGFNl.d.ts} +182 -3
- package/dist/{model-constants-DWcxOmaY.d.cts → model-constants-BElS3AeE.d.ts} +142 -23
- package/dist/{model-constants-Bg4ccSQb.d.ts → model-constants-CpQz1bGa.d.cts} +142 -23
- package/dist/tts-capabilities-BtnDWK9K.d.ts +133 -0
- package/dist/tts-capabilities-C52UccTI.d.cts +133 -0
- package/package.json +1 -1
- package/src/__tests__/add-captions-nemotron-pricing.test.ts +111 -0
- package/src/__tests__/dialogue-capabilities.test.ts +167 -6
- package/src/__tests__/extend-providers.test.ts +353 -26
- package/src/__tests__/fixtures/mask-composite-quote-parity.json +1 -1
- package/src/__tests__/fixtures/measured-input-quote-parity.json +1435 -0
- package/src/__tests__/fixtures/planned-length-quote-parity.json +1866 -0
- package/src/__tests__/fixtures/video-utility-quote-parity.json +2343 -0
- package/src/__tests__/flux-3-klein.test.ts +203 -0
- package/src/__tests__/gpt-image-2-6-formats.test.ts +3 -1
- package/src/__tests__/kling4-catalog.test.ts +1 -1
- package/src/__tests__/llm-models.test.ts +48 -13
- package/src/__tests__/llm-price-key.test.ts +12 -0
- package/src/__tests__/model-makers.test.ts +3 -0
- package/src/__tests__/node-runtime-keys.test.ts +7 -0
- package/src/__tests__/normalize-node-params.test.ts +147 -1
- package/src/__tests__/retired-lip-sync-providers.test.ts +43 -0
- package/src/__tests__/seedance-extend-source-credit-id.test.ts +89 -0
- package/src/__tests__/sequence-execution.test.ts +22 -1
- package/src/__tests__/speech-pricing.test.ts +62 -1
- package/src/__tests__/suno-credit-type.test.ts +21 -2
- package/src/__tests__/transcribe-capabilities.test.ts +4 -2
- package/src/__tests__/tts-capabilities.test.ts +160 -4
- package/src/__tests__/video-analysis-catalog-sync.test.ts +4 -2
- package/src/__tests__/video-analysis-pricing.test.ts +22 -9
- package/src/__tests__/video-subjects.test.ts +192 -0
- package/src/__tests__/wired-character-names.test.ts +142 -0
- package/src/caption-styles.ts +62 -0
- package/src/credit-estimators/add-captions-nemotron.ts +73 -0
- package/src/credit-estimators/index.ts +14 -0
- package/src/credit-estimators/speech.ts +57 -9
- package/src/credit-identifiers.ts +284 -13
- package/src/dialogue-capabilities.ts +220 -3
- package/src/dubbing-structure.ts +186 -0
- package/src/entries/captions.ts +2 -0
- package/src/entries/credits.ts +25 -1
- package/src/entries/entities.ts +2 -0
- package/src/entries/llm-models.ts +7 -0
- package/src/entries/media.ts +3 -1
- package/src/entries/model-catalog.ts +30 -0
- package/src/entries/models.ts +54 -0
- package/src/entries/nodes.ts +2 -0
- package/src/entries/pipeline.ts +1 -1
- package/src/entries/video.ts +8 -1
- package/src/flux-3-klein.ts +69 -0
- package/src/gemini-tts.ts +144 -0
- package/src/input-image-pricing.ts +23 -6
- package/src/llm-models.ts +130 -36
- package/src/model-catalog.ts +539 -25
- package/src/model-constants.ts +247 -25
- package/src/node-default-mappings.ts +3 -0
- package/src/node-runtime-keys.ts +3 -0
- package/src/normalize-node-params.ts +123 -2
- package/src/seedance-extend-rate.ts +116 -0
- package/src/sequence-execution.ts +24 -0
- package/src/transcribe-preflight.ts +23 -0
- package/src/tts-capabilities.ts +193 -1
- package/src/video-analysis-pricing.ts +39 -15
- package/src/video-character-refs.ts +160 -3
- package/src/wired-character-names.ts +134 -18
- package/src/wired-character-video-subjects.ts +63 -0
- package/dist/chunk-63H4C56Q.cjs +0 -38
- package/dist/chunk-63H4C56Q.cjs.map +0 -1
- package/dist/chunk-6M563QE6.js.map +0 -1
- package/dist/chunk-6TGB7ECA.cjs.map +0 -1
- package/dist/chunk-6XUG4L7X.cjs +0 -54
- package/dist/chunk-6XUG4L7X.cjs.map +0 -1
- package/dist/chunk-BLJUCPMV.cjs.map +0 -1
- package/dist/chunk-BMJVKYVB.js.map +0 -1
- package/dist/chunk-CZ5IQB3L.js.map +0 -1
- package/dist/chunk-F6WGGYQW.cjs.map +0 -1
- package/dist/chunk-GMBDLNLD.cjs.map +0 -1
- package/dist/chunk-GSKLPI3J.cjs.map +0 -1
- package/dist/chunk-HBXF6RUU.js +0 -31
- package/dist/chunk-HBXF6RUU.js.map +0 -1
- package/dist/chunk-HSHCCBIV.js.map +0 -1
- package/dist/chunk-HWQ2SYNA.js.map +0 -1
- package/dist/chunk-IY3Y462W.js +0 -42
- package/dist/chunk-IY3Y462W.js.map +0 -1
- package/dist/chunk-KHH54GRP.cjs.map +0 -1
- package/dist/chunk-KMGCHV6O.js.map +0 -1
- package/dist/chunk-LH72PQO2.cjs.map +0 -1
- package/dist/chunk-M5OCFGHF.cjs.map +0 -1
- package/dist/chunk-NIAFR5EE.js.map +0 -1
- package/dist/chunk-O7RZRUMZ.js.map +0 -1
- package/dist/chunk-OV3JTKBY.js.map +0 -1
- package/dist/chunk-PSKZKLDG.js.map +0 -1
- package/dist/chunk-Q6IES3U2.js.map +0 -1
- package/dist/chunk-TM5JYSJF.cjs.map +0 -1
- package/dist/chunk-WRSWH7US.cjs.map +0 -1
- package/dist/chunk-XBTYGQ6Z.js.map +0 -1
- package/dist/chunk-XGGZWA4A.cjs.map +0 -1
- package/dist/chunk-XGVJGNZW.cjs.map +0 -1
- package/dist/chunk-Y35JQPT6.cjs.map +0 -1
- package/dist/chunk-Y4GCJJPF.cjs.map +0 -1
- package/dist/chunk-YUER7TJG.js.map +0 -1
- package/dist/chunk-YX6TFX7H.js.map +0 -1
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dubbing structure — the wire contract of a dub read back by its job id
|
|
3
|
+
* (`GET /v1/dubbing/:jobId`), and of the captions export beside it
|
|
4
|
+
* (`GET /v1/dubbing/:jobId/captions`).
|
|
5
|
+
*
|
|
6
|
+
* One shape whichever engine made the dub, so a client is written once. A
|
|
7
|
+
* field an engine does not tell is null, never absent:
|
|
8
|
+
* - `sourceSegmentId` names the source line a language's line translates.
|
|
9
|
+
* It is null where the dub's lines carry no link to the source lines; the
|
|
10
|
+
* two lists are then read side by side, by time.
|
|
11
|
+
* - `sourceText` is the original text a line translates, as the dub keeps
|
|
12
|
+
* it beside the line; null where the dub keeps none. Each of the two is
|
|
13
|
+
* told on its own: a line can carry `sourceText` and no `sourceSegmentId`.
|
|
14
|
+
* - a speaker's `name` and `voice` are null until they can be read.
|
|
15
|
+
*
|
|
16
|
+
* `capabilities` says what can be done to this dub now. A client offers an
|
|
17
|
+
* action only when its capability is true.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/** The caption file formats a dub exports. */
|
|
21
|
+
export const DUBBING_CAPTION_FORMATS = ["srt", "vtt"] as const
|
|
22
|
+
export type DubbingCaptionFormat = (typeof DUBBING_CAPTION_FORMATS)[number]
|
|
23
|
+
|
|
24
|
+
/** The `language` value that names the original speech in a captions request. */
|
|
25
|
+
export const DUBBING_SOURCE_LANGUAGE = "source"
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Where a language of a dub stands:
|
|
29
|
+
* - `processing`: being made; its lines are not readable yet.
|
|
30
|
+
* - `completed`: it is made; its lines and captions are readable where the dubbing service gives them.
|
|
31
|
+
* - `stale`: its lines changed after its media was last made.
|
|
32
|
+
* - `failed`: it was not made.
|
|
33
|
+
*/
|
|
34
|
+
export const DUBBING_LANGUAGE_STATUSES = ["processing", "completed", "stale", "failed"] as const
|
|
35
|
+
export type DubbingLanguageStatus = (typeof DUBBING_LANGUAGE_STATUSES)[number]
|
|
36
|
+
|
|
37
|
+
/** One line of the original speech. Times are seconds from the start of the media. */
|
|
38
|
+
export interface DubbingSourceSegment {
|
|
39
|
+
/** Unique within the source lines. */
|
|
40
|
+
id: string
|
|
41
|
+
speakerId: string | null
|
|
42
|
+
start: number
|
|
43
|
+
end: number
|
|
44
|
+
text: string
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** One line of a dubbed language. Times are seconds from the start of the media. */
|
|
48
|
+
export interface DubbingSegment {
|
|
49
|
+
/** Unique within this language's lines. */
|
|
50
|
+
id: string
|
|
51
|
+
speakerId: string | null
|
|
52
|
+
start: number
|
|
53
|
+
end: number
|
|
54
|
+
/**
|
|
55
|
+
* The `id` of the source line this one translates; null where the dub's
|
|
56
|
+
* lines carry no link to the source lines.
|
|
57
|
+
*/
|
|
58
|
+
sourceSegmentId: string | null
|
|
59
|
+
/**
|
|
60
|
+
* The original text this line translates, as the dub keeps it beside the
|
|
61
|
+
* line; null where it keeps none. It can be told where `sourceSegmentId` is
|
|
62
|
+
* null.
|
|
63
|
+
*/
|
|
64
|
+
sourceText: string | null
|
|
65
|
+
text: string
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** One language a dub speaks. */
|
|
69
|
+
export interface DubbingLanguage {
|
|
70
|
+
/** The language code the dub was asked for (`es`, `pt-BR`); unique within a dub. */
|
|
71
|
+
code: string
|
|
72
|
+
/**
|
|
73
|
+
* The job whose result is this language's dubbed media. null when the
|
|
74
|
+
* language was made but no job of the account holds its media: adding the
|
|
75
|
+
* language again delivers it, unless its status is `stale` (its lines
|
|
76
|
+
* changed after its media was made), when adding it is refused.
|
|
77
|
+
*/
|
|
78
|
+
jobId: string | null
|
|
79
|
+
status: DubbingLanguageStatus
|
|
80
|
+
/** Empty unless `status` is `completed` or `stale`, and where the dubbing service does not give the language's lines. */
|
|
81
|
+
segments: DubbingSegment[]
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** The voice a speaker is dubbed in. */
|
|
85
|
+
export interface DubbingSpeakerVoice {
|
|
86
|
+
id: string
|
|
87
|
+
name: string | null
|
|
88
|
+
previewUrl: string | null
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** One speaker the dub tells apart. */
|
|
92
|
+
export interface DubbingSpeaker {
|
|
93
|
+
/** The `speakerId` its lines carry. */
|
|
94
|
+
id: string
|
|
95
|
+
name: string | null
|
|
96
|
+
voice: DubbingSpeakerVoice | null
|
|
97
|
+
/** How many source lines the speaker has (lines of the first language when the source is not readable). */
|
|
98
|
+
segmentCount: number
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** What can be done to a dub now. */
|
|
102
|
+
export interface DubbingCapabilities {
|
|
103
|
+
/** Change a line's text. */
|
|
104
|
+
editSegments: boolean
|
|
105
|
+
/** Make chosen lines again. */
|
|
106
|
+
regenerate: boolean
|
|
107
|
+
/** Replace a speaker's voice. */
|
|
108
|
+
setSpeakerVoice: boolean
|
|
109
|
+
/** Render the media again after edits. */
|
|
110
|
+
render: boolean
|
|
111
|
+
/** Add a target language (`POST /v1/dubbing/:jobId/languages`). */
|
|
112
|
+
addLanguage: boolean
|
|
113
|
+
/** Export captions (`GET /v1/dubbing/:jobId/captions`). */
|
|
114
|
+
captions: boolean
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* What adding a language to this dub is charged. The price is the answer of
|
|
119
|
+
* `POST /v1/credits/model-costs` for `creditIdByLanguage[language] ?? creditId`.
|
|
120
|
+
*/
|
|
121
|
+
export interface DubbingAddLanguagePrice {
|
|
122
|
+
/** Whole minutes an added language is charged for; null when the length is only known once it runs. */
|
|
123
|
+
billableMinutes: number | null
|
|
124
|
+
/** The price id of an added language; null with `billableMinutes`. */
|
|
125
|
+
creditId: string | null
|
|
126
|
+
/** The languages priced by another id than `creditId`, by lowercase language code. */
|
|
127
|
+
creditIdByLanguage: Record<string, string>
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** `GET /v1/dubbing/:jobId`. */
|
|
131
|
+
export interface DubbingStructure {
|
|
132
|
+
/** The job the dub was created by. Languages added later hang off it. */
|
|
133
|
+
jobId: string
|
|
134
|
+
/** Seconds of media the dub covers; null when not known. */
|
|
135
|
+
durationSec: number | null
|
|
136
|
+
/** The original speech; null when its lines are not readable. */
|
|
137
|
+
source: { language: string | null; segments: DubbingSourceSegment[] } | null
|
|
138
|
+
languages: DubbingLanguage[]
|
|
139
|
+
speakers: DubbingSpeaker[]
|
|
140
|
+
capabilities: DubbingCapabilities
|
|
141
|
+
addLanguage: DubbingAddLanguagePrice
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/** `POST /v1/dubbing/:jobId/languages` request. */
|
|
145
|
+
export interface DubbingAddLanguageInput {
|
|
146
|
+
/** The language to add (`es`, `pt-BR`). */
|
|
147
|
+
targetLanguage: string
|
|
148
|
+
/** The rights confirmation, when the dub was made from a link the deployment asks one for. */
|
|
149
|
+
confirmationId?: string
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/** `POST /v1/dubbing/:jobId/languages` response: the job that delivers the added language. */
|
|
153
|
+
export interface DubbingAddLanguageResult {
|
|
154
|
+
jobId: string
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* The error codes the dubbing reads and the add-language call answer beside
|
|
159
|
+
* the platform's own (`not_found`, `unauthorized`, `validation_error`). Each
|
|
160
|
+
* is the `error.code` of the response body.
|
|
161
|
+
*/
|
|
162
|
+
export const DUBBING_ERROR_CODES = [
|
|
163
|
+
/** 422: the job is not a dub. */
|
|
164
|
+
"not_a_dubbing_job",
|
|
165
|
+
/** 409: the dub is still being made. */
|
|
166
|
+
"dubbing_not_ready",
|
|
167
|
+
/** 422: the dub was not made. */
|
|
168
|
+
"dubbing_failed",
|
|
169
|
+
/** 410: the dub is no longer held where it was made. */
|
|
170
|
+
"dubbing_unavailable",
|
|
171
|
+
/** 404: the dub has no such language. */
|
|
172
|
+
"dubbing_language_not_found",
|
|
173
|
+
/** 409: that language is still being made. */
|
|
174
|
+
"dubbing_language_processing",
|
|
175
|
+
/** 422: that language has no captions to export. */
|
|
176
|
+
"dubbing_captions_unavailable",
|
|
177
|
+
/** 409: the dub already speaks that language. */
|
|
178
|
+
"dubbing_language_exists",
|
|
179
|
+
/** 422: the length of the dub cannot be read, so a language cannot be priced. */
|
|
180
|
+
"unreadable_dubbing_source",
|
|
181
|
+
/** 413: the dub is longer than 30 minutes, so a language cannot be added to it. */
|
|
182
|
+
"media_duration_exceeds_limit",
|
|
183
|
+
/** 502: the dubbing service did not answer. */
|
|
184
|
+
"dubbing_read_failed",
|
|
185
|
+
] as const
|
|
186
|
+
export type DubbingErrorCode = (typeof DUBBING_ERROR_CODES)[number]
|
package/src/entries/captions.ts
CHANGED
package/src/entries/credits.ts
CHANGED
|
@@ -26,6 +26,16 @@ export {
|
|
|
26
26
|
seedanceVideoEditCreditId,
|
|
27
27
|
tailExtendCreditId,
|
|
28
28
|
tailExtendResolution,
|
|
29
|
+
seedanceExtendRateCreditId,
|
|
30
|
+
seedanceExtendFullWindowCreditId,
|
|
31
|
+
seedanceExtendSourceCreditId,
|
|
32
|
+
pixverseExtendCreditId,
|
|
33
|
+
pixverseExtendQuality,
|
|
34
|
+
catalogExtendCreditId,
|
|
35
|
+
catalogExtendResolution,
|
|
36
|
+
grokExtendCreditId,
|
|
37
|
+
grokExtendSeconds,
|
|
38
|
+
grokExtendWiredSourceResolution,
|
|
29
39
|
seedanceExtendCreditId,
|
|
30
40
|
seedanceExtendResolution,
|
|
31
41
|
videoGenerationCreditId,
|
|
@@ -45,7 +55,21 @@ export {
|
|
|
45
55
|
SUNO_VERSION_PRICED_OPERATIONS,
|
|
46
56
|
SUNO_SELECT_OPERATIONS,
|
|
47
57
|
} from "../credit-identifiers.js"
|
|
48
|
-
export type { NormalizedImageGen, PricedVideoSelection } from "../credit-identifiers.js"
|
|
58
|
+
export type { NormalizedImageGen, PricedVideoSelection, GrokExtendSourceResolution } from "../credit-identifiers.js"
|
|
59
|
+
export {
|
|
60
|
+
SEEDANCE_EXTEND_SENT_PRICED_PROVIDER,
|
|
61
|
+
SEEDANCE_EXTEND_CONTEXT_MAX_SEC,
|
|
62
|
+
SEEDANCE_EXTEND_RATE_SECONDS,
|
|
63
|
+
SEEDANCE_EXTEND_RATE_CREDIT_IDS,
|
|
64
|
+
isSeedanceExtendPricedBySecondsSent,
|
|
65
|
+
isSeedanceExtendRateCreditId,
|
|
66
|
+
seedanceExtendAddedSec,
|
|
67
|
+
seedanceExtendRefusesSource,
|
|
68
|
+
seedanceExtendSourceSec,
|
|
69
|
+
seedanceExtendSentSec,
|
|
70
|
+
seedanceExtendUnits,
|
|
71
|
+
type SentPricedSeedanceExtendProvider,
|
|
72
|
+
} from "../seedance-extend-rate.js"
|
|
49
73
|
export * from "../credit-estimators/index.js"
|
|
50
74
|
export {
|
|
51
75
|
resolveTopazUpscale,
|
package/src/entries/entities.ts
CHANGED
|
@@ -50,7 +50,9 @@ export {
|
|
|
50
50
|
wiredCharacterNames,
|
|
51
51
|
wiredCharacterNamesOf,
|
|
52
52
|
wiredCharacterBySlug,
|
|
53
|
+
wiredCharacterSlug,
|
|
53
54
|
wiredCharacterKey,
|
|
55
|
+
wiredCharacterVideoUrls,
|
|
54
56
|
aliasRetiredCharacterMentions,
|
|
55
57
|
RETIRED_CHARACTER_MENTION_SLUGS,
|
|
56
58
|
} from "../wired-character-names.js"
|
|
@@ -45,6 +45,13 @@ export {
|
|
|
45
45
|
getLlmModel,
|
|
46
46
|
getLlmTier,
|
|
47
47
|
getLlmModalityCaps,
|
|
48
|
+
type LlmModalityCaps,
|
|
49
|
+
llmAcceptsFiles,
|
|
50
|
+
LLM_FILE_MODELS,
|
|
51
|
+
LLM_REFERENCE_FILES_MAX,
|
|
52
|
+
LLM_REFERENCE_FILES_MAX_TOTAL_BYTES,
|
|
53
|
+
LLM_REFERENCE_FILES_MAX_PAGES,
|
|
54
|
+
LLM_REFERENCE_FILE_MIME_TYPES,
|
|
48
55
|
buildLlmCreditIdentifier,
|
|
49
56
|
llmCreditRung,
|
|
50
57
|
resolveLlmCreditId,
|
package/src/entries/media.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `@nodaro/shared/media` — Media-editing contracts: image overlays, masks, Lottie slots, depth, inpaint regions, audio FX presets, the FreeCut protocol.
|
|
2
|
+
* `@nodaro/shared/media` — Media-editing contracts: image overlays, masks, Lottie slots, depth, inpaint regions, audio FX presets, the FreeCut protocol, the dubbing structure.
|
|
3
3
|
*
|
|
4
4
|
* One of the package's subpath entries (see `src/index.ts`). The root
|
|
5
5
|
* re-exports every entry, so each name here is also importable from
|
|
@@ -37,3 +37,5 @@ export * from "../generate-mask.js"
|
|
|
37
37
|
export * from "../mask-composite.js"
|
|
38
38
|
export * from "../image-overlay-shapes.js"
|
|
39
39
|
export * from "../image-overlay-platforms.js"
|
|
40
|
+
// --- A dub read back by job id: its lines per language, its captions formats ---
|
|
41
|
+
export * from "../dubbing-structure.js"
|
|
@@ -53,10 +53,23 @@ export {
|
|
|
53
53
|
seedream55Resolution,
|
|
54
54
|
} from "../seedream-5-5.js"
|
|
55
55
|
export type { Seedream55Model, Seedream55Resolution } from "../seedream-5-5.js"
|
|
56
|
+
export {
|
|
57
|
+
FLUX_3_KLEIN_DEFAULT_RESOLUTION,
|
|
58
|
+
FLUX_3_KLEIN_I2I,
|
|
59
|
+
FLUX_3_KLEIN_MAX_INPUT_IMAGES,
|
|
60
|
+
FLUX_3_KLEIN_RESOLUTIONS,
|
|
61
|
+
FLUX_3_KLEIN_T2I,
|
|
62
|
+
flux3KleinCreditId,
|
|
63
|
+
flux3KleinResolution,
|
|
64
|
+
isFlux3Klein,
|
|
65
|
+
isFlux3KleinI2i,
|
|
66
|
+
} from "../flux-3-klein.js"
|
|
67
|
+
export type { Flux3KleinModel, Flux3KleinResolution } from "../flux-3-klein.js"
|
|
56
68
|
// The models priced by the input images a run sends, and how a run's images are counted.
|
|
57
69
|
export {
|
|
58
70
|
isPricedPerInputImage,
|
|
59
71
|
isPricedPerInputImageEdit,
|
|
72
|
+
priceReadsInputImages,
|
|
60
73
|
pricedEstimatedImages,
|
|
61
74
|
pricedSentImages,
|
|
62
75
|
} from "../input-image-pricing.js"
|
|
@@ -72,6 +85,7 @@ export {
|
|
|
72
85
|
isModelMakerId,
|
|
73
86
|
modelMakerOf,
|
|
74
87
|
SPEECH_UNIT_PRICE_NOTE,
|
|
88
|
+
SPEECH_PER_1K_PRICE_NOTE,
|
|
75
89
|
listModels,
|
|
76
90
|
groupByFamily,
|
|
77
91
|
groupByKindAndFamily,
|
|
@@ -139,8 +153,10 @@ export type {
|
|
|
139
153
|
ModelInputContext,
|
|
140
154
|
SourceImageSize,
|
|
141
155
|
TtsCapabilities,
|
|
156
|
+
TtsDirectionSheet,
|
|
142
157
|
TtsSettingLever,
|
|
143
158
|
} from "../model-catalog.js"
|
|
159
|
+
export type { TtsNamedVoice, GeminiTtsVoiceGroup } from "../gemini-tts.js"
|
|
144
160
|
// Speech-model capability lookups (derive from `ModelCatalogEntry.tts` above).
|
|
145
161
|
export {
|
|
146
162
|
TTS_PROVIDER_ALIASES,
|
|
@@ -153,7 +169,21 @@ export {
|
|
|
153
169
|
ttsHasLever,
|
|
154
170
|
ttsLanguageCodes,
|
|
155
171
|
ttsSupportsTimestamps,
|
|
172
|
+
ttsNamedVoices,
|
|
173
|
+
ttsAcceptsVoice,
|
|
174
|
+
ttsNamedVoiceFor,
|
|
175
|
+
ttsVoiceForModel,
|
|
176
|
+
ttsDirection,
|
|
177
|
+
ttsAngleTags,
|
|
178
|
+
ttsDirectionFor,
|
|
179
|
+
ttsDirectionProblem,
|
|
180
|
+
ttsTakesReplica,
|
|
181
|
+
replicaModels,
|
|
182
|
+
replicaOf,
|
|
183
|
+
ttsReplicaProblem,
|
|
184
|
+
replicaConsentProblem,
|
|
156
185
|
} from "../tts-capabilities.js"
|
|
186
|
+
export type { TtsDirectionValues } from "../tts-capabilities.js"
|
|
157
187
|
// Per-model safety-filter retry/fallback policy (derives from
|
|
158
188
|
// `ModelCatalogEntry.safetyFilter` above).
|
|
159
189
|
export { safetyRetryPolicy } from "../safety-retry-policy.js"
|
package/src/entries/models.ts
CHANGED
|
@@ -90,7 +90,18 @@ export {
|
|
|
90
90
|
EXTEND_VIDEO_PROVIDERS,
|
|
91
91
|
isSeedanceExtendProvider,
|
|
92
92
|
isTailExtendProvider,
|
|
93
|
+
PIXVERSE_V6_EXTEND_PROVIDER,
|
|
94
|
+
isPixverseExtendProvider,
|
|
95
|
+
isCatalogExtendProvider,
|
|
96
|
+
extendHasSoundSwitch,
|
|
97
|
+
GROK_EXTEND_PROVIDER,
|
|
98
|
+
isGrokExtendProvider,
|
|
99
|
+
GROK_EXTEND_SOURCE_MODELS,
|
|
100
|
+
isGrokExtendSourceModel,
|
|
93
101
|
LIP_SYNC_PROVIDERS,
|
|
102
|
+
RETIRED_LIP_SYNC_PROVIDERS,
|
|
103
|
+
retiredLipSyncProviderName,
|
|
104
|
+
retiredLipSyncProviderMessage,
|
|
94
105
|
REPLICATE_LIP_SYNC_PROVIDERS,
|
|
95
106
|
FAL_LIP_SYNC_PROVIDERS,
|
|
96
107
|
VIDEO_INPUT_LIP_SYNC_PROVIDERS,
|
|
@@ -154,6 +165,8 @@ export {
|
|
|
154
165
|
VIDEO_REF_LIMITS_BY_PROVIDER,
|
|
155
166
|
VIDEO_REF_VIDEO_DURATION_LIMITS,
|
|
156
167
|
checkRefVideoDurations,
|
|
168
|
+
VIDEO_CHARACTER_CLIP_DURATION_LIMITS,
|
|
169
|
+
checkCharacterClipDurations,
|
|
157
170
|
VIDEO_PROVIDERS_REQUIRING_IMAGE,
|
|
158
171
|
videoProviderRequiresImage,
|
|
159
172
|
videoProviderFoldsLoneEndFrame,
|
|
@@ -247,6 +260,7 @@ export {
|
|
|
247
260
|
VIDEO_REF_AUDIO_RULES,
|
|
248
261
|
checkRefAudioRules,
|
|
249
262
|
DEFAULT_VIDEO_PROVIDER,
|
|
263
|
+
LEGACY_VIDEO_NODE_DEFAULT_PROVIDER,
|
|
250
264
|
DEFAULT_VIDEO_DURATION_SEC,
|
|
251
265
|
applyDefaultVideoSelection,
|
|
252
266
|
PRICING_DEFAULT_DURATION_SEC,
|
|
@@ -314,6 +328,9 @@ export type {
|
|
|
314
328
|
ExtendVideoProvider,
|
|
315
329
|
SeedanceExtendProvider,
|
|
316
330
|
TailExtendProvider,
|
|
331
|
+
PixverseExtendProvider,
|
|
332
|
+
CatalogExtendProvider,
|
|
333
|
+
GrokExtendProvider,
|
|
317
334
|
FaceSwapProvider,
|
|
318
335
|
LipSyncProvider,
|
|
319
336
|
MotionTransferProviderType,
|
|
@@ -359,6 +376,27 @@ export { SEEDANCE_REFERENCE_TASK_TYPES, SEEDANCE_EDIT_REF_VIDEO_SEC } from "../s
|
|
|
359
376
|
export type { SeedanceReferenceTaskType, DeclaredSeedanceTaskType } from "../seedance-task-type.js"
|
|
360
377
|
export { GEMINI_OMNI_VOICE_PRESETS, GEMINI_OMNI_VOICE_PRESET_IDS } from "../gemini-omni-voices.js"
|
|
361
378
|
export type { GeminiOmniVoicePreset, GeminiOmniVoicePresetId } from "../gemini-omni-voices.js"
|
|
379
|
+
export {
|
|
380
|
+
GEMINI_TTS_VOICE_GROUPS,
|
|
381
|
+
GEMINI_3_8_TTS_VOICES,
|
|
382
|
+
GEMINI_3_1_TTS_VOICES,
|
|
383
|
+
GEMINI_3_8_DEFAULT_VOICE,
|
|
384
|
+
GEMINI_3_1_DEFAULT_VOICE,
|
|
385
|
+
GEMINI_3_8_TONE_TAGS,
|
|
386
|
+
GEMINI_3_1_TTS_STYLES,
|
|
387
|
+
GEMINI_3_1_TTS_PACES,
|
|
388
|
+
GEMINI_3_1_TTS_ACCENTS,
|
|
389
|
+
GEMINI_TTS_MAX_CHARS,
|
|
390
|
+
TTS_DIRECTION_MAX_CHARS,
|
|
391
|
+
REPLICA_MAX_BYTES,
|
|
392
|
+
REPLICA_SOURCE_MIN_SEC,
|
|
393
|
+
REPLICA_SOURCE_MAX_SEC,
|
|
394
|
+
REPLICA_CONSENT_MAX_SEC,
|
|
395
|
+
REPLICA_CONSENT_SENTENCE,
|
|
396
|
+
REPLICA_CONSENT_ATTESTATION,
|
|
397
|
+
type TtsReplica,
|
|
398
|
+
type TtsReplicaRequest,
|
|
399
|
+
} from "../gemini-tts.js"
|
|
362
400
|
export {
|
|
363
401
|
NODE_DEFAULT_TYPES,
|
|
364
402
|
validateProviderForNodeType,
|
|
@@ -384,6 +422,22 @@ export {
|
|
|
384
422
|
dialogueHasLever,
|
|
385
423
|
dialogueStabilityAccepted,
|
|
386
424
|
dialogueSupportsTimestamps,
|
|
425
|
+
dialogueMaxSpeakers,
|
|
426
|
+
dialogueTakesFillerWords,
|
|
427
|
+
dialogueVoicesForModel,
|
|
428
|
+
ELEVENLABS_DIALOGUE_MAX_VOICES,
|
|
429
|
+
dialogueLineStyleMaxChars,
|
|
430
|
+
dialogueLineStyleFor,
|
|
431
|
+
dialogueTakesSpeakerDirection,
|
|
432
|
+
dialogueSpeakerDirectionFor,
|
|
433
|
+
dialogueVoicesOf,
|
|
434
|
+
dialogueProblem,
|
|
435
|
+
dialogueOutputFormats,
|
|
436
|
+
dialogueOutputFormatFor,
|
|
437
|
+
dialogueReplicaVoices,
|
|
438
|
+
dialogueReplicaOf,
|
|
439
|
+
type DialogueRequestShape,
|
|
440
|
+
type DialogueProblem,
|
|
387
441
|
} from "../dialogue-capabilities.js"
|
|
388
442
|
export * from "../provider-directive-defaults.js"
|
|
389
443
|
export * from "../lora-routing.js"
|
package/src/entries/nodes.ts
CHANGED
|
@@ -194,6 +194,7 @@ export {
|
|
|
194
194
|
transcribeTranslationRefusal,
|
|
195
195
|
transcribeTargetLanguageOf,
|
|
196
196
|
findWordlessTranscriptFeeds,
|
|
197
|
+
transcribeNodeReturnsWords,
|
|
197
198
|
} from "../transcribe-preflight.js"
|
|
198
199
|
export type { PreflightGraphNode, PreflightGraphEdge, WordlessTranscriptFeed } from "../transcribe-preflight.js"
|
|
199
200
|
export {
|
|
@@ -224,6 +225,7 @@ export {
|
|
|
224
225
|
PHOTO_AUTO_ASPECT_NODE_TYPES,
|
|
225
226
|
nodeAspectRatio,
|
|
226
227
|
normalizeNodeModelParams,
|
|
228
|
+
withListedReferenceTaskTypes,
|
|
227
229
|
describeNodeAdjustments,
|
|
228
230
|
} from "../normalize-node-params.js"
|
|
229
231
|
export type { NodeParamAdjustment, NormalizedNodes } from "../normalize-node-params.js"
|
package/src/entries/pipeline.ts
CHANGED
|
@@ -40,4 +40,4 @@ export {
|
|
|
40
40
|
STUDIO_KEYFRAME_REVIEW_KEYS,
|
|
41
41
|
STUDIO_KEYFRAME_ACCEPTANCE_PRIVATE_KEYS,
|
|
42
42
|
} from "../studio-transient.js"
|
|
43
|
-
export { STUDIO_DEPENDENT_FRAMES_CAPABILITY, SequenceExecutionRequiredError, requiresSequenceExecution, assertCanvasExecutionAllowed } from "../sequence-execution"
|
|
43
|
+
export { STUDIO_DEPENDENT_FRAMES_CAPABILITY, SequenceExecutionRequiredError, requiresSequenceExecution, assertCanvasExecutionAllowed, isCodecOwnedDocument } from "../sequence-execution"
|
package/src/entries/video.ts
CHANGED
|
@@ -11,6 +11,12 @@ export {
|
|
|
11
11
|
VIDEO_CHARACTER_NAME_MAX,
|
|
12
12
|
VIDEO_CHARACTER_EXTRA_IMAGES_MAX,
|
|
13
13
|
characterReferencesFromWired,
|
|
14
|
+
characterVideoUrls,
|
|
15
|
+
seatCharacterVideos,
|
|
16
|
+
pricedReferenceVideoUrls,
|
|
17
|
+
videoCharacterClipsBilledAsReferenceVideo,
|
|
18
|
+
videoCharacterVideoCap,
|
|
19
|
+
videoCharacterVideoProviders,
|
|
14
20
|
videoCharacterRefCap,
|
|
15
21
|
videoCharacterRefProviders,
|
|
16
22
|
videoCharacterRefUnits,
|
|
@@ -22,7 +28,8 @@ export {
|
|
|
22
28
|
VIDEO_CHARACTER_VOICE_DESCRIPTION_MAX,
|
|
23
29
|
VIDEO_CHARACTER_VOICE_EXAMPLE_MAX,
|
|
24
30
|
} from "../video-character-refs.js"
|
|
25
|
-
export
|
|
31
|
+
export { wiredCharacterSubjectClips } from "../wired-character-video-subjects.js"
|
|
32
|
+
export type { VideoCharacterReference, VideoCharacterVoice, VideoCharacterRefProblem, CharacterVideoSeatProblem } from "../video-character-refs.js"
|
|
26
33
|
export { CONTAINER_OVERHANG_SEC, extractVideoDurationFromNode, editPlanSourceDurationSec } from "../video-duration.js"
|
|
27
34
|
// --- Video URL node + social-video import (host allowlist, node output rule) ---
|
|
28
35
|
export {
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FLUX 3 Klein: a text-to-image id and its edit sibling, priced by size alone
|
|
3
|
+
* (1K, 2K or 4K). An edit's reference images cost nothing extra, so the edit
|
|
4
|
+
* id has the same rows as the text-to-image id.
|
|
5
|
+
*
|
|
6
|
+
* Only the ids and levers live in this published package. The rates are
|
|
7
|
+
* `backend/src/ee/billing/flux-3-klein-pricing.ts`.
|
|
8
|
+
*
|
|
9
|
+
* A different model from FLUX 2 Klein (`flux-2-klein`, which runs elsewhere):
|
|
10
|
+
* neither id may join a set keyed on the FLUX 2 family (`isFlux2Model`).
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export const FLUX_3_KLEIN_T2I = "flux-3-klein"
|
|
14
|
+
export const FLUX_3_KLEIN_I2I = "flux-3-klein-i2i"
|
|
15
|
+
export type Flux3KleinModel = typeof FLUX_3_KLEIN_T2I | typeof FLUX_3_KLEIN_I2I
|
|
16
|
+
|
|
17
|
+
/** The sizes it renders, smallest first. */
|
|
18
|
+
export const FLUX_3_KLEIN_RESOLUTIONS = ["1K", "2K", "4K"] as const
|
|
19
|
+
export type Flux3KleinResolution = (typeof FLUX_3_KLEIN_RESOLUTIONS)[number]
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The size a run renders when it names none: the provider's own default, and
|
|
23
|
+
* the size an unset or unknown value is priced and sent at.
|
|
24
|
+
*/
|
|
25
|
+
export const FLUX_3_KLEIN_DEFAULT_RESOLUTION: Flux3KleinResolution = "1K"
|
|
26
|
+
|
|
27
|
+
/** The most reference images one edit takes (`REF_IMAGE_MAX_LIMITS`). */
|
|
28
|
+
export const FLUX_3_KLEIN_MAX_INPUT_IMAGES = 10
|
|
29
|
+
|
|
30
|
+
export function isFlux3Klein(model: unknown): model is Flux3KleinModel {
|
|
31
|
+
return model === FLUX_3_KLEIN_T2I || model === FLUX_3_KLEIN_I2I
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function isFlux3KleinI2i(model: unknown): model is typeof FLUX_3_KLEIN_I2I {
|
|
35
|
+
return model === FLUX_3_KLEIN_I2I
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The size a FLUX 3 Klein run is priced and sent at: the one asked for when it
|
|
40
|
+
* is one of its sizes (any case), else the default. Unset is the default.
|
|
41
|
+
*/
|
|
42
|
+
export function flux3KleinResolution(resolution: unknown): Flux3KleinResolution {
|
|
43
|
+
const asked = typeof resolution === "string" ? resolution.trim().toUpperCase() : ""
|
|
44
|
+
return FLUX_3_KLEIN_RESOLUTIONS.find((r) => r === asked) ?? FLUX_3_KLEIN_DEFAULT_RESOLUTION
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The price id of a FLUX 3 Klein run: `flux-3-klein:<size>`, or
|
|
49
|
+
* `flux-3-klein-i2i:<size>` for an edit. The bare ids are never built here.
|
|
50
|
+
*
|
|
51
|
+
* A size off its list (a stored node, the multi-model preview pricing one
|
|
52
|
+
* node's data against every model) or none is priced at the default, 1K, which
|
|
53
|
+
* is what the provider renders with none. A text-to-image id sent any image
|
|
54
|
+
* runs on the edit endpoint (the KIE provider swaps it), so it is priced on the
|
|
55
|
+
* edit id whenever `referenceImageCount` is above 0. Every caller passes the
|
|
56
|
+
* images the run sends (`priceReadsInputImages` in `input-image-pricing.ts`: a
|
|
57
|
+
* base image, references, wired images, an entity's source), so the id priced
|
|
58
|
+
* is the id run. Both ids cost the same at each size.
|
|
59
|
+
*/
|
|
60
|
+
export function flux3KleinCreditId(
|
|
61
|
+
provider: Flux3KleinModel,
|
|
62
|
+
resolution: unknown,
|
|
63
|
+
referenceImageCount: number | undefined,
|
|
64
|
+
): string {
|
|
65
|
+
const size = flux3KleinResolution(resolution)
|
|
66
|
+
const images = Number.isFinite(referenceImageCount) ? Math.trunc(referenceImageCount as number) : 0
|
|
67
|
+
const model = provider === FLUX_3_KLEIN_I2I || images > 0 ? FLUX_3_KLEIN_I2I : FLUX_3_KLEIN_T2I
|
|
68
|
+
return `${model}:${size}`
|
|
69
|
+
}
|