@blitzreels/contracts 0.2.12 → 0.2.14

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 (253) hide show
  1. package/dist/ai-credit-costs.d.ts +6 -15
  2. package/dist/ai-credit-costs.d.ts.map +1 -1
  3. package/dist/ai-credit-costs.js +22 -40
  4. package/dist/ai-credit-costs.js.map +1 -1
  5. package/dist/audio-spend-quote.d.ts +42 -0
  6. package/dist/audio-spend-quote.d.ts.map +1 -0
  7. package/dist/audio-spend-quote.js +23 -0
  8. package/dist/audio-spend-quote.js.map +1 -0
  9. package/dist/carousel-creative-source.d.ts +50 -0
  10. package/dist/carousel-creative-source.d.ts.map +1 -0
  11. package/dist/carousel-creative-source.js +29 -0
  12. package/dist/carousel-creative-source.js.map +1 -0
  13. package/dist/carousel-document-present.d.ts +4 -0
  14. package/dist/carousel-document-present.d.ts.map +1 -1
  15. package/dist/carousel-document-present.js +3 -0
  16. package/dist/carousel-document-present.js.map +1 -1
  17. package/dist/carousel-recipe.d.ts +2 -3
  18. package/dist/carousel-recipe.d.ts.map +1 -1
  19. package/dist/carousel-recipe.js +20 -7
  20. package/dist/carousel-recipe.js.map +1 -1
  21. package/dist/carousel-template-catalog.d.ts +4 -0
  22. package/dist/carousel-template-catalog.d.ts.map +1 -1
  23. package/dist/carousel-template-catalog.js +7 -5
  24. package/dist/carousel-template-catalog.js.map +1 -1
  25. package/dist/carousels-contract.d.ts +349 -1
  26. package/dist/carousels-contract.d.ts.map +1 -1
  27. package/dist/carousels-contract.js +60 -2
  28. package/dist/carousels-contract.js.map +1 -1
  29. package/dist/clip-batch-estimate.d.ts +5 -0
  30. package/dist/clip-batch-estimate.d.ts.map +1 -1
  31. package/dist/clip-batch-estimate.js +7 -2
  32. package/dist/clip-batch-estimate.js.map +1 -1
  33. package/dist/content-batch-contract.d.ts +250 -0
  34. package/dist/content-batch-contract.d.ts.map +1 -0
  35. package/dist/content-batch-contract.js +85 -0
  36. package/dist/content-batch-contract.js.map +1 -0
  37. package/dist/content-generation-options.d.ts +31 -0
  38. package/dist/content-generation-options.d.ts.map +1 -0
  39. package/dist/content-generation-options.js +71 -0
  40. package/dist/content-generation-options.js.map +1 -0
  41. package/dist/content-review-contract.d.ts +38 -0
  42. package/dist/content-review-contract.d.ts.map +1 -0
  43. package/dist/content-review-contract.js +29 -0
  44. package/dist/content-review-contract.js.map +1 -0
  45. package/dist/creative-asset-contract.d.ts +26 -0
  46. package/dist/creative-asset-contract.d.ts.map +1 -0
  47. package/dist/creative-asset-contract.js +59 -0
  48. package/dist/creative-asset-contract.js.map +1 -0
  49. package/dist/creative-composition-contract.d.ts +4 -0
  50. package/dist/creative-composition-contract.d.ts.map +1 -0
  51. package/dist/creative-composition-contract.js +135 -0
  52. package/dist/creative-composition-contract.js.map +1 -0
  53. package/dist/creative-composition-duration.d.ts +30 -0
  54. package/dist/creative-composition-duration.d.ts.map +1 -0
  55. package/dist/creative-composition-duration.js +24 -0
  56. package/dist/creative-composition-duration.js.map +1 -0
  57. package/dist/creative-composition-edit.d.ts +8358 -0
  58. package/dist/creative-composition-edit.d.ts.map +1 -0
  59. package/dist/creative-composition-edit.js +212 -0
  60. package/dist/creative-composition-edit.js.map +1 -0
  61. package/dist/creative-composition-normalize.d.ts +12 -0
  62. package/dist/creative-composition-normalize.d.ts.map +1 -0
  63. package/dist/creative-composition-normalize.js +65 -0
  64. package/dist/creative-composition-normalize.js.map +1 -0
  65. package/dist/creative-composition-read.d.ts +9 -0
  66. package/dist/creative-composition-read.d.ts.map +1 -0
  67. package/dist/creative-composition-read.js +13 -0
  68. package/dist/creative-composition-read.js.map +1 -0
  69. package/dist/creative-composition-structure.d.ts +40 -0
  70. package/dist/creative-composition-structure.d.ts.map +1 -0
  71. package/dist/creative-composition-structure.js +113 -0
  72. package/dist/creative-composition-structure.js.map +1 -0
  73. package/dist/creative-composition-types.d.ts +334 -0
  74. package/dist/creative-composition-types.d.ts.map +1 -0
  75. package/dist/creative-composition-types.js +18 -0
  76. package/dist/creative-composition-types.js.map +1 -0
  77. package/dist/creative-controls-contract.d.ts +64 -0
  78. package/dist/creative-controls-contract.d.ts.map +1 -0
  79. package/dist/creative-controls-contract.js +87 -0
  80. package/dist/creative-controls-contract.js.map +1 -0
  81. package/dist/creative-element-contract.d.ts +4 -0
  82. package/dist/creative-element-contract.d.ts.map +1 -0
  83. package/dist/creative-element-contract.js +236 -0
  84. package/dist/creative-element-contract.js.map +1 -0
  85. package/dist/creative-font-contract.d.ts +22 -0
  86. package/dist/creative-font-contract.d.ts.map +1 -0
  87. package/dist/creative-font-contract.js +13 -0
  88. package/dist/creative-font-contract.js.map +1 -0
  89. package/dist/creative-learning-contract.d.ts +660 -0
  90. package/dist/creative-learning-contract.d.ts.map +1 -0
  91. package/dist/creative-learning-contract.js +110 -0
  92. package/dist/creative-learning-contract.js.map +1 -0
  93. package/dist/creative-map-contract.d.ts +166 -0
  94. package/dist/creative-map-contract.d.ts.map +1 -0
  95. package/dist/creative-map-contract.js +77 -0
  96. package/dist/creative-map-contract.js.map +1 -0
  97. package/dist/creative-source-contract.d.ts +328 -0
  98. package/dist/creative-source-contract.d.ts.map +1 -0
  99. package/dist/creative-source-contract.js +236 -0
  100. package/dist/creative-source-contract.js.map +1 -0
  101. package/dist/creative-source-edit-contract.d.ts +107 -0
  102. package/dist/creative-source-edit-contract.d.ts.map +1 -0
  103. package/dist/creative-source-edit-contract.js +73 -0
  104. package/dist/creative-source-edit-contract.js.map +1 -0
  105. package/dist/creative-spend.d.ts +145 -0
  106. package/dist/creative-spend.d.ts.map +1 -0
  107. package/dist/creative-spend.js +106 -0
  108. package/dist/creative-spend.js.map +1 -0
  109. package/dist/creative-style-contract.d.ts +2917 -0
  110. package/dist/creative-style-contract.d.ts.map +1 -0
  111. package/dist/creative-style-contract.js +174 -0
  112. package/dist/creative-style-contract.js.map +1 -0
  113. package/dist/credit-units.d.ts +10 -0
  114. package/dist/credit-units.d.ts.map +1 -0
  115. package/dist/credit-units.js +26 -0
  116. package/dist/credit-units.js.map +1 -0
  117. package/dist/customer-outcomes-contract.d.ts +157 -0
  118. package/dist/customer-outcomes-contract.d.ts.map +1 -0
  119. package/dist/customer-outcomes-contract.js +66 -0
  120. package/dist/customer-outcomes-contract.js.map +1 -0
  121. package/dist/editor-command-contract.d.ts +5633 -0
  122. package/dist/editor-command-contract.d.ts.map +1 -1
  123. package/dist/editor-command-contract.js +11 -0
  124. package/dist/editor-command-contract.js.map +1 -1
  125. package/dist/editor-document-contract.d.ts +12 -0
  126. package/dist/editor-document-contract.d.ts.map +1 -1
  127. package/dist/editor-document-contract.js +8 -0
  128. package/dist/editor-document-contract.js.map +1 -1
  129. package/dist/editor-snapshot-contract.d.ts +6 -0
  130. package/dist/editor-snapshot-contract.d.ts.map +1 -1
  131. package/dist/export-quote.d.ts +42 -0
  132. package/dist/export-quote.d.ts.map +1 -0
  133. package/dist/export-quote.js +16 -0
  134. package/dist/export-quote.js.map +1 -0
  135. package/dist/generation-image-size.d.ts +32 -0
  136. package/dist/generation-image-size.d.ts.map +1 -0
  137. package/dist/generation-image-size.js +77 -0
  138. package/dist/generation-image-size.js.map +1 -0
  139. package/dist/generation-recovery.d.ts +99 -0
  140. package/dist/generation-recovery.d.ts.map +1 -0
  141. package/dist/generation-recovery.js +104 -0
  142. package/dist/generation-recovery.js.map +1 -0
  143. package/dist/generation-reference-uri.d.ts +10 -0
  144. package/dist/generation-reference-uri.d.ts.map +1 -0
  145. package/dist/generation-reference-uri.js +10 -0
  146. package/dist/generation-reference-uri.js.map +1 -0
  147. package/dist/generation-resolution.d.ts.map +1 -1
  148. package/dist/generation-resolution.js +18 -19
  149. package/dist/generation-resolution.js.map +1 -1
  150. package/dist/generation-spend-quote.d.ts +55 -0
  151. package/dist/generation-spend-quote.d.ts.map +1 -0
  152. package/dist/generation-spend-quote.js +30 -0
  153. package/dist/generation-spend-quote.js.map +1 -0
  154. package/dist/hosted-draft-contract.d.ts +494 -0
  155. package/dist/hosted-draft-contract.d.ts.map +1 -0
  156. package/dist/hosted-draft-contract.js +104 -0
  157. package/dist/hosted-draft-contract.js.map +1 -0
  158. package/dist/hosted-work.d.ts +234 -0
  159. package/dist/hosted-work.d.ts.map +1 -0
  160. package/dist/hosted-work.js +221 -0
  161. package/dist/hosted-work.js.map +1 -0
  162. package/dist/index.d.ts +46 -1
  163. package/dist/index.d.ts.map +1 -1
  164. package/dist/index.js +46 -1
  165. package/dist/index.js.map +1 -1
  166. package/dist/intake-quote.d.ts +63 -0
  167. package/dist/intake-quote.d.ts.map +1 -0
  168. package/dist/intake-quote.js +48 -0
  169. package/dist/intake-quote.js.map +1 -0
  170. package/dist/knowledge-contract.d.ts +539 -0
  171. package/dist/knowledge-contract.d.ts.map +1 -0
  172. package/dist/knowledge-contract.js +157 -0
  173. package/dist/knowledge-contract.js.map +1 -0
  174. package/dist/knowledge-research-contract.d.ts +875 -0
  175. package/dist/knowledge-research-contract.d.ts.map +1 -0
  176. package/dist/knowledge-research-contract.js +236 -0
  177. package/dist/knowledge-research-contract.js.map +1 -0
  178. package/dist/media-source-file.d.ts +28 -0
  179. package/dist/media-source-file.d.ts.map +1 -0
  180. package/dist/media-source-file.js +18 -0
  181. package/dist/media-source-file.js.map +1 -0
  182. package/dist/metered-operations.d.ts +1180 -0
  183. package/dist/metered-operations.d.ts.map +1 -0
  184. package/dist/metered-operations.js +1042 -0
  185. package/dist/metered-operations.js.map +1 -0
  186. package/dist/model-prices.d.ts +389 -0
  187. package/dist/model-prices.d.ts.map +1 -0
  188. package/dist/model-prices.js +581 -0
  189. package/dist/model-prices.js.map +1 -0
  190. package/dist/narrated-video-source.d.ts +175 -0
  191. package/dist/narrated-video-source.d.ts.map +1 -0
  192. package/dist/narrated-video-source.js +137 -0
  193. package/dist/narrated-video-source.js.map +1 -0
  194. package/dist/narrated-video-template.d.ts +2 -0
  195. package/dist/narrated-video-template.d.ts.map +1 -0
  196. package/dist/narrated-video-template.js +53 -0
  197. package/dist/narrated-video-template.js.map +1 -0
  198. package/dist/narration-sequence.d.ts +189 -0
  199. package/dist/narration-sequence.d.ts.map +1 -0
  200. package/dist/narration-sequence.js +157 -0
  201. package/dist/narration-sequence.js.map +1 -0
  202. package/dist/narration-take-contract.d.ts +282 -0
  203. package/dist/narration-take-contract.d.ts.map +1 -0
  204. package/dist/narration-take-contract.js +163 -0
  205. package/dist/narration-take-contract.js.map +1 -0
  206. package/dist/plan-limits.d.ts +3 -1
  207. package/dist/plan-limits.d.ts.map +1 -1
  208. package/dist/plan-limits.js +27 -17
  209. package/dist/plan-limits.js.map +1 -1
  210. package/dist/popular-generation-models.d.ts +20 -0
  211. package/dist/popular-generation-models.d.ts.map +1 -0
  212. package/dist/popular-generation-models.js +57 -0
  213. package/dist/popular-generation-models.js.map +1 -0
  214. package/dist/preview-quote.d.ts +39 -0
  215. package/dist/preview-quote.d.ts.map +1 -0
  216. package/dist/preview-quote.js +19 -0
  217. package/dist/preview-quote.js.map +1 -0
  218. package/dist/publishing-contract.d.ts +372 -0
  219. package/dist/publishing-contract.d.ts.map +1 -1
  220. package/dist/publishing-contract.js +73 -3
  221. package/dist/publishing-contract.js.map +1 -1
  222. package/dist/recipe-operation-contract.d.ts +527 -0
  223. package/dist/recipe-operation-contract.d.ts.map +1 -0
  224. package/dist/recipe-operation-contract.js +207 -0
  225. package/dist/recipe-operation-contract.js.map +1 -0
  226. package/dist/recipe-version-contract.d.ts +217 -0
  227. package/dist/recipe-version-contract.d.ts.map +1 -0
  228. package/dist/recipe-version-contract.js +154 -0
  229. package/dist/recipe-version-contract.js.map +1 -0
  230. package/dist/series-creation.d.ts +270 -0
  231. package/dist/series-creation.d.ts.map +1 -0
  232. package/dist/series-creation.js +110 -0
  233. package/dist/series-creation.js.map +1 -0
  234. package/dist/series-publishing.d.ts +226 -0
  235. package/dist/series-publishing.d.ts.map +1 -0
  236. package/dist/series-publishing.js +78 -0
  237. package/dist/series-publishing.js.map +1 -0
  238. package/dist/social-analytics-contract.d.ts +417 -0
  239. package/dist/social-analytics-contract.d.ts.map +1 -0
  240. package/dist/social-analytics-contract.js +141 -0
  241. package/dist/social-analytics-contract.js.map +1 -0
  242. package/dist/video-transformation.d.ts +12 -12
  243. package/dist/video-transformation.d.ts.map +1 -1
  244. package/dist/video-transformation.js +7 -6
  245. package/dist/video-transformation.js.map +1 -1
  246. package/dist/visuals-contract.d.ts +1 -0
  247. package/dist/visuals-contract.d.ts.map +1 -1
  248. package/dist/visuals-contract.js.map +1 -1
  249. package/dist/web-capture-contract.d.ts +268 -0
  250. package/dist/web-capture-contract.d.ts.map +1 -0
  251. package/dist/web-capture-contract.js +93 -0
  252. package/dist/web-capture-contract.js.map +1 -0
  253. package/package.json +1 -1
