@distilled.cloud/mux 0.0.0 → 1.0.0-rc.22

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 (64) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +122 -4
  3. package/lib/.lazy.json +1 -0
  4. package/lib/_bundle/lazy.js +4 -0
  5. package/lib/_bundle/sdk.js +2 -0
  6. package/lib/_bundle/sdk.js.map +1 -0
  7. package/lib/credentials.d.ts +66 -0
  8. package/lib/credentials.d.ts.map +1 -0
  9. package/lib/credentials.js +1 -0
  10. package/lib/errors.d.ts +45 -0
  11. package/lib/errors.d.ts.map +1 -0
  12. package/lib/errors.js +1 -0
  13. package/lib/index.d.ts +44 -0
  14. package/lib/index.d.ts.map +1 -0
  15. package/lib/index.js +6 -0
  16. package/lib/pagination.d.ts +11 -0
  17. package/lib/pagination.d.ts.map +1 -0
  18. package/lib/pagination.js +1 -0
  19. package/lib/protocol.d.ts +19 -0
  20. package/lib/protocol.d.ts.map +1 -0
  21. package/lib/protocol.js +1 -0
  22. package/lib/retry.d.ts +54 -0
  23. package/lib/retry.d.ts.map +1 -0
  24. package/lib/retry.js +1 -0
  25. package/lib/services/data.d.ts +1347 -0
  26. package/lib/services/data.d.ts.map +1 -0
  27. package/lib/services/data.js +58 -0
  28. package/lib/services/data.js.map +1 -0
  29. package/lib/services/index.d.ts +5 -0
  30. package/lib/services/index.d.ts.map +1 -0
  31. package/lib/services/index.js +4 -0
  32. package/lib/services/robots.d.ts +2206 -0
  33. package/lib/services/robots.d.ts.map +1 -0
  34. package/lib/services/robots.js +75 -0
  35. package/lib/services/robots.js.map +1 -0
  36. package/lib/services/system.d.ts +263 -0
  37. package/lib/services/system.d.ts.map +1 -0
  38. package/lib/services/system.js +2 -0
  39. package/lib/services/system.js.map +1 -0
  40. package/lib/services/video.d.ts +1564 -0
  41. package/lib/services/video.d.ts.map +1 -0
  42. package/lib/services/video.js +100 -0
  43. package/lib/services/video.js.map +1 -0
  44. package/lib/services.lazy/data.js +3 -0
  45. package/lib/services.lazy/index.js +3 -0
  46. package/lib/services.lazy/robots.js +4 -0
  47. package/lib/services.lazy/system.js +1 -0
  48. package/lib/services.lazy/video.js +4 -0
  49. package/lib/traits.d.ts +7 -0
  50. package/lib/traits.d.ts.map +1 -0
  51. package/lib/traits.js +1 -0
  52. package/package.json +82 -2
  53. package/src/credentials.ts +142 -0
  54. package/src/errors.ts +59 -0
  55. package/src/index.ts +43 -0
  56. package/src/pagination.ts +63 -0
  57. package/src/protocol.ts +62 -0
  58. package/src/retry.ts +73 -0
  59. package/src/services/data.ts +3993 -0
  60. package/src/services/index.ts +5 -0
  61. package/src/services/robots.ts +4712 -0
  62. package/src/services/system.ts +752 -0
  63. package/src/services/video.ts +4291 -0
  64. package/src/traits.ts +40 -0
