@aviaryhq/cloudglue-js 0.4.1 → 0.4.2
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.
|
@@ -25,6 +25,8 @@ type ShotConfig = Partial<{
|
|
|
25
25
|
}>;
|
|
26
26
|
type NarrativeConfig = Partial<{
|
|
27
27
|
prompt: string;
|
|
28
|
+
strategy: "direct" | "long" | "balanced";
|
|
29
|
+
number_of_chapters: number;
|
|
28
30
|
}>;
|
|
29
31
|
type Segment = {
|
|
30
32
|
start_time: number;
|
|
@@ -68,8 +70,12 @@ export declare const schemas: {
|
|
|
68
70
|
}>>;
|
|
69
71
|
NarrativeConfig: z.ZodType<Partial<{
|
|
70
72
|
prompt: string;
|
|
73
|
+
strategy: "direct" | "long" | "balanced";
|
|
74
|
+
number_of_chapters: number;
|
|
71
75
|
}>, z.ZodTypeDef, Partial<{
|
|
72
76
|
prompt: string;
|
|
77
|
+
strategy: "direct" | "long" | "balanced";
|
|
78
|
+
number_of_chapters: number;
|
|
73
79
|
}>>;
|
|
74
80
|
NewSegments: z.ZodType<NewSegments, z.ZodTypeDef, NewSegments>;
|
|
75
81
|
Segment: z.ZodType<Segment, z.ZodTypeDef, Segment>;
|
|
@@ -81,7 +87,7 @@ export declare const SegmentsApi: import("@zodios/core").ZodiosInstance<[{
|
|
|
81
87
|
method: "post";
|
|
82
88
|
path: "/segments";
|
|
83
89
|
alias: "createSegments";
|
|
84
|
-
description: "Create intelligent video segments based on shot detection or narrative analysis.\n\n**⚠️ Note: YouTube URLs are supported for narrative-based segmentation only.** Shot-based segmentation requires direct video file access. Use Cloudglue Files, HTTP URLs, or files from data connectors for shot-based segmentation.";
|
|
90
|
+
description: "Create intelligent video segments based on shot detection or narrative analysis.\n\n**⚠️ Note: YouTube URLs are supported for narrative-based segmentation only.** Shot-based segmentation requires direct video file access. Use Cloudglue Files, HTTP URLs, or files from data connectors for shot-based segmentation.\n\n**Narrative Segmentation Strategies:**\n\n• **balanced** (default): Uses multimodal describe job for comprehensive analysis.\n Recommended for most videos. Supports YouTube URLs.\n\n• **direct**: Directly analyzes the full video URL with AI.\n Ideal for videos less than 10 minutes long. Provides finer grain control and expressibility with direct integration of your prompt with the Video AI model.\n\n• **long**: Optimized for longer videos beyond 10 minutes.\n Provides finer grain control and expressibility with direct integration of your prompt with the Video AI model.\n\n**YouTube URLs**: Automatically use the 'balanced' strategy. The strategy field is ignored for YouTube URLs, and other strategies will be rejected with an error.";
|
|
85
91
|
requestFormat: "json";
|
|
86
92
|
parameters: [{
|
|
87
93
|
name: "body";
|
|
@@ -265,7 +271,7 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
|
|
|
265
271
|
method: "post";
|
|
266
272
|
path: "/segments";
|
|
267
273
|
alias: "createSegments";
|
|
268
|
-
description: "Create intelligent video segments based on shot detection or narrative analysis.\n\n**⚠️ Note: YouTube URLs are supported for narrative-based segmentation only.** Shot-based segmentation requires direct video file access. Use Cloudglue Files, HTTP URLs, or files from data connectors for shot-based segmentation.";
|
|
274
|
+
description: "Create intelligent video segments based on shot detection or narrative analysis.\n\n**⚠️ Note: YouTube URLs are supported for narrative-based segmentation only.** Shot-based segmentation requires direct video file access. Use Cloudglue Files, HTTP URLs, or files from data connectors for shot-based segmentation.\n\n**Narrative Segmentation Strategies:**\n\n• **balanced** (default): Uses multimodal describe job for comprehensive analysis.\n Recommended for most videos. Supports YouTube URLs.\n\n• **direct**: Directly analyzes the full video URL with AI.\n Ideal for videos less than 10 minutes long. Provides finer grain control and expressibility with direct integration of your prompt with the Video AI model.\n\n• **long**: Optimized for longer videos beyond 10 minutes.\n Provides finer grain control and expressibility with direct integration of your prompt with the Video AI model.\n\n**YouTube URLs**: Automatically use the 'balanced' strategy. The strategy field is ignored for YouTube URLs, and other strategies will be rejected with an error.";
|
|
269
275
|
requestFormat: "json";
|
|
270
276
|
parameters: [{
|
|
271
277
|
name: "body";
|
|
@@ -14,7 +14,11 @@ const ShotConfig = zod_1.z
|
|
|
14
14
|
.strict()
|
|
15
15
|
.passthrough();
|
|
16
16
|
const NarrativeConfig = zod_1.z
|
|
17
|
-
.object({
|
|
17
|
+
.object({
|
|
18
|
+
prompt: zod_1.z.string(),
|
|
19
|
+
strategy: zod_1.z.enum(["direct", "long", "balanced"]).default("balanced"),
|
|
20
|
+
number_of_chapters: zod_1.z.number().int().gte(1),
|
|
21
|
+
})
|
|
18
22
|
.partial()
|
|
19
23
|
.strict()
|
|
20
24
|
.passthrough();
|
|
@@ -90,7 +94,20 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
90
94
|
alias: "createSegments",
|
|
91
95
|
description: `Create intelligent video segments based on shot detection or narrative analysis.
|
|
92
96
|
|
|
93
|
-
**⚠️ Note: YouTube URLs are supported for narrative-based segmentation only.** Shot-based segmentation requires direct video file access. Use Cloudglue Files, HTTP URLs, or files from data connectors for shot-based segmentation
|
|
97
|
+
**⚠️ Note: YouTube URLs are supported for narrative-based segmentation only.** Shot-based segmentation requires direct video file access. Use Cloudglue Files, HTTP URLs, or files from data connectors for shot-based segmentation.
|
|
98
|
+
|
|
99
|
+
**Narrative Segmentation Strategies:**
|
|
100
|
+
|
|
101
|
+
• **balanced** (default): Uses multimodal describe job for comprehensive analysis.
|
|
102
|
+
Recommended for most videos. Supports YouTube URLs.
|
|
103
|
+
|
|
104
|
+
• **direct**: Directly analyzes the full video URL with AI.
|
|
105
|
+
Ideal for videos less than 10 minutes long. Provides finer grain control and expressibility with direct integration of your prompt with the Video AI model.
|
|
106
|
+
|
|
107
|
+
• **long**: Optimized for longer videos beyond 10 minutes.
|
|
108
|
+
Provides finer grain control and expressibility with direct integration of your prompt with the Video AI model.
|
|
109
|
+
|
|
110
|
+
**YouTube URLs**: Automatically use the 'balanced' strategy. The strategy field is ignored for YouTube URLs, and other strategies will be rejected with an error.`,
|
|
94
111
|
requestFormat: "json",
|
|
95
112
|
parameters: [
|
|
96
113
|
{
|
|
@@ -104,7 +121,7 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
104
121
|
errors: [
|
|
105
122
|
{
|
|
106
123
|
status: 400,
|
|
107
|
-
description: `Invalid request, missing required parameters,
|
|
124
|
+
description: `Invalid request, missing required parameters, unsupported URL type (e.g., YouTube URLs with shot-based segmentation), or unsupported strategy for YouTube URLs (YouTube URLs only support 'balanced' strategy)`,
|
|
108
125
|
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
109
126
|
},
|
|
110
127
|
{
|
package/dist/src/client.d.ts
CHANGED
|
@@ -199,7 +199,7 @@ declare class EnhancedFilesApi {
|
|
|
199
199
|
limit: number;
|
|
200
200
|
offset: number;
|
|
201
201
|
}>;
|
|
202
|
-
uploadFile(params: UploadFileParams): Promise<import("axios").AxiosResponse<any, any
|
|
202
|
+
uploadFile(params: UploadFileParams): Promise<import("axios").AxiosResponse<any, any>>;
|
|
203
203
|
getFile(fileId: string): Promise<import("zod").objectOutputType<{
|
|
204
204
|
id: import("zod").ZodString;
|
|
205
205
|
status: import("zod").ZodEnum<["pending", "processing", "completed", "failed", "not_applicable"]>;
|
|
@@ -2057,6 +2057,8 @@ declare class EnhancedSegmentsApi {
|
|
|
2057
2057
|
}> | undefined;
|
|
2058
2058
|
narrative_config?: Partial<{
|
|
2059
2059
|
prompt: string;
|
|
2060
|
+
strategy: "direct" | "long" | "balanced";
|
|
2061
|
+
number_of_chapters: number;
|
|
2060
2062
|
}> | undefined;
|
|
2061
2063
|
}>;
|
|
2062
2064
|
total: number;
|
|
@@ -2077,6 +2079,8 @@ declare class EnhancedSegmentsApi {
|
|
|
2077
2079
|
}> | undefined;
|
|
2078
2080
|
narrative_config?: Partial<{
|
|
2079
2081
|
prompt: string;
|
|
2082
|
+
strategy: "direct" | "long" | "balanced";
|
|
2083
|
+
number_of_chapters: number;
|
|
2080
2084
|
}> | undefined;
|
|
2081
2085
|
total_segments?: number | undefined;
|
|
2082
2086
|
segments?: Array<{
|
|
@@ -2105,6 +2109,8 @@ declare class EnhancedSegmentsApi {
|
|
|
2105
2109
|
}> | undefined;
|
|
2106
2110
|
narrative_config?: Partial<{
|
|
2107
2111
|
prompt: string;
|
|
2112
|
+
strategy: "direct" | "long" | "balanced";
|
|
2113
|
+
number_of_chapters: number;
|
|
2108
2114
|
}> | undefined;
|
|
2109
2115
|
total_segments?: number | undefined;
|
|
2110
2116
|
segments?: Array<{
|
|
@@ -2131,6 +2137,8 @@ declare class EnhancedSegmentsApi {
|
|
|
2131
2137
|
}> | undefined;
|
|
2132
2138
|
narrative_config?: Partial<{
|
|
2133
2139
|
prompt: string;
|
|
2140
|
+
strategy: "direct" | "long" | "balanced";
|
|
2141
|
+
number_of_chapters: number;
|
|
2134
2142
|
}> | undefined;
|
|
2135
2143
|
total_segments?: number | undefined;
|
|
2136
2144
|
segments?: Array<{
|
package/dist/src/client.js
CHANGED