@@ -0,0 +1,1042 @@
1
+ import { CLIPPING_CREDITS_PER_USD, GENERATION_CREDITS_PER_USD, roundCreditDebit, } from "./credit-units.js";
2
+ import { MODEL_PRICES, resolveModelPrice, } from "./model-prices.js";
3
+ export const METERED_OPERATIONS = {
4
+ faceless_production: {
5
+ label: "Faceless production estimate",
6
+ ledgerType: "faceless_story",
7
+ pricing: { kind: "faceless" },
8
+ },
9
+ usd_dispatch_scoped_hosted_work: {
10
+ label: "dispatch scoped hosted work",
11
+ ledgerType: "other",
12
+ pricing: {
13
+ kind: "included",
14
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
15
+ },
16
+ usdBudget: "usd_dispatch_scoped_hosted_work",
17
+ },
18
+ usd_wait_visual_batch: {
19
+ label: "wait visual batch",
20
+ ledgerType: "other",
21
+ pricing: {
22
+ kind: "included",
23
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
24
+ },
25
+ usdBudget: "usd_wait_visual_batch",
26
+ },
27
+ usd_execute_hosted_work: {
28
+ label: "execute hosted work",
29
+ ledgerType: "other",
30
+ pricing: {
31
+ kind: "included",
32
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
33
+ },
34
+ usdBudget: "usd_execute_hosted_work",
35
+ },
36
+ usd_settle_hosted_work: {
37
+ label: "settle hosted work",
38
+ ledgerType: "other",
39
+ pricing: {
40
+ kind: "included",
41
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
42
+ },
43
+ usdBudget: "usd_settle_hosted_work",
44
+ },
45
+ usd_budget_social_provider_request: {
46
+ label: "budget social provider request",
47
+ ledgerType: "other",
48
+ pricing: {
49
+ kind: "included",
50
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
51
+ },
52
+ usdBudget: "usd_budget_social_provider_request",
53
+ },
54
+ usd_bill_social_provider_request: {
55
+ label: "bill social provider request",
56
+ ledgerType: "other",
57
+ pricing: {
58
+ kind: "included",
59
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
60
+ },
61
+ usdBudget: "usd_bill_social_provider_request",
62
+ },
63
+ usd_dispatch_hosted_work: {
64
+ label: "dispatch hosted work",
65
+ ledgerType: "other",
66
+ pricing: {
67
+ kind: "included",
68
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
69
+ },
70
+ usdBudget: "usd_dispatch_hosted_work",
71
+ },
72
+ usd_run_budgeted_social_metadata: {
73
+ label: "run budgeted social metadata",
74
+ ledgerType: "other",
75
+ pricing: {
76
+ kind: "included",
77
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
78
+ },
79
+ usdBudget: "usd_run_budgeted_social_metadata",
80
+ },
81
+ usd_record_hosted_work_failure: {
82
+ label: "record hosted work failure",
83
+ ledgerType: "other",
84
+ pricing: {
85
+ kind: "included",
86
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
87
+ },
88
+ usdBudget: "usd_record_hosted_work_failure",
89
+ },
90
+ usd_claim_export_spending: {
91
+ label: "claim export spending",
92
+ ledgerType: "other",
93
+ pricing: {
94
+ kind: "included",
95
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
96
+ },
97
+ usdBudget: "usd_claim_export_spending",
98
+ },
99
+ usd_settle_export_spending: {
100
+ label: "settle export spending",
101
+ ledgerType: "other",
102
+ pricing: {
103
+ kind: "included",
104
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
105
+ },
106
+ usdBudget: "usd_settle_export_spending",
107
+ },
108
+ usd_claim_audio_spending: {
109
+ label: "claim audio spending",
110
+ ledgerType: "other",
111
+ pricing: {
112
+ kind: "included",
113
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
114
+ },
115
+ usdBudget: "usd_claim_audio_spending",
116
+ },
117
+ usd_settle_audio_spending: {
118
+ label: "settle audio spending",
119
+ ledgerType: "other",
120
+ pricing: {
121
+ kind: "included",
122
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
123
+ },
124
+ usdBudget: "usd_settle_audio_spending",
125
+ },
126
+ usd_with_creative_job_spend_context: {
127
+ label: "with creative job spend context",
128
+ ledgerType: "other",
129
+ pricing: {
130
+ kind: "included",
131
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
132
+ },
133
+ usdBudget: "usd_with_creative_job_spend_context",
134
+ },
135
+ usd_claim_visual_spending: {
136
+ label: "claim visual spending",
137
+ ledgerType: "other",
138
+ pricing: {
139
+ kind: "included",
140
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
141
+ },
142
+ usdBudget: "usd_claim_visual_spending",
143
+ },
144
+ usd_settle_visual_spending: {
145
+ label: "settle visual spending",
146
+ ledgerType: "other",
147
+ pricing: {
148
+ kind: "included",
149
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
150
+ },
151
+ usdBudget: "usd_settle_visual_spending",
152
+ },
153
+ usd_queue_budgeted_export: {
154
+ label: "queue budgeted export",
155
+ ledgerType: "other",
156
+ pricing: {
157
+ kind: "included",
158
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
159
+ },
160
+ usdBudget: "usd_queue_budgeted_export",
161
+ },
162
+ usd_claim_hosted_transcription_request: {
163
+ label: "claim hosted transcription request",
164
+ ledgerType: "other",
165
+ pricing: {
166
+ kind: "included",
167
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
168
+ },
169
+ usdBudget: "usd_claim_hosted_transcription_request",
170
+ },
171
+ usd_run_admitted_video_review: {
172
+ label: "run admitted video review",
173
+ ledgerType: "other",
174
+ pricing: {
175
+ kind: "included",
176
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
177
+ },
178
+ usdBudget: "usd_run_admitted_video_review",
179
+ },
180
+ usd_run_budgeted_preview: {
181
+ label: "run budgeted preview",
182
+ ledgerType: "other",
183
+ pricing: {
184
+ kind: "included",
185
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
186
+ },
187
+ usdBudget: "usd_run_budgeted_preview",
188
+ },
189
+ usd_wait_visual_task: {
190
+ label: "wait visual task",
191
+ ledgerType: "other",
192
+ pricing: {
193
+ kind: "included",
194
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
195
+ },
196
+ usdBudget: "usd_wait_visual_task",
197
+ },
198
+ usd_trigger_visual_task: {
199
+ label: "trigger visual task",
200
+ ledgerType: "other",
201
+ pricing: {
202
+ kind: "included",
203
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
204
+ },
205
+ usdBudget: "usd_trigger_visual_task",
206
+ },
207
+ usd_execute_social_download: {
208
+ label: "execute social download",
209
+ ledgerType: "other",
210
+ pricing: {
211
+ kind: "included",
212
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
213
+ },
214
+ usdBudget: "usd_execute_social_download",
215
+ },
216
+ usd_expose_creative_spend: {
217
+ label: "expose creative spend",
218
+ ledgerType: "other",
219
+ pricing: {
220
+ kind: "included",
221
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
222
+ },
223
+ usdBudget: "usd_expose_creative_spend",
224
+ },
225
+ usd_reconcile_creative_spend: {
226
+ label: "reconcile creative spend",
227
+ ledgerType: "other",
228
+ pricing: {
229
+ kind: "included",
230
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
231
+ },
232
+ usdBudget: "usd_reconcile_creative_spend",
233
+ },
234
+ usd_reserve_creative_spend: {
235
+ label: "reserve creative spend",
236
+ ledgerType: "other",
237
+ pricing: {
238
+ kind: "included",
239
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
240
+ },
241
+ usdBudget: "usd_reserve_creative_spend",
242
+ },
243
+ usd_cover_narration_spending: {
244
+ label: "cover narration spending",
245
+ ledgerType: "other",
246
+ pricing: {
247
+ kind: "included",
248
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
249
+ },
250
+ usdBudget: "usd_cover_narration_spending",
251
+ },
252
+ usd_settle_narration_spending: {
253
+ label: "settle narration spending",
254
+ ledgerType: "other",
255
+ pricing: {
256
+ kind: "included",
257
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
258
+ },
259
+ usdBudget: "usd_settle_narration_spending",
260
+ },
261
+ usd_reserve_narration_spending: {
262
+ label: "reserve narration spending",
263
+ ledgerType: "other",
264
+ pricing: {
265
+ kind: "included",
266
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
267
+ },
268
+ usdBudget: "usd_reserve_narration_spending",
269
+ },
270
+ usd_expose_capture_cycle: {
271
+ label: "expose capture cycle",
272
+ ledgerType: "other",
273
+ pricing: {
274
+ kind: "included",
275
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
276
+ },
277
+ usdBudget: "usd_expose_capture_cycle",
278
+ },
279
+ usd_reserve_capture_cycle: {
280
+ label: "reserve capture cycle",
281
+ ledgerType: "other",
282
+ pricing: {
283
+ kind: "included",
284
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
285
+ },
286
+ usdBudget: "usd_reserve_capture_cycle",
287
+ },
288
+ usd_settle_capture_cycle: {
289
+ label: "settle capture cycle",
290
+ ledgerType: "other",
291
+ pricing: {
292
+ kind: "included",
293
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
294
+ },
295
+ usdBudget: "usd_settle_capture_cycle",
296
+ },
297
+ usd_admit_research_dispatch: {
298
+ label: "admit research dispatch",
299
+ ledgerType: "other",
300
+ pricing: {
301
+ kind: "included",
302
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
303
+ },
304
+ usdBudget: "usd_admit_research_dispatch",
305
+ },
306
+ usd_start_research_spend_cycle: {
307
+ label: "start research spend cycle",
308
+ ledgerType: "other",
309
+ pricing: {
310
+ kind: "included",
311
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
312
+ },
313
+ usdBudget: "usd_start_research_spend_cycle",
314
+ },
315
+ usd_sync_research_spending: {
316
+ label: "sync research spending",
317
+ ledgerType: "other",
318
+ pricing: {
319
+ kind: "included",
320
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
321
+ },
322
+ usdBudget: "usd_sync_research_spending",
323
+ },
324
+ usd_reconcile_creative_storage_allowance: {
325
+ label: "reconcile creative storage allowance",
326
+ ledgerType: "other",
327
+ pricing: {
328
+ kind: "included",
329
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
330
+ },
331
+ usdBudget: "usd_reconcile_creative_storage_allowance",
332
+ },
333
+ usd_wait_scoped_hosted_work: {
334
+ label: "wait scoped hosted work",
335
+ ledgerType: "other",
336
+ pricing: {
337
+ kind: "included",
338
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
339
+ },
340
+ usdBudget: "usd_wait_scoped_hosted_work",
341
+ },
342
+ usd_dispatch_workflow_worker: {
343
+ label: "dispatch workflow worker",
344
+ ledgerType: "other",
345
+ pricing: {
346
+ kind: "included",
347
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
348
+ },
349
+ usdBudget: "usd_dispatch_workflow_worker",
350
+ },
351
+ usd_bind_audio_spending_run: {
352
+ label: "bind audio spending run",
353
+ ledgerType: "other",
354
+ pricing: {
355
+ kind: "included",
356
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
357
+ },
358
+ usdBudget: "usd_bind_audio_spending_run",
359
+ },
360
+ usd_reserve_audio_spending: {
361
+ label: "reserve audio spending",
362
+ ledgerType: "other",
363
+ pricing: {
364
+ kind: "included",
365
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
366
+ },
367
+ usdBudget: "usd_reserve_audio_spending",
368
+ },
369
+ usd_dispatch_routed_hosted_work: {
370
+ label: "dispatch routed hosted work",
371
+ ledgerType: "other",
372
+ pricing: {
373
+ kind: "included",
374
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
375
+ },
376
+ usdBudget: "usd_dispatch_routed_hosted_work",
377
+ },
378
+ usd_link_export_spending: {
379
+ label: "link export spending",
380
+ ledgerType: "other",
381
+ pricing: {
382
+ kind: "included",
383
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
384
+ },
385
+ usdBudget: "usd_link_export_spending",
386
+ },
387
+ usd_assert_export_render_spending: {
388
+ label: "assert export render spending",
389
+ ledgerType: "other",
390
+ pricing: {
391
+ kind: "included",
392
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
393
+ },
394
+ usdBudget: "usd_assert_export_render_spending",
395
+ },
396
+ usd_run_budgeted_remote_intake: {
397
+ label: "run budgeted remote intake",
398
+ ledgerType: "other",
399
+ pricing: {
400
+ kind: "included",
401
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
402
+ },
403
+ usdBudget: "usd_run_budgeted_remote_intake",
404
+ },
405
+ usd_reconcile_modal_analysis_cache: {
406
+ label: "reconcile modal analysis cache",
407
+ ledgerType: "other",
408
+ pricing: {
409
+ kind: "included",
410
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
411
+ },
412
+ usdBudget: "usd_reconcile_modal_analysis_cache",
413
+ },
414
+ usd_run_budgeted_modal_analysis: {
415
+ label: "run budgeted modal analysis",
416
+ ledgerType: "other",
417
+ pricing: {
418
+ kind: "included",
419
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
420
+ },
421
+ usdBudget: "usd_run_budgeted_modal_analysis",
422
+ },
423
+ usd_assert_creative_storage_admission: {
424
+ label: "assert creative storage admission",
425
+ ledgerType: "other",
426
+ pricing: {
427
+ kind: "included",
428
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
429
+ },
430
+ usdBudget: "usd_assert_creative_storage_admission",
431
+ },
432
+ usd_dispatch_social_download: {
433
+ label: "dispatch social download",
434
+ ledgerType: "other",
435
+ pricing: {
436
+ kind: "included",
437
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
438
+ },
439
+ usdBudget: "usd_dispatch_social_download",
440
+ },
441
+ usd_run_budgeted_qa_preparation: {
442
+ label: "run budgeted qa preparation",
443
+ ledgerType: "other",
444
+ pricing: {
445
+ kind: "included",
446
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
447
+ },
448
+ usdBudget: "usd_run_budgeted_qa_preparation",
449
+ },
450
+ usd_with_standalone_video_review_spending: {
451
+ label: "with standalone video review spending",
452
+ ledgerType: "other",
453
+ pricing: {
454
+ kind: "included",
455
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
456
+ },
457
+ usdBudget: "usd_with_standalone_video_review_spending",
458
+ },
459
+ usd_wait_hosted_work: {
460
+ label: "wait hosted work",
461
+ ledgerType: "other",
462
+ pricing: {
463
+ kind: "included",
464
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
465
+ },
466
+ usdBudget: "usd_wait_hosted_work",
467
+ },
468
+ usd_run_budgeted_vision: {
469
+ label: "run budgeted vision",
470
+ ledgerType: "other",
471
+ pricing: {
472
+ kind: "included",
473
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
474
+ },
475
+ usdBudget: "usd_run_budgeted_vision",
476
+ },
477
+ agent_token_estimate: {
478
+ label: "agent_token_estimate",
479
+ ledgerType: "agent_execution",
480
+ pricing: { kind: "fixed", credits: MODEL_PRICES.default.agent_execution },
481
+ },
482
+ video_upscale_estimate: {
483
+ label: "video_upscale_estimate",
484
+ ledgerType: "video_upscale",
485
+ pricing: { kind: "fixed", credits: MODEL_PRICES.default.video_upscale },
486
+ },
487
+ miscellaneous: {
488
+ label: "miscellaneous",
489
+ ledgerType: "other",
490
+ pricing: { kind: "fixed", credits: MODEL_PRICES.default.other },
491
+ },
492
+ planning_admission: {
493
+ label: "Planning Admission",
494
+ ledgerType: "agent_execution",
495
+ pricing: { kind: "fixed", credits: 0.1 },
496
+ },
497
+ story_planning: {
498
+ label: "Story Planning",
499
+ ledgerType: "prompt_enhancement",
500
+ pricing: {
501
+ kind: "fixed",
502
+ credits: MODEL_PRICES.operation.promptEnhancement,
503
+ },
504
+ },
505
+ ugc_production: {
506
+ label: "Ugc Production",
507
+ ledgerType: "other",
508
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
509
+ },
510
+ knowledge_research: {
511
+ label: "Knowledge Research",
512
+ ledgerType: "other",
513
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
514
+ },
515
+ billing_inspection: {
516
+ label: "Billing Inspection",
517
+ ledgerType: "other",
518
+ pricing: { kind: "fixed", credits: 0 },
519
+ },
520
+ creative_learning: {
521
+ label: "Creative Learning",
522
+ ledgerType: "other",
523
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
524
+ },
525
+ creative_map: {
526
+ label: "Creative Map",
527
+ ledgerType: "other",
528
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
529
+ },
530
+ faceless_production_plan: {
531
+ label: "Faceless Production Plan",
532
+ ledgerType: "prompt_enhancement",
533
+ pricing: { kind: "fixed", credits: 2.5 },
534
+ },
535
+ semantic_action_qa: {
536
+ label: "Semantic Action Qa",
537
+ ledgerType: "prompt_enhancement",
538
+ pricing: {
539
+ kind: "fixed",
540
+ credits: MODEL_PRICES.operation.promptEnhancement,
541
+ },
542
+ },
543
+ creative_recipe: {
544
+ label: "Creative Recipe",
545
+ ledgerType: "other",
546
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
547
+ },
548
+ mistake_detection: {
549
+ label: "Mistake Detection",
550
+ ledgerType: "prompt_enhancement",
551
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
552
+ },
553
+ video_benchmark: {
554
+ label: "Video Benchmark",
555
+ ledgerType: "other",
556
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
557
+ },
558
+ web_capture: {
559
+ label: "Web Capture",
560
+ ledgerType: "other",
561
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
562
+ },
563
+ short_suggestions: {
564
+ label: "Short Suggestions",
565
+ ledgerType: "short_suggestions",
566
+ pricing: { kind: "fixed", credits: MODEL_PRICES.default.short_suggestions },
567
+ },
568
+ broll_analysis: {
569
+ label: "Broll Analysis",
570
+ ledgerType: "prompt_enhancement",
571
+ pricing: {
572
+ kind: "fixed",
573
+ credits: MODEL_PRICES.operation.promptEnhancement,
574
+ },
575
+ },
576
+ media_description: {
577
+ label: "Media Description",
578
+ ledgerType: "prompt_enhancement",
579
+ pricing: {
580
+ kind: "fixed",
581
+ credits: MODEL_PRICES.operation.promptEnhancement,
582
+ },
583
+ },
584
+ ai_content: {
585
+ label: "Ai Content",
586
+ ledgerType: "prompt_enhancement",
587
+ pricing: {
588
+ kind: "fixed",
589
+ credits: MODEL_PRICES.operation.promptEnhancement,
590
+ },
591
+ },
592
+ magic_emojis_pipeline: {
593
+ label: "Magic Emojis Pipeline",
594
+ ledgerType: "prompt_enhancement",
595
+ pricing: { kind: "fixed", credits: MODEL_PRICES.operation.magicEmojis },
596
+ },
597
+ pro_enhancements: {
598
+ label: "Pro Enhancements",
599
+ ledgerType: "prompt_enhancement",
600
+ pricing: {
601
+ kind: "fixed",
602
+ credits: MODEL_PRICES.operation.promptEnhancement,
603
+ },
604
+ },
605
+ broll_organization: {
606
+ label: "Broll Organization",
607
+ ledgerType: "prompt_enhancement",
608
+ pricing: {
609
+ kind: "fixed",
610
+ credits: MODEL_PRICES.operation.promptEnhancement,
611
+ },
612
+ },
613
+ workflow_execution: {
614
+ label: "Workflow Execution",
615
+ ledgerType: "agent_execution",
616
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
617
+ },
618
+ image_generation: {
619
+ label: "Image Generation",
620
+ ledgerType: "image_generation",
621
+ pricing: {
622
+ kind: "per_model",
623
+ catalog: "image",
624
+ defaultModel: "fal-ai/krea/v2/medium/turbo/text-to-image",
625
+ },
626
+ },
627
+ image_edit: {
628
+ label: "Image Edit",
629
+ ledgerType: "image_generation",
630
+ pricing: {
631
+ kind: "per_model",
632
+ catalog: "image",
633
+ defaultModel: "fal-ai/krea/v2/medium/turbo/text-to-image",
634
+ },
635
+ },
636
+ video_generation: {
637
+ label: "Video Generation",
638
+ ledgerType: "video_generation",
639
+ pricing: {
640
+ kind: "per_model",
641
+ catalog: "video",
642
+ defaultModel: "gemini-omni-flash-t2v",
643
+ },
644
+ },
645
+ image_to_video: {
646
+ label: "Image To Video",
647
+ ledgerType: "image_to_video",
648
+ pricing: {
649
+ kind: "per_model",
650
+ catalog: "video",
651
+ defaultModel: "kling-2.6-pro",
652
+ },
653
+ },
654
+ image_upscale: {
655
+ label: "Image Upscale",
656
+ ledgerType: "image_upscale",
657
+ pricing: { kind: "fixed", credits: MODEL_PRICES.default.image_upscale },
658
+ },
659
+ background_removal: {
660
+ label: "Background Removal",
661
+ ledgerType: "background_removal",
662
+ pricing: {
663
+ kind: "fixed",
664
+ credits: MODEL_PRICES.default.background_removal,
665
+ },
666
+ },
667
+ video_text_removal: {
668
+ label: "Video Text Removal",
669
+ ledgerType: "video_text_removal",
670
+ pricing: {
671
+ kind: "fixed",
672
+ credits: MODEL_PRICES.default.video_text_removal,
673
+ },
674
+ },
675
+ video_upscale: {
676
+ label: "Video Upscale",
677
+ ledgerType: "video_upscale",
678
+ pricing: {
679
+ kind: "per_model",
680
+ catalog: "upscale",
681
+ defaultModel: "bytedance-upscaler",
682
+ },
683
+ },
684
+ voice_generation: {
685
+ label: "Voice Generation",
686
+ ledgerType: "voice_generation",
687
+ pricing: {
688
+ kind: "fixed",
689
+ credits: MODEL_PRICES.operation.voicePer1KCharacters,
690
+ },
691
+ },
692
+ music_generation: {
693
+ label: "Music Generation",
694
+ ledgerType: "voice_generation",
695
+ pricing: { kind: "fixed", credits: MODEL_PRICES.music.standalonePerSecond },
696
+ },
697
+ sound_effects: {
698
+ label: "Sound Effects",
699
+ ledgerType: "voice_generation",
700
+ pricing: {
701
+ kind: "fixed",
702
+ credits: MODEL_PRICES.operation.soundEffectsPerGeneration,
703
+ },
704
+ },
705
+ faceless_story: {
706
+ label: "Faceless Story",
707
+ ledgerType: "faceless_story",
708
+ pricing: {
709
+ kind: "fixed",
710
+ credits: MODEL_PRICES.operation.facelessStoryPerScene,
711
+ },
712
+ },
713
+ faceless_music: {
714
+ label: "Faceless music",
715
+ ledgerType: "voice_generation",
716
+ pricing: { kind: "fixed", credits: MODEL_PRICES.operation.musicPerSecond },
717
+ },
718
+ faceless_plan: {
719
+ label: "Faceless Plan",
720
+ ledgerType: "faceless_story",
721
+ pricing: { kind: "fixed", credits: MODEL_PRICES.faceless.plan },
722
+ },
723
+ faceless_voice: {
724
+ label: "Faceless Voice",
725
+ ledgerType: "voice_generation",
726
+ pricing: { kind: "fixed", credits: MODEL_PRICES.faceless.voicePerSecond },
727
+ },
728
+ carousel_compile: {
729
+ label: "Carousel Compile",
730
+ ledgerType: "other",
731
+ pricing: {
732
+ kind: "carousel",
733
+ compileCredits: MODEL_PRICES.operation.carouselCompile,
734
+ rasterCredits: MODEL_PRICES.operation.carouselRaster,
735
+ },
736
+ },
737
+ carousel_raster: {
738
+ label: "Carousel Raster",
739
+ ledgerType: "other",
740
+ pricing: { kind: "fixed", credits: MODEL_PRICES.operation.carouselRaster },
741
+ },
742
+ prompt_enhancement: {
743
+ label: "Prompt Enhancement",
744
+ ledgerType: "prompt_enhancement",
745
+ pricing: {
746
+ kind: "fixed",
747
+ credits: MODEL_PRICES.operation.promptEnhancement,
748
+ },
749
+ },
750
+ url_import: {
751
+ label: "Url Import",
752
+ ledgerType: "other",
753
+ pricing: {
754
+ kind: "per_unit",
755
+ providerUsdPerUnit: MODEL_PRICES.operation.urlImportPerMinute / CLIPPING_CREDITS_PER_USD,
756
+ markup: "clipping",
757
+ unit: "minute",
758
+ },
759
+ },
760
+ export_video: {
761
+ label: "Export Video",
762
+ ledgerType: "export_video",
763
+ pricing: {
764
+ kind: "per_unit",
765
+ providerUsdPerUnit: MODEL_PRICES.operation.exportVideoPerMinute / CLIPPING_CREDITS_PER_USD,
766
+ markup: "clipping",
767
+ unit: "started_minute",
768
+ },
769
+ },
770
+ agent_execution: {
771
+ label: "AI agent execution",
772
+ ledgerType: "agent_execution",
773
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
774
+ },
775
+ source_analysis: {
776
+ label: "Source analysis",
777
+ ledgerType: "transcription",
778
+ pricing: {
779
+ kind: "per_unit",
780
+ providerUsdPerUnit: MODEL_PRICES.operation.sourceAnalysisPerMinute /
781
+ CLIPPING_CREDITS_PER_USD,
782
+ markup: "clipping",
783
+ unit: "minute",
784
+ },
785
+ },
786
+ social_provider_call: {
787
+ label: "Social research",
788
+ ledgerType: "other",
789
+ pricing: { kind: "included", dailyLimitPerWorkspace: 500 },
790
+ },
791
+ huntapi: {
792
+ label: "Social import provider",
793
+ ledgerType: "other",
794
+ pricing: { kind: "included", dailyLimitPerWorkspace: 200 },
795
+ },
796
+ voice_isolation: {
797
+ label: "Studio Sound",
798
+ ledgerType: "other",
799
+ pricing: {
800
+ kind: "per_unit",
801
+ providerUsdPerUnit: 0.12,
802
+ markup: "clipping",
803
+ unit: "started_minute",
804
+ },
805
+ },
806
+ media_understanding: {
807
+ label: "Media understanding",
808
+ ledgerType: "other",
809
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
810
+ },
811
+ brand_scan: {
812
+ label: "Website brand scan",
813
+ ledgerType: "other",
814
+ includedPerWorkspace: 1,
815
+ pricing: { kind: "fixed", credits: 1 },
816
+ },
817
+ reframe_analysis: {
818
+ label: "Smart reframe analysis",
819
+ ledgerType: "export_video",
820
+ pricing: {
821
+ kind: "per_unit",
822
+ providerUsdPerUnit: 0.13,
823
+ markup: "clipping",
824
+ unit: "analysis",
825
+ },
826
+ },
827
+ reframe_prefetch: {
828
+ label: "Background reframe analysis",
829
+ ledgerType: "export_video",
830
+ pricing: {
831
+ kind: "included",
832
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
833
+ },
834
+ },
835
+ trend_discovery: {
836
+ label: "Trend discovery",
837
+ ledgerType: "other",
838
+ pricing: { kind: "included", dailyLimitPerWorkspace: 300 },
839
+ },
840
+ pinterest_search: {
841
+ label: "Pinterest search",
842
+ ledgerType: "other",
843
+ pricing: { kind: "included", dailyLimitPerWorkspace: 200 },
844
+ },
845
+ magic_emojis: {
846
+ label: "Magic emojis",
847
+ ledgerType: "other",
848
+ pricing: { kind: "fixed", credits: MODEL_PRICES.operation.magicEmojis },
849
+ },
850
+ content_personalization: {
851
+ label: "Content writing",
852
+ ledgerType: "other",
853
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
854
+ },
855
+ hosted_draft_model_call: {
856
+ label: "Creative Studio planning",
857
+ ledgerType: "agent_execution",
858
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
859
+ },
860
+ code_highlights: {
861
+ label: "Code highlights",
862
+ ledgerType: "agent_execution",
863
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
864
+ },
865
+ generation_plan: {
866
+ label: "Generation planning",
867
+ ledgerType: "agent_execution",
868
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
869
+ },
870
+ script_parser: {
871
+ label: "Script parsing",
872
+ ledgerType: "agent_execution",
873
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
874
+ },
875
+ prompt_improvement: {
876
+ usdBudget: "prompt",
877
+ label: "Prompt improvement",
878
+ ledgerType: "agent_execution",
879
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
880
+ },
881
+ character_likeness: {
882
+ label: "Character likeness",
883
+ ledgerType: "agent_execution",
884
+ usdBudget: "prompt",
885
+ pricing: {
886
+ kind: "included",
887
+ dailyLimitPerWorkspace: Number.MAX_SAFE_INTEGER,
888
+ },
889
+ },
890
+ character_description: {
891
+ usdBudget: "prompt",
892
+ label: "Character description",
893
+ ledgerType: "agent_execution",
894
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
895
+ },
896
+ frame_vision: {
897
+ label: "Frame vision",
898
+ ledgerType: "agent_execution",
899
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 2 },
900
+ },
901
+ video_review: {
902
+ label: "Video review",
903
+ ledgerType: "agent_execution",
904
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 2 },
905
+ },
906
+ ugc_planning: {
907
+ label: "UGC planning",
908
+ ledgerType: "agent_execution",
909
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
910
+ },
911
+ edit_planning: {
912
+ label: "Edit planning",
913
+ ledgerType: "agent_execution",
914
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
915
+ },
916
+ agent_web_search: {
917
+ label: "Agent web search",
918
+ ledgerType: "agent_execution",
919
+ pricing: { kind: "measured", markup: "generation", reserveCredits: 1 },
920
+ },
921
+ project_name: {
922
+ label: "Project names",
923
+ ledgerType: "other",
924
+ pricing: { kind: "included", dailyLimitPerWorkspace: 200 },
925
+ },
926
+ vocabulary: {
927
+ label: "Vocabulary",
928
+ ledgerType: "other",
929
+ pricing: { kind: "included", dailyLimitPerWorkspace: 200 },
930
+ },
931
+ json_prompt: {
932
+ label: "JSON prompt conversion",
933
+ ledgerType: "other",
934
+ pricing: { kind: "included", dailyLimitPerWorkspace: 200 },
935
+ },
936
+ chat_title: {
937
+ label: "Chat titles",
938
+ ledgerType: "other",
939
+ pricing: { kind: "included", dailyLimitPerWorkspace: 200 },
940
+ },
941
+ embeddings: {
942
+ label: "Embeddings",
943
+ ledgerType: "other",
944
+ pricing: { kind: "included", dailyLimitPerWorkspace: 2000 },
945
+ },
946
+ tiktok_analytics: {
947
+ label: "TikTok analytics fallback",
948
+ ledgerType: "other",
949
+ pricing: { kind: "included", dailyLimitPerWorkspace: 24 },
950
+ },
951
+ };
952
+ export function quoteMeteredOperation({ operation, units, costUsd, model, options, precision = "debit", }) {
953
+ if (!Number.isFinite(units) || units < 0)
954
+ throw new Error("Invalid metered units");
955
+ if (costUsd !== undefined && (!Number.isFinite(costUsd) || costUsd < 0))
956
+ throw new Error("Invalid measured cost");
957
+ const { pricing } = METERED_OPERATIONS[operation];
958
+ const round = precision === "rate" ? (value) => value : roundCreditDebit;
959
+ switch (pricing.kind) {
960
+ case "faceless": {
961
+ const production = options?.production;
962
+ if (!production)
963
+ throw new Error("Faceless production requires model quote snapshots");
964
+ if (![production.imageCreditCost, production.videoCreditsPerSecond].every((rate) => Number.isFinite(rate) && rate >= 0))
965
+ throw new Error("Invalid faceless model quote snapshot");
966
+ const sceneCount = Math.max(MODEL_PRICES.faceless.minSceneCount, Math.min(MODEL_PRICES.faceless.maxSceneCount, Math.round(units / MODEL_PRICES.faceless.sceneDurationSeconds)));
967
+ const quote = (input) => quoteMeteredOperation({ ...input, precision: "rate" });
968
+ return round(quote({ operation: "faceless_story", units: sceneCount }) +
969
+ quote({
970
+ operation: "voice_generation",
971
+ units: ((units / 60) *
972
+ MODEL_PRICES.faceless.narrationCharactersPerMinute) /
973
+ 1000,
974
+ }) +
975
+ sceneCount * production.imageCreditCost +
976
+ sceneCount *
977
+ production.videoCreditsPerSecond *
978
+ MODEL_PRICES.faceless.clipDurationSeconds +
979
+ (production.backgroundMusic
980
+ ? quote({ operation: "faceless_music", units })
981
+ : 0) +
982
+ (production.soundEffects
983
+ ? quote({ operation: "sound_effects", units: 1 })
984
+ : 0) +
985
+ quote({ operation: "export_video", units: units / 60 }) +
986
+ (production.improvePrompt
987
+ ? quote({ operation: "prompt_enhancement", units: 1 })
988
+ : 0));
989
+ }
990
+ case "per_model": {
991
+ const selected = model ?? pricing.defaultModel;
992
+ if (!selected)
993
+ throw new Error(`A model is required for ${operation}`);
994
+ if (pricing.catalog === "upscale") {
995
+ if (selected !== "bytedance-upscaler")
996
+ throw new Error(`Missing upscale price: ${selected}`);
997
+ const resolution = options?.resolution === "4k" ? "4k" : "1080p";
998
+ const cost = Math.round(units *
999
+ MODEL_PRICES.upscale[resolution] *
1000
+ (options?.targetFps === "60fps" ? 2 : 1) *
1001
+ 10_000) / 10_000;
1002
+ return round(Math.ceil(cost * MODEL_PRICES.upscale.customerMultiplier * 100) / 100);
1003
+ }
1004
+ return round(resolveModelPrice({ kind: pricing.catalog, model: selected, options }) *
1005
+ units);
1006
+ }
1007
+ case "carousel":
1008
+ return round(pricing.compileCredits + pricing.rasterCredits * Math.max(1, units));
1009
+ case "included":
1010
+ return 0;
1011
+ case "fixed":
1012
+ return round(pricing.credits * units);
1013
+ case "measured":
1014
+ return round(costUsd === undefined
1015
+ ? Math.max(0.1, pricing.reserveCredits * units)
1016
+ : costUsd * GENERATION_CREDITS_PER_USD);
1017
+ case "per_unit":
1018
+ return round((pricing.unit === "started_minute" ? Math.ceil(units) : units) *
1019
+ (pricing.providerUsdPerUnit *
1020
+ (pricing.markup === "generation"
1021
+ ? GENERATION_CREDITS_PER_USD
1022
+ : CLIPPING_CREDITS_PER_USD)));
1023
+ }
1024
+ }
1025
+ export const METERED_AI_OPERATIONS = {
1026
+ transcription: "source_analysis",
1027
+ prompt_enhancement: "prompt_enhancement",
1028
+ image_generation: "image_generation",
1029
+ background_removal: "background_removal",
1030
+ image_upscale: "image_upscale",
1031
+ video_upscale: "video_upscale_estimate",
1032
+ video_text_removal: "video_text_removal",
1033
+ faceless_story: "faceless_story",
1034
+ voice_generation: "voice_generation",
1035
+ video_generation: "video_generation",
1036
+ image_to_video: "image_to_video",
1037
+ export_video: "export_video",
1038
+ agent_execution: "agent_token_estimate",
1039
+ short_suggestions: "short_suggestions",
1040
+ other: "miscellaneous",
1041
+ };
1042
+ //# sourceMappingURL=metered-operations.js.map