@@ -0,0 +1,4712 @@
1
+ import * as API from "@distilled.cloud/core/api";
2
+ import * as C from "@distilled.cloud/core/category";
3
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-mux/specs/api-spec.json). Do not edit.
4
+ import * as S from "@distilled.cloud/core/schema-lite";
5
+ import * as __L from "@distilled.cloud/core/schema-lite";
6
+ import { MuxServiceErrors } from "../errors.ts";
7
+ import { paginatePage } from "../pagination.ts";
8
+ import { MuxProtocol, type MuxOpError, type MuxOpContext } from "../protocol.ts";
9
+ import * as Retry from "../retry.ts";
10
+ import * as T from "../traits.ts";
11
+ // Schema table, filled on first reach (see __S at the end).
12
+ const __s: any[] = [];
13
+
14
+ export type { MuxOpError, MuxOpContext };
15
+
16
+ /** Span facts shared by every operation (com.distilled.telemetry#service). */
17
+ const TELEMETRY = {
18
+ system: "mux-api",
19
+ responseHeaders: [
20
+ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
21
+ { header: "request-id", name: "http.response.header.request-id", transform: "list" },
22
+ ],
23
+ prefix: "Mux",
24
+ service: "MuxRobots",
25
+ labels: "mux",
26
+ propagate: "w3c",
27
+ } as const;
28
+
29
+ export class BadRequest
30
+ extends /*@__PURE__*/ T.applyErrorMatchers(
31
+ /*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
32
+ code: S.Number,
33
+ message: S.String,
34
+ body: /*@__PURE__*/ S.optional(
35
+ /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(2, __c0, 2)), S.String]),
36
+ ),
37
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
38
+ }).pipe(C.withBadRequestError),
39
+ [{ status: 400 }],
40
+ )
41
+ {
42
+ declare readonly body?: ErrorResponse | string;
43
+ }
44
+
45
+ export class Conflict
46
+ extends /*@__PURE__*/ T.applyErrorMatchers(
47
+ /*@__PURE__*/ S.TaggedError<Conflict>()("Conflict", {
48
+ code: S.Number,
49
+ message: S.String,
50
+ body: /*@__PURE__*/ S.optional(
51
+ /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(2, __c0, 2)), S.String]),
52
+ ),
53
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
54
+ }).pipe(C.withConflictError),
55
+ [{ status: 409 }],
56
+ )
57
+ {
58
+ declare readonly body?: ErrorResponse | string;
59
+ }
60
+
61
+ export class Forbidden
62
+ extends /*@__PURE__*/ T.applyErrorMatchers(
63
+ /*@__PURE__*/ S.TaggedError<Forbidden>()("Forbidden", {
64
+ code: S.Number,
65
+ message: S.String,
66
+ body: /*@__PURE__*/ S.optional(
67
+ /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(2, __c0, 2)), S.String]),
68
+ ),
69
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
70
+ }).pipe(C.withAuthError),
71
+ [{ status: 403 }],
72
+ )
73
+ {
74
+ declare readonly body?: ErrorResponse | string;
75
+ }
76
+
77
+ export class NotFound
78
+ extends /*@__PURE__*/ T.applyErrorMatchers(
79
+ /*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
80
+ code: S.Number,
81
+ message: S.String,
82
+ body: /*@__PURE__*/ S.optional(
83
+ /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(2, __c0, 2)), S.String]),
84
+ ),
85
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
86
+ }).pipe(C.withBadRequestError),
87
+ [{ status: 404 }],
88
+ )
89
+ {
90
+ declare readonly body?: ErrorResponse | string;
91
+ }
92
+
93
+ export class UnprocessableEntity
94
+ extends /*@__PURE__*/ T.applyErrorMatchers(
95
+ /*@__PURE__*/ S.TaggedError<UnprocessableEntity>()("UnprocessableEntity", {
96
+ code: S.Number,
97
+ message: S.String,
98
+ body: /*@__PURE__*/ S.optional(
99
+ /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(2, __c0, 2)), S.String]),
100
+ ),
101
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
102
+ }).pipe(C.withBadRequestError),
103
+ [{ status: 422 }],
104
+ )
105
+ {
106
+ declare readonly body?: ErrorResponse | string;
107
+ }
108
+
109
+ export interface CancelJobRequest {
110
+ /** Robots job ID returned by job creation or listing (rjob_...). */
111
+ JOB_ID: string;
112
+ }
113
+ /** Current job status. */
114
+ export type JobStatus = "pending" | "processing" | "completed" | "errored" | "cancelled";
115
+ export interface JobSummaryLinksSelf {
116
+ /** URL to this resource. */
117
+ href: string;
118
+ }
119
+ /** Hypermedia links for this job. */
120
+ export interface JobSummaryLinks {
121
+ self: JobSummaryLinksSelf;
122
+ }
123
+ export interface JobSummary {
124
+ /** Unique job identifier. */
125
+ id: string;
126
+ workflow: unknown;
127
+ status: JobStatus;
128
+ /** Unix timestamp (seconds) when the job was created. */
129
+ created_at: number;
130
+ /** Unix timestamp (seconds) of the job's last state transition (e.g. when it started processing or reached a terminal state). */
131
+ updated_at: number;
132
+ /** Hypermedia links for this job. */
133
+ _links: JobSummaryLinks;
134
+ }
135
+ export interface CancelJobResponse {
136
+ data: JobSummary;
137
+ }
138
+ /** Optional media execution window in seconds on the original asset timeline. At least one of start_time and end_time is required, and start_time must be less than end_time. An end_time past the end of the media is clamped to it, and a window that starts at or after the end of the media is rejected. Results remain timestamped against the original media timeline. */
139
+ export interface OutputSteeringScope {
140
+ /** Start of the execution window in seconds from the beginning of the media. When omitted, the window starts at the beginning. */
141
+ start_time?: number | undefined;
142
+ /** End of the execution window in seconds from the beginning of the media. When omitted, the window extends to the end. */
143
+ end_time?: number | undefined;
144
+ }
145
+ /** Preferred brand or domain terms to use when supported by the source content. The combined length of all terms must be 240 characters or fewer. */
146
+ export type OutputSteeringBrandTerms = Array<string>;
147
+ /** Accepted alternate names that should normalize to the canonical label. */
148
+ export type OutputSteeringTaxonomyValueAliasesList = Array<string>;
149
+ export interface OutputSteeringTaxonomyValue {
150
+ /** Canonical taxonomy value to prefer when supported by the source content. */
151
+ label: string;
152
+ /** Short explanation of when this value applies. */
153
+ description?: string | undefined;
154
+ /** Accepted alternate names that should normalize to the canonical label. */
155
+ aliases?: OutputSteeringTaxonomyValueAliasesList | undefined;
156
+ }
157
+ /** Controlled vocabulary values used as best-effort model guidance. */
158
+ export type OutputSteeringTaxonomyValuesList = Array<OutputSteeringTaxonomyValue>;
159
+ /** Controlled vocabulary used as best-effort guidance for generated labels and concepts. */
160
+ export interface OutputSteeringTaxonomy {
161
+ /** Optional customer-facing name for the taxonomy. */
162
+ name?: string | undefined;
163
+ /** Controlled vocabulary values used as best-effort model guidance. */
164
+ values: OutputSteeringTaxonomyValuesList;
165
+ /** When false, the model should prefer values from the taxonomy. When true, non-taxonomy values may be used when no taxonomy value applies. */
166
+ allow_other: boolean;
167
+ }
168
+ /** Best-effort guidance that moves scene and chapter density together. */
169
+ export type AnalyzeStructureGranularity = "coarse" | "balanced" | "fine";
170
+ /** Curated controls that restrict Analyze Structure execution or guide its generated metadata without exposing raw prompt editing. The scope start is inclusive, the end is exclusive, and returned timestamps remain absolute. */
171
+ export interface AnalyzeStructureOutputSteering {
172
+ scope?: OutputSteeringScope | undefined;
173
+ /** Intended audience used as best-effort guidance without changing the output schema. */
174
+ audience?: string | undefined;
175
+ brand_terms?: OutputSteeringBrandTerms | undefined;
176
+ topic_taxonomy?: OutputSteeringTaxonomy | undefined;
177
+ granularity?: AnalyzeStructureGranularity | (string & {}) | undefined;
178
+ }
179
+ export interface AnalyzeStructureJobParameters {
180
+ /** The Mux asset ID of the video to analyze. */
181
+ asset_id: string;
182
+ /** BCP 47 language code of the caption source. An explicit language must match a ready source exactly, including case; for example, en does not match en-US. Translation target exclusion and track replacement instead compare base languages case-insensitively. When omitted, automatic selection applies. Uses the first ready subtitle in asset track order without English preference. Audio-only assets with one ready text track lacking subtitle metadata can use that legacy transcript. */
183
+ language_code?: string | undefined;
184
+ /** BCP 47 language code for generated text. Auto-detected from available evidence when omitted. Transcript cues and verbatim quotes remain in their source language. */
185
+ output_language_code?: string | undefined;
186
+ output_steering?: AnalyzeStructureOutputSteering | undefined;
187
+ /** When true, writes the generated title to asset.meta.title after analysis. Defaults to false. Best-effort: a metadata-write failure does not fail the analysis. Check outputs.asset_updates.title for the outcome. */
188
+ update_asset_meta?: boolean | undefined;
189
+ /** When true, replaces or creates the asset's chapters track after analysis. Defaults to false. Best-effort: a chapters-write failure does not fail the analysis. Check outputs.asset_updates.chapters for the outcome. */
190
+ update_asset_chapters?: boolean | undefined;
191
+ }
192
+ export interface CreateAnalyzeStructureJobRequest {
193
+ /** Arbitrary string stored with the job and returned in responses. Useful for correlating jobs with your own systems. */
194
+ passthrough?: string | undefined;
195
+ parameters: AnalyzeStructureJobParameters;
196
+ }
197
+ export interface CreateAnalyzeStructureJobResponse {}
198
+ /** Allowed answer values for this question. Defaults to ["yes", "no"] when omitted and free_form_reply is not true. Mutually exclusive with free_form_reply. Each option is a short label of at most 150 characters. */
199
+ export type AskQuestionsJobParametersQuestionsItemAnswerOptionsList = Array<string>;
200
+ export interface AskQuestionsJobParametersQuestionsItem {
201
+ /** The question to ask about the video content. Maximum 600 characters. */
202
+ question: string;
203
+ /** Allowed answer values for this question. Defaults to ["yes", "no"] when omitted and free_form_reply is not true. Mutually exclusive with free_form_reply. Each option is a short label of at most 150 characters. */
204
+ answer_options?: AskQuestionsJobParametersQuestionsItemAnswerOptionsList | undefined;
205
+ /** When true, the model replies with free-form prose instead of selecting from answer_options. Mutually exclusive with answer_options. Treat the answer as untrusted model output. */
206
+ free_form_reply?: boolean | undefined;
207
+ }
208
+ /** One or more questions to ask about the video, up to 50. Each question can either select from answer_options (defaults to yes/no) or, by setting free_form_reply: true, receive a free-form prose answer. */
209
+ export type AskQuestionsJobParametersQuestionsList = Array<AskQuestionsJobParametersQuestionsItem>;
210
+ export type AskQuestionsOutputSteeringScope = OutputSteeringScope;
211
+ /** Curated controls that optionally restrict question answering to an asset time range. */
212
+ export interface AskQuestionsOutputSteering {
213
+ scope?: OutputSteeringScope | undefined;
214
+ }
215
+ export interface AskQuestionsJobParameters {
216
+ /** The Mux asset ID of the video to analyze. */
217
+ asset_id: string;
218
+ /** One or more questions to ask about the video, up to 50. Each question can either select from answer_options (defaults to yes/no) or, by setting free_form_reply: true, receive a free-form prose answer. */
219
+ questions: AskQuestionsJobParametersQuestionsList;
220
+ /** BCP 47 language code of the caption source. An explicit language must match a ready source exactly, including case; for example, en does not match en-US. Translation target exclusion and track replacement instead compare base languages case-insensitively. When omitted, automatic selection applies. Uses the first ready subtitle in asset track order without English preference. Audio-only assets with one ready text track lacking subtitle metadata can use that legacy transcript. */
221
+ language_code?: string | undefined;
222
+ /** Max character length for free-form answers, between 1 and 1000. Ignored unless at least one question sets free_form_reply: true. */
223
+ max_free_form_answer_length?: number | undefined;
224
+ output_steering?: AskQuestionsOutputSteering | undefined;
225
+ }
226
+ export interface CreateAskQuestionsJobRequest {
227
+ /** Arbitrary string stored with the job and returned in responses. Useful for correlating jobs with your own systems. */
228
+ passthrough?: string | undefined;
229
+ parameters: AskQuestionsJobParameters;
230
+ }
231
+ export interface CreateAskQuestionsJobResponse {}
232
+ export type DirectiveSubjectType = "video.asset";
233
+ /** Mux asset lifecycle subject. Live streams are not supported. */
234
+ export interface DirectiveSubject {
235
+ type: DirectiveSubjectType | (string & {});
236
+ }
237
+ /** Workflow identifier used by POST /robots/v1/jobs/analyze-structure. */
238
+ export type AnalyzeStructureDirectiveBindingWorkflow = "analyze-structure";
239
+ /** Resource reference IDs that must become ready before dispatch. */
240
+ export type AnalyzeStructureDirectiveBindingInputsList = Array<string>;
241
+ /** Parameters for analyze-structure, excluding engine-supplied asset_id and source track_id where applicable. */
242
+ export interface AnalyzeStructureDirectiveBindingParameters {
243
+ /** BCP 47 language code of the caption source. An explicit language must match a ready source exactly, including case; for example, en does not match en-US. Translation target exclusion and track replacement instead compare base languages case-insensitively. When omitted, automatic selection applies. Uses the first ready subtitle in asset track order without English preference. Audio-only assets with one ready text track lacking subtitle metadata can use that legacy transcript. */
244
+ language_code?: string | undefined;
245
+ /** BCP 47 language code for generated text. Auto-detected from available evidence when omitted. Transcript cues and verbatim quotes remain in their source language. */
246
+ output_language_code?: string | undefined;
247
+ output_steering?: AnalyzeStructureOutputSteering | undefined;
248
+ /** When true, writes the generated title to asset.meta.title after analysis. Defaults to false. Best-effort: a metadata-write failure does not fail the analysis. Check outputs.asset_updates.title for the outcome. */
249
+ update_asset_meta?: boolean | undefined;
250
+ /** When true, replaces or creates the asset's chapters track after analysis. Defaults to false. Best-effort: a chapters-write failure does not fail the analysis. Check outputs.asset_updates.chapters for the outcome. */
251
+ update_asset_chapters?: boolean | undefined;
252
+ }
253
+ export interface AnalyzeStructureDirectiveBinding {
254
+ /** Binding identifier, unique within the directive. Producer references point to this identifier. */
255
+ reference_id: string;
256
+ /** Workflow identifier used by POST /robots/v1/jobs/analyze-structure. */
257
+ workflow: AnalyzeStructureDirectiveBindingWorkflow;
258
+ /** Resource reference IDs that must become ready before dispatch. */
259
+ inputs?: AnalyzeStructureDirectiveBindingInputsList | undefined;
260
+ parameters?: AnalyzeStructureDirectiveBindingParameters | undefined;
261
+ }
262
+ /** Workflow identifier used by POST /robots/v1/jobs/summarize. */
263
+ export type SummarizeDirectiveBindingWorkflow = "summarize";
264
+ /** Resource reference IDs that must become ready before dispatch. */
265
+ export type SummarizeDirectiveBindingInputsList = Array<string>;
266
+ /** Tone for the generated summary. "neutral" for straightforward analysis, "playful" for witty and conversational, "professional" for executive-level reporting. */
267
+ export type SummarizeDirectiveBindingParametersTone = "neutral" | "playful" | "professional";
268
+ export type SummarizeOutputSteeringScope = OutputSteeringScope;
269
+ /** Accepted alternate names that should normalize to the canonical label. Up to 10 aliases, each up to 100 characters. */
270
+ export type SummaryTagTaxonomyValuesItemAliasesList = Array<string>;
271
+ export interface SummaryTagTaxonomyValuesItem {
272
+ /** Canonical tag value to prefer in generated tags, up to 100 characters. */
273
+ label: string;
274
+ /** Short explanation of when this tag applies, up to 300 characters. */
275
+ description?: string | undefined;
276
+ /** Accepted alternate names that should normalize to the canonical label. Up to 10 aliases, each up to 100 characters. */
277
+ aliases?: SummaryTagTaxonomyValuesItemAliasesList | undefined;
278
+ }
279
+ /** Controlled vocabulary values for generated tags. Supports 1-50 values. */
280
+ export type SummaryTagTaxonomyValuesList = Array<SummaryTagTaxonomyValuesItem>;
281
+ /** Controlled vocabulary for tag generation. This steers tags and may be deterministically filtered after generation. Supports up to 50 values and 2000 serialized characters. */
282
+ export interface SummaryTagTaxonomy {
283
+ /** Optional customer-facing name for the taxonomy, up to 100 characters. */
284
+ name?: string | undefined;
285
+ /** Controlled vocabulary values for generated tags. Supports 1-50 values. */
286
+ values: SummaryTagTaxonomyValuesList;
287
+ /** When false, generated tags are filtered to taxonomy labels and aliases. When true, unmatched tags may remain. */
288
+ allow_other: boolean;
289
+ }
290
+ /** Best-effort style guidance for the generated title and description. */
291
+ export type SummaryStyle = "concise" | "detailed" | "editorial";
292
+ /** Curated output_steering controls for execution scope, summary style, audience, brand terminology, and tag taxonomy. Scope is enforced; other controls guide model behavior but do not guarantee exact output. */
293
+ export interface SummarizeOutputSteering {
294
+ scope?: OutputSteeringScope | undefined;
295
+ tag_taxonomy?: SummaryTagTaxonomy | undefined;
296
+ summary_style?: SummaryStyle | (string & {}) | undefined;
297
+ /** Intended audience used as best-effort model guidance. Does not change the output schema. */
298
+ audience?: string | undefined;
299
+ brand_terms?: OutputSteeringBrandTerms | undefined;
300
+ }
301
+ /** Parameters for summarize, excluding engine-supplied asset_id and source track_id where applicable. */
302
+ export interface SummarizeDirectiveBindingParameters {
303
+ /** Tone for the generated summary. "neutral" for straightforward analysis, "playful" for witty and conversational, "professional" for executive-level reporting. */
304
+ tone?: SummarizeDirectiveBindingParametersTone | (string & {}) | undefined;
305
+ output_steering?: SummarizeOutputSteering | undefined;
306
+ /** Maximum title length in words. */
307
+ title_length?: number | undefined;
308
+ /** Maximum description length in words. */
309
+ description_length?: number | undefined;
310
+ /** Maximum number of tags to include in the generated output. Defaults to 10. */
311
+ tag_count?: number | undefined;
312
+ /** BCP 47 language code of the caption source. An explicit language must match a ready source exactly, including case; for example, en does not match en-US. Translation target exclusion and track replacement instead compare base languages case-insensitively. When omitted, automatic selection applies. Uses the first ready subtitle in asset track order without English preference. Audio-only assets with one ready text track lacking subtitle metadata can use that legacy transcript. */
313
+ language_code?: string | undefined;
314
+ /** BCP 47 language code for the generated summary output (e.g. "en", "fr", "ja"). Auto-detected from the transcript if omitted. */
315
+ output_language_code?: string | undefined;
316
+ /** When true, the generated title is written to the Mux asset's metadata (asset.meta.title) once the summary completes. Defaults to false. Best-effort: a metadata-write failure does not fail the summary. Check outputs.asset_updates.title for the outcome. */
317
+ update_asset_meta?: boolean | undefined;
318
+ }
319
+ export interface SummarizeDirectiveBinding {
320
+ /** Binding identifier, unique within the directive. Producer references point to this identifier. */
321
+ reference_id: string;
322
+ /** Workflow identifier used by POST /robots/v1/jobs/summarize. */
323
+ workflow: SummarizeDirectiveBindingWorkflow;
324
+ /** Resource reference IDs that must become ready before dispatch. */
325
+ inputs?: SummarizeDirectiveBindingInputsList | undefined;
326
+ parameters?: SummarizeDirectiveBindingParameters | undefined;
327
+ }
328
+ /** Workflow identifier used by POST /robots/v1/jobs/moderate. */
329
+ export type ModerateDirectiveBindingWorkflow = "moderate";
330
+ /** Resource reference IDs that must become ready before dispatch. */
331
+ export type ModerateDirectiveBindingInputsList = Array<string>;
332
+ /** Score thresholds that determine whether content is flagged. When combined with sampling_interval or max_samples, the exceeds_threshold flag reflects whether any category's highest observed score exceeds its configured threshold. Defaults to {sexual: 0.7, violence: 0.8}. */
333
+ export interface ModerateDirectiveBindingParametersThresholds {
334
+ /** Score threshold for sexual content. Content scoring above this value triggers exceeds_threshold. */
335
+ sexual?: number | undefined;
336
+ /** Score threshold for violent content. Content scoring above this value triggers exceeds_threshold. */
337
+ violence?: number | undefined;
338
+ }
339
+ export type ModerateOutputSteeringScope = OutputSteeringScope;
340
+ /** Curated controls that optionally restrict moderation to an asset time range. */
341
+ export type ModerateOutputSteering = AskQuestionsOutputSteering;
342
+ /** Action to take when exceeds_threshold is true. "delete_playback_ids" deletes every playback ID on the asset, making it unplayable while preserving the underlying asset so it can be re-published or reviewed. */
343
+ export type ActionOnFlaggedAction = "delete_playback_ids";
344
+ /** Optional action taken automatically when exceeds_threshold is true. When omitted, the job only reports scores and takes no action. Note: in a directive run that targets the same asset with other workflows, deleting playback IDs can break sibling workflows that need a playback ID. */
345
+ export interface ActionOnFlagged {
346
+ /** Action to take when exceeds_threshold is true. "delete_playback_ids" deletes every playback ID on the asset, making it unplayable while preserving the underlying asset so it can be re-published or reviewed. */
347
+ action: ActionOnFlaggedAction | (string & {});
348
+ }
349
+ /** Parameters for moderate, excluding engine-supplied asset_id and source track_id where applicable. */
350
+ export interface ModerateDirectiveBindingParameters {
351
+ /** BCP 47 language code of the caption source. An explicit language must match a ready source exactly, including case; for example, en does not match en-US. Translation target exclusion and track replacement instead compare base languages case-insensitively. When omitted, automatic selection applies. Uses the first ready subtitle in asset track order without English preference. Audio-only assets with one ready text track lacking subtitle metadata can use that legacy transcript. If no ready track matches, the request is rejected. Ignored for video assets when include_transcript is false. */
352
+ language_code?: string | undefined;
353
+ /** Score thresholds that determine whether content is flagged. When combined with sampling_interval or max_samples, the exceeds_threshold flag reflects whether any category's highest observed score exceeds its configured threshold. Defaults to {sexual: 0.7, violence: 0.8}. */
354
+ thresholds?: ModerateDirectiveBindingParametersThresholds | undefined;
355
+ /** Interval, in seconds, between sampled thumbnails. Minimum 5 seconds. When max_samples is also set, the actual sampling density is the more restrictive of the two constraints. */
356
+ sampling_interval?: number | undefined;
357
+ /** Maximum number of thumbnails to sample. Acts as a cap -- if sampling_interval produces fewer samples than this limit, the interval is respected; otherwise samples are evenly distributed with first and last frames pinned. */
358
+ max_samples?: number | undefined;
359
+ output_steering?: AskQuestionsOutputSteering | undefined;
360
+ on_flagged?: ActionOnFlagged | undefined;
361
+ /** Whether to moderate the asset's caption transcript in addition to sampled thumbnails. Applies to video assets with a ready caption track; audio-only assets are always moderated on their transcript. Set to false to moderate thumbnails only. */
362
+ include_transcript?: boolean | undefined;
363
+ }
364
+ export interface ModerateDirectiveBinding {
365
+ /** Binding identifier, unique within the directive. Producer references point to this identifier. */
366
+ reference_id: string;
367
+ /** Workflow identifier used by POST /robots/v1/jobs/moderate. */
368
+ workflow: ModerateDirectiveBindingWorkflow;
369
+ /** Resource reference IDs that must become ready before dispatch. */
370
+ inputs?: ModerateDirectiveBindingInputsList | undefined;
371
+ parameters?: ModerateDirectiveBindingParameters | undefined;
372
+ }
373
+ /** Workflow identifier used by POST /robots/v1/jobs/generate-chapters. */
374
+ export type GenerateChaptersDirectiveBindingWorkflow = "generate-chapters";
375
+ /** Resource reference IDs that must become ready before dispatch. */
376
+ export type GenerateChaptersDirectiveBindingInputsList = Array<string>;
377
+ /** Best-effort style guidance for generated chapter titles. */
378
+ export type ChapterStyle = "descriptive" | "punchy" | "educational" | "seo" | "platform_neutral";
379
+ /** Best-effort guidance for how coarse or fine chapter boundaries should be. */
380
+ export type ChapterGranularity = "coarse" | "balanced" | "fine";
381
+ /** Curated output_steering controls for chapter style, granularity, audience, and brand terminology. These controls guide model behavior but do not guarantee exact output. */
382
+ export interface GenerateChaptersOutputSteering {
383
+ chapter_style?: ChapterStyle | (string & {}) | undefined;
384
+ chapter_granularity?: ChapterGranularity | (string & {}) | undefined;
385
+ /** Intended audience used as best-effort model guidance. Does not change the output schema. */
386
+ audience?: string | undefined;
387
+ brand_terms?: OutputSteeringBrandTerms | undefined;
388
+ }
389
+ /** Parameters for generate-chapters, excluding engine-supplied asset_id and source track_id where applicable. */
390
+ export interface GenerateChaptersDirectiveBindingParameters {
391
+ /** BCP 47 language code of the caption source. An explicit language must match a ready source exactly, including case; for example, en does not match en-US. Translation target exclusion and track replacement instead compare base languages case-insensitively. When omitted, automatic selection applies. Uses the first ready subtitle in asset track order without English preference. Audio-only assets with one ready text track lacking subtitle metadata can use that legacy transcript. */
392
+ language_code?: string | undefined;
393
+ /** BCP 47 language code for the output chapter titles. Auto-detected from the transcript if omitted. */
394
+ output_language_code?: string | undefined;
395
+ output_steering?: GenerateChaptersOutputSteering | undefined;
396
+ /** When true, the generated chapters are written back to the Mux asset as a chapters text track once the job completes, making them deliverable with the asset. Overwrites existing chapters: an asset holds a single chapters track, so any chapters track already on the asset is deleted and replaced -- including one in a different language, and one you created yourself. Best-effort -- a failed write does not fail the job -- so check `asset_updates.chapters` in the job outputs for the outcome. */
397
+ update_asset_chapters?: boolean | undefined;
398
+ }
399
+ export interface GenerateChaptersDirectiveBinding {
400
+ /** Binding identifier, unique within the directive. Producer references point to this identifier. */
401
+ reference_id: string;
402
+ /** Workflow identifier used by POST /robots/v1/jobs/generate-chapters. */
403
+ workflow: GenerateChaptersDirectiveBindingWorkflow;
404
+ /** Resource reference IDs that must become ready before dispatch. */
405
+ inputs?: GenerateChaptersDirectiveBindingInputsList | undefined;
406
+ parameters?: GenerateChaptersDirectiveBindingParameters | undefined;
407
+ }
408
+ /** Workflow identifier used by POST /robots/v1/jobs/generate-contextual-text. */
409
+ export type GenerateContextualTextDirectiveBindingWorkflow = "generate-contextual-text";
410
+ /** Resource reference IDs that must become ready before dispatch. */
411
+ export type GenerateContextualTextDirectiveBindingInputsList = Array<string>;
412
+ export type GenerateContextualTextOutputSteeringScope = OutputSteeringScope;
413
+ /** Best-effort writing voice for every generated artifact in every variant. To give variants different voices, describe the voice in each variant's instructions instead. */
414
+ export type GenerateContextualTextVoice =
415
+ | "conversational"
416
+ | "editorial"
417
+ | "playful"
418
+ | "professional";
419
+ /** Best-effort guidance for whether and how the text should invite the reader to engage further. */
420
+ export type GenerateContextualTextCallToAction = "none" | "soft" | "direct";
421
+ /** Curated controls that apply to every generated artifact in every variant. Scope bounds execution; the other fields are best-effort writing guidance. To vary voice or audience between variants, use variant instructions. */
422
+ export interface GenerateContextualTextOutputSteering {
423
+ scope?: OutputSteeringScope | undefined;
424
+ /** The intended reader, used as best-effort guidance for framing, vocabulary, and assumed context. */
425
+ audience?: string | undefined;
426
+ voice?: GenerateContextualTextVoice | (string & {}) | undefined;
427
+ call_to_action?: GenerateContextualTextCallToAction | (string & {}) | undefined;
428
+ brand_terms?: unknown | undefined;
429
+ }
430
+ /** A named version of the complete artifact set: every variant produces every artifact, so 2 variants and 2 artifacts produce 4 pieces of text. The key is an identifier only and does not steer generation; use instructions to give the variant an angle. */
431
+ export interface GenerateContextualTextVariant {
432
+ key: string;
433
+ /** Optional bounded guidance that gives this variant a deliberate angle, such as a voice, audience, or focus (for example, "Playful voice for a Gen Z audience"). Applies to every artifact in the variant. Omit it to request another independent take on the same brief. */
434
+ instructions?: string | undefined;
435
+ }
436
+ /** Named versions of the complete artifact set. Every variant produces every artifact. Supports 1-5 variants with unique keys. */
437
+ export type GenerateContextualTextVariants = Array<GenerateContextualTextVariant>;
438
+ /** Publishing channel whose conventions guide the result and set its default length: 300 words for generic and linkedin, 250 words for facebook and youtube, 100 words for tiktok, 1,500 characters for instagram, and 280 characters for x. generic has no platform conventions; its style follows the length cap, and a max_length above 600 words produces article-style writing such as a blog post or newsletter entry. */
439
+ export type GenerateContextualTextChannel =
440
+ | "generic"
441
+ | "x"
442
+ | "linkedin"
443
+ | "facebook"
444
+ | "instagram"
445
+ | "tiktok"
446
+ | "youtube";
447
+ export type GenerateContextualTextCharacterMaxLengthUnit = "characters";
448
+ export interface GenerateContextualTextCharacterMaxLength {
449
+ unit: GenerateContextualTextCharacterMaxLengthUnit;
450
+ value: number;
451
+ }
452
+ export type GenerateContextualTextWordMaxLengthUnit = "words";
453
+ export interface GenerateContextualTextWordMaxLength {
454
+ unit: GenerateContextualTextWordMaxLengthUnit;
455
+ value: number;
456
+ }
457
+ /** Hard output cap in characters or words. Defaults to the channel's cap. Text aims for about 85% of the cap regardless of the source's length, so set the length you want rather than relying on the default. x is always capped at 280 characters, even with a word cap. */
458
+ export type GenerateContextualTextMaxLength =
459
+ | GenerateContextualTextCharacterMaxLength
460
+ | GenerateContextualTextWordMaxLength;
461
+ /** Whether the text may use Markdown syntax. plain contains no Markdown. */
462
+ export type GenerateContextualTextFormat = "plain" | "markdown";
463
+ /** One deliverable, such as a social post, blog post, or newsletter entry. Every variant produces each artifact. The channel sets conventions and a default cap, max_length sets the hard cap, and format controls Markdown. */
464
+ export interface GenerateContextualTextArtifact {
465
+ key: string;
466
+ /** Optional guidance specific to this artifact, such as the deliverable to write. Applies in every variant. */
467
+ instructions?: string | undefined;
468
+ channel?: GenerateContextualTextChannel | (string & {}) | undefined;
469
+ max_length?: GenerateContextualTextMaxLength | undefined;
470
+ format?: GenerateContextualTextFormat | (string & {}) | undefined;
471
+ }
472
+ /** The deliverables to create. Every variant produces each artifact. Supports 1-5 artifacts with unique keys. */
473
+ export type GenerateContextualTextArtifacts = Array<GenerateContextualTextArtifact>;
474
+ /** Parameters for generate-contextual-text, excluding engine-supplied asset_id and source track_id where applicable. */
475
+ export interface GenerateContextualTextDirectiveBindingParameters {
476
+ /** When true for a video asset, generate or reuse Mux shots and attach a bounded sample of shot frames as additional visual evidence. Video assets always include a storyboard; the transcript remains authoritative. Not supported for audio-only assets. */
477
+ use_shots?: boolean | undefined;
478
+ output_steering?: GenerateContextualTextOutputSteering | undefined;
479
+ variants: GenerateContextualTextVariants;
480
+ artifacts: GenerateContextualTextArtifacts;
481
+ /** BCP 47 language code of the caption source. An explicit language must match a ready source exactly, including case; for example, en does not match en-US. Translation target exclusion and track replacement instead compare base languages case-insensitively. When omitted, automatic selection applies. Uses the first ready subtitle in asset track order without English preference. Audio-only assets with one ready text track lacking subtitle metadata can use that legacy transcript. */
482
+ language_code?: string | undefined;
483
+ /** BCP 47 language code for generated text. Defaults to the selected transcript track's language when available. */
484
+ output_language_code?: string | undefined;
485
+ }
486
+ export interface GenerateContextualTextDirectiveBinding {
487
+ /** Binding identifier, unique within the directive. Producer references point to this identifier. */
488
+ reference_id: string;
489
+ /** Workflow identifier used by POST /robots/v1/jobs/generate-contextual-text. */
490
+ workflow: GenerateContextualTextDirectiveBindingWorkflow;
491
+ /** Resource reference IDs that must become ready before dispatch. */
492
+ inputs?: GenerateContextualTextDirectiveBindingInputsList | undefined;
493
+ parameters: GenerateContextualTextDirectiveBindingParameters;
494
+ }
495
+ /** Workflow identifier used by POST /robots/v1/jobs/edit-captions. */
496
+ export type EditCaptionsDirectiveBindingWorkflow = "edit-captions";
497
+ /** Resource reference IDs that must become ready before dispatch. */
498
+ export type EditCaptionsDirectiveBindingInputsList = Array<string>;
499
+ /** How profanity is detected. Currently only `llm` is supported, which uses an LLM to identify profanity in cue text. */
500
+ export type EditCaptionsDirectiveBindingParametersAutoCensorProfanityDetectionMethod = "llm";
501
+ /** Replacement strategy for detected profanity: blank inserts bracketed underscores, remove drops the match, and mask replaces characters with question marks. Defaults to "blank". */
502
+ export type EditCaptionsDirectiveBindingParametersAutoCensorProfanityMode =
503
+ | "blank"
504
+ | "remove"
505
+ | "mask";
506
+ /** Additional words or short phrases that should always be censored even if the model does not detect them. */
507
+ export type EditCaptionsDirectiveBindingParametersAutoCensorProfanityAlwaysCensorList =
508
+ Array<string>;
509
+ /** Words or short phrases that should never be censored even if the model flags them. */
510
+ export type EditCaptionsDirectiveBindingParametersAutoCensorProfanityNeverCensorList =
511
+ Array<string>;
512
+ /** Optional LLM-driven profanity detection and censorship rules applied to the selected caption track. */
513
+ export interface EditCaptionsDirectiveBindingParametersAutoCensorProfanity {
514
+ /** How profanity is detected. Currently only `llm` is supported, which uses an LLM to identify profanity in cue text. */
515
+ detection_method?:
516
+ | EditCaptionsDirectiveBindingParametersAutoCensorProfanityDetectionMethod
517
+ | (string & {})
518
+ | undefined;
519
+ /** Replacement strategy for detected profanity: blank inserts bracketed underscores, remove drops the match, and mask replaces characters with question marks. Defaults to "blank". */
520
+ mode?: EditCaptionsDirectiveBindingParametersAutoCensorProfanityMode | (string & {}) | undefined;
521
+ /** Additional words or short phrases that should always be censored even if the model does not detect them. */
522
+ always_censor?:
523
+ | EditCaptionsDirectiveBindingParametersAutoCensorProfanityAlwaysCensorList
524
+ | undefined;
525
+ /** Words or short phrases that should never be censored even if the model flags them. */
526
+ never_censor?:
527
+ | EditCaptionsDirectiveBindingParametersAutoCensorProfanityNeverCensorList
528
+ | undefined;
529
+ }
530
+ export interface EditCaptionsDirectiveBindingParametersReplacementsItem {
531
+ /** Exact word or phrase to replace in cue text. */
532
+ find: string;
533
+ /** Replacement text to insert when a match is found. Use an empty string to delete the match. */
534
+ replace: string;
535
+ /** When true, `find` is matched only with exact case. Defaults to false (case-insensitive matching), so "gonna" also matches "Gonna" and "GONNA". */
536
+ case_sensitive?: boolean | undefined;
537
+ }
538
+ /** Optional static word or phrase replacements applied directly to cue text. */
539
+ export type EditCaptionsDirectiveBindingParametersReplacementsList =
540
+ Array<EditCaptionsDirectiveBindingParametersReplacementsItem>;
541
+ export interface EditCaptionsSpeakerReplacement {
542
+ /** Existing speaker label without the surrounding square brackets. Must match the label in the track exactly, including case. */
543
+ find: string;
544
+ /** New speaker label without the surrounding square brackets. */
545
+ replace: string;
546
+ }
547
+ /** Optional replacements for bracketed speaker labels at the start of caption cues. Values omit the surrounding square brackets, and matching spoken text is not changed. */
548
+ export type EditCaptionsDirectiveBindingParametersSpeakerReplacementsList =
549
+ Array<EditCaptionsSpeakerReplacement>;
550
+ /** What to do with the source track. Defaults to `replace`: the source is deleted and the edited track takes its place under the same name, language and closed-captions setting; no other track is touched, and the source is restored if the edited track can't be added. `fail` deletes nothing and adds the edited track alongside the source, so it requires a `track_name` different from the source's. Either way the request is rejected if a track other than the source already has the edited track's name. `replace` requires `upload_to_mux` to be true. */
551
+ export type EditCaptionsReplaceExistingTracks = "replace" | "fail";
552
+ /** Parameters for edit-captions, excluding engine-supplied asset_id and source track_id where applicable. The engine selects the first ready subtitle in asset track order, or the single ready legacy text transcript on an audio-only asset. */
553
+ export interface EditCaptionsDirectiveBindingParameters {
554
+ /** Optional LLM-driven profanity detection and censorship rules applied to the selected caption track. */
555
+ auto_censor_profanity?: EditCaptionsDirectiveBindingParametersAutoCensorProfanity | undefined;
556
+ /** Optional static word or phrase replacements applied directly to cue text. */
557
+ replacements?: EditCaptionsDirectiveBindingParametersReplacementsList | undefined;
558
+ /** Optional replacements for bracketed speaker labels at the start of caption cues. Values omit the surrounding square brackets, and matching spoken text is not changed. */
559
+ speaker_replacements?: EditCaptionsDirectiveBindingParametersSpeakerReplacementsList | undefined;
560
+ /** Whether to upload the edited VTT back to the Mux asset as a text track. Defaults to true. */
561
+ upload_to_mux?: boolean | undefined;
562
+ replace_existing_tracks?: EditCaptionsReplaceExistingTracks | (string & {}) | undefined;
563
+ /** Name for the edited Mux text track. Defaults to the source track's name. Required and must differ from the source's name when `replace_existing_tracks` is `fail`. Mux requires text track names to be unique on an asset. */
564
+ track_name?: string | undefined;
565
+ }
566
+ export interface EditCaptionsDirectiveBinding {
567
+ /** Binding identifier, unique within the directive. Producer references point to this identifier. */
568
+ reference_id: string;
569
+ /** Workflow identifier used by POST /robots/v1/jobs/edit-captions. */
570
+ workflow: EditCaptionsDirectiveBindingWorkflow;
571
+ /** Resource reference IDs that must become ready before dispatch. */
572
+ inputs?: EditCaptionsDirectiveBindingInputsList | undefined;
573
+ parameters?: EditCaptionsDirectiveBindingParameters | undefined;
574
+ }
575
+ /** Workflow identifier used by POST /robots/v1/jobs/translate-captions. */
576
+ export type TranslateCaptionsDirectiveBindingWorkflow = "translate-captions";
577
+ /** Resource reference IDs that must become ready before dispatch. */
578
+ export type TranslateCaptionsDirectiveBindingInputsList = Array<string>;
579
+ /** Best-effort list of terms (brand names, proper nouns) to preserve verbatim in the translated captions. Does not guarantee exact output. Terms must not contain '<' or '>', invisible characters, or characters altered by Unicode normalization. */
580
+ export type TranslateCaptionsNeverTranslateTerms = Array<string>;
581
+ /** What to do when the asset already has a text track in the same language as, or with the same name as, the translated track. Defaults to `fail`, which rejects the request before any translation is billed. `replace_all` deletes every such track first. `replace_generated` deletes only Mux Video auto-generated tracks and rejects if an uploaded track is in the way. Any value other than `fail` requires `upload_to_mux` to be true. Existing tracks are matched by language ignoring region subtags, and by name ignoring case, in any status. */
582
+ export type TranslateCaptionsReplaceExistingTracks = "fail" | "replace_all" | "replace_generated";
583
+ /** Parameters for translate-captions, excluding engine-supplied asset_id and source track_id where applicable. The engine selects the first eligible ready subtitle in asset track order, or the single ready legacy text transcript on an audio-only asset, whose language differs from output_language_code. Target-language comparison ignores case and region subtags, matching the track replacement rules. */
584
+ export interface TranslateCaptionsDirectiveBindingParameters {
585
+ /** Name for the translated Mux text track. Defaults to "{Language} (Auto-translated)", e.g. "Spanish (Auto-translated)". Mux requires text track names to be unique on an asset, and an existing track with this name is handled according to `replace_existing_tracks`. */
586
+ track_name?: string | undefined;
587
+ /** Whether to upload the translated VTT and attach it as a text track on the Mux asset. Defaults to true. */
588
+ upload_to_mux?: boolean | undefined;
589
+ never_translate?: TranslateCaptionsNeverTranslateTerms | undefined;
590
+ replace_existing_tracks?: TranslateCaptionsReplaceExistingTracks | (string & {}) | undefined;
591
+ /** BCP 47 language code for the translated output (e.g. "es", "ja"). Unless replace_existing_tracks allows replacement, the asset must not already have a text track for this language. */
592
+ output_language_code: string;
593
+ }
594
+ export interface TranslateCaptionsDirectiveBinding {
595
+ /** Binding identifier, unique within the directive. Producer references point to this identifier. */
596
+ reference_id: string;
597
+ /** Workflow identifier used by POST /robots/v1/jobs/translate-captions. */
598
+ workflow: TranslateCaptionsDirectiveBindingWorkflow;
599
+ /** Resource reference IDs that must become ready before dispatch. */
600
+ inputs?: TranslateCaptionsDirectiveBindingInputsList | undefined;
601
+ parameters: TranslateCaptionsDirectiveBindingParameters;
602
+ }
603
+ /** Workflow identifier used by POST /robots/v1/jobs/translate-audio. */
604
+ export type TranslateAudioDirectiveBindingWorkflow = "translate-audio";
605
+ /** Resource reference IDs that must become ready before dispatch. */
606
+ export type TranslateAudioDirectiveBindingInputsList = Array<string>;
607
+ /** What to do when the asset already has an audio track in the same language as, or with the same name as, the new dubbed track. Defaults to `fail`, which rejects the request before any dubbing is billed. `replace_all` deletes every such track first. Audio tracks are never auto-generated by Mux Video, so `replace_generated` behaves as `fail` here. The asset's primary audio track is never deleted. Any value other than `fail` requires `upload_to_mux` to be true. Existing tracks are matched by language ignoring region subtags, and by name ignoring case, in any status. */
608
+ export type TranslateAudioReplaceExistingTracks = "fail" | "replace_all" | "replace_generated";
609
+ /** Subtitle conflict policy. Defaults to fail. Conflicts under this policy prevent subtitle attachment and omit caption_track_id without failing the dubbing job. replace_generated deletes only Mux-generated subtitles; uploaded tracks, including earlier Robots outputs, block it. replace_all deletes every conflicting subtitle or same-name text track. Conflicts match language ignoring region or name ignoring case. A deleting policy requires captions.upload_to_mux to be true. This policy never applies to audio tracks. */
610
+ export type TranslateAudioCaptionsReplaceExistingTracks =
611
+ | "fail"
612
+ | "replace_all"
613
+ | "replace_generated";
614
+ /** Optional subtitle attachment settings. Omitting this object or its upload_to_mux disables caption upload; the dub's WebVTT download remains available when retrieval succeeds. */
615
+ export interface TranslateAudioCaptions {
616
+ /** Whether to attach the dub's translated WebVTT as a subtitle track. Defaults to false, independently of the audio upload_to_mux. Caption conflicts and other attachment failures omit caption_track_id without failing the completed dub. */
617
+ upload_to_mux?: boolean | undefined;
618
+ /** Name for the dubbed subtitle track. Defaults to {Language} (dub), e.g. Spanish (dub). Independent of the audio track_name. */
619
+ track_name?: string | undefined;
620
+ replace_existing_tracks?: TranslateAudioCaptionsReplaceExistingTracks | (string & {}) | undefined;
621
+ }
622
+ /** Parameters for translate-audio, excluding engine-supplied asset_id and source track_id where applicable. */
623
+ export interface TranslateAudioDirectiveBindingParameters {
624
+ /** Name for the dubbed Mux audio track. Defaults to "{Language} (Auto-dubbed)", e.g. "Spanish (Auto-dubbed)". Mux requires audio track names to be unique on an asset, and an existing track with this name is handled according to `replace_existing_tracks`. */
625
+ track_name?: string | undefined;
626
+ /** Whether to automatically upload the translated audio track to the Mux asset. Defaults to true. Must be false for audio-only assets, clips, and assets created from live streams, because Mux cannot add audio tracks to them; the job then returns downloadable audio instead. To keep a clip's dub on Mux, dub its source asset. */
627
+ upload_to_mux?: boolean | undefined;
628
+ replace_existing_tracks?: TranslateAudioReplaceExistingTracks | (string & {}) | undefined;
629
+ captions?: TranslateAudioCaptions | undefined;
630
+ /** BCP 47 language tag for the target audio (e.g. "es", "ur", "yue"). See [supported languages](https://www.mux.com/docs/guides/robots-supported-languages#translate-audio). Known ISO 639-3 aliases are accepted. Region and script subtags are retained on Mux tracks, but dubbing uses the base language. */
631
+ output_language_code: string;
632
+ }
633
+ export interface TranslateAudioDirectiveBinding {
634
+ /** Binding identifier, unique within the directive. Producer references point to this identifier. */
635
+ reference_id: string;
636
+ /** Workflow identifier used by POST /robots/v1/jobs/translate-audio. */
637
+ workflow: TranslateAudioDirectiveBindingWorkflow;
638
+ /** Resource reference IDs that must become ready before dispatch. */
639
+ inputs?: TranslateAudioDirectiveBindingInputsList | undefined;
640
+ parameters: TranslateAudioDirectiveBindingParameters;
641
+ }
642
+ /** Workflow identifier used by POST /robots/v1/jobs/ask-questions. */
643
+ export type AskQuestionsDirectiveBindingWorkflow = "ask-questions";
644
+ /** Resource reference IDs that must become ready before dispatch. */
645
+ export type AskQuestionsDirectiveBindingInputsList = Array<string>;
646
+ /** Allowed answer values for this question. Defaults to ["yes", "no"] when omitted and free_form_reply is not true. Mutually exclusive with free_form_reply. Each option is a short label of at most 150 characters. */
647
+ export type AskQuestionsDirectiveBindingParametersQuestionsItemAnswerOptionsList = Array<string>;
648
+ export interface AskQuestionsDirectiveBindingParametersQuestionsItem {
649
+ /** The question to ask about the video content. Maximum 600 characters. */
650
+ question: string;
651
+ /** Allowed answer values for this question. Defaults to ["yes", "no"] when omitted and free_form_reply is not true. Mutually exclusive with free_form_reply. Each option is a short label of at most 150 characters. */
652
+ answer_options?: AskQuestionsDirectiveBindingParametersQuestionsItemAnswerOptionsList | undefined;
653
+ /** When true, the model replies with free-form prose instead of selecting from answer_options. Mutually exclusive with answer_options. Treat the answer as untrusted model output. */
654
+ free_form_reply?: boolean | undefined;
655
+ }
656
+ /** One or more questions to ask about the video, up to 50. Each question can either select from answer_options (defaults to yes/no) or, by setting free_form_reply: true, receive a free-form prose answer. */
657
+ export type AskQuestionsDirectiveBindingParametersQuestionsList =
658
+ Array<AskQuestionsDirectiveBindingParametersQuestionsItem>;
659
+ /** Parameters for ask-questions, excluding engine-supplied asset_id and source track_id where applicable. */
660
+ export interface AskQuestionsDirectiveBindingParameters {
661
+ /** One or more questions to ask about the video, up to 50. Each question can either select from answer_options (defaults to yes/no) or, by setting free_form_reply: true, receive a free-form prose answer. */
662
+ questions: AskQuestionsDirectiveBindingParametersQuestionsList;
663
+ /** BCP 47 language code of the caption source. An explicit language must match a ready source exactly, including case; for example, en does not match en-US. Translation target exclusion and track replacement instead compare base languages case-insensitively. When omitted, automatic selection applies. Uses the first ready subtitle in asset track order without English preference. Audio-only assets with one ready text track lacking subtitle metadata can use that legacy transcript. */
664
+ language_code?: string | undefined;
665
+ /** Max character length for free-form answers, between 1 and 1000. Ignored unless at least one question sets free_form_reply: true. */
666
+ max_free_form_answer_length?: number | undefined;
667
+ output_steering?: AskQuestionsOutputSteering | undefined;
668
+ }
669
+ export interface AskQuestionsDirectiveBinding {
670
+ /** Binding identifier, unique within the directive. Producer references point to this identifier. */
671
+ reference_id: string;
672
+ /** Workflow identifier used by POST /robots/v1/jobs/ask-questions. */
673
+ workflow: AskQuestionsDirectiveBindingWorkflow;
674
+ /** Resource reference IDs that must become ready before dispatch. */
675
+ inputs?: AskQuestionsDirectiveBindingInputsList | undefined;
676
+ parameters: AskQuestionsDirectiveBindingParameters;
677
+ }
678
+ /** Workflow identifier used by POST /robots/v1/jobs/find-key-moments. */
679
+ export type FindKeyMomentsDirectiveBindingWorkflow = "find-key-moments";
680
+ /** Resource reference IDs that must become ready before dispatch. */
681
+ export type FindKeyMomentsDirectiveBindingInputsList = Array<string>;
682
+ export type FindKeyMomentsOutputSteeringScope = OutputSteeringScope;
683
+ /** Best-effort guidance for what qualifies as a strong standalone key moment. */
684
+ export type KeyMomentsSelectionStrategy =
685
+ | "standalone_hooks"
686
+ | "educational_takeaways"
687
+ | "story_beats"
688
+ | "product_moments"
689
+ | "speaker_highlights";
690
+ /** Best-effort title style guidance for generated moment titles. */
691
+ export type KeyMomentsTitleStyle = "descriptive" | "punchy" | "educational" | "social";
692
+ /** Controlled vocabulary values used as best-effort model guidance. */
693
+ export type FindKeyMomentsOutputSteeringTopicTaxonomyValuesList =
694
+ Array<OutputSteeringTaxonomyValue>;
695
+ export interface FindKeyMomentsOutputSteeringTopicTaxonomy {
696
+ /** Optional customer-facing name for the taxonomy. */
697
+ name?: string | undefined;
698
+ /** Controlled vocabulary values used as best-effort model guidance. */
699
+ values: FindKeyMomentsOutputSteeringTopicTaxonomyValuesList;
700
+ /** When false, the model should prefer values from the taxonomy. When true, non-taxonomy values may be used when no taxonomy value applies. */
701
+ allow_other: boolean;
702
+ }
703
+ export type KeyMomentsRubricPriority =
704
+ | "clarity_in_isolation"
705
+ | "emotional_intensity"
706
+ | "novelty"
707
+ | "soundbite_quality";
708
+ /** Rubric dimensions to use as tie-breakers after applying selection strategy. Best-effort guidance only. */
709
+ export type FindKeyMomentsOutputSteeringRubricPrioritiesList = Array<
710
+ KeyMomentsRubricPriority | (string & {})
711
+ >;
712
+ /** Curated output_steering controls for execution scope, selection strategy, title style, audience, taxonomy, and rubric tie-breakers. Scope is enforced; other controls guide model behavior but do not guarantee exact output. */
713
+ export interface FindKeyMomentsOutputSteering {
714
+ scope?: OutputSteeringScope | undefined;
715
+ selection_strategy?: KeyMomentsSelectionStrategy | (string & {}) | undefined;
716
+ title_style?: KeyMomentsTitleStyle | (string & {}) | undefined;
717
+ /** Intended audience used as best-effort model guidance. Does not change the output schema. */
718
+ audience?: string | undefined;
719
+ brand_terms?: OutputSteeringBrandTerms | undefined;
720
+ topic_taxonomy?: FindKeyMomentsOutputSteeringTopicTaxonomy | undefined;
721
+ /** Rubric dimensions to use as tie-breakers after applying selection strategy. Best-effort guidance only. */
722
+ rubric_priorities?: FindKeyMomentsOutputSteeringRubricPrioritiesList | undefined;
723
+ }
724
+ /** Preferred highlight duration range in seconds. Best-effort guidance, with millisecond precision. */
725
+ export interface FindKeyMomentsTargetDuration {
726
+ /** Preferred minimum highlight duration in seconds, with millisecond precision. */
727
+ min: number;
728
+ /** Preferred maximum highlight duration in seconds, with millisecond precision. */
729
+ max: number;
730
+ }
731
+ /** Parameters for find-key-moments, excluding engine-supplied asset_id and source track_id where applicable. */
732
+ export interface FindKeyMomentsDirectiveBindingParameters {
733
+ /** Maximum number of key moments to extract. When omitted, defaults to 10 for assets up to one hour and 25 for longer assets. */
734
+ max_moments?: number | undefined;
735
+ /** Controls whether video assets are analyzed using Mux shots. When true, shots are generated or reused and visual evidence drives selection. When false or omitted, selection uses transcript evidence and the asset must have a caption track. Not supported for audio-only assets. */
736
+ use_shots?: boolean | undefined;
737
+ output_steering?: FindKeyMomentsOutputSteering | undefined;
738
+ target_duration?: FindKeyMomentsTargetDuration | undefined;
739
+ }
740
+ export interface FindKeyMomentsDirectiveBinding {
741
+ /** Binding identifier, unique within the directive. Producer references point to this identifier. */
742
+ reference_id: string;
743
+ /** Workflow identifier used by POST /robots/v1/jobs/find-key-moments. */
744
+ workflow: FindKeyMomentsDirectiveBindingWorkflow;
745
+ /** Resource reference IDs that must become ready before dispatch. */
746
+ inputs?: FindKeyMomentsDirectiveBindingInputsList | undefined;
747
+ parameters?: FindKeyMomentsDirectiveBindingParameters | undefined;
748
+ }
749
+ /** Workflow identifier used by POST /robots/v1/jobs/generate-engagement-insights. */
750
+ export type GenerateEngagementInsightsDirectiveBindingWorkflow = "generate-engagement-insights";
751
+ /** Resource reference IDs that must become ready before dispatch. */
752
+ export type GenerateEngagementInsightsDirectiveBindingInputsList = Array<string>;
753
+ export interface GenerateEngagementInsightsDirectiveBinding {
754
+ /** Binding identifier, unique within the directive. Producer references point to this identifier. */
755
+ reference_id: string;
756
+ /** Workflow identifier used by POST /robots/v1/jobs/generate-engagement-insights. */
757
+ workflow: GenerateEngagementInsightsDirectiveBindingWorkflow;
758
+ /** Resource reference IDs that must become ready before dispatch. */
759
+ inputs?: GenerateEngagementInsightsDirectiveBindingInputsList | undefined;
760
+ parameters?: unknown | undefined;
761
+ }
762
+ /** Workflow identifier used by POST /robots/v1/jobs/generate-premium-captions. */
763
+ export type GeneratePremiumCaptionsDirectiveBindingWorkflow = "generate-premium-captions";
764
+ /** Resource reference IDs that must become ready before dispatch. */
765
+ export type GeneratePremiumCaptionsDirectiveBindingInputsList = Array<string>;
766
+ /** What to do when the asset already has a text track in the same language as, or with the same name as, the new caption track. Defaults to `fail`, which rejects the request before any work is billed. `replace_all` deletes every such track first. `replace_generated` deletes only Mux Video auto-generated tracks and rejects if an uploaded track is in the way. Existing tracks are matched by language ignoring region subtags, and by name ignoring case, in any status. When `language_code` is omitted the detected language is used, and tracks are only deleted when the detection is confident; otherwise the job behaves as `fail`. */
767
+ export type GeneratePremiumCaptionsReplaceExistingTracks =
768
+ | "fail"
769
+ | "replace_all"
770
+ | "replace_generated";
771
+ /** Best-effort list of words or short phrases (proper nouns, product names, jargon) likely to appear in the audio, used to bias recognition toward correct spellings. Does not guarantee exact output. Each phrase may contain at most 49 characters and 5 words, and must not contain the characters <, >, {, }, [, ], or \. */
772
+ export type GeneratePremiumCaptionsPhrases = Array<string>;
773
+ /** Parameters for generate-premium-captions, excluding engine-supplied asset_id and source track_id where applicable. */
774
+ export interface GeneratePremiumCaptionsDirectiveBindingParameters {
775
+ /** BCP 47 language code of the audio (e.g. "en", "es"). A best-effort hint that biases transcription toward this language -- it is not verified against the audio and does not guarantee the output language. When supplied, language detection is skipped and the captions are labeled with this code. The language will be auto-detected when omitted; existing tracks are then checked against `replace_existing_tracks` after transcription, so a same-language conflict errors the job at track creation instead of being rejected up front, and a deleting policy only applies when the detection is confident. */
776
+ language_code?: string | undefined;
777
+ replace_existing_tracks?:
778
+ | GeneratePremiumCaptionsReplaceExistingTracks
779
+ | (string & {})
780
+ | undefined;
781
+ /** Custom name for the uploaded Mux text track. Defaults to "{Language} (Generated)", e.g. "English (Generated)". Mux requires text track names to be unique on an asset. */
782
+ track_name?: string | undefined;
783
+ /** When true, speaker labels are identified and added to each caption cue. Useful for interviews, podcasts, and multi-speaker content. */
784
+ include_speakers?: boolean | undefined;
785
+ /** When true, word-level timestamps are exported as a JSON file accessible via temporary_words_url in the job outputs. The URL expires 7 days after the job completes. Billed at a higher unit rate. */
786
+ include_words?: boolean | undefined;
787
+ /** Whether to upload the generated SRT to the Mux asset as a new text track. Defaults to true. When false, no track is created and `replace_existing_tracks` must be `fail`; the generated SRT remains available via `temporary_srt_url`. */
788
+ upload_to_mux?: boolean | undefined;
789
+ phrases?: GeneratePremiumCaptionsPhrases | undefined;
790
+ }
791
+ export interface GeneratePremiumCaptionsDirectiveBinding {
792
+ /** Binding identifier, unique within the directive. Producer references point to this identifier. */
793
+ reference_id: string;
794
+ /** Workflow identifier used by POST /robots/v1/jobs/generate-premium-captions. */
795
+ workflow: GeneratePremiumCaptionsDirectiveBindingWorkflow;
796
+ /** Resource reference IDs that must become ready before dispatch. */
797
+ inputs?: GeneratePremiumCaptionsDirectiveBindingInputsList | undefined;
798
+ parameters?: GeneratePremiumCaptionsDirectiveBindingParameters | undefined;
799
+ }
800
+ /** Workflow identifier used by POST /robots/v1/jobs/find-best-thumbnails. */
801
+ export type FindBestThumbnailsDirectiveBindingWorkflow = "find-best-thumbnails";
802
+ /** Resource reference IDs that must become ready before dispatch. */
803
+ export type FindBestThumbnailsDirectiveBindingInputsList = Array<string>;
804
+ export type FindBestThumbnailsOutputSteeringScope = OutputSteeringScope;
805
+ /** Best-effort guidance for what kind of thumbnail candidate should score highest. */
806
+ export type FindBestThumbnailsSelectionStrategy =
807
+ | "face_or_action"
808
+ | "clean_composition"
809
+ | "high_contrast"
810
+ | "brand_safe"
811
+ | "campaign_thumbnail";
812
+ export type FindBestThumbnailsScoringPriority =
813
+ | "focus"
814
+ | "face_or_action"
815
+ | "composition"
816
+ | "contrast_color"
817
+ | "brand_fit";
818
+ /** Rubric criteria to emphasize in close calls. Best-effort guidance only. */
819
+ export type FindBestThumbnailsOutputSteeringScoringPrioritiesList = Array<
820
+ FindBestThumbnailsScoringPriority | (string & {})
821
+ >;
822
+ /** Curated output_steering controls for execution scope, thumbnail scoring strategy, explicit user intent, audience, campaign style, and scoring priorities. Scope is enforced; other controls guide model behavior but do not guarantee exact output. */
823
+ export interface FindBestThumbnailsOutputSteering {
824
+ scope?: OutputSteeringScope | undefined;
825
+ selection_strategy?: FindBestThumbnailsSelectionStrategy | (string & {}) | undefined;
826
+ /** Open-ended description of what the user is explicitly looking for in candidate thumbnails. Best-effort guidance only. */
827
+ looking_for?: string | undefined;
828
+ /** Intended audience used as best-effort scoring guidance. Does not change the output schema. */
829
+ audience?: string | undefined;
830
+ /** Short description of the campaign/channel thumbnail style to prefer when supported by the frame. */
831
+ campaign_style?: string | undefined;
832
+ /** Rubric criteria to emphasize in close calls. Best-effort guidance only. */
833
+ scoring_priorities?: FindBestThumbnailsOutputSteeringScoringPrioritiesList | undefined;
834
+ }
835
+ /** Parameters for find-best-thumbnails, excluding engine-supplied asset_id and source track_id where applicable. */
836
+ export interface FindBestThumbnailsDirectiveBindingParameters {
837
+ /** Maximum number of candidate thumbnails to return (1-5). Defaults to 5. */
838
+ max_thumbnails?: number | undefined;
839
+ output_steering?: FindBestThumbnailsOutputSteering | undefined;
840
+ /** When true, the highest-scoring thumbnail's timestamp is written to the Mux asset's thumbnail_time once the job completes, making that frame the asset's default poster image. The new thumbnail will appear for some clients sooner than others, depending on local cache settings. Defaults to false. */
841
+ update_asset_thumbnail?: boolean | undefined;
842
+ }
843
+ export interface FindBestThumbnailsDirectiveBinding {
844
+ /** Binding identifier, unique within the directive. Producer references point to this identifier. */
845
+ reference_id: string;
846
+ /** Workflow identifier used by POST /robots/v1/jobs/find-best-thumbnails. */
847
+ workflow: FindBestThumbnailsDirectiveBindingWorkflow;
848
+ /** Resource reference IDs that must become ready before dispatch. */
849
+ inputs?: FindBestThumbnailsDirectiveBindingInputsList | undefined;
850
+ parameters?: FindBestThumbnailsDirectiveBindingParameters | undefined;
851
+ }
852
+ export type DirectiveBinding =
853
+ | AnalyzeStructureDirectiveBinding
854
+ | SummarizeDirectiveBinding
855
+ | ModerateDirectiveBinding
856
+ | GenerateChaptersDirectiveBinding
857
+ | GenerateContextualTextDirectiveBinding
858
+ | EditCaptionsDirectiveBinding
859
+ | TranslateCaptionsDirectiveBinding
860
+ | TranslateAudioDirectiveBinding
861
+ | AskQuestionsDirectiveBinding
862
+ | FindKeyMomentsDirectiveBinding
863
+ | GenerateEngagementInsightsDirectiveBinding
864
+ | GeneratePremiumCaptionsDirectiveBinding
865
+ | FindBestThumbnailsDirectiveBinding;
866
+ export type DirectiveBindings = Array<DirectiveBinding>;
867
+ export interface CreateDirectiveRequest {
868
+ /** Human-readable directive name. */
869
+ name: string;
870
+ subject: DirectiveSubject;
871
+ resources?: unknown | undefined;
872
+ bindings: DirectiveBindings;
873
+ }
874
+ export interface DirectiveSelfLink {
875
+ /** URL to the directive in its creation API version. */
876
+ href: string;
877
+ }
878
+ export interface DirectiveLinks {
879
+ self: DirectiveSelfLink;
880
+ }
881
+ export interface Directive {
882
+ /** Human-readable directive name. */
883
+ name: string;
884
+ subject: DirectiveSubject;
885
+ resources: unknown;
886
+ bindings: DirectiveBindings;
887
+ /** Opaque directive identifier (drv_...). */
888
+ id: string;
889
+ _links: DirectiveLinks;
890
+ /** Creation Unix timestamp in seconds. */
891
+ created_at: number;
892
+ /** Last update Unix timestamp in seconds. */
893
+ updated_at: number;
894
+ }
895
+ export interface DirectiveResponse {
896
+ data: Directive;
897
+ }
898
+ /** How profanity is detected. Currently only `llm` is supported, which uses an LLM to identify profanity in cue text. */
899
+ export type EditCaptionsJobParametersAutoCensorProfanityDetectionMethod = "llm";
900
+ /** Replacement strategy for detected profanity: blank inserts bracketed underscores, remove drops the match, and mask replaces characters with question marks. Defaults to "blank". */
901
+ export type EditCaptionsJobParametersAutoCensorProfanityMode = "blank" | "remove" | "mask";
902
+ /** Additional words or short phrases that should always be censored even if the model does not detect them. */
903
+ export type EditCaptionsJobParametersAutoCensorProfanityAlwaysCensorList = Array<string>;
904
+ /** Words or short phrases that should never be censored even if the model flags them. */
905
+ export type EditCaptionsJobParametersAutoCensorProfanityNeverCensorList = Array<string>;
906
+ /** Optional LLM-driven profanity detection and censorship rules applied to the selected caption track. */
907
+ export interface EditCaptionsJobParametersAutoCensorProfanity {
908
+ /** How profanity is detected. Currently only `llm` is supported, which uses an LLM to identify profanity in cue text. */
909
+ detection_method?:
910
+ | EditCaptionsJobParametersAutoCensorProfanityDetectionMethod
911
+ | (string & {})
912
+ | undefined;
913
+ /** Replacement strategy for detected profanity: blank inserts bracketed underscores, remove drops the match, and mask replaces characters with question marks. Defaults to "blank". */
914
+ mode?: EditCaptionsJobParametersAutoCensorProfanityMode | (string & {}) | undefined;
915
+ /** Additional words or short phrases that should always be censored even if the model does not detect them. */
916
+ always_censor?: EditCaptionsJobParametersAutoCensorProfanityAlwaysCensorList | undefined;
917
+ /** Words or short phrases that should never be censored even if the model flags them. */
918
+ never_censor?: EditCaptionsJobParametersAutoCensorProfanityNeverCensorList | undefined;
919
+ }
920
+ export type EditCaptionsJobParametersReplacementsItem =
921
+ EditCaptionsDirectiveBindingParametersReplacementsItem;
922
+ /** Optional static word or phrase replacements applied directly to cue text. */
923
+ export type EditCaptionsJobParametersReplacementsList =
924
+ Array<EditCaptionsDirectiveBindingParametersReplacementsItem>;
925
+ /** Optional replacements for bracketed speaker labels at the start of caption cues. Values omit the surrounding square brackets, and matching spoken text is not changed. */
926
+ export type EditCaptionsJobParametersSpeakerReplacementsList =
927
+ Array<EditCaptionsSpeakerReplacement>;
928
+ export interface EditCaptionsJobParameters {
929
+ /** The Mux asset ID whose existing text track should be edited. */
930
+ asset_id: string;
931
+ /** Mux text track ID of the source captions. Must identify a ready subtitle track, or the single ready legacy text transcript without subtitle metadata on an audio-only asset. A missing or unready source is rejected. */
932
+ track_id: string;
933
+ /** Optional LLM-driven profanity detection and censorship rules applied to the selected caption track. */
934
+ auto_censor_profanity?: EditCaptionsJobParametersAutoCensorProfanity | undefined;
935
+ /** Optional static word or phrase replacements applied directly to cue text. */
936
+ replacements?: EditCaptionsJobParametersReplacementsList | undefined;
937
+ /** Optional replacements for bracketed speaker labels at the start of caption cues. Values omit the surrounding square brackets, and matching spoken text is not changed. */
938
+ speaker_replacements?: EditCaptionsJobParametersSpeakerReplacementsList | undefined;
939
+ /** Whether to upload the edited VTT back to the Mux asset as a text track. Defaults to true. */
940
+ upload_to_mux?: boolean | undefined;
941
+ replace_existing_tracks?: EditCaptionsReplaceExistingTracks | (string & {}) | undefined;
942
+ /** Name for the edited Mux text track. Defaults to the source track's name. Required and must differ from the source's name when `replace_existing_tracks` is `fail`. Mux requires text track names to be unique on an asset. */
943
+ track_name?: string | undefined;
944
+ }
945
+ export interface CreateEditCaptionsJobRequest {
946
+ /** Arbitrary string stored with the job and returned in responses. Useful for correlating jobs with your own systems. */
947
+ passthrough?: string | undefined;
948
+ parameters: EditCaptionsJobParameters;
949
+ }
950
+ export interface CreateEditCaptionsJobResponse {}
951
+ export interface FindBestThumbnailsJobParameters {
952
+ /** The Mux asset ID of the video to find thumbnails for. */
953
+ asset_id: string;
954
+ /** Maximum number of candidate thumbnails to return (1-5). Defaults to 5. */
955
+ max_thumbnails?: number | undefined;
956
+ output_steering?: FindBestThumbnailsOutputSteering | undefined;
957
+ /** When true, the highest-scoring thumbnail's timestamp is written to the Mux asset's thumbnail_time once the job completes, making that frame the asset's default poster image. The new thumbnail will appear for some clients sooner than others, depending on local cache settings. Defaults to false. */
958
+ update_asset_thumbnail?: boolean | undefined;
959
+ }
960
+ export interface CreateFindBestThumbnailsJobRequest {
961
+ /** Arbitrary string stored with the job and returned in responses. Useful for correlating jobs with your own systems. */
962
+ passthrough?: string | undefined;
963
+ parameters: FindBestThumbnailsJobParameters;
964
+ }
965
+ export interface CreateFindBestThumbnailsJobResponse {}
966
+ export interface FindKeyMomentsJobParameters {
967
+ /** The Mux asset ID of the video to analyze. */
968
+ asset_id: string;
969
+ /** Maximum number of key moments to extract. When omitted, defaults to 10 for assets up to one hour and 25 for longer assets. */
970
+ max_moments?: number | undefined;
971
+ /** Controls whether video assets are analyzed using Mux shots. When true, shots are generated or reused and visual evidence drives selection. When false or omitted, selection uses transcript evidence and the asset must have a caption track. Not supported for audio-only assets. */
972
+ use_shots?: boolean | undefined;
973
+ output_steering?: FindKeyMomentsOutputSteering | undefined;
974
+ target_duration?: FindKeyMomentsTargetDuration | undefined;
975
+ }
976
+ export interface CreateFindKeyMomentsJobRequest {
977
+ /** Arbitrary string stored with the job and returned in responses. Useful for correlating jobs with your own systems. */
978
+ passthrough?: string | undefined;
979
+ parameters: FindKeyMomentsJobParameters;
980
+ }
981
+ export interface CreateFindKeyMomentsJobResponse {}
982
+ export interface GenerateChaptersJobParameters {
983
+ /** The Mux asset ID of the video to generate chapters for. */
984
+ asset_id: string;
985
+ /** BCP 47 language code of the caption source. An explicit language must match a ready source exactly, including case; for example, en does not match en-US. Translation target exclusion and track replacement instead compare base languages case-insensitively. When omitted, automatic selection applies. Uses the first ready subtitle in asset track order without English preference. Audio-only assets with one ready text track lacking subtitle metadata can use that legacy transcript. */
986
+ language_code?: string | undefined;
987
+ /** BCP 47 language code for the output chapter titles. Auto-detected from the transcript if omitted. */
988
+ output_language_code?: string | undefined;
989
+ output_steering?: GenerateChaptersOutputSteering | undefined;
990
+ /** When true, the generated chapters are written back to the Mux asset as a chapters text track once the job completes, making them deliverable with the asset. Overwrites existing chapters: an asset holds a single chapters track, so any chapters track already on the asset is deleted and replaced -- including one in a different language, and one you created yourself. Best-effort -- a failed write does not fail the job -- so check `asset_updates.chapters` in the job outputs for the outcome. */
991
+ update_asset_chapters?: boolean | undefined;
992
+ }
993
+ export interface CreateGenerateChaptersJobRequest {
994
+ /** Arbitrary string stored with the job and returned in responses. Useful for correlating jobs with your own systems. */
995
+ passthrough?: string | undefined;
996
+ parameters: GenerateChaptersJobParameters;
997
+ }
998
+ export interface CreateGenerateChaptersJobResponse {}
999
+ export interface GenerateContextualTextJobParameters {
1000
+ /** The Mux asset ID whose transcript grounds the generated text. */
1001
+ asset_id: string;
1002
+ /** When true for a video asset, generate or reuse Mux shots and attach a bounded sample of shot frames as additional visual evidence. Video assets always include a storyboard; the transcript remains authoritative. Not supported for audio-only assets. */
1003
+ use_shots?: boolean | undefined;
1004
+ output_steering?: GenerateContextualTextOutputSteering | undefined;
1005
+ variants: GenerateContextualTextVariants;
1006
+ artifacts: GenerateContextualTextArtifacts;
1007
+ /** BCP 47 language code of the caption source. An explicit language must match a ready source exactly, including case; for example, en does not match en-US. Translation target exclusion and track replacement instead compare base languages case-insensitively. When omitted, automatic selection applies. Uses the first ready subtitle in asset track order without English preference. Audio-only assets with one ready text track lacking subtitle metadata can use that legacy transcript. */
1008
+ language_code?: string | undefined;
1009
+ /** BCP 47 language code for generated text. Defaults to the selected transcript track's language when available. */
1010
+ output_language_code?: string | undefined;
1011
+ }
1012
+ export interface CreateGenerateContextualTextJobRequest {
1013
+ /** Arbitrary string stored with the job and returned in responses. Useful for correlating jobs with your own systems. */
1014
+ passthrough?: string | undefined;
1015
+ parameters: GenerateContextualTextJobParameters;
1016
+ }
1017
+ export interface CreateGenerateContextualTextJobResponse {}
1018
+ export interface GenerateEngagementInsightsJobParameters {
1019
+ /** The Mux asset ID of the video to analyze engagement for. */
1020
+ asset_id: string;
1021
+ }
1022
+ export interface CreateGenerateEngagementInsightsJobRequest {
1023
+ /** Arbitrary string stored with the job and returned in responses. Useful for correlating jobs with your own systems. */
1024
+ passthrough?: string | undefined;
1025
+ parameters: GenerateEngagementInsightsJobParameters;
1026
+ }
1027
+ export interface CreateGenerateEngagementInsightsJobResponse {}
1028
+ export interface GeneratePremiumCaptionsJobParameters {
1029
+ /** The Mux asset ID of the video to caption. */
1030
+ asset_id: string;
1031
+ /** BCP 47 language code of the audio (e.g. "en", "es"). A best-effort hint that biases transcription toward this language -- it is not verified against the audio and does not guarantee the output language. When supplied, language detection is skipped and the captions are labeled with this code. The language will be auto-detected when omitted; existing tracks are then checked against `replace_existing_tracks` after transcription, so a same-language conflict errors the job at track creation instead of being rejected up front, and a deleting policy only applies when the detection is confident. */
1032
+ language_code?: string | undefined;
1033
+ replace_existing_tracks?:
1034
+ | GeneratePremiumCaptionsReplaceExistingTracks
1035
+ | (string & {})
1036
+ | undefined;
1037
+ /** Custom name for the uploaded Mux text track. Defaults to "{Language} (Generated)", e.g. "English (Generated)". Mux requires text track names to be unique on an asset. */
1038
+ track_name?: string | undefined;
1039
+ /** When true, speaker labels are identified and added to each caption cue. Useful for interviews, podcasts, and multi-speaker content. */
1040
+ include_speakers?: boolean | undefined;
1041
+ /** When true, word-level timestamps are exported as a JSON file accessible via temporary_words_url in the job outputs. The URL expires 7 days after the job completes. Billed at a higher unit rate. */
1042
+ include_words?: boolean | undefined;
1043
+ /** Whether to upload the generated SRT to the Mux asset as a new text track. Defaults to true. When false, no track is created and `replace_existing_tracks` must be `fail`; the generated SRT remains available via `temporary_srt_url`. */
1044
+ upload_to_mux?: boolean | undefined;
1045
+ phrases?: GeneratePremiumCaptionsPhrases | undefined;
1046
+ }
1047
+ export interface CreateGeneratePremiumCaptionsJobRequest {
1048
+ /** Arbitrary string stored with the job and returned in responses. Useful for correlating jobs with your own systems. */
1049
+ passthrough?: string | undefined;
1050
+ parameters: GeneratePremiumCaptionsJobParameters;
1051
+ }
1052
+ export interface CreateGeneratePremiumCaptionsJobResponse {}
1053
+ /** Score thresholds that determine whether content is flagged. When combined with sampling_interval or max_samples, the exceeds_threshold flag reflects whether any category's highest observed score exceeds its configured threshold. Defaults to {sexual: 0.7, violence: 0.8}. */
1054
+ export type ModerateJobParametersThresholds = ModerateDirectiveBindingParametersThresholds;
1055
+ export interface ModerateJobParameters {
1056
+ /** The Mux asset ID of the video to moderate. */
1057
+ asset_id: string;
1058
+ /** BCP 47 language code of the caption source. An explicit language must match a ready source exactly, including case; for example, en does not match en-US. Translation target exclusion and track replacement instead compare base languages case-insensitively. When omitted, automatic selection applies. Uses the first ready subtitle in asset track order without English preference. Audio-only assets with one ready text track lacking subtitle metadata can use that legacy transcript. If no ready track matches, the request is rejected. Ignored for video assets when include_transcript is false. */
1059
+ language_code?: string | undefined;
1060
+ /** Score thresholds that determine whether content is flagged. When combined with sampling_interval or max_samples, the exceeds_threshold flag reflects whether any category's highest observed score exceeds its configured threshold. Defaults to {sexual: 0.7, violence: 0.8}. */
1061
+ thresholds?: ModerateDirectiveBindingParametersThresholds | undefined;
1062
+ /** Interval, in seconds, between sampled thumbnails. Minimum 5 seconds. When max_samples is also set, the actual sampling density is the more restrictive of the two constraints. */
1063
+ sampling_interval?: number | undefined;
1064
+ /** Maximum number of thumbnails to sample. Acts as a cap -- if sampling_interval produces fewer samples than this limit, the interval is respected; otherwise samples are evenly distributed with first and last frames pinned. */
1065
+ max_samples?: number | undefined;
1066
+ output_steering?: AskQuestionsOutputSteering | undefined;
1067
+ on_flagged?: ActionOnFlagged | undefined;
1068
+ /** Whether to moderate the asset's caption transcript in addition to sampled thumbnails. Applies to video assets with a ready caption track; audio-only assets are always moderated on their transcript. Set to false to moderate thumbnails only. */
1069
+ include_transcript?: boolean | undefined;
1070
+ }
1071
+ export interface CreateModerateJobRequest {
1072
+ /** Arbitrary string stored with the job and returned in responses. Useful for correlating jobs with your own systems. */
1073
+ passthrough?: string | undefined;
1074
+ parameters: ModerateJobParameters;
1075
+ }
1076
+ export interface CreateModerateJobResponse {}
1077
+ /** Tone for the generated summary. "neutral" for straightforward analysis, "playful" for witty and conversational, "professional" for executive-level reporting. */
1078
+ export type SummarizeJobParametersTone = "neutral" | "playful" | "professional";
1079
+ export interface SummarizeJobParameters {
1080
+ /** The Mux asset ID of the video to summarize. */
1081
+ asset_id: string;
1082
+ /** Tone for the generated summary. "neutral" for straightforward analysis, "playful" for witty and conversational, "professional" for executive-level reporting. */
1083
+ tone?: SummarizeJobParametersTone | (string & {}) | undefined;
1084
+ output_steering?: SummarizeOutputSteering | undefined;
1085
+ /** Maximum title length in words. */
1086
+ title_length?: number | undefined;
1087
+ /** Maximum description length in words. */
1088
+ description_length?: number | undefined;
1089
+ /** Maximum number of tags to include in the generated output. Defaults to 10. */
1090
+ tag_count?: number | undefined;
1091
+ /** BCP 47 language code of the caption source. An explicit language must match a ready source exactly, including case; for example, en does not match en-US. Translation target exclusion and track replacement instead compare base languages case-insensitively. When omitted, automatic selection applies. Uses the first ready subtitle in asset track order without English preference. Audio-only assets with one ready text track lacking subtitle metadata can use that legacy transcript. */
1092
+ language_code?: string | undefined;
1093
+ /** BCP 47 language code for the generated summary output (e.g. "en", "fr", "ja"). Auto-detected from the transcript if omitted. */
1094
+ output_language_code?: string | undefined;
1095
+ /** When true, the generated title is written to the Mux asset's metadata (asset.meta.title) once the summary completes. Defaults to false. Best-effort: a metadata-write failure does not fail the summary. Check outputs.asset_updates.title for the outcome. */
1096
+ update_asset_meta?: boolean | undefined;
1097
+ }
1098
+ export interface CreateSummarizeJobRequest {
1099
+ /** Arbitrary string stored with the job and returned in responses. Useful for correlating jobs with your own systems. */
1100
+ passthrough?: string | undefined;
1101
+ parameters: SummarizeJobParameters;
1102
+ }
1103
+ export interface CreateSummarizeJobResponse {}
1104
+ export interface TranslateAudioJobParameters {
1105
+ /** The Mux asset ID of the video to translate. */
1106
+ asset_id: string;
1107
+ /** Name for the dubbed Mux audio track. Defaults to "{Language} (Auto-dubbed)", e.g. "Spanish (Auto-dubbed)". Mux requires audio track names to be unique on an asset, and an existing track with this name is handled according to `replace_existing_tracks`. */
1108
+ track_name?: string | undefined;
1109
+ /** Whether to automatically upload the translated audio track to the Mux asset. Defaults to true. Must be false for audio-only assets, clips, and assets created from live streams, because Mux cannot add audio tracks to them; the job then returns downloadable audio instead. To keep a clip's dub on Mux, dub its source asset. */
1110
+ upload_to_mux?: boolean | undefined;
1111
+ replace_existing_tracks?: TranslateAudioReplaceExistingTracks | (string & {}) | undefined;
1112
+ captions?: TranslateAudioCaptions | undefined;
1113
+ /** BCP 47 language tag for the target audio (e.g. "es", "ur", "yue"). See [supported languages](https://www.mux.com/docs/guides/robots-supported-languages#translate-audio). Known ISO 639-3 aliases are accepted. Region and script subtags are retained on Mux tracks, but dubbing uses the base language. */
1114
+ output_language_code: string;
1115
+ }
1116
+ export interface CreateTranslateAudioJobRequest {
1117
+ /** Arbitrary string stored with the job and returned in responses. Useful for correlating jobs with your own systems. */
1118
+ passthrough?: string | undefined;
1119
+ parameters: TranslateAudioJobParameters;
1120
+ }
1121
+ export interface CreateTranslateAudioJobResponse {}
1122
+ export interface TranslateCaptionsJobParameters {
1123
+ /** The Mux asset ID of the video whose captions will be translated. */
1124
+ asset_id: string;
1125
+ /** Mux text track ID of the source captions. Must identify a ready subtitle track, or the single ready legacy text transcript without subtitle metadata on an audio-only asset. A missing or unready source is rejected. */
1126
+ track_id: string;
1127
+ /** Name for the translated Mux text track. Defaults to "{Language} (Auto-translated)", e.g. "Spanish (Auto-translated)". Mux requires text track names to be unique on an asset, and an existing track with this name is handled according to `replace_existing_tracks`. */
1128
+ track_name?: string | undefined;
1129
+ /** Whether to upload the translated VTT and attach it as a text track on the Mux asset. Defaults to true. */
1130
+ upload_to_mux?: boolean | undefined;
1131
+ never_translate?: TranslateCaptionsNeverTranslateTerms | undefined;
1132
+ replace_existing_tracks?: TranslateCaptionsReplaceExistingTracks | (string & {}) | undefined;
1133
+ /** BCP 47 language code for the translated output (e.g. "es", "ja"). Unless replace_existing_tracks allows replacement, the asset must not already have a text track for this language. */
1134
+ output_language_code: string;
1135
+ }
1136
+ export interface CreateTranslateCaptionsJobRequest {
1137
+ /** Arbitrary string stored with the job and returned in responses. Useful for correlating jobs with your own systems. */
1138
+ passthrough?: string | undefined;
1139
+ parameters: TranslateCaptionsJobParameters;
1140
+ }
1141
+ export interface CreateTranslateCaptionsJobResponse {}
1142
+ export interface DeleteDirectiveRequest {
1143
+ /** Directive ID returned by directive creation or listing (drv_...). */
1144
+ DIRECTIVE_ID: string;
1145
+ }
1146
+ export interface DeleteDirectiveResponse {}
1147
+ export interface GetAnalyzeStructureJobRequest {
1148
+ /** Robots job ID returned by job creation or listing (rjob_...). */
1149
+ JOB_ID: string;
1150
+ }
1151
+ /** The directive run that dispatched this job. Absent for jobs created via direct API POST. */
1152
+ export interface JobDirectiveContext {
1153
+ /** ID of the directive that dispatched this job. */
1154
+ id: string;
1155
+ /** ID of the specific directive run that dispatched this job. */
1156
+ run_id: string;
1157
+ }
1158
+ export type AnalyzeStructureJobWorkflow = "analyze-structure";
1159
+ export interface JobError {
1160
+ /** Stable public error category identifier. New types may be added, so handle unknown values. */
1161
+ type: string;
1162
+ /** Identifies the specific condition that failed, when it has a public code. Absent for other failures. New codes may be added, so handle unknown values. */
1163
+ code?: string | undefined;
1164
+ /** Human-readable public error message. */
1165
+ message: string;
1166
+ /** Whether retrying this job may resolve the error. */
1167
+ retryable?: boolean | undefined;
1168
+ }
1169
+ /** Error details. Present when status is 'errored'. */
1170
+ export type AnalyzeStructureJobErrorsList = Array<JobError>;
1171
+ /** Mux asset metadata, if available. */
1172
+ export interface SlimlineAssetMeta {
1173
+ /** Asset title from Mux metadata. */
1174
+ title?: string | undefined;
1175
+ /** Creator identifier from Mux metadata. */
1176
+ creator_id?: string | undefined;
1177
+ /** External identifier from Mux metadata. */
1178
+ external_id?: string | undefined;
1179
+ }
1180
+ export interface SlimlineAssetLinksSelf {
1181
+ /** URL to the Mux asset resource. */
1182
+ href: string;
1183
+ }
1184
+ /** Hypermedia links for the asset. */
1185
+ export interface SlimlineAssetLinks {
1186
+ self: SlimlineAssetLinksSelf;
1187
+ }
1188
+ export interface SlimlineAsset {
1189
+ /** Mux asset ID. */
1190
+ id: string;
1191
+ /** Mux asset metadata, if available. */
1192
+ meta?: SlimlineAssetMeta | undefined;
1193
+ /** Passthrough string from the Mux asset. */
1194
+ passthrough?: string | undefined;
1195
+ /** Hypermedia links for the asset. */
1196
+ _links: SlimlineAssetLinks;
1197
+ }
1198
+ /** Mux assets associated with this job. */
1199
+ export type ResourcesAssetsList = Array<SlimlineAsset>;
1200
+ /** Related Mux resources linked to this job. */
1201
+ export interface Resources {
1202
+ /** Mux assets associated with this job. */
1203
+ assets: ResourcesAssetsList;
1204
+ }
1205
+ /** Generated tags. Always present and empty when no tag qualifies. */
1206
+ export type AnalyzeStructureJobOutputsTagsList = Array<string>;
1207
+ export interface AnalyzeStructureChapter {
1208
+ /** Chapter start time in seconds on the original asset timeline. Fractional seconds are supported. */
1209
+ start_time: number;
1210
+ /** Chapter end time in seconds on the original asset timeline. Fractional seconds are supported. */
1211
+ end_time: number;
1212
+ /** Concise chapter title. */
1213
+ title: string;
1214
+ }
1215
+ /** Generated chapters in timeline order. Chapters are generated only when the analyzed range is at least 60 seconds long and has at least two coverage segments. Always present, and may be empty even when those conditions are met. */
1216
+ export type AnalyzeStructureJobOutputsChaptersList = Array<AnalyzeStructureChapter>;
1217
+ export interface AnalyzeStructureCue {
1218
+ /** Cue start time in seconds on the original asset timeline. Fractional seconds are supported. */
1219
+ start_time: number;
1220
+ /** Cue end time in seconds on the original asset timeline. Fractional seconds are supported. */
1221
+ end_time: number;
1222
+ /** Transcript text for this cue. */
1223
+ text: string;
1224
+ }
1225
+ /** Transcript cues overlapping this scene. Empty when no usable transcript evidence is available. */
1226
+ export type AnalyzeStructureSceneCuesList = Array<AnalyzeStructureCue>;
1227
+ /** Evidence-grounded concepts from the audible content. */
1228
+ export type AnalyzeStructureSceneNotableAudibleConceptsList = Array<string>;
1229
+ export interface AnalyzeStructureVisualConcept {
1230
+ concept: unknown;
1231
+ /** Relevance score from 0.0 to 1.0. */
1232
+ score: number;
1233
+ /** Brief explanation of the relevance score. */
1234
+ rationale: string;
1235
+ }
1236
+ /** Scored concepts from the visual content. */
1237
+ export type AnalyzeStructureSceneNotableVisualConceptsList = Array<AnalyzeStructureVisualConcept>;
1238
+ export interface AnalyzeStructureShot {
1239
+ /** Shot or beat start time in seconds on the original asset timeline. Fractional seconds are supported. */
1240
+ start_time: number;
1241
+ /** Shot or beat end time in seconds on the original asset timeline. Fractional seconds are supported. */
1242
+ end_time: number;
1243
+ /** Short description of what happens during this shot or beat. */
1244
+ visual_description: string;
1245
+ }
1246
+ /** Optional ordered shot or beat breakdown within the scene. */
1247
+ export type AnalyzeStructureSceneShotsList = Array<AnalyzeStructureShot>;
1248
+ export interface AnalyzeStructureScene {
1249
+ /** Scene start time in seconds on the original asset timeline. Fractional seconds are supported. */
1250
+ start_time: number;
1251
+ /** Scene end time in seconds on the original asset timeline. Fractional seconds are supported. */
1252
+ end_time: number;
1253
+ /** Short human-readable title for the scene. */
1254
+ title: string;
1255
+ /** Transcript cues overlapping this scene. Empty when no usable transcript evidence is available. */
1256
+ cues: AnalyzeStructureSceneCuesList;
1257
+ /** Summary of what is said during the scene, when transcript evidence supports one. */
1258
+ audible_narrative?: string | undefined;
1259
+ /** Summary of what visually happens during the scene. */
1260
+ visual_narrative?: string | undefined;
1261
+ /** Combined audible and visual takeaway when both evidence types are meaningfully present. */
1262
+ blended_narrative?: string | undefined;
1263
+ /** Evidence-grounded concepts from the audible content. */
1264
+ notable_audible_concepts?: AnalyzeStructureSceneNotableAudibleConceptsList | undefined;
1265
+ /** Scored concepts from the visual content. */
1266
+ notable_visual_concepts?: AnalyzeStructureSceneNotableVisualConceptsList | undefined;
1267
+ /** Optional ordered shot or beat breakdown within the scene. */
1268
+ shots?: AnalyzeStructureSceneShotsList | undefined;
1269
+ /** Number of source shots or visual beats grouped into the scene. */
1270
+ shot_count: number;
1271
+ }
1272
+ /** Generated scenes in timeline order. Always present and empty for audio-only media. */
1273
+ export type AnalyzeStructureJobOutputsScenesList = Array<AnalyzeStructureScene>;
1274
+ /** Transcript cues overlapping this key moment. Empty when no usable transcript evidence is available. */
1275
+ export type AnalyzeStructureKeyMomentCuesList = Array<AnalyzeStructureCue>;
1276
+ /** Best short verbatim quote from the moment when one is supported. */
1277
+ export interface AnalyzeStructureQuotableSegment {
1278
+ /** Quote start time in seconds on the original asset timeline. Fractional seconds are supported. */
1279
+ time: number;
1280
+ /** Verbatim transcript quote selected from the key moment. */
1281
+ text: string;
1282
+ }
1283
+ /** Evidence-grounded concepts from the audible content. */
1284
+ export type AnalyzeStructureKeyMomentNotableAudibleConceptsList = Array<string>;
1285
+ /** Scored concepts from the visual content. */
1286
+ export type AnalyzeStructureKeyMomentNotableVisualConceptsList =
1287
+ Array<AnalyzeStructureVisualConcept>;
1288
+ export interface AnalyzeStructureKeyMoment {
1289
+ /** Key moment start time in seconds on the original asset timeline. Fractional seconds are supported. */
1290
+ start_time: number;
1291
+ /** Key moment end time in seconds on the original asset timeline. Fractional seconds are supported. */
1292
+ end_time: number;
1293
+ /** Overall evidence-grounded quality score from 0.0 to 1.0. */
1294
+ overall_score: number;
1295
+ /** Short title for the key moment. */
1296
+ title: string;
1297
+ /** Transcript cues overlapping this key moment. Empty when no usable transcript evidence is available. */
1298
+ cues: AnalyzeStructureKeyMomentCuesList;
1299
+ quotable_segment?: AnalyzeStructureQuotableSegment | undefined;
1300
+ /** Summary of what is said during the moment. */
1301
+ audible_narrative?: string | undefined;
1302
+ /** Evidence-grounded concepts from the audible content. */
1303
+ notable_audible_concepts?: AnalyzeStructureKeyMomentNotableAudibleConceptsList | undefined;
1304
+ /** Summary of what visually happens during the moment. */
1305
+ visual_narrative?: string | undefined;
1306
+ /** Scored concepts from the visual content. */
1307
+ notable_visual_concepts?: AnalyzeStructureKeyMomentNotableVisualConceptsList | undefined;
1308
+ }
1309
+ /** Generated key moments in timeline order. Always present and empty when no moment qualifies. */
1310
+ export type AnalyzeStructureJobOutputsKeyMomentsList = Array<AnalyzeStructureKeyMoment>;
1311
+ /** Outcome of the requested asset title update. */
1312
+ export type AnalyzeStructureTitleAssetUpdateStatus = "updated" | "failed";
1313
+ /** Present when a title update was requested. */
1314
+ export interface AnalyzeStructureTitleAssetUpdate {
1315
+ /** Outcome of the requested asset title update. */
1316
+ status: AnalyzeStructureTitleAssetUpdateStatus;
1317
+ }
1318
+ /** Outcome of the requested chapters track update. */
1319
+ export type AnalyzeStructureChaptersAssetUpdateStatus = "created" | "failed";
1320
+ /** IDs of tracks deleted during replacement. Omitted when no deletions were recorded; historical jobs may lack this information. */
1321
+ export type ReplacedTrackIds = Array<string>;
1322
+ /** Present when a chapters update was attempted. Omitted when no chapters were generated; any existing chapters track is left unchanged. When status is `failed` and replaced_track_ids is nonempty, deletion succeeded but replacement creation failed, leaving the asset without a chapters track. */
1323
+ export interface AnalyzeStructureChaptersAssetUpdate {
1324
+ /** Outcome of the requested chapters track update. */
1325
+ status: AnalyzeStructureChaptersAssetUpdateStatus;
1326
+ /** ID of the newly created chapters track. */
1327
+ track_id?: string | undefined;
1328
+ replaced_track_ids?: ReplacedTrackIds | undefined;
1329
+ }
1330
+ /** Best-effort outcomes for attempted asset updates. Omitted when no update was attempted, including when only chapters were requested but none were generated. */
1331
+ export interface AnalyzeStructureAssetUpdateOutcomes {
1332
+ title?: AnalyzeStructureTitleAssetUpdate | undefined;
1333
+ chapters?: AnalyzeStructureChaptersAssetUpdate | undefined;
1334
+ }
1335
+ /** Workflow results. Present when status is 'completed'. */
1336
+ export interface AnalyzeStructureJobOutputs {
1337
+ /** Generated title for the analyzed media. */
1338
+ title: string;
1339
+ /** Generated summary of the analyzed media. */
1340
+ summary: string;
1341
+ /** Generated tags. Always present and empty when no tag qualifies. */
1342
+ tags: AnalyzeStructureJobOutputsTagsList;
1343
+ /** Generated chapters in timeline order. Chapters are generated only when the analyzed range is at least 60 seconds long and has at least two coverage segments. Always present, and may be empty even when those conditions are met. */
1344
+ chapters: AnalyzeStructureJobOutputsChaptersList;
1345
+ /** Generated scenes in timeline order. Always present and empty for audio-only media. */
1346
+ scenes: AnalyzeStructureJobOutputsScenesList;
1347
+ /** Generated key moments in timeline order. Always present and empty when no moment qualifies. */
1348
+ key_moments: AnalyzeStructureJobOutputsKeyMomentsList;
1349
+ asset_updates?: AnalyzeStructureAssetUpdateOutcomes | undefined;
1350
+ }
1351
+ export interface AnalyzeStructureJob {
1352
+ /** Unique job identifier. */
1353
+ id: string;
1354
+ /** Arbitrary string supplied at creation, returned as-is. */
1355
+ passthrough?: string | undefined;
1356
+ /** Number of Mux AI units consumed by this job. */
1357
+ units_consumed: number;
1358
+ directive?: JobDirectiveContext | undefined;
1359
+ /** Unix timestamp (seconds) when the job was created. */
1360
+ created_at: number;
1361
+ /** Unix timestamp (seconds) of the job's last state transition (e.g. when it started processing or reached a terminal state). */
1362
+ updated_at: number;
1363
+ workflow: AnalyzeStructureJobWorkflow;
1364
+ parameters: AnalyzeStructureJobParameters;
1365
+ status: JobStatus;
1366
+ /** Error details. Present when status is 'errored'. */
1367
+ errors?: AnalyzeStructureJobErrorsList | undefined;
1368
+ resources?: Resources | undefined;
1369
+ outputs?: AnalyzeStructureJobOutputs | undefined;
1370
+ }
1371
+ export interface AnalyzeStructureJobResponse {
1372
+ data: AnalyzeStructureJob;
1373
+ }
1374
+ export interface GetAskQuestionsJobRequest {
1375
+ /** Robots job ID returned by job creation or listing (rjob_...). */
1376
+ JOB_ID: string;
1377
+ }
1378
+ export type AskQuestionsJobWorkflow = "ask-questions";
1379
+ /** Error details. Present when status is 'errored'. */
1380
+ export type AskQuestionsJobErrorsList = Array<JobError>;
1381
+ export interface AskQuestionsJobOutputsAnswersItem {
1382
+ /** The original question that was asked. */
1383
+ question: string;
1384
+ /** For enum questions, constrained to one of the provided answer_options. For free-form questions, responds with prose up to max_free_form_answer_length characters - treat as untrusted model output. Null when the question was skipped. */
1385
+ answer: string | null;
1386
+ /** Confidence score from 0.0 to 1.0. Values above 0.9 indicate clear, unambiguous evidence; 0.7-0.9 strong evidence with minor ambiguity; 0.5-0.7 moderate evidence; below 0.5 weak or uncertain evidence. Always 0 when skipped. */
1387
+ confidence: number;
1388
+ /** Explanation citing specific visual or audio evidence from the video, or why the question was skipped. */
1389
+ reasoning: string;
1390
+ /** Whether the question was skipped due to irrelevance to the video content. */
1391
+ skipped: boolean;
1392
+ }
1393
+ /** One answer per question, in the same order as the input questions. */
1394
+ export type AskQuestionsJobOutputsAnswersList = Array<AskQuestionsJobOutputsAnswersItem>;
1395
+ /** Workflow results. Present when status is 'completed'. */
1396
+ export interface AskQuestionsJobOutputs {
1397
+ /** One answer per question, in the same order as the input questions. */
1398
+ answers: AskQuestionsJobOutputsAnswersList;
1399
+ }
1400
+ export interface AskQuestionsJob {
1401
+ /** Unique job identifier. */
1402
+ id: string;
1403
+ /** Arbitrary string supplied at creation, returned as-is. */
1404
+ passthrough?: string | undefined;
1405
+ /** Number of Mux AI units consumed by this job. */
1406
+ units_consumed: number;
1407
+ directive?: JobDirectiveContext | undefined;
1408
+ /** Unix timestamp (seconds) when the job was created. */
1409
+ created_at: number;
1410
+ /** Unix timestamp (seconds) of the job's last state transition (e.g. when it started processing or reached a terminal state). */
1411
+ updated_at: number;
1412
+ workflow: AskQuestionsJobWorkflow;
1413
+ parameters: AskQuestionsJobParameters;
1414
+ status: JobStatus;
1415
+ /** Error details. Present when status is 'errored'. */
1416
+ errors?: AskQuestionsJobErrorsList | undefined;
1417
+ resources?: Resources | undefined;
1418
+ outputs?: AskQuestionsJobOutputs | undefined;
1419
+ }
1420
+ export interface AskQuestionsJobResponse {
1421
+ data: AskQuestionsJob;
1422
+ }
1423
+ export interface GetDirectiveRequest {
1424
+ /** Directive ID returned by directive creation or listing (drv_...). */
1425
+ DIRECTIVE_ID: string;
1426
+ }
1427
+ export interface GetDirectiveRunRequest {
1428
+ /** Directive ID returned by directive creation or listing (drv_...). */
1429
+ DIRECTIVE_ID: string;
1430
+ /** Run ID returned by directive run creation or listing (drvrun_...). */
1431
+ RUN_ID: string;
1432
+ }
1433
+ export type DirectiveRunStatus =
1434
+ | "pending"
1435
+ | "dispatching"
1436
+ | "running"
1437
+ | "waiting"
1438
+ | "completed"
1439
+ | "partial"
1440
+ | "errored";
1441
+ export type DirectiveNodeDispatchedStatus = "dispatched";
1442
+ /** The Robots workflow for this binding. */
1443
+ export type WorkflowName =
1444
+ | "analyze-structure"
1445
+ | "summarize"
1446
+ | "generate-contextual-text"
1447
+ | "moderate"
1448
+ | "generate-chapters"
1449
+ | "edit-captions"
1450
+ | "translate-captions"
1451
+ | "translate-audio"
1452
+ | "ask-questions"
1453
+ | "find-key-moments"
1454
+ | "generate-engagement-insights"
1455
+ | "generate-premium-captions"
1456
+ | "find-best-thumbnails";
1457
+ export interface DirectiveNodeDispatched {
1458
+ /** Declared binding reference_id from directive.bindings[]. */
1459
+ reference_id: string;
1460
+ status: DirectiveNodeDispatchedStatus;
1461
+ /** Workflow job ID (rjob_...). */
1462
+ job_id: string;
1463
+ workflow: WorkflowName;
1464
+ }
1465
+ export type DirectiveNodeFailedStatus = "failed";
1466
+ export interface DirectiveNodeFailed {
1467
+ /** Declared binding reference_id from directive.bindings[]. */
1468
+ reference_id: string;
1469
+ status: DirectiveNodeFailedStatus;
1470
+ /** Human-readable diagnostic explaining why the binding didn't dispatch. */
1471
+ reason: string;
1472
+ }
1473
+ export type DirectiveNodeWaitingForResourcesStatus = "waiting_for_resources";
1474
+ export interface DirectiveNodeWaitingForResources {
1475
+ /** Declared binding reference_id from directive.bindings[]. */
1476
+ reference_id: string;
1477
+ status: DirectiveNodeWaitingForResourcesStatus;
1478
+ workflow: WorkflowName;
1479
+ }
1480
+ export type DirectiveNodeWaitingForSourceBindingsStatus = "waiting_for_source_bindings";
1481
+ /** reference_ids of producer bindings within this directive that must complete before this binding can dispatch. */
1482
+ export type DirectiveNodeWaitingForSourceBindingsSourceBindingsList = Array<string>;
1483
+ export interface DirectiveNodeWaitingForSourceBindings {
1484
+ /** Declared binding reference_id from directive.bindings[]. */
1485
+ reference_id: string;
1486
+ status: DirectiveNodeWaitingForSourceBindingsStatus;
1487
+ workflow: WorkflowName;
1488
+ /** reference_ids of producer bindings within this directive that must complete before this binding can dispatch. */
1489
+ source_bindings: DirectiveNodeWaitingForSourceBindingsSourceBindingsList;
1490
+ }
1491
+ export type DirectiveNodeState =
1492
+ | DirectiveNodeDispatched
1493
+ | DirectiveNodeFailed
1494
+ | DirectiveNodeWaitingForResources
1495
+ | DirectiveNodeWaitingForSourceBindings;
1496
+ /** Per-binding state in configuration order. Failed nodes retain their reason diagnostic. */
1497
+ export type DirectiveNodeStates = Array<DirectiveNodeState>;
1498
+ export interface DirectiveRun {
1499
+ /** Opaque run identifier (drvrun_...). */
1500
+ id: string;
1501
+ /** Opaque parent directive identifier (drv_...). */
1502
+ directive_id: string;
1503
+ /** Bare Mux asset ID targeted by the run. */
1504
+ subject_id: string;
1505
+ status: DirectiveRunStatus;
1506
+ node_states: DirectiveNodeStates;
1507
+ /** Run start Unix timestamp in seconds. */
1508
+ started_at: number;
1509
+ /** Terminal Unix timestamp in seconds, or null while in progress. */
1510
+ completed_at: number | null;
1511
+ }
1512
+ export interface DirectiveRunResponse {
1513
+ data: DirectiveRun;
1514
+ }
1515
+ export interface GetEditCaptionsJobRequest {
1516
+ /** Robots job ID returned by job creation or listing (rjob_...). */
1517
+ JOB_ID: string;
1518
+ }
1519
+ export type EditCaptionsJobWorkflow = "edit-captions";
1520
+ /** Error details. Present when status is 'errored'. */
1521
+ export type EditCaptionsJobErrorsList = Array<JobError>;
1522
+ export interface EditCaptionsJobOutputs {
1523
+ /** Total count of cue text replacements applied across all edit operations. */
1524
+ total_replacement_count: number;
1525
+ /** Temporary pre-signed URL for downloading the edited VTT file. Expires 7 days after the job completes. */
1526
+ temporary_vtt_url?: string | undefined;
1527
+ /** Mux text track ID of the newly created edited captions, distinct from the source parameters.track_id. Present when upload_to_mux is true and the upload succeeds. */
1528
+ track_id?: string | undefined;
1529
+ replaced_track_ids?: ReplacedTrackIds | undefined;
1530
+ }
1531
+ export interface EditCaptionsJob {
1532
+ /** Unique job identifier. */
1533
+ id: string;
1534
+ /** Arbitrary string supplied at creation, returned as-is. */
1535
+ passthrough?: string | undefined;
1536
+ /** Number of Mux AI units consumed by this job. */
1537
+ units_consumed: number;
1538
+ directive?: JobDirectiveContext | undefined;
1539
+ /** Unix timestamp (seconds) when the job was created. */
1540
+ created_at: number;
1541
+ /** Unix timestamp (seconds) of the job's last state transition (e.g. when it started processing or reached a terminal state). */
1542
+ updated_at: number;
1543
+ workflow: EditCaptionsJobWorkflow;
1544
+ parameters: EditCaptionsJobParameters;
1545
+ status: JobStatus;
1546
+ /** Error details. Present when status is 'errored'. */
1547
+ errors?: EditCaptionsJobErrorsList | undefined;
1548
+ resources?: Resources | undefined;
1549
+ outputs?: EditCaptionsJobOutputs | undefined;
1550
+ }
1551
+ export interface EditCaptionsJobResponse {
1552
+ data: EditCaptionsJob;
1553
+ }
1554
+ export interface GetFindBestThumbnailsJobRequest {
1555
+ /** Robots job ID returned by job creation or listing (rjob_...). */
1556
+ JOB_ID: string;
1557
+ }
1558
+ export type FindBestThumbnailsJobWorkflow = "find-best-thumbnails";
1559
+ /** Error details. Present when status is 'errored'. */
1560
+ export type FindBestThumbnailsJobErrorsList = Array<JobError>;
1561
+ /** Outcome of the requested asset thumbnail update. */
1562
+ export type FindBestThumbnailsThumbnailAssetUpdateStatus = "updated" | "failed";
1563
+ export interface FindBestThumbnailsThumbnailAssetUpdate {
1564
+ /** Outcome of the requested asset thumbnail update. */
1565
+ status: FindBestThumbnailsThumbnailAssetUpdateStatus;
1566
+ }
1567
+ /** Recorded asset thumbnail update outcome. Omitted when no outcome was recorded, including historical jobs. */
1568
+ export interface FindBestThumbnailsAssetUpdateOutcomes {
1569
+ thumbnail?: FindBestThumbnailsThumbnailAssetUpdate | undefined;
1570
+ }
1571
+ /** Per-category quality scores. */
1572
+ export interface FindBestThumbnailsCandidateSubscores {
1573
+ /** Sharpness and focus quality score (0-1). */
1574
+ focus: number;
1575
+ /** Presence of faces or dynamic action score (0-1). */
1576
+ face_or_action: number;
1577
+ /** Visual composition and framing quality score (0-1). */
1578
+ composition: number;
1579
+ /** Color contrast and vibrancy score (0-1). */
1580
+ contrast_color: number;
1581
+ /** Alignment with brand guidelines score (0-1). */
1582
+ brand_fit: number;
1583
+ }
1584
+ export interface FindBestThumbnailsCandidate {
1585
+ /** Per-category quality scores. */
1586
+ subscores: FindBestThumbnailsCandidateSubscores;
1587
+ /** Overall quality score from 0 to 1. */
1588
+ overall: number;
1589
+ /** AI-generated description of the frame content. */
1590
+ description: string;
1591
+ /** Suggested alternative text for the candidate thumbnail image, suitable for use with the thumbnail URL in an accessible UI. */
1592
+ alt_text?: string | undefined;
1593
+ /** Absolute frame timestamp in seconds on the original asset timeline. Fractional seconds are supported. */
1594
+ time: number;
1595
+ }
1596
+ /** Selected thumbnails, ordered best to worst by overall quality score. */
1597
+ export type FindBestThumbnailsJobOutputsBestThumbnailsList = Array<FindBestThumbnailsCandidate>;
1598
+ export interface FindBestThumbnailsJobOutputs {
1599
+ asset_updates?: FindBestThumbnailsAssetUpdateOutcomes | undefined;
1600
+ /** Selected thumbnails, ordered best to worst by overall quality score. */
1601
+ best_thumbnails: FindBestThumbnailsJobOutputsBestThumbnailsList;
1602
+ }
1603
+ export interface FindBestThumbnailsJob {
1604
+ /** Unique job identifier. */
1605
+ id: string;
1606
+ /** Arbitrary string supplied at creation, returned as-is. */
1607
+ passthrough?: string | undefined;
1608
+ /** Number of Mux AI units consumed by this job. */
1609
+ units_consumed: number;
1610
+ directive?: JobDirectiveContext | undefined;
1611
+ /** Unix timestamp (seconds) when the job was created. */
1612
+ created_at: number;
1613
+ /** Unix timestamp (seconds) of the job's last state transition (e.g. when it started processing or reached a terminal state). */
1614
+ updated_at: number;
1615
+ workflow: FindBestThumbnailsJobWorkflow;
1616
+ parameters: FindBestThumbnailsJobParameters;
1617
+ status: JobStatus;
1618
+ /** Error details. Present when status is 'errored'. */
1619
+ errors?: FindBestThumbnailsJobErrorsList | undefined;
1620
+ resources?: Resources | undefined;
1621
+ outputs?: FindBestThumbnailsJobOutputs | undefined;
1622
+ }
1623
+ export interface FindBestThumbnailsJobResponse {
1624
+ data: FindBestThumbnailsJob;
1625
+ }
1626
+ export interface GetFindKeyMomentsJobRequest {
1627
+ /** Robots job ID returned by job creation or listing (rjob_...). */
1628
+ JOB_ID: string;
1629
+ }
1630
+ export type FindKeyMomentsJobWorkflow = "find-key-moments";
1631
+ /** Error details. Present when status is 'errored'. */
1632
+ export type FindKeyMomentsJobErrorsList = Array<JobError>;
1633
+ export interface FindKeyMomentsCue {
1634
+ /** Transcript text for this cue. */
1635
+ text: string;
1636
+ /** Cue start time in seconds on the original asset timeline. Fractional seconds are supported. */
1637
+ start_time: number;
1638
+ /** Cue end time in seconds on the original asset timeline. Fractional seconds are supported. */
1639
+ end_time: number;
1640
+ }
1641
+ /** Contiguous transcript segments that comprise this moment. Empty when video selection identifies the moment without transcript evidence. */
1642
+ export type FindKeyMomentsCuesList = Array<FindKeyMomentsCue>;
1643
+ /** Best short, verbatim quote from within this moment. Omitted when the selected video moment has no source-grounded transcript quote. */
1644
+ export interface FindKeyMomentsQuotableSegment {
1645
+ /** Verbatim transcript quote selected from within the key moment. */
1646
+ text: string;
1647
+ /** Quote start timestamp in seconds on the original asset timeline. Fractional seconds are supported. */
1648
+ time: number;
1649
+ }
1650
+ /** Multi-word descriptive phrases (2-5 words each) capturing key audible concepts. Empty when no transcript evidence is available. */
1651
+ export type FindKeyMomentsNotableAudibleConceptsList = Array<string>;
1652
+ export interface FindKeyMomentsNotableVisualConceptsItem {
1653
+ /** Multi-word visual concept (2-5 words). */
1654
+ concept: string;
1655
+ /** Relevance score from 0.0 to 1.0 measuring how important the visual concept is to the moment's available evidence. */
1656
+ score: number;
1657
+ /** Brief explanation of the relevance score. */
1658
+ rationale: string;
1659
+ }
1660
+ /** Scored visual concepts extracted from sampled frames. Present for video assets only. */
1661
+ export type FindKeyMomentsNotableVisualConceptsList =
1662
+ Array<FindKeyMomentsNotableVisualConceptsItem>;
1663
+ export interface FindKeyMoments {
1664
+ /** Contiguous transcript segments that comprise this moment. Empty when video selection identifies the moment without transcript evidence. */
1665
+ cues: FindKeyMomentsCuesList;
1666
+ /** Weighted quality score from 0.0 to 1.0 based on the audible and/or visual evidence available to the selected analysis mode. */
1667
+ overall_score: number;
1668
+ /** Short catchy title for the moment (3-8 words). */
1669
+ title: string;
1670
+ quotable_segment?: FindKeyMomentsQuotableSegment | undefined;
1671
+ /** One-sentence summary of what is being said during the moment. Empty when no transcript evidence is available. */
1672
+ audible_narrative: string;
1673
+ /** Multi-word descriptive phrases (2-5 words each) capturing key audible concepts. Empty when no transcript evidence is available. */
1674
+ notable_audible_concepts: FindKeyMomentsNotableAudibleConceptsList;
1675
+ /** One-sentence summary of what is visually happening. Present for video assets only. */
1676
+ visual_narrative?: string | undefined;
1677
+ /** Scored visual concepts extracted from sampled frames. Present for video assets only. */
1678
+ notable_visual_concepts?: FindKeyMomentsNotableVisualConceptsList | undefined;
1679
+ /** Key moment start time in seconds on the original asset timeline. Fractional seconds are supported. */
1680
+ start_time: number;
1681
+ /** Key moment end time in seconds on the original asset timeline. Fractional seconds are supported. */
1682
+ end_time: number;
1683
+ }
1684
+ /** Extracted key moments, ordered by their absolute position on the original asset timeline. */
1685
+ export type FindKeyMomentsJobOutputsMomentsList = Array<FindKeyMoments>;
1686
+ export interface FindKeyMomentsJobOutputs {
1687
+ /** Extracted key moments, ordered by their absolute position on the original asset timeline. */
1688
+ moments: FindKeyMomentsJobOutputsMomentsList;
1689
+ }
1690
+ export interface FindKeyMomentsJob {
1691
+ /** Unique job identifier. */
1692
+ id: string;
1693
+ /** Arbitrary string supplied at creation, returned as-is. */
1694
+ passthrough?: string | undefined;
1695
+ /** Number of Mux AI units consumed by this job. */
1696
+ units_consumed: number;
1697
+ directive?: JobDirectiveContext | undefined;
1698
+ /** Unix timestamp (seconds) when the job was created. */
1699
+ created_at: number;
1700
+ /** Unix timestamp (seconds) of the job's last state transition (e.g. when it started processing or reached a terminal state). */
1701
+ updated_at: number;
1702
+ workflow: FindKeyMomentsJobWorkflow;
1703
+ parameters: FindKeyMomentsJobParameters;
1704
+ status: JobStatus;
1705
+ /** Error details. Present when status is 'errored'. */
1706
+ errors?: FindKeyMomentsJobErrorsList | undefined;
1707
+ resources?: Resources | undefined;
1708
+ outputs?: FindKeyMomentsJobOutputs | undefined;
1709
+ }
1710
+ export interface FindKeyMomentsJobResponse {
1711
+ data: FindKeyMomentsJob;
1712
+ }
1713
+ export interface GetGenerateChaptersJobRequest {
1714
+ /** Robots job ID returned by job creation or listing (rjob_...). */
1715
+ JOB_ID: string;
1716
+ }
1717
+ export type GenerateChaptersJobWorkflow = "generate-chapters";
1718
+ /** Error details. Present when status is 'errored'. */
1719
+ export type GenerateChaptersJobErrorsList = Array<JobError>;
1720
+ export interface GenerateChaptersJobOutputsChaptersItem {
1721
+ /** Chapter start time in seconds. The first chapter always starts at 0. */
1722
+ start_time: number;
1723
+ /** Concise chapter title. */
1724
+ title: string;
1725
+ }
1726
+ /** Generated chapters, ordered by start time. */
1727
+ export type GenerateChaptersJobOutputsChaptersList = Array<GenerateChaptersJobOutputsChaptersItem>;
1728
+ /** Outcome of the chapters track write. `created` means the asset now carries these chapters. `failed` means the write was attempted and errored; the chapters in this response are still valid and can be applied manually. */
1729
+ export type GenerateChaptersAssetUpdateStatus = "created" | "failed";
1730
+ /** What happened when the generated chapters were written back to the Mux asset. Present only when update_asset_chapters was true. When status is `failed` and replaced_track_ids is nonempty, deletion succeeded but replacement creation failed, leaving the asset without a chapters track. */
1731
+ export interface GenerateChaptersAssetUpdate {
1732
+ status: GenerateChaptersAssetUpdateStatus;
1733
+ /** Mux text track ID of the chapters track created on the asset. Present when status is `created`. */
1734
+ track_id?: string | undefined;
1735
+ replaced_track_ids?: ReplacedTrackIds | undefined;
1736
+ }
1737
+ /** Recorded best-effort chapters track update outcome. A failed update does not fail the analysis job. Omitted when no outcome was recorded. */
1738
+ export interface GenerateChaptersAssetUpdateOutcomes {
1739
+ chapters?: GenerateChaptersAssetUpdate | undefined;
1740
+ }
1741
+ export interface GenerateChaptersJobOutputs {
1742
+ /** Generated chapters, ordered by start time. */
1743
+ chapters: GenerateChaptersJobOutputsChaptersList;
1744
+ asset_updates?: GenerateChaptersAssetUpdateOutcomes | undefined;
1745
+ }
1746
+ export interface GenerateChaptersJob {
1747
+ /** Unique job identifier. */
1748
+ id: string;
1749
+ /** Arbitrary string supplied at creation, returned as-is. */
1750
+ passthrough?: string | undefined;
1751
+ /** Number of Mux AI units consumed by this job. */
1752
+ units_consumed: number;
1753
+ directive?: JobDirectiveContext | undefined;
1754
+ /** Unix timestamp (seconds) when the job was created. */
1755
+ created_at: number;
1756
+ /** Unix timestamp (seconds) of the job's last state transition (e.g. when it started processing or reached a terminal state). */
1757
+ updated_at: number;
1758
+ workflow: GenerateChaptersJobWorkflow;
1759
+ parameters: GenerateChaptersJobParameters;
1760
+ status: JobStatus;
1761
+ /** Error details. Present when status is 'errored'. */
1762
+ errors?: GenerateChaptersJobErrorsList | undefined;
1763
+ resources?: Resources | undefined;
1764
+ outputs?: GenerateChaptersJobOutputs | undefined;
1765
+ }
1766
+ export interface GenerateChaptersJobResponse {
1767
+ data: GenerateChaptersJob;
1768
+ }
1769
+ export interface GetGenerateContextualTextJobRequest {
1770
+ /** Robots job ID returned by job creation or listing (rjob_...). */
1771
+ JOB_ID: string;
1772
+ }
1773
+ export type GenerateContextualTextJobWorkflow = "generate-contextual-text";
1774
+ /** Error details. Present when status is 'errored'. */
1775
+ export type GenerateContextualTextJobErrorsList = Array<JobError>;
1776
+ export interface GeneratedTextArtifact {
1777
+ key: string;
1778
+ /** Generated text for this artifact. */
1779
+ content: string;
1780
+ }
1781
+ /** Generated deliverables for this variant, one per requested artifact. */
1782
+ export type GeneratedTextVariantArtifactsList = Array<GeneratedTextArtifact>;
1783
+ export interface GeneratedTextVariant {
1784
+ key: string;
1785
+ /** Generated deliverables for this variant, one per requested artifact. */
1786
+ artifacts: GeneratedTextVariantArtifactsList;
1787
+ }
1788
+ /** Generated versions of the complete artifact set, one per requested variant. */
1789
+ export type GenerateContextualTextJobOutputsVariantsList = Array<GeneratedTextVariant>;
1790
+ /** Workflow results. Present when status is 'completed'. */
1791
+ export interface GenerateContextualTextJobOutputs {
1792
+ /** Generated versions of the complete artifact set, one per requested variant. */
1793
+ variants: GenerateContextualTextJobOutputsVariantsList;
1794
+ }
1795
+ export interface GenerateContextualTextJob {
1796
+ /** Unique job identifier. */
1797
+ id: string;
1798
+ /** Arbitrary string supplied at creation, returned as-is. */
1799
+ passthrough?: string | undefined;
1800
+ /** Number of Mux AI units consumed by this job. */
1801
+ units_consumed: number;
1802
+ directive?: JobDirectiveContext | undefined;
1803
+ /** Unix timestamp (seconds) when the job was created. */
1804
+ created_at: number;
1805
+ /** Unix timestamp (seconds) of the job's last state transition (e.g. when it started processing or reached a terminal state). */
1806
+ updated_at: number;
1807
+ workflow: GenerateContextualTextJobWorkflow;
1808
+ parameters: GenerateContextualTextJobParameters;
1809
+ status: JobStatus;
1810
+ /** Error details. Present when status is 'errored'. */
1811
+ errors?: GenerateContextualTextJobErrorsList | undefined;
1812
+ resources?: Resources | undefined;
1813
+ outputs?: GenerateContextualTextJobOutputs | undefined;
1814
+ }
1815
+ export interface GenerateContextualTextJobResponse {
1816
+ data: GenerateContextualTextJob;
1817
+ }
1818
+ export interface GetGenerateEngagementInsightsJobRequest {
1819
+ /** Robots job ID returned by job creation or listing (rjob_...). */
1820
+ JOB_ID: string;
1821
+ }
1822
+ export type GenerateEngagementInsightsJobWorkflow = "generate-engagement-insights";
1823
+ /** Error details. Present when status is 'errored'. */
1824
+ export type GenerateEngagementInsightsJobErrorsList = Array<JobError>;
1825
+ export interface GenerateEngagementInsightsMomentInsight {
1826
+ /** Normalized engagement score (0-1). */
1827
+ engagement_score: number;
1828
+ /** Primary insight explaining the engagement pattern. */
1829
+ insight: string;
1830
+ /** Engagement insight start time in seconds on the original asset timeline. Fractional seconds are supported. */
1831
+ start_time: number;
1832
+ /** Engagement insight end time in seconds on the original asset timeline. Fractional seconds are supported. */
1833
+ end_time: number;
1834
+ }
1835
+ /** Per-moment engagement insights for identified hotspots. */
1836
+ export type GenerateEngagementInsightsJobOutputsMomentInsightsList =
1837
+ Array<GenerateEngagementInsightsMomentInsight>;
1838
+ /** Key trends identified across the video. */
1839
+ export type GenerateEngagementInsightsJobOutputsOverallInsightTrendsList = Array<string>;
1840
+ /** Overall engagement analysis across the video. */
1841
+ export interface GenerateEngagementInsightsJobOutputsOverallInsight {
1842
+ /** Summary of overall engagement patterns. */
1843
+ summary: string;
1844
+ /** Key trends identified across the video. */
1845
+ trends: GenerateEngagementInsightsJobOutputsOverallInsightTrendsList;
1846
+ }
1847
+ export interface GenerateEngagementInsightsJobOutputs {
1848
+ /** Per-moment engagement insights for identified hotspots. */
1849
+ moment_insights: GenerateEngagementInsightsJobOutputsMomentInsightsList;
1850
+ /** Overall engagement analysis across the video. */
1851
+ overall_insight: GenerateEngagementInsightsJobOutputsOverallInsight;
1852
+ }
1853
+ export interface GenerateEngagementInsightsJob {
1854
+ /** Unique job identifier. */
1855
+ id: string;
1856
+ /** Arbitrary string supplied at creation, returned as-is. */
1857
+ passthrough?: string | undefined;
1858
+ /** Number of Mux AI units consumed by this job. */
1859
+ units_consumed: number;
1860
+ directive?: JobDirectiveContext | undefined;
1861
+ /** Unix timestamp (seconds) when the job was created. */
1862
+ created_at: number;
1863
+ /** Unix timestamp (seconds) of the job's last state transition (e.g. when it started processing or reached a terminal state). */
1864
+ updated_at: number;
1865
+ workflow: GenerateEngagementInsightsJobWorkflow;
1866
+ parameters: GenerateEngagementInsightsJobParameters;
1867
+ status: JobStatus;
1868
+ /** Error details. Present when status is 'errored'. */
1869
+ errors?: GenerateEngagementInsightsJobErrorsList | undefined;
1870
+ resources?: Resources | undefined;
1871
+ outputs?: GenerateEngagementInsightsJobOutputs | undefined;
1872
+ }
1873
+ export interface GenerateEngagementInsightsJobResponse {
1874
+ data: GenerateEngagementInsightsJob;
1875
+ }
1876
+ export interface GetGeneratePremiumCaptionsJobRequest {
1877
+ /** Robots job ID returned by job creation or listing (rjob_...). */
1878
+ JOB_ID: string;
1879
+ }
1880
+ export type GeneratePremiumCaptionsJobWorkflow = "generate-premium-captions";
1881
+ /** Error details. Present when status is 'errored'. */
1882
+ export type GeneratePremiumCaptionsJobErrorsList = Array<JobError>;
1883
+ export interface GeneratePremiumCaptionsJobOutputs {
1884
+ /** Mux text track ID of the newly uploaded caption track. Omitted when upload_to_mux is false. */
1885
+ track_id?: string | undefined;
1886
+ /** Resolved language code of the generated captions (may differ from the requested code when auto-detected). */
1887
+ language_code: string;
1888
+ /** The transcription model's confidence in its automatic language detection, from 0 to 1. Always 1 when language_code was supplied in the request, since detection is skipped. */
1889
+ auto_language_confidence?: number | undefined;
1890
+ /** Temporary pre-signed URL to download the generated SRT file. Expires 7 days after the job completes. */
1891
+ temporary_srt_url?: string | undefined;
1892
+ /** Temporary pre-signed URL to download the word-level timestamp JSON. Present when include_words is true. Expires 7 days after the job completes. Download and store this file for long-term access. */
1893
+ temporary_words_url?: string | undefined;
1894
+ /** Language code reported by the transcription model. Only a genuine detection when language_code was omitted from the request; when a language_code hint was supplied, detection is skipped and this echoes the requested language. */
1895
+ detected_language_code?: string | undefined;
1896
+ replaced_track_ids?: ReplacedTrackIds | undefined;
1897
+ }
1898
+ export interface GeneratePremiumCaptionsJob {
1899
+ /** Unique job identifier. */
1900
+ id: string;
1901
+ /** Arbitrary string supplied at creation, returned as-is. */
1902
+ passthrough?: string | undefined;
1903
+ /** Number of Mux AI units consumed by this job. */
1904
+ units_consumed: number;
1905
+ directive?: JobDirectiveContext | undefined;
1906
+ /** Unix timestamp (seconds) when the job was created. */
1907
+ created_at: number;
1908
+ /** Unix timestamp (seconds) of the job's last state transition (e.g. when it started processing or reached a terminal state). */
1909
+ updated_at: number;
1910
+ workflow: GeneratePremiumCaptionsJobWorkflow;
1911
+ parameters: GeneratePremiumCaptionsJobParameters;
1912
+ status: JobStatus;
1913
+ /** Error details. Present when status is 'errored'. */
1914
+ errors?: GeneratePremiumCaptionsJobErrorsList | undefined;
1915
+ resources?: Resources | undefined;
1916
+ outputs?: GeneratePremiumCaptionsJobOutputs | undefined;
1917
+ }
1918
+ export interface GeneratePremiumCaptionsJobResponse {
1919
+ data: GeneratePremiumCaptionsJob;
1920
+ }
1921
+ export interface GetModerateJobRequest {
1922
+ /** Robots job ID returned by job creation or listing (rjob_...). */
1923
+ JOB_ID: string;
1924
+ }
1925
+ export type ModerateJobWorkflow = "moderate";
1926
+ /** Error details. Present when status is 'errored'. */
1927
+ export type ModerateJobErrorsList = Array<JobError>;
1928
+ export interface ModerateJobOutputsThumbnailScoresItem {
1929
+ /** Time in seconds of the thumbnail within the video. */
1930
+ time: number;
1931
+ /** Sexual content score from 0.0 to 1.0. */
1932
+ sexual: number;
1933
+ /** Violence content score from 0.0 to 1.0. */
1934
+ violence: number;
1935
+ }
1936
+ /** Per-thumbnail moderation scores. Empty for audio-only assets. */
1937
+ export type ModerateJobOutputsThumbnailScoresList = Array<ModerateJobOutputsThumbnailScoresItem>;
1938
+ /** Highest scores across every moderated thumbnail and transcript window for each category. */
1939
+ export interface ModerateJobOutputsMaxScores {
1940
+ sexual: number;
1941
+ violence: number;
1942
+ }
1943
+ export type ModerateJobOutputsFlaggedActionAction = "delete_playback_ids";
1944
+ /** Playback IDs that were deleted from the asset because it exceeded the threshold. */
1945
+ export type ModerateJobOutputsFlaggedActionDeletedPlaybackIdsList = Array<string>;
1946
+ /** Present only when on_flagged was set and exceeds_threshold was true. Records the action taken and which playback IDs were deleted. */
1947
+ export interface ModerateJobOutputsFlaggedAction {
1948
+ action: ModerateJobOutputsFlaggedActionAction;
1949
+ /** Playback IDs that were deleted from the asset because it exceeded the threshold. */
1950
+ deleted_playback_ids: ModerateJobOutputsFlaggedActionDeletedPlaybackIdsList;
1951
+ }
1952
+ export interface ModerateJobOutputsTranscriptScoresItem {
1953
+ /** Time in seconds where the moderated transcript window starts. */
1954
+ start_time: number;
1955
+ /** Time in seconds where the moderated transcript window ends. */
1956
+ end_time: number;
1957
+ /** Sexual content score from 0.0 to 1.0. */
1958
+ sexual: number;
1959
+ /** Violence content score from 0.0 to 1.0. */
1960
+ violence: number;
1961
+ }
1962
+ /** Per-window transcript moderation scores. Empty when transcript moderation was skipped. */
1963
+ export type ModerateJobOutputsTranscriptScoresList = Array<ModerateJobOutputsTranscriptScoresItem>;
1964
+ /** "completed" if at least one thumbnail was moderated, "skipped" if nothing could be moderated on this surface (see skip_reason), "failed" if every thumbnail errored so this surface contributed no scores. */
1965
+ export type ModerateJobOutputsThumbnailModerationStatus = "completed" | "skipped" | "failed";
1966
+ /** Present only when status is "skipped". Machine-readable reason nothing was moderated. */
1967
+ export type ModerateJobOutputsThumbnailModerationSkipReason =
1968
+ | "no_video_track"
1969
+ | "no_video_in_scope";
1970
+ /** Outcome of thumbnail moderation. */
1971
+ export interface ModerateJobOutputsThumbnailModeration {
1972
+ /** "completed" if at least one thumbnail was moderated, "skipped" if nothing could be moderated on this surface (see skip_reason), "failed" if every thumbnail errored so this surface contributed no scores. */
1973
+ status: ModerateJobOutputsThumbnailModerationStatus;
1974
+ /** Present only when status is "skipped". Machine-readable reason nothing was moderated. */
1975
+ skip_reason?: ModerateJobOutputsThumbnailModerationSkipReason | undefined;
1976
+ /** Present only when status is "skipped". Human-readable explanation of skip_reason. */
1977
+ skip_message?: string | undefined;
1978
+ }
1979
+ /** "completed" if at least one transcript window was moderated, "skipped" if nothing could be moderated on this surface (see skip_reason), "failed" if every transcript window errored so this surface contributed no scores. */
1980
+ export type ModerateJobOutputsTranscriptModerationStatus = "completed" | "skipped" | "failed";
1981
+ /** Present only when status is "skipped". Machine-readable reason nothing was moderated. */
1982
+ export type ModerateJobOutputsTranscriptModerationSkipReason =
1983
+ | "no_ready_text_track"
1984
+ | "no_cues"
1985
+ | "disabled";
1986
+ /** Outcome of transcript moderation. */
1987
+ export interface ModerateJobOutputsTranscriptModeration {
1988
+ /** "completed" if at least one transcript window was moderated, "skipped" if nothing could be moderated on this surface (see skip_reason), "failed" if every transcript window errored so this surface contributed no scores. */
1989
+ status: ModerateJobOutputsTranscriptModerationStatus;
1990
+ /** Present only when status is "skipped". Machine-readable reason nothing was moderated. */
1991
+ skip_reason?: ModerateJobOutputsTranscriptModerationSkipReason | undefined;
1992
+ /** Present only when status is "skipped". Human-readable explanation of skip_reason. */
1993
+ skip_message?: string | undefined;
1994
+ }
1995
+ export interface ModerateJobOutputs {
1996
+ /** Per-thumbnail moderation scores. Empty for audio-only assets. */
1997
+ thumbnail_scores: ModerateJobOutputsThumbnailScoresList;
1998
+ /** Highest scores across every moderated thumbnail and transcript window for each category. */
1999
+ max_scores: ModerateJobOutputsMaxScores;
2000
+ /** True if any category's max score exceeds its configured threshold. */
2001
+ exceeds_threshold: boolean;
2002
+ /** Present only when on_flagged was set and exceeds_threshold was true. Records the action taken and which playback IDs were deleted. */
2003
+ flagged_action?: ModerateJobOutputsFlaggedAction | undefined;
2004
+ /** Per-window transcript moderation scores. Empty when transcript moderation was skipped. */
2005
+ transcript_scores: ModerateJobOutputsTranscriptScoresList;
2006
+ /** Outcome of thumbnail moderation. */
2007
+ thumbnail_moderation: ModerateJobOutputsThumbnailModeration;
2008
+ /** Outcome of transcript moderation. */
2009
+ transcript_moderation: ModerateJobOutputsTranscriptModeration;
2010
+ }
2011
+ export interface ModerateJob {
2012
+ /** Unique job identifier. */
2013
+ id: string;
2014
+ /** Arbitrary string supplied at creation, returned as-is. */
2015
+ passthrough?: string | undefined;
2016
+ /** Number of Mux AI units consumed by this job. */
2017
+ units_consumed: number;
2018
+ directive?: JobDirectiveContext | undefined;
2019
+ /** Unix timestamp (seconds) when the job was created. */
2020
+ created_at: number;
2021
+ /** Unix timestamp (seconds) of the job's last state transition (e.g. when it started processing or reached a terminal state). */
2022
+ updated_at: number;
2023
+ workflow: ModerateJobWorkflow;
2024
+ parameters: ModerateJobParameters;
2025
+ status: JobStatus;
2026
+ /** Error details. Present when status is 'errored'. */
2027
+ errors?: ModerateJobErrorsList | undefined;
2028
+ resources?: Resources | undefined;
2029
+ outputs?: ModerateJobOutputs | undefined;
2030
+ }
2031
+ export interface ModerateJobResponse {
2032
+ data: ModerateJob;
2033
+ }
2034
+ export interface GetSummarizeJobRequest {
2035
+ /** Robots job ID returned by job creation or listing (rjob_...). */
2036
+ JOB_ID: string;
2037
+ }
2038
+ export type SummarizeJobWorkflow = "summarize";
2039
+ /** Error details. Present when status is 'errored'. */
2040
+ export type SummarizeJobErrorsList = Array<JobError>;
2041
+ /** Generated keyword tags for the video. */
2042
+ export type SummarizeJobOutputsTagsList = Array<string>;
2043
+ /** Outcome of the requested asset title update. */
2044
+ export type SummarizeTitleAssetUpdateStatus = "updated" | "failed";
2045
+ export interface SummarizeTitleAssetUpdate {
2046
+ /** Outcome of the requested asset title update. */
2047
+ status: SummarizeTitleAssetUpdateStatus;
2048
+ }
2049
+ /** Recorded asset title update outcome. Omitted when no outcome was recorded, including historical jobs. */
2050
+ export interface SummarizeAssetUpdateOutcomes {
2051
+ title?: SummarizeTitleAssetUpdate | undefined;
2052
+ }
2053
+ export interface SummarizeJobOutputs {
2054
+ /** Generated title capturing the essence of the video. */
2055
+ title: string;
2056
+ /** Generated description of the video content (typically 2-4 sentences). */
2057
+ description: string;
2058
+ /** Generated keyword tags for the video. */
2059
+ tags: SummarizeJobOutputsTagsList;
2060
+ asset_updates?: SummarizeAssetUpdateOutcomes | undefined;
2061
+ }
2062
+ export interface SummarizeJob {
2063
+ /** Unique job identifier. */
2064
+ id: string;
2065
+ /** Arbitrary string supplied at creation, returned as-is. */
2066
+ passthrough?: string | undefined;
2067
+ /** Number of Mux AI units consumed by this job. */
2068
+ units_consumed: number;
2069
+ directive?: JobDirectiveContext | undefined;
2070
+ /** Unix timestamp (seconds) when the job was created. */
2071
+ created_at: number;
2072
+ /** Unix timestamp (seconds) of the job's last state transition (e.g. when it started processing or reached a terminal state). */
2073
+ updated_at: number;
2074
+ workflow: SummarizeJobWorkflow;
2075
+ parameters: SummarizeJobParameters;
2076
+ status: JobStatus;
2077
+ /** Error details. Present when status is 'errored'. */
2078
+ errors?: SummarizeJobErrorsList | undefined;
2079
+ resources?: Resources | undefined;
2080
+ outputs?: SummarizeJobOutputs | undefined;
2081
+ }
2082
+ export interface SummarizeJobResponse {
2083
+ data: SummarizeJob;
2084
+ }
2085
+ export interface GetTranslateAudioJobRequest {
2086
+ /** Robots job ID returned by job creation or listing (rjob_...). */
2087
+ JOB_ID: string;
2088
+ }
2089
+ export type TranslateAudioJobWorkflow = "translate-audio";
2090
+ /** Error details. Present when status is 'errored'. */
2091
+ export type TranslateAudioJobErrorsList = Array<JobError>;
2092
+ export interface TranslateAudioJobOutputs {
2093
+ /** Temporary pre-signed URL to download the dubbed audio with the FLAC output format. Expires 7 days after the job completes. */
2094
+ temporary_audio_url?: string | undefined;
2095
+ /** Temporary download URL for the dub's translated WebVTT, available independently of asset uploads when retrieval succeeds. Expires after 7 days. This is the dubbing translation, not a separate caption translation. */
2096
+ temporary_vtt_url?: string | undefined;
2097
+ /** Mux subtitle track ID when caption upload succeeded. Omitted when caption upload was not requested or failed. Mux has accepted the track, which may still be preparing. */
2098
+ caption_track_id?: string | undefined;
2099
+ replaced_caption_track_ids?: unknown | undefined;
2100
+ /** Mux audio track ID, present when upload_to_mux is true. */
2101
+ track_id?: string | undefined;
2102
+ replaced_track_ids?: ReplacedTrackIds | undefined;
2103
+ }
2104
+ export interface TranslateAudioJob {
2105
+ /** Unique job identifier. */
2106
+ id: string;
2107
+ /** Arbitrary string supplied at creation, returned as-is. */
2108
+ passthrough?: string | undefined;
2109
+ /** Number of Mux AI units consumed by this job. */
2110
+ units_consumed: number;
2111
+ directive?: JobDirectiveContext | undefined;
2112
+ /** Unix timestamp (seconds) when the job was created. */
2113
+ created_at: number;
2114
+ /** Unix timestamp (seconds) of the job's last state transition (e.g. when it started processing or reached a terminal state). */
2115
+ updated_at: number;
2116
+ workflow: TranslateAudioJobWorkflow;
2117
+ parameters: TranslateAudioJobParameters;
2118
+ status: JobStatus;
2119
+ /** Error details. Present when status is 'errored'. */
2120
+ errors?: TranslateAudioJobErrorsList | undefined;
2121
+ resources?: Resources | undefined;
2122
+ outputs?: TranslateAudioJobOutputs | undefined;
2123
+ }
2124
+ export interface TranslateAudioJobResponse {
2125
+ data: TranslateAudioJob;
2126
+ }
2127
+ export interface GetTranslateCaptionsJobRequest {
2128
+ /** Robots job ID returned by job creation or listing (rjob_...). */
2129
+ JOB_ID: string;
2130
+ }
2131
+ export type TranslateCaptionsJobWorkflow = "translate-captions";
2132
+ /** Error details. Present when status is 'errored'. */
2133
+ export type TranslateCaptionsJobErrorsList = Array<JobError>;
2134
+ export interface TranslateCaptionsJobOutputs {
2135
+ /** Temporary pre-signed URL to download the translated VTT file, including when upload_to_mux is false. Expires 7 days after the job completes. */
2136
+ temporary_vtt_url?: string | undefined;
2137
+ /** Present when never_translate terms were supplied. False when at least one term was not preserved verbatim in the translated captions. Preservation is best-effort: verified, not guaranteed. */
2138
+ never_translate_terms_preserved?: boolean | undefined;
2139
+ /** Mux text track ID of the newly created translated captions, distinct from the source parameters.track_id. Present when upload_to_mux is true. */
2140
+ track_id?: string | undefined;
2141
+ replaced_track_ids?: ReplacedTrackIds | undefined;
2142
+ }
2143
+ export interface TranslateCaptionsJob {
2144
+ /** Unique job identifier. */
2145
+ id: string;
2146
+ /** Arbitrary string supplied at creation, returned as-is. */
2147
+ passthrough?: string | undefined;
2148
+ /** Number of Mux AI units consumed by this job. */
2149
+ units_consumed: number;
2150
+ directive?: JobDirectiveContext | undefined;
2151
+ /** Unix timestamp (seconds) when the job was created. */
2152
+ created_at: number;
2153
+ /** Unix timestamp (seconds) of the job's last state transition (e.g. when it started processing or reached a terminal state). */
2154
+ updated_at: number;
2155
+ workflow: TranslateCaptionsJobWorkflow;
2156
+ parameters: TranslateCaptionsJobParameters;
2157
+ status: JobStatus;
2158
+ /** Error details. Present when status is 'errored'. */
2159
+ errors?: TranslateCaptionsJobErrorsList | undefined;
2160
+ resources?: Resources | undefined;
2161
+ outputs?: TranslateCaptionsJobOutputs | undefined;
2162
+ }
2163
+ export interface TranslateCaptionsJobResponse {
2164
+ data: TranslateCaptionsJob;
2165
+ }
2166
+ export interface ListDirectiveRunsRequest {
2167
+ /** Directive ID returned by directive creation or listing (drv_...). */
2168
+ DIRECTIVE_ID: string;
2169
+ /** Maximum number of results to return (default 25, max 100). */
2170
+ limit?: number | undefined;
2171
+ /** Page number, 1-indexed (default 1). */
2172
+ page?: number | undefined;
2173
+ }
2174
+ export type DirectiveRunListResponseDataList = Array<DirectiveRun>;
2175
+ export interface DirectiveRunListResponse {
2176
+ data: DirectiveRunListResponseDataList;
2177
+ total_row_count: number;
2178
+ }
2179
+ export interface ListDirectivesRequest {
2180
+ /** Maximum number of results to return (default 25, max 100). */
2181
+ limit?: number | undefined;
2182
+ /** Page number, 1-indexed (default 1). */
2183
+ page?: number | undefined;
2184
+ }
2185
+ /** Directive summary. Follow the self link to retrieve its configuration through its creation API version. */
2186
+ export interface DirectiveSummary {
2187
+ /** Opaque directive identifier (drv_...). */
2188
+ id: string;
2189
+ /** Human-readable directive name. */
2190
+ name: string;
2191
+ /** Creation Unix timestamp in seconds. */
2192
+ created_at: number;
2193
+ /** Last update Unix timestamp in seconds. */
2194
+ updated_at: number;
2195
+ _links: DirectiveLinks;
2196
+ }
2197
+ export type DirectiveListResponseDataList = Array<DirectiveSummary>;
2198
+ export interface DirectiveListResponse {
2199
+ data: DirectiveListResponseDataList;
2200
+ total_row_count: number;
2201
+ }
2202
+ export interface ListJobsRequest {
2203
+ /** Filter by workflow name */
2204
+ workflow?: unknown | undefined;
2205
+ /** Filter by job status */
2206
+ status?: unknown | undefined;
2207
+ /** Filter by Mux asset ID */
2208
+ asset_id?: string | undefined;
2209
+ /** Maximum number of jobs to return (default 25, max 100) */
2210
+ limit?: number | undefined;
2211
+ /** Page number (default 1) */
2212
+ page?: number | undefined;
2213
+ }
2214
+ export type ListJobsResponseDataList = Array<JobSummary>;
2215
+ export interface ListJobsResponse {
2216
+ data: ListJobsResponseDataList;
2217
+ /** Total number of jobs matching the query filters */
2218
+ total_row_count: number;
2219
+ }
2220
+ export interface RunDirectiveRequest {
2221
+ /** Directive ID returned by directive creation or listing (drv_...). */
2222
+ DIRECTIVE_ID: string;
2223
+ /** The bare Mux asset ID to run the directive against, as returned by the Mux Video API. */
2224
+ asset_id: string;
2225
+ }
2226
+ export interface RunDirectiveResponse {}
2227
+ /** Individual error messages describing what went wrong. */
2228
+ export type ErrorDetailMessagesList = Array<string>;
2229
+ export interface ErrorDetail {
2230
+ /** Machine-readable error type. New types may be added, so handle unknown values. */
2231
+ type: string;
2232
+ /** Identifies the specific condition that failed, when it has a public code. Absent for other errors. New codes may be added, so handle unknown values. */
2233
+ code?: string | undefined;
2234
+ /** Individual error messages describing what went wrong. */
2235
+ messages: ErrorDetailMessagesList;
2236
+ }
2237
+ export interface ErrorResponse {
2238
+ error: ErrorDetail;
2239
+ }
2240
+ export type CancelJobError = Forbidden | NotFound | Conflict | UnprocessableEntity | MuxOpError;
2241
+ /** Cancel a job Cancels a job that is currently pending or processing. */
2242
+ export const cancelJob: API.OperationMethod<
2243
+ CancelJobRequest,
2244
+ CancelJobResponse,
2245
+ CancelJobError,
2246
+ MuxOpContext
2247
+ > = /*@__PURE__*/ API.make(() => ({
2248
+ input: __S(1472, __c46, 0) as any as S.Schema<CancelJobRequest>,
2249
+ output: __S(1473, __c46, 1) as any as S.Schema<CancelJobResponse>,
2250
+ errors: [Forbidden, NotFound, Conflict, UnprocessableEntity],
2251
+ serviceErrors: MuxServiceErrors,
2252
+ protocol: MuxProtocol,
2253
+ retry: Retry.Retry,
2254
+ telemetry: TELEMETRY,
2255
+ span: "CancelJob",
2256
+ }));
2257
+
2258
+ export type CreateAnalyzeStructureJobError =
2259
+ | BadRequest
2260
+ | Forbidden
2261
+ | Conflict
2262
+ | UnprocessableEntity
2263
+ | MuxOpError;
2264
+ /** Create an 'analyze-structure' job Creates a job that generates a coherent title, summary, tags, chapters, scenes, and key moments from shared evidence for a Mux asset. */
2265
+ export const createAnalyzeStructureJob: API.OperationMethod<
2266
+ CreateAnalyzeStructureJobRequest,
2267
+ CreateAnalyzeStructureJobResponse,
2268
+ CreateAnalyzeStructureJobError,
2269
+ MuxOpContext
2270
+ > = /*@__PURE__*/ API.make(() => ({
2271
+ input: __S(1568, __c49, 0) as any as S.Schema<CreateAnalyzeStructureJobRequest>,
2272
+ output: __S(1696, __c53, 0) as any as S.Schema<CreateAnalyzeStructureJobResponse>,
2273
+ errors: [BadRequest, Forbidden, Conflict, UnprocessableEntity],
2274
+ serviceErrors: MuxServiceErrors,
2275
+ protocol: MuxProtocol,
2276
+ retry: Retry.Retry,
2277
+ telemetry: TELEMETRY,
2278
+ span: "CreateAnalyzeStructureJob",
2279
+ }));
2280
+
2281
+ export type CreateAskQuestionsJobError =
2282
+ | BadRequest
2283
+ | Forbidden
2284
+ | Conflict
2285
+ | UnprocessableEntity
2286
+ | MuxOpError;
2287
+ /** Create an 'ask-questions' job Creates a new job that uses AI to answer questions about a Mux Video asset. Optional output steering can restrict execution to a time scope in seconds. */
2288
+ export const createAskQuestionsJob: API.OperationMethod<
2289
+ CreateAskQuestionsJobRequest,
2290
+ CreateAskQuestionsJobResponse,
2291
+ CreateAskQuestionsJobError,
2292
+ MuxOpContext
2293
+ > = /*@__PURE__*/ API.make(() => ({
2294
+ input: __S(1728, __c54, 0) as any as S.Schema<CreateAskQuestionsJobRequest>,
2295
+ output: __S(1696, __c53, 0) as any as S.Schema<CreateAskQuestionsJobResponse>,
2296
+ errors: [BadRequest, Forbidden, Conflict, UnprocessableEntity],
2297
+ serviceErrors: MuxServiceErrors,
2298
+ protocol: MuxProtocol,
2299
+ retry: Retry.Retry,
2300
+ telemetry: TELEMETRY,
2301
+ span: "CreateAskQuestionsJob",
2302
+ }));
2303
+
2304
+ export type CreateDirectiveError = BadRequest | Forbidden | UnprocessableEntity | MuxOpError;
2305
+ /** Create a directive Creates a new directive that defines which Robots workflows should run against Mux assets, and under what resource conditions. */
2306
+ export const createDirective: API.OperationMethod<
2307
+ CreateDirectiveRequest,
2308
+ DirectiveResponse,
2309
+ CreateDirectiveError,
2310
+ MuxOpContext
2311
+ > = /*@__PURE__*/ API.make(() => ({
2312
+ input: __S(1824, __c57, 0) as any as S.Schema<CreateDirectiveRequest>,
2313
+ output: __S(1859, __c58, 3) as any as S.Schema<DirectiveResponse>,
2314
+ errors: [BadRequest, Forbidden, UnprocessableEntity],
2315
+ serviceErrors: MuxServiceErrors,
2316
+ protocol: MuxProtocol,
2317
+ retry: Retry.Retry,
2318
+ telemetry: TELEMETRY,
2319
+ span: "CreateDirective",
2320
+ }));
2321
+
2322
+ export type CreateEditCaptionsJobError =
2323
+ | BadRequest
2324
+ | Forbidden
2325
+ | Conflict
2326
+ | UnprocessableEntity
2327
+ | MuxOpError;
2328
+ /** Create an 'edit-captions' job Creates a new job that edits an existing Mux text track using static replacements, speaker-label replacements, and optional profanity censoring. Provide at least one of `replacements`, `speaker_replacements`, or `auto_censor_profanity`. */
2329
+ export const createEditCaptionsJob: API.OperationMethod<
2330
+ CreateEditCaptionsJobRequest,
2331
+ CreateEditCaptionsJobResponse,
2332
+ CreateEditCaptionsJobError,
2333
+ MuxOpContext
2334
+ > = /*@__PURE__*/ API.make(() => ({
2335
+ input: __S(1888, __c59, 0) as any as S.Schema<CreateEditCaptionsJobRequest>,
2336
+ output: __S(1696, __c53, 0) as any as S.Schema<CreateEditCaptionsJobResponse>,
2337
+ errors: [BadRequest, Forbidden, Conflict, UnprocessableEntity],
2338
+ serviceErrors: MuxServiceErrors,
2339
+ protocol: MuxProtocol,
2340
+ retry: Retry.Retry,
2341
+ telemetry: TELEMETRY,
2342
+ span: "CreateEditCaptionsJob",
2343
+ }));
2344
+
2345
+ export type CreateFindBestThumbnailsJobError =
2346
+ | BadRequest
2347
+ | Forbidden
2348
+ | Conflict
2349
+ | UnprocessableEntity
2350
+ | MuxOpError;
2351
+ /** Create a 'find-best-thumbnails' job Creates a new job that samples thumbnails from a Mux Video asset, scores them with AI, and selects the best thumbnail candidates. Optional output_steering.scope hard-limits sampling to a time window expressed in seconds while returned timestamps stay absolute to the asset timeline. Other output steering can guide scoring strategy, explicit user intent, audience, and campaign style without changing the response schema. */
2352
+ export const createFindBestThumbnailsJob: API.OperationMethod<
2353
+ CreateFindBestThumbnailsJobRequest,
2354
+ CreateFindBestThumbnailsJobResponse,
2355
+ CreateFindBestThumbnailsJobError,
2356
+ MuxOpContext
2357
+ > = /*@__PURE__*/ API.make(() => ({
2358
+ input: __S(32, __c1, 0) as any as S.Schema<CreateFindBestThumbnailsJobRequest>,
2359
+ output: __S(1696, __c53, 0) as any as S.Schema<CreateFindBestThumbnailsJobResponse>,
2360
+ errors: [BadRequest, Forbidden, Conflict, UnprocessableEntity],
2361
+ serviceErrors: MuxServiceErrors,
2362
+ protocol: MuxProtocol,
2363
+ retry: Retry.Retry,
2364
+ telemetry: TELEMETRY,
2365
+ span: "CreateFindBestThumbnailsJob",
2366
+ }));
2367
+
2368
+ export type CreateFindKeyMomentsJobError =
2369
+ | BadRequest
2370
+ | Forbidden
2371
+ | Conflict
2372
+ | UnprocessableEntity
2373
+ | MuxOpError;
2374
+ /** Create a 'find-key-moments' job Creates a new job that uses AI to identify key moments in a Mux Video asset. Set use_shots to true to automatically generate or reuse Mux shots and use visual evidence during selection, with transcript evidence incorporated when available; otherwise selection uses transcript evidence and the asset must have a caption track. Audio-only assets always use transcript evidence and require a caption track. Optional output steering can restrict execution to a time scope in seconds and guide selection strategy, title style, audience, topic taxonomy, and scoring priorities without changing the response schema. Scoped results retain absolute timestamps on the original asset timeline. Uses the first ready subtitle in asset track order without English preference. Audio-only assets with one ready text track lacking subtitle metadata can use that legacy transcript. Audio-only analysis requires a caption source; video analysis can proceed without automatic captions when the selected mode permits it. */
2375
+ export const createFindKeyMomentsJob: API.OperationMethod<
2376
+ CreateFindKeyMomentsJobRequest,
2377
+ CreateFindKeyMomentsJobResponse,
2378
+ CreateFindKeyMomentsJobError,
2379
+ MuxOpContext
2380
+ > = /*@__PURE__*/ API.make(() => ({
2381
+ input: __S(128, __c4, 0) as any as S.Schema<CreateFindKeyMomentsJobRequest>,
2382
+ output: __S(1696, __c53, 0) as any as S.Schema<CreateFindKeyMomentsJobResponse>,
2383
+ errors: [BadRequest, Forbidden, Conflict, UnprocessableEntity],
2384
+ serviceErrors: MuxServiceErrors,
2385
+ protocol: MuxProtocol,
2386
+ retry: Retry.Retry,
2387
+ telemetry: TELEMETRY,
2388
+ span: "CreateFindKeyMomentsJob",
2389
+ }));
2390
+
2391
+ export type CreateGenerateChaptersJobError =
2392
+ | BadRequest
2393
+ | Forbidden
2394
+ | Conflict
2395
+ | UnprocessableEntity
2396
+ | MuxOpError;
2397
+ /** Create a 'generate-chapters' job Creates a new job that uses AI to generate chapters for a Mux Video asset. Optional output steering can guide chapter style, granularity, audience, and brand terms without changing the response schema. */
2398
+ export const createGenerateChaptersJob: API.OperationMethod<
2399
+ CreateGenerateChaptersJobRequest,
2400
+ CreateGenerateChaptersJobResponse,
2401
+ CreateGenerateChaptersJobError,
2402
+ MuxOpContext
2403
+ > = /*@__PURE__*/ API.make(() => ({
2404
+ input: __S(192, __c6, 0) as any as S.Schema<CreateGenerateChaptersJobRequest>,
2405
+ output: __S(1696, __c53, 0) as any as S.Schema<CreateGenerateChaptersJobResponse>,
2406
+ errors: [BadRequest, Forbidden, Conflict, UnprocessableEntity],
2407
+ serviceErrors: MuxServiceErrors,
2408
+ protocol: MuxProtocol,
2409
+ retry: Retry.Retry,
2410
+ telemetry: TELEMETRY,
2411
+ span: "CreateGenerateChaptersJob",
2412
+ }));
2413
+
2414
+ export type CreateGenerateContextualTextJobError =
2415
+ | BadRequest
2416
+ | Forbidden
2417
+ | Conflict
2418
+ | UnprocessableEntity
2419
+ | MuxOpError;
2420
+ /** Create a 'generate-contextual-text' job Generates customizable text, such as social posts, blog posts, and newsletter entries, from a Mux video or audio asset. Describe each piece of text you want as an artifact, and request named variants to get several versions of the whole set. Optional output steering limits the time range used and guides audience, voice, call to action, and brand terminology. */
2421
+ export const createGenerateContextualTextJob: API.OperationMethod<
2422
+ CreateGenerateContextualTextJobRequest,
2423
+ CreateGenerateContextualTextJobResponse,
2424
+ CreateGenerateContextualTextJobError,
2425
+ MuxOpContext
2426
+ > = /*@__PURE__*/ API.make(() => ({
2427
+ input: __S(256, __c8, 0) as any as S.Schema<CreateGenerateContextualTextJobRequest>,
2428
+ output: __S(1696, __c53, 0) as any as S.Schema<CreateGenerateContextualTextJobResponse>,
2429
+ errors: [BadRequest, Forbidden, Conflict, UnprocessableEntity],
2430
+ serviceErrors: MuxServiceErrors,
2431
+ protocol: MuxProtocol,
2432
+ retry: Retry.Retry,
2433
+ telemetry: TELEMETRY,
2434
+ span: "CreateGenerateContextualTextJob",
2435
+ }));
2436
+
2437
+ export type CreateGenerateEngagementInsightsJobError =
2438
+ | BadRequest
2439
+ | Forbidden
2440
+ | Conflict
2441
+ | UnprocessableEntity
2442
+ | MuxOpError;
2443
+ /** Create a 'generate-engagement-insights' job Creates a new job that uses AI to analyze viewer engagement patterns and generate insights for a Mux Video asset. Uses the first ready subtitle in asset track order without English preference. Audio-only assets with one ready text track lacking subtitle metadata can use that legacy transcript. Caption evidence is optional, including for audio-only assets without captions. */
2444
+ export const createGenerateEngagementInsightsJob: API.OperationMethod<
2445
+ CreateGenerateEngagementInsightsJobRequest,
2446
+ CreateGenerateEngagementInsightsJobResponse,
2447
+ CreateGenerateEngagementInsightsJobError,
2448
+ MuxOpContext
2449
+ > = /*@__PURE__*/ API.make(() => ({
2450
+ input: __S(320, __c10, 0) as any as S.Schema<CreateGenerateEngagementInsightsJobRequest>,
2451
+ output: __S(1696, __c53, 0) as any as S.Schema<CreateGenerateEngagementInsightsJobResponse>,
2452
+ errors: [BadRequest, Forbidden, Conflict, UnprocessableEntity],
2453
+ serviceErrors: MuxServiceErrors,
2454
+ protocol: MuxProtocol,
2455
+ retry: Retry.Retry,
2456
+ telemetry: TELEMETRY,
2457
+ span: "CreateGenerateEngagementInsightsJob",
2458
+ }));
2459
+
2460
+ export type CreateGeneratePremiumCaptionsJobError =
2461
+ | BadRequest
2462
+ | Forbidden
2463
+ | Conflict
2464
+ | UnprocessableEntity
2465
+ | MuxOpError;
2466
+ /** Create a 'generate-premium-captions' job Creates a new job that generates high-quality captions for a Mux Video asset. */
2467
+ export const createGeneratePremiumCaptionsJob: API.OperationMethod<
2468
+ CreateGeneratePremiumCaptionsJobRequest,
2469
+ CreateGeneratePremiumCaptionsJobResponse,
2470
+ CreateGeneratePremiumCaptionsJobError,
2471
+ MuxOpContext
2472
+ > = /*@__PURE__*/ API.make(() => ({
2473
+ input: __S(384, __c12, 0) as any as S.Schema<CreateGeneratePremiumCaptionsJobRequest>,
2474
+ output: __S(1696, __c53, 0) as any as S.Schema<CreateGeneratePremiumCaptionsJobResponse>,
2475
+ errors: [BadRequest, Forbidden, Conflict, UnprocessableEntity],
2476
+ serviceErrors: MuxServiceErrors,
2477
+ protocol: MuxProtocol,
2478
+ retry: Retry.Retry,
2479
+ telemetry: TELEMETRY,
2480
+ span: "CreateGeneratePremiumCaptionsJob",
2481
+ }));
2482
+
2483
+ export type CreateModerateJobError =
2484
+ | BadRequest
2485
+ | Forbidden
2486
+ | Conflict
2487
+ | UnprocessableEntity
2488
+ | MuxOpError;
2489
+ /** Create a 'moderate' job Creates a new job that uses AI to analyze a Mux Video asset for inappropriate content. Optional output steering can restrict execution to a time scope in seconds. */
2490
+ export const createModerateJob: API.OperationMethod<
2491
+ CreateModerateJobRequest,
2492
+ CreateModerateJobResponse,
2493
+ CreateModerateJobError,
2494
+ MuxOpContext
2495
+ > = /*@__PURE__*/ API.make(() => ({
2496
+ input: __S(448, __c14, 0) as any as S.Schema<CreateModerateJobRequest>,
2497
+ output: __S(1696, __c53, 0) as any as S.Schema<CreateModerateJobResponse>,
2498
+ errors: [BadRequest, Forbidden, Conflict, UnprocessableEntity],
2499
+ serviceErrors: MuxServiceErrors,
2500
+ protocol: MuxProtocol,
2501
+ retry: Retry.Retry,
2502
+ telemetry: TELEMETRY,
2503
+ span: "CreateModerateJob",
2504
+ }));
2505
+
2506
+ export type CreateSummarizeJobError =
2507
+ | BadRequest
2508
+ | Forbidden
2509
+ | Conflict
2510
+ | UnprocessableEntity
2511
+ | MuxOpError;
2512
+ /** Create a 'summarize' job Creates a new job that uses AI to generate a title, description, and tags for a Mux Video asset. Optional output steering can restrict execution to a time scope in seconds and guide summary style, audience, brand terms, and tag taxonomy without changing the response schema. */
2513
+ export const createSummarizeJob: API.OperationMethod<
2514
+ CreateSummarizeJobRequest,
2515
+ CreateSummarizeJobResponse,
2516
+ CreateSummarizeJobError,
2517
+ MuxOpContext
2518
+ > = /*@__PURE__*/ API.make(() => ({
2519
+ input: __S(512, __c16, 0) as any as S.Schema<CreateSummarizeJobRequest>,
2520
+ output: __S(1696, __c53, 0) as any as S.Schema<CreateSummarizeJobResponse>,
2521
+ errors: [BadRequest, Forbidden, Conflict, UnprocessableEntity],
2522
+ serviceErrors: MuxServiceErrors,
2523
+ protocol: MuxProtocol,
2524
+ retry: Retry.Retry,
2525
+ telemetry: TELEMETRY,
2526
+ span: "CreateSummarizeJob",
2527
+ }));
2528
+
2529
+ export type CreateTranslateAudioJobError =
2530
+ | BadRequest
2531
+ | Forbidden
2532
+ | Conflict
2533
+ | UnprocessableEntity
2534
+ | MuxOpError;
2535
+ /** Create a 'translate-audio' job Creates a new job that translates the audio track of a Mux Video asset to another language. */
2536
+ export const createTranslateAudioJob: API.OperationMethod<
2537
+ CreateTranslateAudioJobRequest,
2538
+ CreateTranslateAudioJobResponse,
2539
+ CreateTranslateAudioJobError,
2540
+ MuxOpContext
2541
+ > = /*@__PURE__*/ API.make(() => ({
2542
+ input: __S(576, __c18, 0) as any as S.Schema<CreateTranslateAudioJobRequest>,
2543
+ output: __S(1696, __c53, 0) as any as S.Schema<CreateTranslateAudioJobResponse>,
2544
+ errors: [BadRequest, Forbidden, Conflict, UnprocessableEntity],
2545
+ serviceErrors: MuxServiceErrors,
2546
+ protocol: MuxProtocol,
2547
+ retry: Retry.Retry,
2548
+ telemetry: TELEMETRY,
2549
+ span: "CreateTranslateAudioJob",
2550
+ }));
2551
+
2552
+ export type CreateTranslateCaptionsJobError =
2553
+ | BadRequest
2554
+ | Forbidden
2555
+ | Conflict
2556
+ | UnprocessableEntity
2557
+ | MuxOpError;
2558
+ /** Create a 'translate-captions' job Creates a new job that translates captions on a Mux Video asset from one language to another. */
2559
+ export const createTranslateCaptionsJob: API.OperationMethod<
2560
+ CreateTranslateCaptionsJobRequest,
2561
+ CreateTranslateCaptionsJobResponse,
2562
+ CreateTranslateCaptionsJobError,
2563
+ MuxOpContext
2564
+ > = /*@__PURE__*/ API.make(() => ({
2565
+ input: __S(640, __c20, 0) as any as S.Schema<CreateTranslateCaptionsJobRequest>,
2566
+ output: __S(1696, __c53, 0) as any as S.Schema<CreateTranslateCaptionsJobResponse>,
2567
+ errors: [BadRequest, Forbidden, Conflict, UnprocessableEntity],
2568
+ serviceErrors: MuxServiceErrors,
2569
+ protocol: MuxProtocol,
2570
+ retry: Retry.Retry,
2571
+ telemetry: TELEMETRY,
2572
+ span: "CreateTranslateCaptionsJob",
2573
+ }));
2574
+
2575
+ export type DeleteDirectiveError = Forbidden | NotFound | UnprocessableEntity | MuxOpError;
2576
+ /** Delete a directive Deletes a directive. After this call, subsequent GET and LIST requests will no longer return it and new directive runs cannot be triggered for it. In-flight runs that have already read the directive config continue to completion. */
2577
+ export const deleteDirective: API.OperationMethod<
2578
+ DeleteDirectiveRequest,
2579
+ DeleteDirectiveResponse,
2580
+ DeleteDirectiveError,
2581
+ MuxOpContext
2582
+ > = /*@__PURE__*/ API.make(() => ({
2583
+ input: __S(704, __c22, 0) as any as S.Schema<DeleteDirectiveRequest>,
2584
+ output: __S(1696, __c53, 0) as any as S.Schema<DeleteDirectiveResponse>,
2585
+ errors: [Forbidden, NotFound, UnprocessableEntity],
2586
+ serviceErrors: MuxServiceErrors,
2587
+ protocol: MuxProtocol,
2588
+ retry: Retry.Retry,
2589
+ telemetry: TELEMETRY,
2590
+ span: "DeleteDirective",
2591
+ }));
2592
+
2593
+ export type GetAnalyzeStructureJobError = Forbidden | NotFound | UnprocessableEntity | MuxOpError;
2594
+ /** Get an 'analyze-structure' job Retrieves the current status and results of an Analyze Structure job. Jobs are automatically deleted after 30 days. */
2595
+ export const getAnalyzeStructureJob: API.OperationMethod<
2596
+ GetAnalyzeStructureJobRequest,
2597
+ AnalyzeStructureJobResponse,
2598
+ GetAnalyzeStructureJobError,
2599
+ MuxOpContext
2600
+ > = /*@__PURE__*/ API.make(() => ({
2601
+ input: __S(736, __c23, 0) as any as S.Schema<GetAnalyzeStructureJobRequest>,
2602
+ output: __S(753, __c23, 17) as any as S.Schema<AnalyzeStructureJobResponse>,
2603
+ errors: [Forbidden, NotFound, UnprocessableEntity],
2604
+ serviceErrors: MuxServiceErrors,
2605
+ protocol: MuxProtocol,
2606
+ retry: Retry.Retry,
2607
+ telemetry: TELEMETRY,
2608
+ span: "GetAnalyzeStructureJob",
2609
+ }));
2610
+
2611
+ export type GetAskQuestionsJobError = Forbidden | NotFound | UnprocessableEntity | MuxOpError;
2612
+ /** Get an 'ask-questions' job Retrieves the current status and results of an 'ask-questions' job. Jobs are automatically deleted after 30 days. */
2613
+ export const getAskQuestionsJob: API.OperationMethod<
2614
+ GetAskQuestionsJobRequest,
2615
+ AskQuestionsJobResponse,
2616
+ GetAskQuestionsJobError,
2617
+ MuxOpContext
2618
+ > = /*@__PURE__*/ API.make(() => ({
2619
+ input: __S(864, __c27, 0) as any as S.Schema<GetAskQuestionsJobRequest>,
2620
+ output: __S(869, __c27, 5) as any as S.Schema<AskQuestionsJobResponse>,
2621
+ errors: [Forbidden, NotFound, UnprocessableEntity],
2622
+ serviceErrors: MuxServiceErrors,
2623
+ protocol: MuxProtocol,
2624
+ retry: Retry.Retry,
2625
+ telemetry: TELEMETRY,
2626
+ span: "GetAskQuestionsJob",
2627
+ }));
2628
+
2629
+ export type GetDirectiveError = Forbidden | NotFound | UnprocessableEntity | MuxOpError;
2630
+ /** Get a directive Returns a v1 directive. A directive owned by v0 returns 404. */
2631
+ export const getDirective: API.OperationMethod<
2632
+ GetDirectiveRequest,
2633
+ DirectiveResponse,
2634
+ GetDirectiveError,
2635
+ MuxOpContext
2636
+ > = /*@__PURE__*/ API.make(() => ({
2637
+ input: __S(896, __c28, 0) as any as S.Schema<GetDirectiveRequest>,
2638
+ output: __S(1859, __c58, 3) as any as S.Schema<DirectiveResponse>,
2639
+ errors: [Forbidden, NotFound, UnprocessableEntity],
2640
+ serviceErrors: MuxServiceErrors,
2641
+ protocol: MuxProtocol,
2642
+ retry: Retry.Retry,
2643
+ telemetry: TELEMETRY,
2644
+ span: "GetDirective",
2645
+ }));
2646
+
2647
+ export type GetDirectiveRunError = Forbidden | NotFound | UnprocessableEntity | MuxOpError;
2648
+ /** Get a directive run Retrieves the status, node states, and outcome of a specific directive run. Runs are retained for 30 days. */
2649
+ export const getDirectiveRun: API.OperationMethod<
2650
+ GetDirectiveRunRequest,
2651
+ DirectiveRunResponse,
2652
+ GetDirectiveRunError,
2653
+ MuxOpContext
2654
+ > = /*@__PURE__*/ API.make(() => ({
2655
+ input: __S(928, __c29, 0) as any as S.Schema<GetDirectiveRunRequest>,
2656
+ output: __S(929, __c29, 1) as any as S.Schema<DirectiveRunResponse>,
2657
+ errors: [Forbidden, NotFound, UnprocessableEntity],
2658
+ serviceErrors: MuxServiceErrors,
2659
+ protocol: MuxProtocol,
2660
+ retry: Retry.Retry,
2661
+ telemetry: TELEMETRY,
2662
+ span: "GetDirectiveRun",
2663
+ }));
2664
+
2665
+ export type GetEditCaptionsJobError = Forbidden | NotFound | UnprocessableEntity | MuxOpError;
2666
+ /** Get an 'edit-captions' job Retrieves the current status and results of an 'edit-captions' job. Jobs are automatically deleted after 30 days. */
2667
+ export const getEditCaptionsJob: API.OperationMethod<
2668
+ GetEditCaptionsJobRequest,
2669
+ EditCaptionsJobResponse,
2670
+ GetEditCaptionsJobError,
2671
+ MuxOpContext
2672
+ > = /*@__PURE__*/ API.make(() => ({
2673
+ input: __S(992, __c31, 0) as any as S.Schema<GetEditCaptionsJobRequest>,
2674
+ output: __S(995, __c31, 3) as any as S.Schema<EditCaptionsJobResponse>,
2675
+ errors: [Forbidden, NotFound, UnprocessableEntity],
2676
+ serviceErrors: MuxServiceErrors,
2677
+ protocol: MuxProtocol,
2678
+ retry: Retry.Retry,
2679
+ telemetry: TELEMETRY,
2680
+ span: "GetEditCaptionsJob",
2681
+ }));
2682
+
2683
+ export type GetFindBestThumbnailsJobError = Forbidden | NotFound | UnprocessableEntity | MuxOpError;
2684
+ /** Get a 'find-best-thumbnails' job Retrieves the current status and results of a 'find-best-thumbnails' job. Jobs are automatically deleted after 30 days. */
2685
+ export const getFindBestThumbnailsJob: API.OperationMethod<
2686
+ GetFindBestThumbnailsJobRequest,
2687
+ FindBestThumbnailsJobResponse,
2688
+ GetFindBestThumbnailsJobError,
2689
+ MuxOpContext
2690
+ > = /*@__PURE__*/ API.make(() => ({
2691
+ input: __S(1024, __c32, 0) as any as S.Schema<GetFindBestThumbnailsJobRequest>,
2692
+ output: __S(1031, __c32, 7) as any as S.Schema<FindBestThumbnailsJobResponse>,
2693
+ errors: [Forbidden, NotFound, UnprocessableEntity],
2694
+ serviceErrors: MuxServiceErrors,
2695
+ protocol: MuxProtocol,
2696
+ retry: Retry.Retry,
2697
+ telemetry: TELEMETRY,
2698
+ span: "GetFindBestThumbnailsJob",
2699
+ }));
2700
+
2701
+ export type GetFindKeyMomentsJobError = Forbidden | NotFound | UnprocessableEntity | MuxOpError;
2702
+ /** Get a 'find-key-moments' job Retrieves the current status and results of a 'find-key-moments' job. Jobs are automatically deleted after 30 days. */
2703
+ export const getFindKeyMomentsJob: API.OperationMethod<
2704
+ GetFindKeyMomentsJobRequest,
2705
+ FindKeyMomentsJobResponse,
2706
+ GetFindKeyMomentsJobError,
2707
+ MuxOpContext
2708
+ > = /*@__PURE__*/ API.make(() => ({
2709
+ input: __S(1056, __c33, 0) as any as S.Schema<GetFindKeyMomentsJobRequest>,
2710
+ output: __S(1066, __c33, 10) as any as S.Schema<FindKeyMomentsJobResponse>,
2711
+ errors: [Forbidden, NotFound, UnprocessableEntity],
2712
+ serviceErrors: MuxServiceErrors,
2713
+ protocol: MuxProtocol,
2714
+ retry: Retry.Retry,
2715
+ telemetry: TELEMETRY,
2716
+ span: "GetFindKeyMomentsJob",
2717
+ }));
2718
+
2719
+ export type GetGenerateChaptersJobError = Forbidden | NotFound | UnprocessableEntity | MuxOpError;
2720
+ /** Get a 'generate-chapters' job Retrieves the current status and results of a 'generate-chapters' job. Jobs are automatically deleted after 30 days. */
2721
+ export const getGenerateChaptersJob: API.OperationMethod<
2722
+ GetGenerateChaptersJobRequest,
2723
+ GenerateChaptersJobResponse,
2724
+ GetGenerateChaptersJobError,
2725
+ MuxOpContext
2726
+ > = /*@__PURE__*/ API.make(() => ({
2727
+ input: __S(1088, __c34, 0) as any as S.Schema<GetGenerateChaptersJobRequest>,
2728
+ output: __S(1094, __c34, 6) as any as S.Schema<GenerateChaptersJobResponse>,
2729
+ errors: [Forbidden, NotFound, UnprocessableEntity],
2730
+ serviceErrors: MuxServiceErrors,
2731
+ protocol: MuxProtocol,
2732
+ retry: Retry.Retry,
2733
+ telemetry: TELEMETRY,
2734
+ span: "GetGenerateChaptersJob",
2735
+ }));
2736
+
2737
+ export type GetGenerateContextualTextJobError =
2738
+ | Forbidden
2739
+ | NotFound
2740
+ | UnprocessableEntity
2741
+ | MuxOpError;
2742
+ /** Get a 'generate-contextual-text' job Retrieves the current status and generated text artifacts. Jobs are automatically deleted after 30 days. */
2743
+ export const getGenerateContextualTextJob: API.OperationMethod<
2744
+ GetGenerateContextualTextJobRequest,
2745
+ GenerateContextualTextJobResponse,
2746
+ GetGenerateContextualTextJobError,
2747
+ MuxOpContext
2748
+ > = /*@__PURE__*/ API.make(() => ({
2749
+ input: __S(1120, __c35, 0) as any as S.Schema<GetGenerateContextualTextJobRequest>,
2750
+ output: __S(1127, __c35, 7) as any as S.Schema<GenerateContextualTextJobResponse>,
2751
+ errors: [Forbidden, NotFound, UnprocessableEntity],
2752
+ serviceErrors: MuxServiceErrors,
2753
+ protocol: MuxProtocol,
2754
+ retry: Retry.Retry,
2755
+ telemetry: TELEMETRY,
2756
+ span: "GetGenerateContextualTextJob",
2757
+ }));
2758
+
2759
+ export type GetGenerateEngagementInsightsJobError =
2760
+ | Forbidden
2761
+ | NotFound
2762
+ | UnprocessableEntity
2763
+ | MuxOpError;
2764
+ /** Get a 'generate-engagement-insights' job Retrieves the current status and results of a 'generate-engagement-insights' job. Jobs are automatically deleted after 30 days. */
2765
+ export const getGenerateEngagementInsightsJob: API.OperationMethod<
2766
+ GetGenerateEngagementInsightsJobRequest,
2767
+ GenerateEngagementInsightsJobResponse,
2768
+ GetGenerateEngagementInsightsJobError,
2769
+ MuxOpContext
2770
+ > = /*@__PURE__*/ API.make(() => ({
2771
+ input: __S(1152, __c36, 0) as any as S.Schema<GetGenerateEngagementInsightsJobRequest>,
2772
+ output: __S(1158, __c36, 6) as any as S.Schema<GenerateEngagementInsightsJobResponse>,
2773
+ errors: [Forbidden, NotFound, UnprocessableEntity],
2774
+ serviceErrors: MuxServiceErrors,
2775
+ protocol: MuxProtocol,
2776
+ retry: Retry.Retry,
2777
+ telemetry: TELEMETRY,
2778
+ span: "GetGenerateEngagementInsightsJob",
2779
+ }));
2780
+
2781
+ export type GetGeneratePremiumCaptionsJobError =
2782
+ | Forbidden
2783
+ | NotFound
2784
+ | UnprocessableEntity
2785
+ | MuxOpError;
2786
+ /** Get a 'generate-premium-captions' job Retrieves the current status and results of a 'generate-premium-captions' job. Jobs are automatically deleted after 30 days. */
2787
+ export const getGeneratePremiumCaptionsJob: API.OperationMethod<
2788
+ GetGeneratePremiumCaptionsJobRequest,
2789
+ GeneratePremiumCaptionsJobResponse,
2790
+ GetGeneratePremiumCaptionsJobError,
2791
+ MuxOpContext
2792
+ > = /*@__PURE__*/ API.make(() => ({
2793
+ input: __S(1184, __c37, 0) as any as S.Schema<GetGeneratePremiumCaptionsJobRequest>,
2794
+ output: __S(1187, __c37, 3) as any as S.Schema<GeneratePremiumCaptionsJobResponse>,
2795
+ errors: [Forbidden, NotFound, UnprocessableEntity],
2796
+ serviceErrors: MuxServiceErrors,
2797
+ protocol: MuxProtocol,
2798
+ retry: Retry.Retry,
2799
+ telemetry: TELEMETRY,
2800
+ span: "GetGeneratePremiumCaptionsJob",
2801
+ }));
2802
+
2803
+ export type GetModerateJobError = Forbidden | NotFound | UnprocessableEntity | MuxOpError;
2804
+ /** Get a 'moderate' job Retrieves the current status and results of a 'moderate' job. Jobs are automatically deleted after 30 days. */
2805
+ export const getModerateJob: API.OperationMethod<
2806
+ GetModerateJobRequest,
2807
+ ModerateJobResponse,
2808
+ GetModerateJobError,
2809
+ MuxOpContext
2810
+ > = /*@__PURE__*/ API.make(() => ({
2811
+ input: __S(1216, __c38, 0) as any as S.Schema<GetModerateJobRequest>,
2812
+ output: __S(1226, __c38, 10) as any as S.Schema<ModerateJobResponse>,
2813
+ errors: [Forbidden, NotFound, UnprocessableEntity],
2814
+ serviceErrors: MuxServiceErrors,
2815
+ protocol: MuxProtocol,
2816
+ retry: Retry.Retry,
2817
+ telemetry: TELEMETRY,
2818
+ span: "GetModerateJob",
2819
+ }));
2820
+
2821
+ export type GetSummarizeJobError = Forbidden | NotFound | UnprocessableEntity | MuxOpError;
2822
+ /** Get a 'summarize' job Retrieves the current status and results of a 'summarize' job. Jobs are automatically deleted after 30 days. */
2823
+ export const getSummarizeJob: API.OperationMethod<
2824
+ GetSummarizeJobRequest,
2825
+ SummarizeJobResponse,
2826
+ GetSummarizeJobError,
2827
+ MuxOpContext
2828
+ > = /*@__PURE__*/ API.make(() => ({
2829
+ input: __S(1248, __c39, 0) as any as S.Schema<GetSummarizeJobRequest>,
2830
+ output: __S(1252, __c39, 4) as any as S.Schema<SummarizeJobResponse>,
2831
+ errors: [Forbidden, NotFound, UnprocessableEntity],
2832
+ serviceErrors: MuxServiceErrors,
2833
+ protocol: MuxProtocol,
2834
+ retry: Retry.Retry,
2835
+ telemetry: TELEMETRY,
2836
+ span: "GetSummarizeJob",
2837
+ }));
2838
+
2839
+ export type GetTranslateAudioJobError = Forbidden | NotFound | UnprocessableEntity | MuxOpError;
2840
+ /** Get a 'translate-audio' job Retrieves the current status and results of a 'translate-audio' job. Jobs are automatically deleted after 30 days. */
2841
+ export const getTranslateAudioJob: API.OperationMethod<
2842
+ GetTranslateAudioJobRequest,
2843
+ TranslateAudioJobResponse,
2844
+ GetTranslateAudioJobError,
2845
+ MuxOpContext
2846
+ > = /*@__PURE__*/ API.make(() => ({
2847
+ input: __S(1280, __c40, 0) as any as S.Schema<GetTranslateAudioJobRequest>,
2848
+ output: __S(1283, __c40, 3) as any as S.Schema<TranslateAudioJobResponse>,
2849
+ errors: [Forbidden, NotFound, UnprocessableEntity],
2850
+ serviceErrors: MuxServiceErrors,
2851
+ protocol: MuxProtocol,
2852
+ retry: Retry.Retry,
2853
+ telemetry: TELEMETRY,
2854
+ span: "GetTranslateAudioJob",
2855
+ }));
2856
+
2857
+ export type GetTranslateCaptionsJobError = Forbidden | NotFound | UnprocessableEntity | MuxOpError;
2858
+ /** Get a 'translate-captions' job Retrieves the current status and results of a 'translate-captions' job. Jobs are automatically deleted after 30 days. */
2859
+ export const getTranslateCaptionsJob: API.OperationMethod<
2860
+ GetTranslateCaptionsJobRequest,
2861
+ TranslateCaptionsJobResponse,
2862
+ GetTranslateCaptionsJobError,
2863
+ MuxOpContext
2864
+ > = /*@__PURE__*/ API.make(() => ({
2865
+ input: __S(1312, __c41, 0) as any as S.Schema<GetTranslateCaptionsJobRequest>,
2866
+ output: __S(1315, __c41, 3) as any as S.Schema<TranslateCaptionsJobResponse>,
2867
+ errors: [Forbidden, NotFound, UnprocessableEntity],
2868
+ serviceErrors: MuxServiceErrors,
2869
+ protocol: MuxProtocol,
2870
+ retry: Retry.Retry,
2871
+ telemetry: TELEMETRY,
2872
+ span: "GetTranslateCaptionsJob",
2873
+ }));
2874
+
2875
+ export type ListDirectiveRunsError = Forbidden | NotFound | UnprocessableEntity | MuxOpError;
2876
+ /** List directive runs Returns a paginated list of runs for a directive, newest first. Runs are retained for 30 days. */
2877
+ export const listDirectiveRuns: API.PaginatedOperationMethod<
2878
+ ListDirectiveRunsRequest,
2879
+ DirectiveRunListResponse,
2880
+ ListDirectiveRunsError,
2881
+ MuxOpContext,
2882
+ DirectiveRun
2883
+ > = /*@__PURE__*/ API.makePaginated(
2884
+ () => ({
2885
+ input: __S(1344, __c42, 0) as any as S.Schema<ListDirectiveRunsRequest>,
2886
+ output: __S(1346, __c42, 2) as any as S.Schema<DirectiveRunListResponse>,
2887
+ errors: [Forbidden, NotFound, UnprocessableEntity],
2888
+ serviceErrors: MuxServiceErrors,
2889
+ protocol: MuxProtocol,
2890
+ retry: Retry.Retry,
2891
+ telemetry: TELEMETRY,
2892
+ span: "ListDirectiveRuns",
2893
+ pagination: { mode: "page", inputToken: "page", items: "data", pageSize: "limit" } as const,
2894
+ }),
2895
+ paginatePage,
2896
+ ) as any;
2897
+
2898
+ export type ListDirectivesError = Forbidden | UnprocessableEntity | MuxOpError;
2899
+ /** List directives Returns active v0 and v1 directive summaries, newest first. Follow each self link to retrieve the owning-version configuration. */
2900
+ export const listDirectives: API.PaginatedOperationMethod<
2901
+ ListDirectivesRequest,
2902
+ DirectiveListResponse,
2903
+ ListDirectivesError,
2904
+ MuxOpContext,
2905
+ DirectiveSummary
2906
+ > = /*@__PURE__*/ API.makePaginated(
2907
+ () => ({
2908
+ input: __S(1376, __c43, 0) as any as S.Schema<ListDirectivesRequest>,
2909
+ output: __S(1379, __c43, 3) as any as S.Schema<DirectiveListResponse>,
2910
+ errors: [Forbidden, UnprocessableEntity],
2911
+ serviceErrors: MuxServiceErrors,
2912
+ protocol: MuxProtocol,
2913
+ retry: Retry.Retry,
2914
+ telemetry: TELEMETRY,
2915
+ span: "ListDirectives",
2916
+ pagination: { mode: "page", inputToken: "page", items: "data", pageSize: "limit" } as const,
2917
+ }),
2918
+ paginatePage,
2919
+ ) as any;
2920
+
2921
+ export type ListJobsError = Forbidden | UnprocessableEntity | MuxOpError;
2922
+ /** List jobs Returns a paginated list of Robots jobs, with optional filters for workflow, status, and asset_id. Jobs are automatically deleted after 30 days. */
2923
+ export const listJobs: API.PaginatedOperationMethod<
2924
+ ListJobsRequest,
2925
+ ListJobsResponse,
2926
+ ListJobsError,
2927
+ MuxOpContext,
2928
+ JobSummary
2929
+ > = /*@__PURE__*/ API.makePaginated(
2930
+ () => ({
2931
+ input: __S(1408, __c44, 0) as any as S.Schema<ListJobsRequest>,
2932
+ output: __S(1410, __c44, 2) as any as S.Schema<ListJobsResponse>,
2933
+ errors: [Forbidden, UnprocessableEntity],
2934
+ serviceErrors: MuxServiceErrors,
2935
+ protocol: MuxProtocol,
2936
+ retry: Retry.Retry,
2937
+ telemetry: TELEMETRY,
2938
+ span: "ListJobs",
2939
+ pagination: { mode: "page", inputToken: "page", items: "data", pageSize: "limit" } as const,
2940
+ }),
2941
+ paginatePage,
2942
+ ) as any;
2943
+
2944
+ export type RunDirectiveError =
2945
+ | BadRequest
2946
+ | Forbidden
2947
+ | NotFound
2948
+ | Conflict
2949
+ | UnprocessableEntity
2950
+ | MuxOpError;
2951
+ /** Trigger a directive run Starts a v1 run for a v1 directive. A directive owned by v0 returns 404. */
2952
+ export const runDirective: API.OperationMethod<
2953
+ RunDirectiveRequest,
2954
+ RunDirectiveResponse,
2955
+ RunDirectiveError,
2956
+ MuxOpContext
2957
+ > = /*@__PURE__*/ API.make(() => ({
2958
+ input: __S(1440, __c45, 0) as any as S.Schema<RunDirectiveRequest>,
2959
+ output: __S(1696, __c53, 0) as any as S.Schema<RunDirectiveResponse>,
2960
+ errors: [BadRequest, Forbidden, NotFound, Conflict, UnprocessableEntity],
2961
+ serviceErrors: MuxServiceErrors,
2962
+ protocol: MuxProtocol,
2963
+ retry: Retry.Retry,
2964
+ telemetry: TELEMETRY,
2965
+ span: "RunDirective",
2966
+ }));
2967
+
2968
+ // Schema builders: each runs one schema initializer, on that schema's first use.
2969
+ function __c0(j: number): any {
2970
+ switch (j) {
2971
+ case 0:
2972
+ return S.Array(S.String);
2973
+ case 1:
2974
+ return S.suspend(() =>
2975
+ S.Struct({
2976
+ type: S.String,
2977
+ code: S.optional(S.String),
2978
+ messages: __S(0, __c0, 0),
2979
+ }),
2980
+ ).annotate({ identifier: "ErrorDetail" });
2981
+ case 2:
2982
+ return S.suspend(() =>
2983
+ S.Struct({
2984
+ error: __S(1, __c0, 1),
2985
+ }),
2986
+ ).annotate({ identifier: "ErrorResponse" });
2987
+ }
2988
+ }
2989
+ function __c1(j: number): any {
2990
+ switch (j) {
2991
+ case 0:
2992
+ return S.suspend(() =>
2993
+ S.Struct({
2994
+ passthrough: S.optional(S.String),
2995
+ parameters: __S(97, __c3, 1),
2996
+ }).pipe(T.Http({ method: "POST", uri: "/robots/v1/jobs/find-best-thumbnails", code: 200 })),
2997
+ ).annotate({ identifier: "CreateFindBestThumbnailsJobRequest" });
2998
+ }
2999
+ }
3000
+ function __c2(j: number): any {
3001
+ switch (j) {
3002
+ case 0:
3003
+ return S.Array(S.String);
3004
+ }
3005
+ }
3006
+ function __c3(j: number): any {
3007
+ switch (j) {
3008
+ case 0:
3009
+ return S.suspend(() =>
3010
+ S.Struct({
3011
+ scope: S.optional(__S(1664, __c52, 0)),
3012
+ selection_strategy: S.optional(S.String),
3013
+ looking_for: S.optional(S.String),
3014
+ audience: S.optional(S.String),
3015
+ campaign_style: S.optional(S.String),
3016
+ scoring_priorities: S.optional(__S(64, __c2, 0)),
3017
+ }),
3018
+ ).annotate({ identifier: "FindBestThumbnailsOutputSteering" });
3019
+ case 1:
3020
+ return S.suspend(() =>
3021
+ S.Struct({
3022
+ asset_id: S.String,
3023
+ max_thumbnails: S.optional(S.Number),
3024
+ output_steering: S.optional(__S(96, __c3, 0)),
3025
+ update_asset_thumbnail: S.optional(S.Boolean),
3026
+ }),
3027
+ ).annotate({ identifier: "FindBestThumbnailsJobParameters" });
3028
+ }
3029
+ }
3030
+ function __c4(j: number): any {
3031
+ switch (j) {
3032
+ case 0:
3033
+ return S.suspend(() =>
3034
+ S.Struct({
3035
+ passthrough: S.optional(S.String),
3036
+ parameters: __S(162, __c5, 2),
3037
+ }).pipe(T.Http({ method: "POST", uri: "/robots/v1/jobs/find-key-moments", code: 200 })),
3038
+ ).annotate({ identifier: "CreateFindKeyMomentsJobRequest" });
3039
+ }
3040
+ }
3041
+ function __c5(j: number): any {
3042
+ switch (j) {
3043
+ case 0:
3044
+ return S.suspend(() =>
3045
+ S.Struct({
3046
+ scope: S.optional(__S(1664, __c52, 0)),
3047
+ selection_strategy: S.optional(S.String),
3048
+ title_style: S.optional(S.String),
3049
+ audience: S.optional(S.String),
3050
+ brand_terms: S.optional(__S(0, __c0, 0)),
3051
+ topic_taxonomy: S.optional(__S(1602, __c50, 2)),
3052
+ rubric_priorities: S.optional(__S(64, __c2, 0)),
3053
+ }),
3054
+ ).annotate({ identifier: "FindKeyMomentsOutputSteering" });
3055
+ case 1:
3056
+ return S.suspend(() =>
3057
+ S.Struct({
3058
+ min: S.Number,
3059
+ max: S.Number,
3060
+ }),
3061
+ ).annotate({ identifier: "FindKeyMomentsTargetDuration" });
3062
+ case 2:
3063
+ return S.suspend(() =>
3064
+ S.Struct({
3065
+ asset_id: S.String,
3066
+ max_moments: S.optional(S.Number),
3067
+ use_shots: S.optional(S.Boolean),
3068
+ output_steering: S.optional(__S(160, __c5, 0)),
3069
+ target_duration: S.optional(__S(161, __c5, 1)),
3070
+ }),
3071
+ ).annotate({ identifier: "FindKeyMomentsJobParameters" });
3072
+ }
3073
+ }
3074
+ function __c6(j: number): any {
3075
+ switch (j) {
3076
+ case 0:
3077
+ return S.suspend(() =>
3078
+ S.Struct({
3079
+ passthrough: S.optional(S.String),
3080
+ parameters: __S(225, __c7, 1),
3081
+ }).pipe(T.Http({ method: "POST", uri: "/robots/v1/jobs/generate-chapters", code: 200 })),
3082
+ ).annotate({ identifier: "CreateGenerateChaptersJobRequest" });
3083
+ }
3084
+ }
3085
+ function __c7(j: number): any {
3086
+ switch (j) {
3087
+ case 0:
3088
+ return S.suspend(() =>
3089
+ S.Struct({
3090
+ chapter_style: S.optional(S.String),
3091
+ chapter_granularity: S.optional(S.String),
3092
+ audience: S.optional(S.String),
3093
+ brand_terms: S.optional(__S(0, __c0, 0)),
3094
+ }),
3095
+ ).annotate({ identifier: "GenerateChaptersOutputSteering" });
3096
+ case 1:
3097
+ return S.suspend(() =>
3098
+ S.Struct({
3099
+ asset_id: S.String,
3100
+ language_code: S.optional(S.String),
3101
+ output_language_code: S.optional(S.String),
3102
+ output_steering: S.optional(__S(224, __c7, 0)),
3103
+ update_asset_chapters: S.optional(S.Boolean),
3104
+ }),
3105
+ ).annotate({ identifier: "GenerateChaptersJobParameters" });
3106
+ }
3107
+ }
3108
+ function __c8(j: number): any {
3109
+ switch (j) {
3110
+ case 0:
3111
+ return S.suspend(() =>
3112
+ S.Struct({
3113
+ passthrough: S.optional(S.String),
3114
+ parameters: __S(293, __c9, 5),
3115
+ }).pipe(
3116
+ T.Http({ method: "POST", uri: "/robots/v1/jobs/generate-contextual-text", code: 200 }),
3117
+ ),
3118
+ ).annotate({ identifier: "CreateGenerateContextualTextJobRequest" });
3119
+ }
3120
+ }
3121
+ function __c9(j: number): any {
3122
+ switch (j) {
3123
+ case 0:
3124
+ return S.suspend(() =>
3125
+ S.Struct({
3126
+ scope: S.optional(__S(1664, __c52, 0)),
3127
+ audience: S.optional(S.String),
3128
+ voice: S.optional(S.String),
3129
+ call_to_action: S.optional(S.String),
3130
+ brand_terms: S.optional(S.Unknown),
3131
+ }),
3132
+ ).annotate({ identifier: "GenerateContextualTextOutputSteering" });
3133
+ case 1:
3134
+ return S.suspend(() =>
3135
+ S.Struct({
3136
+ key: S.String,
3137
+ instructions: S.optional(S.String),
3138
+ }),
3139
+ ).annotate({ identifier: "GenerateContextualTextVariant" });
3140
+ case 2:
3141
+ return S.Array(__S(289, __c9, 1));
3142
+ case 3:
3143
+ return S.suspend(() =>
3144
+ S.Struct({
3145
+ key: S.String,
3146
+ instructions: S.optional(S.String),
3147
+ channel: S.optional(S.String),
3148
+ max_length: S.optional(S.Unknown),
3149
+ format: S.optional(S.String),
3150
+ }),
3151
+ ).annotate({ identifier: "GenerateContextualTextArtifact" });
3152
+ case 4:
3153
+ return S.Array(__S(291, __c9, 3));
3154
+ case 5:
3155
+ return S.suspend(() =>
3156
+ S.Struct({
3157
+ asset_id: S.String,
3158
+ use_shots: S.optional(S.Boolean),
3159
+ output_steering: S.optional(__S(288, __c9, 0)),
3160
+ variants: __S(290, __c9, 2),
3161
+ artifacts: __S(292, __c9, 4),
3162
+ language_code: S.optional(S.String),
3163
+ output_language_code: S.optional(S.String),
3164
+ }),
3165
+ ).annotate({ identifier: "GenerateContextualTextJobParameters" });
3166
+ }
3167
+ }
3168
+ function __c10(j: number): any {
3169
+ switch (j) {
3170
+ case 0:
3171
+ return S.suspend(() =>
3172
+ S.Struct({
3173
+ passthrough: S.optional(S.String),
3174
+ parameters: __S(352, __c11, 0),
3175
+ }).pipe(
3176
+ T.Http({
3177
+ method: "POST",
3178
+ uri: "/robots/v1/jobs/generate-engagement-insights",
3179
+ code: 200,
3180
+ }),
3181
+ ),
3182
+ ).annotate({ identifier: "CreateGenerateEngagementInsightsJobRequest" });
3183
+ }
3184
+ }
3185
+ function __c11(j: number): any {
3186
+ switch (j) {
3187
+ case 0:
3188
+ return S.suspend(() =>
3189
+ S.Struct({
3190
+ asset_id: S.String,
3191
+ }),
3192
+ ).annotate({ identifier: "GenerateEngagementInsightsJobParameters" });
3193
+ }
3194
+ }
3195
+ function __c12(j: number): any {
3196
+ switch (j) {
3197
+ case 0:
3198
+ return S.suspend(() =>
3199
+ S.Struct({
3200
+ passthrough: S.optional(S.String),
3201
+ parameters: __S(416, __c13, 0),
3202
+ }).pipe(
3203
+ T.Http({ method: "POST", uri: "/robots/v1/jobs/generate-premium-captions", code: 200 }),
3204
+ ),
3205
+ ).annotate({ identifier: "CreateGeneratePremiumCaptionsJobRequest" });
3206
+ }
3207
+ }
3208
+ function __c13(j: number): any {
3209
+ switch (j) {
3210
+ case 0:
3211
+ return S.suspend(() =>
3212
+ S.Struct({
3213
+ asset_id: S.String,
3214
+ language_code: S.optional(S.String),
3215
+ replace_existing_tracks: S.optional(S.String),
3216
+ track_name: S.optional(S.String),
3217
+ include_speakers: S.optional(S.Boolean),
3218
+ include_words: S.optional(S.Boolean),
3219
+ upload_to_mux: S.optional(S.Boolean),
3220
+ phrases: S.optional(__S(0, __c0, 0)),
3221
+ }),
3222
+ ).annotate({ identifier: "GeneratePremiumCaptionsJobParameters" });
3223
+ }
3224
+ }
3225
+ function __c14(j: number): any {
3226
+ switch (j) {
3227
+ case 0:
3228
+ return S.suspend(() =>
3229
+ S.Struct({
3230
+ passthrough: S.optional(S.String),
3231
+ parameters: __S(482, __c15, 2),
3232
+ }).pipe(T.Http({ method: "POST", uri: "/robots/v1/jobs/moderate", code: 200 })),
3233
+ ).annotate({ identifier: "CreateModerateJobRequest" });
3234
+ }
3235
+ }
3236
+ function __c15(j: number): any {
3237
+ switch (j) {
3238
+ case 0:
3239
+ return S.suspend(() =>
3240
+ S.Struct({
3241
+ sexual: S.optional(S.Number),
3242
+ violence: S.optional(S.Number),
3243
+ }),
3244
+ ).annotate({ identifier: "ModerateDirectiveBindingParametersThresholds" });
3245
+ case 1:
3246
+ return S.suspend(() =>
3247
+ S.Struct({
3248
+ action: S.String,
3249
+ }),
3250
+ ).annotate({ identifier: "ActionOnFlagged" });
3251
+ case 2:
3252
+ return S.suspend(() =>
3253
+ S.Struct({
3254
+ asset_id: S.String,
3255
+ language_code: S.optional(S.String),
3256
+ thresholds: S.optional(__S(480, __c15, 0)),
3257
+ sampling_interval: S.optional(S.Number),
3258
+ max_samples: S.optional(S.Number),
3259
+ output_steering: S.optional(__S(1760, __c55, 0)),
3260
+ on_flagged: S.optional(__S(481, __c15, 1)),
3261
+ include_transcript: S.optional(S.Boolean),
3262
+ }),
3263
+ ).annotate({ identifier: "ModerateJobParameters" });
3264
+ }
3265
+ }
3266
+ function __c16(j: number): any {
3267
+ switch (j) {
3268
+ case 0:
3269
+ return S.suspend(() =>
3270
+ S.Struct({
3271
+ passthrough: S.optional(S.String),
3272
+ parameters: __S(545, __c17, 1),
3273
+ }).pipe(T.Http({ method: "POST", uri: "/robots/v1/jobs/summarize", code: 200 })),
3274
+ ).annotate({ identifier: "CreateSummarizeJobRequest" });
3275
+ }
3276
+ }
3277
+ function __c17(j: number): any {
3278
+ switch (j) {
3279
+ case 0:
3280
+ return S.suspend(() =>
3281
+ S.Struct({
3282
+ scope: S.optional(__S(1664, __c52, 0)),
3283
+ tag_taxonomy: S.optional(__S(1602, __c50, 2)),
3284
+ summary_style: S.optional(S.String),
3285
+ audience: S.optional(S.String),
3286
+ brand_terms: S.optional(__S(0, __c0, 0)),
3287
+ }),
3288
+ ).annotate({ identifier: "SummarizeOutputSteering" });
3289
+ case 1:
3290
+ return S.suspend(() =>
3291
+ S.Struct({
3292
+ asset_id: S.String,
3293
+ tone: S.optional(S.String),
3294
+ output_steering: S.optional(__S(544, __c17, 0)),
3295
+ title_length: S.optional(S.Number),
3296
+ description_length: S.optional(S.Number),
3297
+ tag_count: S.optional(S.Number),
3298
+ language_code: S.optional(S.String),
3299
+ output_language_code: S.optional(S.String),
3300
+ update_asset_meta: S.optional(S.Boolean),
3301
+ }),
3302
+ ).annotate({ identifier: "SummarizeJobParameters" });
3303
+ }
3304
+ }
3305
+ function __c18(j: number): any {
3306
+ switch (j) {
3307
+ case 0:
3308
+ return S.suspend(() =>
3309
+ S.Struct({
3310
+ passthrough: S.optional(S.String),
3311
+ parameters: __S(609, __c19, 1),
3312
+ }).pipe(T.Http({ method: "POST", uri: "/robots/v1/jobs/translate-audio", code: 200 })),
3313
+ ).annotate({ identifier: "CreateTranslateAudioJobRequest" });
3314
+ }
3315
+ }
3316
+ function __c19(j: number): any {
3317
+ switch (j) {
3318
+ case 0:
3319
+ return S.suspend(() =>
3320
+ S.Struct({
3321
+ upload_to_mux: S.optional(S.Boolean),
3322
+ track_name: S.optional(S.String),
3323
+ replace_existing_tracks: S.optional(S.String),
3324
+ }),
3325
+ ).annotate({ identifier: "TranslateAudioCaptions" });
3326
+ case 1:
3327
+ return S.suspend(() =>
3328
+ S.Struct({
3329
+ asset_id: S.String,
3330
+ track_name: S.optional(S.String),
3331
+ upload_to_mux: S.optional(S.Boolean),
3332
+ replace_existing_tracks: S.optional(S.String),
3333
+ captions: S.optional(__S(608, __c19, 0)),
3334
+ output_language_code: S.String,
3335
+ }),
3336
+ ).annotate({ identifier: "TranslateAudioJobParameters" });
3337
+ }
3338
+ }
3339
+ function __c20(j: number): any {
3340
+ switch (j) {
3341
+ case 0:
3342
+ return S.suspend(() =>
3343
+ S.Struct({
3344
+ passthrough: S.optional(S.String),
3345
+ parameters: __S(672, __c21, 0),
3346
+ }).pipe(T.Http({ method: "POST", uri: "/robots/v1/jobs/translate-captions", code: 200 })),
3347
+ ).annotate({ identifier: "CreateTranslateCaptionsJobRequest" });
3348
+ }
3349
+ }
3350
+ function __c21(j: number): any {
3351
+ switch (j) {
3352
+ case 0:
3353
+ return S.suspend(() =>
3354
+ S.Struct({
3355
+ asset_id: S.String,
3356
+ track_id: S.String,
3357
+ track_name: S.optional(S.String),
3358
+ upload_to_mux: S.optional(S.Boolean),
3359
+ never_translate: S.optional(__S(0, __c0, 0)),
3360
+ replace_existing_tracks: S.optional(S.String),
3361
+ output_language_code: S.String,
3362
+ }),
3363
+ ).annotate({ identifier: "TranslateCaptionsJobParameters" });
3364
+ }
3365
+ }
3366
+ function __c22(j: number): any {
3367
+ switch (j) {
3368
+ case 0:
3369
+ return S.suspend(() =>
3370
+ S.Struct({
3371
+ DIRECTIVE_ID: S.String.pipe(T.Label()),
3372
+ }).pipe(
3373
+ T.Http({ method: "DELETE", uri: "/robots/v1/directives/{DIRECTIVE_ID}", code: 200 }),
3374
+ ),
3375
+ ).annotate({ identifier: "DeleteDirectiveRequest" });
3376
+ }
3377
+ }
3378
+ function __c23(j: number): any {
3379
+ switch (j) {
3380
+ case 0:
3381
+ return S.suspend(() =>
3382
+ S.Struct({
3383
+ JOB_ID: S.String.pipe(T.Label()),
3384
+ }).pipe(
3385
+ T.Http({ method: "GET", uri: "/robots/v1/jobs/analyze-structure/{JOB_ID}", code: 200 }),
3386
+ ),
3387
+ ).annotate({ identifier: "GetAnalyzeStructureJobRequest" });
3388
+ case 1:
3389
+ return S.suspend(() =>
3390
+ S.Struct({
3391
+ start_time: S.Number,
3392
+ end_time: S.Number,
3393
+ title: S.String,
3394
+ }),
3395
+ ).annotate({ identifier: "AnalyzeStructureChapter" });
3396
+ case 2:
3397
+ return S.Array(__S(737, __c23, 1));
3398
+ case 3:
3399
+ return S.suspend(() =>
3400
+ S.Struct({
3401
+ start_time: S.Number,
3402
+ end_time: S.Number,
3403
+ text: S.String,
3404
+ }),
3405
+ ).annotate({ identifier: "AnalyzeStructureCue" });
3406
+ case 4:
3407
+ return S.Array(__S(739, __c23, 3));
3408
+ case 5:
3409
+ return S.suspend(() =>
3410
+ S.Struct({
3411
+ concept: S.Unknown,
3412
+ score: S.Number,
3413
+ rationale: S.String,
3414
+ }),
3415
+ ).annotate({ identifier: "AnalyzeStructureVisualConcept" });
3416
+ case 6:
3417
+ return S.Array(__S(741, __c23, 5));
3418
+ case 7:
3419
+ return S.suspend(() =>
3420
+ S.Struct({
3421
+ start_time: S.Number,
3422
+ end_time: S.Number,
3423
+ visual_description: S.String,
3424
+ }),
3425
+ ).annotate({ identifier: "AnalyzeStructureShot" });
3426
+ case 8:
3427
+ return S.Array(__S(743, __c23, 7));
3428
+ case 9:
3429
+ return S.suspend(() =>
3430
+ S.Struct({
3431
+ start_time: S.Number,
3432
+ end_time: S.Number,
3433
+ title: S.String,
3434
+ cues: __S(740, __c23, 4),
3435
+ audible_narrative: S.optional(S.String),
3436
+ visual_narrative: S.optional(S.String),
3437
+ blended_narrative: S.optional(S.String),
3438
+ notable_audible_concepts: S.optional(__S(0, __c0, 0)),
3439
+ notable_visual_concepts: S.optional(__S(742, __c23, 6)),
3440
+ shots: S.optional(__S(744, __c23, 8)),
3441
+ shot_count: S.Number,
3442
+ }),
3443
+ ).annotate({ identifier: "AnalyzeStructureScene" });
3444
+ case 10:
3445
+ return S.Array(__S(745, __c23, 9));
3446
+ case 11:
3447
+ return S.suspend(() =>
3448
+ S.Struct({
3449
+ time: S.Number,
3450
+ text: S.String,
3451
+ }),
3452
+ ).annotate({ identifier: "AnalyzeStructureQuotableSegment" });
3453
+ case 12:
3454
+ return S.suspend(() =>
3455
+ S.Struct({
3456
+ start_time: S.Number,
3457
+ end_time: S.Number,
3458
+ overall_score: S.Number,
3459
+ title: S.String,
3460
+ cues: __S(740, __c23, 4),
3461
+ quotable_segment: S.optional(__S(747, __c23, 11)),
3462
+ audible_narrative: S.optional(S.String),
3463
+ notable_audible_concepts: S.optional(__S(0, __c0, 0)),
3464
+ visual_narrative: S.optional(S.String),
3465
+ notable_visual_concepts: S.optional(__S(742, __c23, 6)),
3466
+ }),
3467
+ ).annotate({ identifier: "AnalyzeStructureKeyMoment" });
3468
+ case 13:
3469
+ return S.Array(__S(748, __c23, 12));
3470
+ case 14:
3471
+ return S.suspend(() =>
3472
+ S.Struct({
3473
+ title: S.optional(__S(800, __c25, 0)),
3474
+ chapters: S.optional(__S(832, __c26, 0)),
3475
+ }),
3476
+ ).annotate({ identifier: "AnalyzeStructureAssetUpdateOutcomes" });
3477
+ case 15:
3478
+ return S.suspend(() =>
3479
+ S.Struct({
3480
+ title: S.String,
3481
+ summary: S.String,
3482
+ tags: __S(0, __c0, 0),
3483
+ chapters: __S(738, __c23, 2),
3484
+ scenes: __S(746, __c23, 10),
3485
+ key_moments: __S(749, __c23, 13),
3486
+ asset_updates: S.optional(__S(750, __c23, 14)),
3487
+ }),
3488
+ ).annotate({ identifier: "AnalyzeStructureJobOutputs" });
3489
+ case 16:
3490
+ return S.suspend(() =>
3491
+ S.Struct({
3492
+ id: S.String,
3493
+ passthrough: S.optional(S.String),
3494
+ units_consumed: S.Number,
3495
+ directive: S.optional(__S(768, __c24, 0)),
3496
+ created_at: S.Number,
3497
+ updated_at: S.Number,
3498
+ workflow: S.String,
3499
+ parameters: __S(1633, __c51, 1),
3500
+ status: S.String,
3501
+ errors: S.optional(__S(770, __c24, 2)),
3502
+ resources: S.optional(__S(774, __c24, 6)),
3503
+ outputs: S.optional(__S(751, __c23, 15)),
3504
+ }),
3505
+ ).annotate({ identifier: "AnalyzeStructureJob" });
3506
+ case 17:
3507
+ return S.suspend(() =>
3508
+ S.Struct({
3509
+ data: __S(752, __c23, 16),
3510
+ }),
3511
+ ).annotate({ identifier: "AnalyzeStructureJobResponse" });
3512
+ }
3513
+ }
3514
+ function __c24(j: number): any {
3515
+ switch (j) {
3516
+ case 0:
3517
+ return S.suspend(() =>
3518
+ S.Struct({
3519
+ id: S.String,
3520
+ run_id: S.String,
3521
+ }),
3522
+ ).annotate({ identifier: "JobDirectiveContext" });
3523
+ case 1:
3524
+ return S.suspend(() =>
3525
+ S.Struct({
3526
+ type: S.String,
3527
+ code: S.optional(S.String),
3528
+ message: S.String,
3529
+ retryable: S.optional(S.Boolean),
3530
+ }),
3531
+ ).annotate({ identifier: "JobError" });
3532
+ case 2:
3533
+ return S.Array(__S(769, __c24, 1));
3534
+ case 3:
3535
+ return S.suspend(() =>
3536
+ S.Struct({
3537
+ title: S.optional(S.String),
3538
+ creator_id: S.optional(S.String),
3539
+ external_id: S.optional(S.String),
3540
+ }),
3541
+ ).annotate({ identifier: "SlimlineAssetMeta" });
3542
+ case 4:
3543
+ return S.suspend(() =>
3544
+ S.Struct({
3545
+ id: S.String,
3546
+ meta: S.optional(__S(771, __c24, 3)),
3547
+ passthrough: S.optional(S.String),
3548
+ _links: __S(1537, __c48, 1),
3549
+ }),
3550
+ ).annotate({ identifier: "SlimlineAsset" });
3551
+ case 5:
3552
+ return S.Array(__S(772, __c24, 4));
3553
+ case 6:
3554
+ return S.suspend(() =>
3555
+ S.Struct({
3556
+ assets: __S(773, __c24, 5),
3557
+ }),
3558
+ ).annotate({ identifier: "Resources" });
3559
+ }
3560
+ }
3561
+ function __c25(j: number): any {
3562
+ switch (j) {
3563
+ case 0:
3564
+ return S.suspend(() =>
3565
+ S.Struct({
3566
+ status: S.String,
3567
+ }),
3568
+ ).annotate({ identifier: "AnalyzeStructureTitleAssetUpdate" });
3569
+ }
3570
+ }
3571
+ function __c26(j: number): any {
3572
+ switch (j) {
3573
+ case 0:
3574
+ return S.suspend(() =>
3575
+ S.Struct({
3576
+ status: S.String,
3577
+ track_id: S.optional(S.String),
3578
+ replaced_track_ids: S.optional(__S(0, __c0, 0)),
3579
+ }),
3580
+ ).annotate({ identifier: "AnalyzeStructureChaptersAssetUpdate" });
3581
+ }
3582
+ }
3583
+ function __c27(j: number): any {
3584
+ switch (j) {
3585
+ case 0:
3586
+ return S.suspend(() =>
3587
+ S.Struct({
3588
+ JOB_ID: S.String.pipe(T.Label()),
3589
+ }).pipe(
3590
+ T.Http({ method: "GET", uri: "/robots/v1/jobs/ask-questions/{JOB_ID}", code: 200 }),
3591
+ ),
3592
+ ).annotate({ identifier: "GetAskQuestionsJobRequest" });
3593
+ case 1:
3594
+ return S.suspend(() =>
3595
+ S.Struct({
3596
+ question: S.String,
3597
+ answer: S.NullOr(S.String),
3598
+ confidence: S.Number,
3599
+ reasoning: S.String,
3600
+ skipped: S.Boolean,
3601
+ }),
3602
+ ).annotate({ identifier: "AskQuestionsJobOutputsAnswersItem" });
3603
+ case 2:
3604
+ return S.Array(__S(865, __c27, 1));
3605
+ case 3:
3606
+ return S.suspend(() =>
3607
+ S.Struct({
3608
+ answers: __S(866, __c27, 2),
3609
+ }),
3610
+ ).annotate({ identifier: "AskQuestionsJobOutputs" });
3611
+ case 4:
3612
+ return S.suspend(() =>
3613
+ S.Struct({
3614
+ id: S.String,
3615
+ passthrough: S.optional(S.String),
3616
+ units_consumed: S.Number,
3617
+ directive: S.optional(__S(768, __c24, 0)),
3618
+ created_at: S.Number,
3619
+ updated_at: S.Number,
3620
+ workflow: S.String,
3621
+ parameters: __S(1794, __c56, 2),
3622
+ status: S.String,
3623
+ errors: S.optional(__S(770, __c24, 2)),
3624
+ resources: S.optional(__S(774, __c24, 6)),
3625
+ outputs: S.optional(__S(867, __c27, 3)),
3626
+ }),
3627
+ ).annotate({ identifier: "AskQuestionsJob" });
3628
+ case 5:
3629
+ return S.suspend(() =>
3630
+ S.Struct({
3631
+ data: __S(868, __c27, 4),
3632
+ }),
3633
+ ).annotate({ identifier: "AskQuestionsJobResponse" });
3634
+ }
3635
+ }
3636
+ function __c28(j: number): any {
3637
+ switch (j) {
3638
+ case 0:
3639
+ return S.suspend(() =>
3640
+ S.Struct({
3641
+ DIRECTIVE_ID: S.String.pipe(T.Label()),
3642
+ }).pipe(T.Http({ method: "GET", uri: "/robots/v1/directives/{DIRECTIVE_ID}", code: 200 })),
3643
+ ).annotate({ identifier: "GetDirectiveRequest" });
3644
+ }
3645
+ }
3646
+ function __c29(j: number): any {
3647
+ switch (j) {
3648
+ case 0:
3649
+ return S.suspend(() =>
3650
+ S.Struct({
3651
+ DIRECTIVE_ID: S.String.pipe(T.Label()),
3652
+ RUN_ID: S.String.pipe(T.Label()),
3653
+ }).pipe(
3654
+ T.Http({
3655
+ method: "GET",
3656
+ uri: "/robots/v1/directives/{DIRECTIVE_ID}/runs/{RUN_ID}",
3657
+ code: 200,
3658
+ }),
3659
+ ),
3660
+ ).annotate({ identifier: "GetDirectiveRunRequest" });
3661
+ case 1:
3662
+ return S.suspend(() =>
3663
+ S.Struct({
3664
+ data: __S(961, __c30, 1),
3665
+ }),
3666
+ ).annotate({ identifier: "DirectiveRunResponse" });
3667
+ }
3668
+ }
3669
+ function __c30(j: number): any {
3670
+ switch (j) {
3671
+ case 0:
3672
+ return S.Array(S.Unknown);
3673
+ case 1:
3674
+ return S.suspend(() =>
3675
+ S.Struct({
3676
+ id: S.String,
3677
+ directive_id: S.String,
3678
+ subject_id: S.String,
3679
+ status: S.String,
3680
+ node_states: __S(960, __c30, 0),
3681
+ started_at: S.Number,
3682
+ completed_at: S.NullOr(S.Number),
3683
+ }),
3684
+ ).annotate({ identifier: "DirectiveRun" });
3685
+ }
3686
+ }
3687
+ function __c31(j: number): any {
3688
+ switch (j) {
3689
+ case 0:
3690
+ return S.suspend(() =>
3691
+ S.Struct({
3692
+ JOB_ID: S.String.pipe(T.Label()),
3693
+ }).pipe(
3694
+ T.Http({ method: "GET", uri: "/robots/v1/jobs/edit-captions/{JOB_ID}", code: 200 }),
3695
+ ),
3696
+ ).annotate({ identifier: "GetEditCaptionsJobRequest" });
3697
+ case 1:
3698
+ return S.suspend(() =>
3699
+ S.Struct({
3700
+ total_replacement_count: S.Number,
3701
+ temporary_vtt_url: S.optional(S.String),
3702
+ track_id: S.optional(S.String),
3703
+ replaced_track_ids: S.optional(__S(0, __c0, 0)),
3704
+ }),
3705
+ ).annotate({ identifier: "EditCaptionsJobOutputs" });
3706
+ case 2:
3707
+ return S.suspend(() =>
3708
+ S.Struct({
3709
+ id: S.String,
3710
+ passthrough: S.optional(S.String),
3711
+ units_consumed: S.Number,
3712
+ directive: S.optional(__S(768, __c24, 0)),
3713
+ created_at: S.Number,
3714
+ updated_at: S.Number,
3715
+ workflow: S.String,
3716
+ parameters: __S(1925, __c60, 5),
3717
+ status: S.String,
3718
+ errors: S.optional(__S(770, __c24, 2)),
3719
+ resources: S.optional(__S(774, __c24, 6)),
3720
+ outputs: S.optional(__S(993, __c31, 1)),
3721
+ }),
3722
+ ).annotate({ identifier: "EditCaptionsJob" });
3723
+ case 3:
3724
+ return S.suspend(() =>
3725
+ S.Struct({
3726
+ data: __S(994, __c31, 2),
3727
+ }),
3728
+ ).annotate({ identifier: "EditCaptionsJobResponse" });
3729
+ }
3730
+ }
3731
+ function __c32(j: number): any {
3732
+ switch (j) {
3733
+ case 0:
3734
+ return S.suspend(() =>
3735
+ S.Struct({
3736
+ JOB_ID: S.String.pipe(T.Label()),
3737
+ }).pipe(
3738
+ T.Http({
3739
+ method: "GET",
3740
+ uri: "/robots/v1/jobs/find-best-thumbnails/{JOB_ID}",
3741
+ code: 200,
3742
+ }),
3743
+ ),
3744
+ ).annotate({ identifier: "GetFindBestThumbnailsJobRequest" });
3745
+ case 1:
3746
+ return S.suspend(() =>
3747
+ S.Struct({
3748
+ thumbnail: S.optional(__S(800, __c25, 0)),
3749
+ }),
3750
+ ).annotate({ identifier: "FindBestThumbnailsAssetUpdateOutcomes" });
3751
+ case 2:
3752
+ return S.suspend(() =>
3753
+ S.Struct({
3754
+ focus: S.Number,
3755
+ face_or_action: S.Number,
3756
+ composition: S.Number,
3757
+ contrast_color: S.Number,
3758
+ brand_fit: S.Number,
3759
+ }),
3760
+ ).annotate({ identifier: "FindBestThumbnailsCandidateSubscores" });
3761
+ case 3:
3762
+ return S.suspend(() =>
3763
+ S.Struct({
3764
+ subscores: __S(1026, __c32, 2),
3765
+ overall: S.Number,
3766
+ description: S.String,
3767
+ alt_text: S.optional(S.String),
3768
+ time: S.Number,
3769
+ }),
3770
+ ).annotate({ identifier: "FindBestThumbnailsCandidate" });
3771
+ case 4:
3772
+ return S.Array(__S(1027, __c32, 3));
3773
+ case 5:
3774
+ return S.suspend(() =>
3775
+ S.Struct({
3776
+ asset_updates: S.optional(__S(1025, __c32, 1)),
3777
+ best_thumbnails: __S(1028, __c32, 4),
3778
+ }),
3779
+ ).annotate({ identifier: "FindBestThumbnailsJobOutputs" });
3780
+ case 6:
3781
+ return S.suspend(() =>
3782
+ S.Struct({
3783
+ id: S.String,
3784
+ passthrough: S.optional(S.String),
3785
+ units_consumed: S.Number,
3786
+ directive: S.optional(__S(768, __c24, 0)),
3787
+ created_at: S.Number,
3788
+ updated_at: S.Number,
3789
+ workflow: S.String,
3790
+ parameters: __S(97, __c3, 1),
3791
+ status: S.String,
3792
+ errors: S.optional(__S(770, __c24, 2)),
3793
+ resources: S.optional(__S(774, __c24, 6)),
3794
+ outputs: S.optional(__S(1029, __c32, 5)),
3795
+ }),
3796
+ ).annotate({ identifier: "FindBestThumbnailsJob" });
3797
+ case 7:
3798
+ return S.suspend(() =>
3799
+ S.Struct({
3800
+ data: __S(1030, __c32, 6),
3801
+ }),
3802
+ ).annotate({ identifier: "FindBestThumbnailsJobResponse" });
3803
+ }
3804
+ }
3805
+ function __c33(j: number): any {
3806
+ switch (j) {
3807
+ case 0:
3808
+ return S.suspend(() =>
3809
+ S.Struct({
3810
+ JOB_ID: S.String.pipe(T.Label()),
3811
+ }).pipe(
3812
+ T.Http({ method: "GET", uri: "/robots/v1/jobs/find-key-moments/{JOB_ID}", code: 200 }),
3813
+ ),
3814
+ ).annotate({ identifier: "GetFindKeyMomentsJobRequest" });
3815
+ case 1:
3816
+ return S.suspend(() =>
3817
+ S.Struct({
3818
+ text: S.String,
3819
+ start_time: S.Number,
3820
+ end_time: S.Number,
3821
+ }),
3822
+ ).annotate({ identifier: "FindKeyMomentsCue" });
3823
+ case 2:
3824
+ return S.Array(__S(1057, __c33, 1));
3825
+ case 3:
3826
+ return S.suspend(() =>
3827
+ S.Struct({
3828
+ text: S.String,
3829
+ time: S.Number,
3830
+ }),
3831
+ ).annotate({ identifier: "FindKeyMomentsQuotableSegment" });
3832
+ case 4:
3833
+ return S.suspend(() =>
3834
+ S.Struct({
3835
+ concept: S.String,
3836
+ score: S.Number,
3837
+ rationale: S.String,
3838
+ }),
3839
+ ).annotate({ identifier: "FindKeyMomentsNotableVisualConceptsItem" });
3840
+ case 5:
3841
+ return S.Array(__S(1060, __c33, 4));
3842
+ case 6:
3843
+ return S.suspend(() =>
3844
+ S.Struct({
3845
+ cues: __S(1058, __c33, 2),
3846
+ overall_score: S.Number,
3847
+ title: S.String,
3848
+ quotable_segment: S.optional(__S(1059, __c33, 3)),
3849
+ audible_narrative: S.String,
3850
+ notable_audible_concepts: __S(0, __c0, 0),
3851
+ visual_narrative: S.optional(S.String),
3852
+ notable_visual_concepts: S.optional(__S(1061, __c33, 5)),
3853
+ start_time: S.Number,
3854
+ end_time: S.Number,
3855
+ }),
3856
+ ).annotate({ identifier: "FindKeyMoments" });
3857
+ case 7:
3858
+ return S.Array(__S(1062, __c33, 6));
3859
+ case 8:
3860
+ return S.suspend(() =>
3861
+ S.Struct({
3862
+ moments: __S(1063, __c33, 7),
3863
+ }),
3864
+ ).annotate({ identifier: "FindKeyMomentsJobOutputs" });
3865
+ case 9:
3866
+ return S.suspend(() =>
3867
+ S.Struct({
3868
+ id: S.String,
3869
+ passthrough: S.optional(S.String),
3870
+ units_consumed: S.Number,
3871
+ directive: S.optional(__S(768, __c24, 0)),
3872
+ created_at: S.Number,
3873
+ updated_at: S.Number,
3874
+ workflow: S.String,
3875
+ parameters: __S(162, __c5, 2),
3876
+ status: S.String,
3877
+ errors: S.optional(__S(770, __c24, 2)),
3878
+ resources: S.optional(__S(774, __c24, 6)),
3879
+ outputs: S.optional(__S(1064, __c33, 8)),
3880
+ }),
3881
+ ).annotate({ identifier: "FindKeyMomentsJob" });
3882
+ case 10:
3883
+ return S.suspend(() =>
3884
+ S.Struct({
3885
+ data: __S(1065, __c33, 9),
3886
+ }),
3887
+ ).annotate({ identifier: "FindKeyMomentsJobResponse" });
3888
+ }
3889
+ }
3890
+ function __c34(j: number): any {
3891
+ switch (j) {
3892
+ case 0:
3893
+ return S.suspend(() =>
3894
+ S.Struct({
3895
+ JOB_ID: S.String.pipe(T.Label()),
3896
+ }).pipe(
3897
+ T.Http({ method: "GET", uri: "/robots/v1/jobs/generate-chapters/{JOB_ID}", code: 200 }),
3898
+ ),
3899
+ ).annotate({ identifier: "GetGenerateChaptersJobRequest" });
3900
+ case 1:
3901
+ return S.suspend(() =>
3902
+ S.Struct({
3903
+ start_time: S.Number,
3904
+ title: S.String,
3905
+ }),
3906
+ ).annotate({ identifier: "GenerateChaptersJobOutputsChaptersItem" });
3907
+ case 2:
3908
+ return S.Array(__S(1089, __c34, 1));
3909
+ case 3:
3910
+ return S.suspend(() =>
3911
+ S.Struct({
3912
+ chapters: S.optional(__S(832, __c26, 0)),
3913
+ }),
3914
+ ).annotate({ identifier: "GenerateChaptersAssetUpdateOutcomes" });
3915
+ case 4:
3916
+ return S.suspend(() =>
3917
+ S.Struct({
3918
+ chapters: __S(1090, __c34, 2),
3919
+ asset_updates: S.optional(__S(1091, __c34, 3)),
3920
+ }),
3921
+ ).annotate({ identifier: "GenerateChaptersJobOutputs" });
3922
+ case 5:
3923
+ return S.suspend(() =>
3924
+ S.Struct({
3925
+ id: S.String,
3926
+ passthrough: S.optional(S.String),
3927
+ units_consumed: S.Number,
3928
+ directive: S.optional(__S(768, __c24, 0)),
3929
+ created_at: S.Number,
3930
+ updated_at: S.Number,
3931
+ workflow: S.String,
3932
+ parameters: __S(225, __c7, 1),
3933
+ status: S.String,
3934
+ errors: S.optional(__S(770, __c24, 2)),
3935
+ resources: S.optional(__S(774, __c24, 6)),
3936
+ outputs: S.optional(__S(1092, __c34, 4)),
3937
+ }),
3938
+ ).annotate({ identifier: "GenerateChaptersJob" });
3939
+ case 6:
3940
+ return S.suspend(() =>
3941
+ S.Struct({
3942
+ data: __S(1093, __c34, 5),
3943
+ }),
3944
+ ).annotate({ identifier: "GenerateChaptersJobResponse" });
3945
+ }
3946
+ }
3947
+ function __c35(j: number): any {
3948
+ switch (j) {
3949
+ case 0:
3950
+ return S.suspend(() =>
3951
+ S.Struct({
3952
+ JOB_ID: S.String.pipe(T.Label()),
3953
+ }).pipe(
3954
+ T.Http({
3955
+ method: "GET",
3956
+ uri: "/robots/v1/jobs/generate-contextual-text/{JOB_ID}",
3957
+ code: 200,
3958
+ }),
3959
+ ),
3960
+ ).annotate({ identifier: "GetGenerateContextualTextJobRequest" });
3961
+ case 1:
3962
+ return S.suspend(() =>
3963
+ S.Struct({
3964
+ key: S.String,
3965
+ content: S.String,
3966
+ }),
3967
+ ).annotate({ identifier: "GeneratedTextArtifact" });
3968
+ case 2:
3969
+ return S.Array(__S(1121, __c35, 1));
3970
+ case 3:
3971
+ return S.suspend(() =>
3972
+ S.Struct({
3973
+ key: S.String,
3974
+ artifacts: __S(1122, __c35, 2),
3975
+ }),
3976
+ ).annotate({ identifier: "GeneratedTextVariant" });
3977
+ case 4:
3978
+ return S.Array(__S(1123, __c35, 3));
3979
+ case 5:
3980
+ return S.suspend(() =>
3981
+ S.Struct({
3982
+ variants: __S(1124, __c35, 4),
3983
+ }),
3984
+ ).annotate({ identifier: "GenerateContextualTextJobOutputs" });
3985
+ case 6:
3986
+ return S.suspend(() =>
3987
+ S.Struct({
3988
+ id: S.String,
3989
+ passthrough: S.optional(S.String),
3990
+ units_consumed: S.Number,
3991
+ directive: S.optional(__S(768, __c24, 0)),
3992
+ created_at: S.Number,
3993
+ updated_at: S.Number,
3994
+ workflow: S.String,
3995
+ parameters: __S(293, __c9, 5),
3996
+ status: S.String,
3997
+ errors: S.optional(__S(770, __c24, 2)),
3998
+ resources: S.optional(__S(774, __c24, 6)),
3999
+ outputs: S.optional(__S(1125, __c35, 5)),
4000
+ }),
4001
+ ).annotate({ identifier: "GenerateContextualTextJob" });
4002
+ case 7:
4003
+ return S.suspend(() =>
4004
+ S.Struct({
4005
+ data: __S(1126, __c35, 6),
4006
+ }),
4007
+ ).annotate({ identifier: "GenerateContextualTextJobResponse" });
4008
+ }
4009
+ }
4010
+ function __c36(j: number): any {
4011
+ switch (j) {
4012
+ case 0:
4013
+ return S.suspend(() =>
4014
+ S.Struct({
4015
+ JOB_ID: S.String.pipe(T.Label()),
4016
+ }).pipe(
4017
+ T.Http({
4018
+ method: "GET",
4019
+ uri: "/robots/v1/jobs/generate-engagement-insights/{JOB_ID}",
4020
+ code: 200,
4021
+ }),
4022
+ ),
4023
+ ).annotate({ identifier: "GetGenerateEngagementInsightsJobRequest" });
4024
+ case 1:
4025
+ return S.suspend(() =>
4026
+ S.Struct({
4027
+ engagement_score: S.Number,
4028
+ insight: S.String,
4029
+ start_time: S.Number,
4030
+ end_time: S.Number,
4031
+ }),
4032
+ ).annotate({ identifier: "GenerateEngagementInsightsMomentInsight" });
4033
+ case 2:
4034
+ return S.Array(__S(1153, __c36, 1));
4035
+ case 3:
4036
+ return S.suspend(() =>
4037
+ S.Struct({
4038
+ summary: S.String,
4039
+ trends: __S(0, __c0, 0),
4040
+ }),
4041
+ ).annotate({ identifier: "GenerateEngagementInsightsJobOutputsOverallInsight" });
4042
+ case 4:
4043
+ return S.suspend(() =>
4044
+ S.Struct({
4045
+ moment_insights: __S(1154, __c36, 2),
4046
+ overall_insight: __S(1155, __c36, 3),
4047
+ }),
4048
+ ).annotate({ identifier: "GenerateEngagementInsightsJobOutputs" });
4049
+ case 5:
4050
+ return S.suspend(() =>
4051
+ S.Struct({
4052
+ id: S.String,
4053
+ passthrough: S.optional(S.String),
4054
+ units_consumed: S.Number,
4055
+ directive: S.optional(__S(768, __c24, 0)),
4056
+ created_at: S.Number,
4057
+ updated_at: S.Number,
4058
+ workflow: S.String,
4059
+ parameters: __S(352, __c11, 0),
4060
+ status: S.String,
4061
+ errors: S.optional(__S(770, __c24, 2)),
4062
+ resources: S.optional(__S(774, __c24, 6)),
4063
+ outputs: S.optional(__S(1156, __c36, 4)),
4064
+ }),
4065
+ ).annotate({ identifier: "GenerateEngagementInsightsJob" });
4066
+ case 6:
4067
+ return S.suspend(() =>
4068
+ S.Struct({
4069
+ data: __S(1157, __c36, 5),
4070
+ }),
4071
+ ).annotate({ identifier: "GenerateEngagementInsightsJobResponse" });
4072
+ }
4073
+ }
4074
+ function __c37(j: number): any {
4075
+ switch (j) {
4076
+ case 0:
4077
+ return S.suspend(() =>
4078
+ S.Struct({
4079
+ JOB_ID: S.String.pipe(T.Label()),
4080
+ }).pipe(
4081
+ T.Http({
4082
+ method: "GET",
4083
+ uri: "/robots/v1/jobs/generate-premium-captions/{JOB_ID}",
4084
+ code: 200,
4085
+ }),
4086
+ ),
4087
+ ).annotate({ identifier: "GetGeneratePremiumCaptionsJobRequest" });
4088
+ case 1:
4089
+ return S.suspend(() =>
4090
+ S.Struct({
4091
+ track_id: S.optional(S.String),
4092
+ language_code: S.String,
4093
+ auto_language_confidence: S.optional(S.Number),
4094
+ temporary_srt_url: S.optional(S.String),
4095
+ temporary_words_url: S.optional(S.String),
4096
+ detected_language_code: S.optional(S.String),
4097
+ replaced_track_ids: S.optional(__S(0, __c0, 0)),
4098
+ }),
4099
+ ).annotate({ identifier: "GeneratePremiumCaptionsJobOutputs" });
4100
+ case 2:
4101
+ return S.suspend(() =>
4102
+ S.Struct({
4103
+ id: S.String,
4104
+ passthrough: S.optional(S.String),
4105
+ units_consumed: S.Number,
4106
+ directive: S.optional(__S(768, __c24, 0)),
4107
+ created_at: S.Number,
4108
+ updated_at: S.Number,
4109
+ workflow: S.String,
4110
+ parameters: __S(416, __c13, 0),
4111
+ status: S.String,
4112
+ errors: S.optional(__S(770, __c24, 2)),
4113
+ resources: S.optional(__S(774, __c24, 6)),
4114
+ outputs: S.optional(__S(1185, __c37, 1)),
4115
+ }),
4116
+ ).annotate({ identifier: "GeneratePremiumCaptionsJob" });
4117
+ case 3:
4118
+ return S.suspend(() =>
4119
+ S.Struct({
4120
+ data: __S(1186, __c37, 2),
4121
+ }),
4122
+ ).annotate({ identifier: "GeneratePremiumCaptionsJobResponse" });
4123
+ }
4124
+ }
4125
+ function __c38(j: number): any {
4126
+ switch (j) {
4127
+ case 0:
4128
+ return S.suspend(() =>
4129
+ S.Struct({
4130
+ JOB_ID: S.String.pipe(T.Label()),
4131
+ }).pipe(T.Http({ method: "GET", uri: "/robots/v1/jobs/moderate/{JOB_ID}", code: 200 })),
4132
+ ).annotate({ identifier: "GetModerateJobRequest" });
4133
+ case 1:
4134
+ return S.suspend(() =>
4135
+ S.Struct({
4136
+ time: S.Number,
4137
+ sexual: S.Number,
4138
+ violence: S.Number,
4139
+ }),
4140
+ ).annotate({ identifier: "ModerateJobOutputsThumbnailScoresItem" });
4141
+ case 2:
4142
+ return S.Array(__S(1217, __c38, 1));
4143
+ case 3:
4144
+ return S.suspend(() =>
4145
+ S.Struct({
4146
+ sexual: S.Number,
4147
+ violence: S.Number,
4148
+ }),
4149
+ ).annotate({ identifier: "ModerateJobOutputsMaxScores" });
4150
+ case 4:
4151
+ return S.suspend(() =>
4152
+ S.Struct({
4153
+ action: S.String,
4154
+ deleted_playback_ids: __S(0, __c0, 0),
4155
+ }),
4156
+ ).annotate({ identifier: "ModerateJobOutputsFlaggedAction" });
4157
+ case 5:
4158
+ return S.suspend(() =>
4159
+ S.Struct({
4160
+ start_time: S.Number,
4161
+ end_time: S.Number,
4162
+ sexual: S.Number,
4163
+ violence: S.Number,
4164
+ }),
4165
+ ).annotate({ identifier: "ModerateJobOutputsTranscriptScoresItem" });
4166
+ case 6:
4167
+ return S.Array(__S(1221, __c38, 5));
4168
+ case 7:
4169
+ return S.suspend(() =>
4170
+ S.Struct({
4171
+ status: S.String,
4172
+ skip_reason: S.optional(S.String),
4173
+ skip_message: S.optional(S.String),
4174
+ }),
4175
+ ).annotate({ identifier: "ModerateJobOutputsThumbnailModeration" });
4176
+ case 8:
4177
+ return S.suspend(() =>
4178
+ S.Struct({
4179
+ thumbnail_scores: __S(1218, __c38, 2),
4180
+ max_scores: __S(1219, __c38, 3),
4181
+ exceeds_threshold: S.Boolean,
4182
+ flagged_action: S.optional(__S(1220, __c38, 4)),
4183
+ transcript_scores: __S(1222, __c38, 6),
4184
+ thumbnail_moderation: __S(1223, __c38, 7),
4185
+ transcript_moderation: __S(1223, __c38, 7),
4186
+ }),
4187
+ ).annotate({ identifier: "ModerateJobOutputs" });
4188
+ case 9:
4189
+ return S.suspend(() =>
4190
+ S.Struct({
4191
+ id: S.String,
4192
+ passthrough: S.optional(S.String),
4193
+ units_consumed: S.Number,
4194
+ directive: S.optional(__S(768, __c24, 0)),
4195
+ created_at: S.Number,
4196
+ updated_at: S.Number,
4197
+ workflow: S.String,
4198
+ parameters: __S(482, __c15, 2),
4199
+ status: S.String,
4200
+ errors: S.optional(__S(770, __c24, 2)),
4201
+ resources: S.optional(__S(774, __c24, 6)),
4202
+ outputs: S.optional(__S(1224, __c38, 8)),
4203
+ }),
4204
+ ).annotate({ identifier: "ModerateJob" });
4205
+ case 10:
4206
+ return S.suspend(() =>
4207
+ S.Struct({
4208
+ data: __S(1225, __c38, 9),
4209
+ }),
4210
+ ).annotate({ identifier: "ModerateJobResponse" });
4211
+ }
4212
+ }
4213
+ function __c39(j: number): any {
4214
+ switch (j) {
4215
+ case 0:
4216
+ return S.suspend(() =>
4217
+ S.Struct({
4218
+ JOB_ID: S.String.pipe(T.Label()),
4219
+ }).pipe(T.Http({ method: "GET", uri: "/robots/v1/jobs/summarize/{JOB_ID}", code: 200 })),
4220
+ ).annotate({ identifier: "GetSummarizeJobRequest" });
4221
+ case 1:
4222
+ return S.suspend(() =>
4223
+ S.Struct({
4224
+ title: S.optional(__S(800, __c25, 0)),
4225
+ }),
4226
+ ).annotate({ identifier: "SummarizeAssetUpdateOutcomes" });
4227
+ case 2:
4228
+ return S.suspend(() =>
4229
+ S.Struct({
4230
+ title: S.String,
4231
+ description: S.String,
4232
+ tags: __S(0, __c0, 0),
4233
+ asset_updates: S.optional(__S(1249, __c39, 1)),
4234
+ }),
4235
+ ).annotate({ identifier: "SummarizeJobOutputs" });
4236
+ case 3:
4237
+ return S.suspend(() =>
4238
+ S.Struct({
4239
+ id: S.String,
4240
+ passthrough: S.optional(S.String),
4241
+ units_consumed: S.Number,
4242
+ directive: S.optional(__S(768, __c24, 0)),
4243
+ created_at: S.Number,
4244
+ updated_at: S.Number,
4245
+ workflow: S.String,
4246
+ parameters: __S(545, __c17, 1),
4247
+ status: S.String,
4248
+ errors: S.optional(__S(770, __c24, 2)),
4249
+ resources: S.optional(__S(774, __c24, 6)),
4250
+ outputs: S.optional(__S(1250, __c39, 2)),
4251
+ }),
4252
+ ).annotate({ identifier: "SummarizeJob" });
4253
+ case 4:
4254
+ return S.suspend(() =>
4255
+ S.Struct({
4256
+ data: __S(1251, __c39, 3),
4257
+ }),
4258
+ ).annotate({ identifier: "SummarizeJobResponse" });
4259
+ }
4260
+ }
4261
+ function __c40(j: number): any {
4262
+ switch (j) {
4263
+ case 0:
4264
+ return S.suspend(() =>
4265
+ S.Struct({
4266
+ JOB_ID: S.String.pipe(T.Label()),
4267
+ }).pipe(
4268
+ T.Http({ method: "GET", uri: "/robots/v1/jobs/translate-audio/{JOB_ID}", code: 200 }),
4269
+ ),
4270
+ ).annotate({ identifier: "GetTranslateAudioJobRequest" });
4271
+ case 1:
4272
+ return S.suspend(() =>
4273
+ S.Struct({
4274
+ temporary_audio_url: S.optional(S.String),
4275
+ temporary_vtt_url: S.optional(S.String),
4276
+ caption_track_id: S.optional(S.String),
4277
+ replaced_caption_track_ids: S.optional(S.Unknown),
4278
+ track_id: S.optional(S.String),
4279
+ replaced_track_ids: S.optional(__S(0, __c0, 0)),
4280
+ }),
4281
+ ).annotate({ identifier: "TranslateAudioJobOutputs" });
4282
+ case 2:
4283
+ return S.suspend(() =>
4284
+ S.Struct({
4285
+ id: S.String,
4286
+ passthrough: S.optional(S.String),
4287
+ units_consumed: S.Number,
4288
+ directive: S.optional(__S(768, __c24, 0)),
4289
+ created_at: S.Number,
4290
+ updated_at: S.Number,
4291
+ workflow: S.String,
4292
+ parameters: __S(609, __c19, 1),
4293
+ status: S.String,
4294
+ errors: S.optional(__S(770, __c24, 2)),
4295
+ resources: S.optional(__S(774, __c24, 6)),
4296
+ outputs: S.optional(__S(1281, __c40, 1)),
4297
+ }),
4298
+ ).annotate({ identifier: "TranslateAudioJob" });
4299
+ case 3:
4300
+ return S.suspend(() =>
4301
+ S.Struct({
4302
+ data: __S(1282, __c40, 2),
4303
+ }),
4304
+ ).annotate({ identifier: "TranslateAudioJobResponse" });
4305
+ }
4306
+ }
4307
+ function __c41(j: number): any {
4308
+ switch (j) {
4309
+ case 0:
4310
+ return S.suspend(() =>
4311
+ S.Struct({
4312
+ JOB_ID: S.String.pipe(T.Label()),
4313
+ }).pipe(
4314
+ T.Http({ method: "GET", uri: "/robots/v1/jobs/translate-captions/{JOB_ID}", code: 200 }),
4315
+ ),
4316
+ ).annotate({ identifier: "GetTranslateCaptionsJobRequest" });
4317
+ case 1:
4318
+ return S.suspend(() =>
4319
+ S.Struct({
4320
+ temporary_vtt_url: S.optional(S.String),
4321
+ never_translate_terms_preserved: S.optional(S.Boolean),
4322
+ track_id: S.optional(S.String),
4323
+ replaced_track_ids: S.optional(__S(0, __c0, 0)),
4324
+ }),
4325
+ ).annotate({ identifier: "TranslateCaptionsJobOutputs" });
4326
+ case 2:
4327
+ return S.suspend(() =>
4328
+ S.Struct({
4329
+ id: S.String,
4330
+ passthrough: S.optional(S.String),
4331
+ units_consumed: S.Number,
4332
+ directive: S.optional(__S(768, __c24, 0)),
4333
+ created_at: S.Number,
4334
+ updated_at: S.Number,
4335
+ workflow: S.String,
4336
+ parameters: __S(672, __c21, 0),
4337
+ status: S.String,
4338
+ errors: S.optional(__S(770, __c24, 2)),
4339
+ resources: S.optional(__S(774, __c24, 6)),
4340
+ outputs: S.optional(__S(1313, __c41, 1)),
4341
+ }),
4342
+ ).annotate({ identifier: "TranslateCaptionsJob" });
4343
+ case 3:
4344
+ return S.suspend(() =>
4345
+ S.Struct({
4346
+ data: __S(1314, __c41, 2),
4347
+ }),
4348
+ ).annotate({ identifier: "TranslateCaptionsJobResponse" });
4349
+ }
4350
+ }
4351
+ function __c42(j: number): any {
4352
+ switch (j) {
4353
+ case 0:
4354
+ return S.suspend(() =>
4355
+ S.Struct({
4356
+ DIRECTIVE_ID: S.String.pipe(T.Label()),
4357
+ limit: S.optional(S.Number.pipe(T.Query())),
4358
+ page: S.optional(S.Number.pipe(T.Query())),
4359
+ }).pipe(
4360
+ T.Http({ method: "GET", uri: "/robots/v1/directives/{DIRECTIVE_ID}/runs", code: 200 }),
4361
+ ),
4362
+ ).annotate({ identifier: "ListDirectiveRunsRequest" });
4363
+ case 1:
4364
+ return S.Array(__S(961, __c30, 1));
4365
+ case 2:
4366
+ return S.suspend(() =>
4367
+ S.Struct({
4368
+ data: __S(1345, __c42, 1),
4369
+ total_row_count: S.Number,
4370
+ }),
4371
+ ).annotate({ identifier: "DirectiveRunListResponse" });
4372
+ }
4373
+ }
4374
+ function __c43(j: number): any {
4375
+ switch (j) {
4376
+ case 0:
4377
+ return S.suspend(() =>
4378
+ S.Struct({
4379
+ limit: S.optional(S.Number.pipe(T.Query())),
4380
+ page: S.optional(S.Number.pipe(T.Query())),
4381
+ }).pipe(T.Http({ method: "GET", uri: "/robots/v1/directives", code: 200 })),
4382
+ ).annotate({ identifier: "ListDirectivesRequest" });
4383
+ case 1:
4384
+ return S.suspend(() =>
4385
+ S.Struct({
4386
+ id: S.String,
4387
+ name: S.String,
4388
+ created_at: S.Number,
4389
+ updated_at: S.Number,
4390
+ _links: __S(1537, __c48, 1),
4391
+ }),
4392
+ ).annotate({ identifier: "DirectiveSummary" });
4393
+ case 2:
4394
+ return S.Array(__S(1377, __c43, 1));
4395
+ case 3:
4396
+ return S.suspend(() =>
4397
+ S.Struct({
4398
+ data: __S(1378, __c43, 2),
4399
+ total_row_count: S.Number,
4400
+ }),
4401
+ ).annotate({ identifier: "DirectiveListResponse" });
4402
+ }
4403
+ }
4404
+ function __c44(j: number): any {
4405
+ switch (j) {
4406
+ case 0:
4407
+ return S.suspend(() =>
4408
+ S.Struct({
4409
+ workflow: S.optional(S.Unknown.pipe(T.Query())),
4410
+ status: S.optional(S.Unknown.pipe(T.Query())),
4411
+ asset_id: S.optional(S.String.pipe(T.Query())),
4412
+ limit: S.optional(S.Number.pipe(T.Query())),
4413
+ page: S.optional(S.Number.pipe(T.Query())),
4414
+ }).pipe(T.Http({ method: "GET", uri: "/robots/v1/jobs", code: 200 })),
4415
+ ).annotate({ identifier: "ListJobsRequest" });
4416
+ case 1:
4417
+ return S.Array(__S(1504, __c47, 0));
4418
+ case 2:
4419
+ return S.suspend(() =>
4420
+ S.Struct({
4421
+ data: __S(1409, __c44, 1),
4422
+ total_row_count: S.Number,
4423
+ }),
4424
+ ).annotate({ identifier: "ListJobsResponse" });
4425
+ }
4426
+ }
4427
+ function __c45(j: number): any {
4428
+ switch (j) {
4429
+ case 0:
4430
+ return S.suspend(() =>
4431
+ S.Struct({
4432
+ DIRECTIVE_ID: S.String.pipe(T.Label()),
4433
+ asset_id: S.String,
4434
+ }).pipe(
4435
+ T.Http({ method: "POST", uri: "/robots/v1/directives/{DIRECTIVE_ID}/runs", code: 200 }),
4436
+ ),
4437
+ ).annotate({ identifier: "RunDirectiveRequest" });
4438
+ }
4439
+ }
4440
+ function __c46(j: number): any {
4441
+ switch (j) {
4442
+ case 0:
4443
+ return S.suspend(() =>
4444
+ S.Struct({
4445
+ JOB_ID: S.String.pipe(T.Label()),
4446
+ }).pipe(T.Http({ method: "POST", uri: "/robots/v1/jobs/{JOB_ID}/cancel", code: 200 })),
4447
+ ).annotate({ identifier: "CancelJobRequest" });
4448
+ case 1:
4449
+ return S.suspend(() =>
4450
+ S.Struct({
4451
+ data: __S(1504, __c47, 0),
4452
+ }),
4453
+ ).annotate({ identifier: "CancelJobResponse" });
4454
+ }
4455
+ }
4456
+ function __c47(j: number): any {
4457
+ switch (j) {
4458
+ case 0:
4459
+ return S.suspend(() =>
4460
+ S.Struct({
4461
+ id: S.String,
4462
+ workflow: S.Unknown,
4463
+ status: S.String,
4464
+ created_at: S.Number,
4465
+ updated_at: S.Number,
4466
+ _links: __S(1537, __c48, 1),
4467
+ }),
4468
+ ).annotate({ identifier: "JobSummary" });
4469
+ }
4470
+ }
4471
+ function __c48(j: number): any {
4472
+ switch (j) {
4473
+ case 0:
4474
+ return S.suspend(() =>
4475
+ S.Struct({
4476
+ href: S.String,
4477
+ }),
4478
+ ).annotate({ identifier: "JobSummaryLinksSelf" });
4479
+ case 1:
4480
+ return S.suspend(() =>
4481
+ S.Struct({
4482
+ self: __S(1536, __c48, 0),
4483
+ }),
4484
+ ).annotate({ identifier: "JobSummaryLinks" });
4485
+ }
4486
+ }
4487
+ function __c49(j: number): any {
4488
+ switch (j) {
4489
+ case 0:
4490
+ return S.suspend(() =>
4491
+ S.Struct({
4492
+ passthrough: S.optional(S.String),
4493
+ parameters: __S(1633, __c51, 1),
4494
+ }).pipe(T.Http({ method: "POST", uri: "/robots/v1/jobs/analyze-structure", code: 200 })),
4495
+ ).annotate({ identifier: "CreateAnalyzeStructureJobRequest" });
4496
+ }
4497
+ }
4498
+ function __c50(j: number): any {
4499
+ switch (j) {
4500
+ case 0:
4501
+ return S.suspend(() =>
4502
+ S.Struct({
4503
+ label: S.String,
4504
+ description: S.optional(S.String),
4505
+ aliases: S.optional(__S(0, __c0, 0)),
4506
+ }),
4507
+ ).annotate({ identifier: "OutputSteeringTaxonomyValue" });
4508
+ case 1:
4509
+ return S.Array(__S(1600, __c50, 0));
4510
+ case 2:
4511
+ return S.suspend(() =>
4512
+ S.Struct({
4513
+ name: S.optional(S.String),
4514
+ values: __S(1601, __c50, 1),
4515
+ allow_other: S.Boolean,
4516
+ }),
4517
+ ).annotate({ identifier: "OutputSteeringTaxonomy" });
4518
+ }
4519
+ }
4520
+ function __c51(j: number): any {
4521
+ switch (j) {
4522
+ case 0:
4523
+ return S.suspend(() =>
4524
+ S.Struct({
4525
+ scope: S.optional(__S(1664, __c52, 0)),
4526
+ audience: S.optional(S.String),
4527
+ brand_terms: S.optional(__S(0, __c0, 0)),
4528
+ topic_taxonomy: S.optional(__S(1602, __c50, 2)),
4529
+ granularity: S.optional(S.String),
4530
+ }),
4531
+ ).annotate({ identifier: "AnalyzeStructureOutputSteering" });
4532
+ case 1:
4533
+ return S.suspend(() =>
4534
+ S.Struct({
4535
+ asset_id: S.String,
4536
+ language_code: S.optional(S.String),
4537
+ output_language_code: S.optional(S.String),
4538
+ output_steering: S.optional(__S(1632, __c51, 0)),
4539
+ update_asset_meta: S.optional(S.Boolean),
4540
+ update_asset_chapters: S.optional(S.Boolean),
4541
+ }),
4542
+ ).annotate({ identifier: "AnalyzeStructureJobParameters" });
4543
+ }
4544
+ }
4545
+ function __c52(j: number): any {
4546
+ switch (j) {
4547
+ case 0:
4548
+ return S.suspend(() =>
4549
+ S.Struct({
4550
+ start_time: S.optional(S.Number),
4551
+ end_time: S.optional(S.Number),
4552
+ }),
4553
+ ).annotate({ identifier: "OutputSteeringScope" });
4554
+ }
4555
+ }
4556
+ function __c53(j: number): any {
4557
+ switch (j) {
4558
+ case 0:
4559
+ return S.suspend(() => S.Struct({})).annotate({
4560
+ identifier: "CreateAnalyzeStructureJobResponse",
4561
+ });
4562
+ }
4563
+ }
4564
+ function __c54(j: number): any {
4565
+ switch (j) {
4566
+ case 0:
4567
+ return S.suspend(() =>
4568
+ S.Struct({
4569
+ passthrough: S.optional(S.String),
4570
+ parameters: __S(1794, __c56, 2),
4571
+ }).pipe(T.Http({ method: "POST", uri: "/robots/v1/jobs/ask-questions", code: 200 })),
4572
+ ).annotate({ identifier: "CreateAskQuestionsJobRequest" });
4573
+ }
4574
+ }
4575
+ function __c55(j: number): any {
4576
+ switch (j) {
4577
+ case 0:
4578
+ return S.suspend(() =>
4579
+ S.Struct({
4580
+ scope: S.optional(__S(1664, __c52, 0)),
4581
+ }),
4582
+ ).annotate({ identifier: "AskQuestionsOutputSteering" });
4583
+ }
4584
+ }
4585
+ function __c56(j: number): any {
4586
+ switch (j) {
4587
+ case 0:
4588
+ return S.suspend(() =>
4589
+ S.Struct({
4590
+ question: S.String,
4591
+ answer_options: S.optional(__S(0, __c0, 0)),
4592
+ free_form_reply: S.optional(S.Boolean),
4593
+ }),
4594
+ ).annotate({ identifier: "AskQuestionsJobParametersQuestionsItem" });
4595
+ case 1:
4596
+ return S.Array(__S(1792, __c56, 0));
4597
+ case 2:
4598
+ return S.suspend(() =>
4599
+ S.Struct({
4600
+ asset_id: S.String,
4601
+ questions: __S(1793, __c56, 1),
4602
+ language_code: S.optional(S.String),
4603
+ max_free_form_answer_length: S.optional(S.Number),
4604
+ output_steering: S.optional(__S(1760, __c55, 0)),
4605
+ }),
4606
+ ).annotate({ identifier: "AskQuestionsJobParameters" });
4607
+ }
4608
+ }
4609
+ function __c57(j: number): any {
4610
+ switch (j) {
4611
+ case 0:
4612
+ return S.suspend(() =>
4613
+ S.Struct({
4614
+ name: S.String,
4615
+ subject: __S(1856, __c58, 0),
4616
+ resources: S.optional(S.Unknown),
4617
+ bindings: __S(1857, __c58, 1),
4618
+ }).pipe(T.Http({ method: "POST", uri: "/robots/v1/directives", code: 200 })),
4619
+ ).annotate({ identifier: "CreateDirectiveRequest" });
4620
+ }
4621
+ }
4622
+ function __c58(j: number): any {
4623
+ switch (j) {
4624
+ case 0:
4625
+ return S.suspend(() =>
4626
+ S.Struct({
4627
+ type: S.String,
4628
+ }),
4629
+ ).annotate({ identifier: "DirectiveSubject" });
4630
+ case 1:
4631
+ return S.Array(S.Unknown);
4632
+ case 2:
4633
+ return S.suspend(() =>
4634
+ S.Struct({
4635
+ name: S.String,
4636
+ subject: __S(1856, __c58, 0),
4637
+ resources: S.Unknown,
4638
+ bindings: __S(1857, __c58, 1),
4639
+ id: S.String,
4640
+ _links: __S(1537, __c48, 1),
4641
+ created_at: S.Number,
4642
+ updated_at: S.Number,
4643
+ }),
4644
+ ).annotate({ identifier: "Directive" });
4645
+ case 3:
4646
+ return S.suspend(() =>
4647
+ S.Struct({
4648
+ data: __S(1858, __c58, 2),
4649
+ }),
4650
+ ).annotate({ identifier: "DirectiveResponse" });
4651
+ }
4652
+ }
4653
+ function __c59(j: number): any {
4654
+ switch (j) {
4655
+ case 0:
4656
+ return S.suspend(() =>
4657
+ S.Struct({
4658
+ passthrough: S.optional(S.String),
4659
+ parameters: __S(1925, __c60, 5),
4660
+ }).pipe(T.Http({ method: "POST", uri: "/robots/v1/jobs/edit-captions", code: 200 })),
4661
+ ).annotate({ identifier: "CreateEditCaptionsJobRequest" });
4662
+ }
4663
+ }
4664
+ function __c60(j: number): any {
4665
+ switch (j) {
4666
+ case 0:
4667
+ return S.suspend(() =>
4668
+ S.Struct({
4669
+ detection_method: S.optional(S.String),
4670
+ mode: S.optional(S.String),
4671
+ always_censor: S.optional(__S(0, __c0, 0)),
4672
+ never_censor: S.optional(__S(0, __c0, 0)),
4673
+ }),
4674
+ ).annotate({ identifier: "EditCaptionsDirectiveBindingParametersAutoCensorProfanity" });
4675
+ case 1:
4676
+ return S.suspend(() =>
4677
+ S.Struct({
4678
+ find: S.String,
4679
+ replace: S.String,
4680
+ case_sensitive: S.optional(S.Boolean),
4681
+ }),
4682
+ ).annotate({ identifier: "EditCaptionsDirectiveBindingParametersReplacementsItem" });
4683
+ case 2:
4684
+ return S.Array(__S(1921, __c60, 1));
4685
+ case 3:
4686
+ return S.suspend(() =>
4687
+ S.Struct({
4688
+ find: S.String,
4689
+ replace: S.String,
4690
+ }),
4691
+ ).annotate({ identifier: "EditCaptionsSpeakerReplacement" });
4692
+ case 4:
4693
+ return S.Array(__S(1923, __c60, 3));
4694
+ case 5:
4695
+ return S.suspend(() =>
4696
+ S.Struct({
4697
+ asset_id: S.String,
4698
+ track_id: S.String,
4699
+ auto_censor_profanity: S.optional(__S(1920, __c60, 0)),
4700
+ replacements: S.optional(__S(1922, __c60, 2)),
4701
+ speaker_replacements: S.optional(__S(1924, __c60, 4)),
4702
+ upload_to_mux: S.optional(S.Boolean),
4703
+ replace_existing_tracks: S.optional(S.String),
4704
+ track_name: S.optional(S.String),
4705
+ }),
4706
+ ).annotate({ identifier: "EditCaptionsJobParameters" });
4707
+ }
4708
+ }
4709
+ // Schema table: entry i is schema j of builder f, made on first reach.
4710
+ function __S(i: number, f: (j: number) => unknown, j: number): any {
4711
+ return (__s[i] ??= __L.at(f, j));
4712
+ }