@ai-sdk/black-forest-labs 2.0.52 → 2.0.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @ai-sdk/black-forest-labs
2
2
 
3
+ ## 2.0.54
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [8c65988]
8
+ - Updated dependencies [527a163]
9
+ - @ai-sdk/provider@4.0.21
10
+ - @ai-sdk/provider-utils@5.0.53
11
+
12
+ ## 2.0.53
13
+
14
+ ### Patch Changes
15
+
16
+ - ede5b89: chore: migrate package builds from tsup to tsdown
17
+ - Updated dependencies [ede5b89]
18
+ - @ai-sdk/provider@4.0.20
19
+ - @ai-sdk/provider-utils@5.0.52
20
+
3
21
  ## 2.0.52
4
22
 
5
23
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,105 +1,111 @@
1
- import { ProviderV4, ImageModelV4, Experimental_VideoModelV4 } from '@ai-sdk/provider';
2
- import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
3
- import { FetchFunction, InferSchema } from '@ai-sdk/provider-utils';
4
-
1
+ import { Experimental_VideoModelV4, ImageModelV4, ProviderV4 } from "@ai-sdk/provider";
2
+ import { FetchFunction, InferSchema } from "@ai-sdk/provider-utils";
3
+ import { z } from "zod/v4";
4
+ //#region src/black-forest-labs-image-settings.d.ts
5
5
  type BlackForestLabsImageModelId = 'flux-kontext-pro' | 'flux-kontext-max' | 'flux-pro-1.1-ultra' | 'flux-pro-1.1' | 'flux-pro-1.0-fill' | (string & {});
6
6
  type BlackForestLabsAspectRatio = `${number}:${number}`;
7
-
7
+ //#endregion
8
+ //#region src/black-forest-labs-video-settings.d.ts
8
9
  type BlackForestLabsVideoModelId = 'flux-3-video' | (string & {});
9
-
10
+ //#endregion
11
+ //#region src/black-forest-labs-provider.d.ts
10
12
  interface BlackForestLabsProviderSettings {
11
- /**
12
- * Black Forest Labs API key. Default value is taken from the `BFL_API_KEY` environment variable.
13
- */
14
- apiKey?: string;
15
- /**
16
- * Base URL for the API calls. Defaults to `https://api.bfl.ai/v1`.
17
- */
18
- baseURL?: string;
19
- /**
20
- * Custom headers to include in the requests.
21
- */
22
- headers?: Record<string, string>;
23
- /**
24
- * Custom fetch implementation. You can use it as a middleware to intercept
25
- * requests, or to provide a custom fetch implementation for e.g. testing.
26
- */
27
- fetch?: FetchFunction;
28
- /**
29
- * Poll interval in milliseconds between status checks. Defaults to 500ms for
30
- * images and 2s for video.
31
- */
32
- pollIntervalMillis?: number;
33
- /**
34
- * Overall timeout in milliseconds for polling before giving up. Defaults to
35
- * 60s for images and 10 minutes for video.
36
- */
37
- pollTimeoutMillis?: number;
13
+ /**
14
+ * Black Forest Labs API key. Default value is taken from the `BFL_API_KEY` environment variable.
15
+ */
16
+ apiKey?: string;
17
+ /**
18
+ * Base URL for the API calls. Defaults to `https://api.bfl.ai/v1`.
19
+ */
20
+ baseURL?: string;
21
+ /**
22
+ * Custom headers to include in the requests.
23
+ */
24
+ headers?: Record<string, string>;
25
+ /**
26
+ * Custom fetch implementation. You can use it as a middleware to intercept
27
+ * requests, or to provide a custom fetch implementation for e.g. testing.
28
+ */
29
+ fetch?: FetchFunction;
30
+ /**
31
+ * Poll interval in milliseconds between status checks. Defaults to 500ms for
32
+ * images and 2s for video.
33
+ */
34
+ pollIntervalMillis?: number;
35
+ /**
36
+ * Overall timeout in milliseconds for polling before giving up. Defaults to
37
+ * 60s for images and 10 minutes for video.
38
+ */
39
+ pollTimeoutMillis?: number;
38
40
  }
39
41
  interface BlackForestLabsProvider extends ProviderV4 {
40
- /**
41
- * Creates a model for image generation.
42
- */
43
- image(modelId: BlackForestLabsImageModelId): ImageModelV4;
44
- /**
45
- * Creates a model for image generation.
46
- */
47
- imageModel(modelId: BlackForestLabsImageModelId): ImageModelV4;
48
- /**
49
- * Creates a model for video generation.
50
- */
51
- video(modelId: BlackForestLabsVideoModelId): Experimental_VideoModelV4;
52
- /**
53
- * Creates a model for video generation.
54
- */
55
- videoModel(modelId: BlackForestLabsVideoModelId): Experimental_VideoModelV4;
56
- /**
57
- * @deprecated Use `embeddingModel` instead.
58
- */
59
- textEmbeddingModel(modelId: string): never;
42
+ /**
43
+ * Creates a model for image generation.
44
+ */
45
+ image(modelId: BlackForestLabsImageModelId): ImageModelV4;
46
+ /**
47
+ * Creates a model for image generation.
48
+ */
49
+ imageModel(modelId: BlackForestLabsImageModelId): ImageModelV4;
50
+ /**
51
+ * Creates a model for video generation.
52
+ */
53
+ video(modelId: BlackForestLabsVideoModelId): Experimental_VideoModelV4;
54
+ /**
55
+ * Creates a model for video generation.
56
+ */
57
+ videoModel(modelId: BlackForestLabsVideoModelId): Experimental_VideoModelV4;
58
+ /**
59
+ * @deprecated Use `embeddingModel` instead.
60
+ */
61
+ textEmbeddingModel(modelId: string): never;
60
62
  }
61
- declare function createBlackForestLabs(options?: BlackForestLabsProviderSettings): BlackForestLabsProvider;
62
- declare const blackForestLabs: BlackForestLabsProvider;
63
-
64
- declare const blackForestLabsImageModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
65
- imagePrompt?: string | undefined;
66
- imagePromptStrength?: number | undefined;
67
- inputImage?: string | undefined;
68
- inputImage2?: string | undefined;
69
- inputImage3?: string | undefined;
70
- inputImage4?: string | undefined;
71
- inputImage5?: string | undefined;
72
- inputImage6?: string | undefined;
73
- inputImage7?: string | undefined;
74
- inputImage8?: string | undefined;
75
- inputImage9?: string | undefined;
76
- inputImage10?: string | undefined;
77
- steps?: number | undefined;
78
- guidance?: number | undefined;
79
- width?: number | undefined;
80
- height?: number | undefined;
81
- outputFormat?: "jpeg" | "png" | undefined;
82
- promptUpsampling?: boolean | undefined;
83
- raw?: boolean | undefined;
84
- safetyTolerance?: number | undefined;
85
- webhookSecret?: string | undefined;
86
- webhookUrl?: string | undefined;
87
- pollIntervalMillis?: number | undefined;
88
- pollTimeoutMillis?: number | undefined;
63
+ export declare function createBlackForestLabs(options?: BlackForestLabsProviderSettings): BlackForestLabsProvider;
64
+ export declare const blackForestLabs: BlackForestLabsProvider;
65
+ //#endregion
66
+ //#region src/black-forest-labs-image-model-options.d.ts
67
+ declare const blackForestLabsImageModelOptionsSchema: import("@ai-sdk/provider-utils").LazySchema<{
68
+ imagePrompt?: string | undefined;
69
+ imagePromptStrength?: number | undefined;
70
+ inputImage?: string | undefined;
71
+ inputImage2?: string | undefined;
72
+ inputImage3?: string | undefined;
73
+ inputImage4?: string | undefined;
74
+ inputImage5?: string | undefined;
75
+ inputImage6?: string | undefined;
76
+ inputImage7?: string | undefined;
77
+ inputImage8?: string | undefined;
78
+ inputImage9?: string | undefined;
79
+ inputImage10?: string | undefined;
80
+ steps?: number | undefined;
81
+ guidance?: number | undefined;
82
+ width?: number | undefined;
83
+ height?: number | undefined;
84
+ outputFormat?: "jpeg" | "png" | undefined;
85
+ promptUpsampling?: boolean | undefined;
86
+ raw?: boolean | undefined;
87
+ safetyTolerance?: number | undefined;
88
+ webhookSecret?: string | undefined;
89
+ webhookUrl?: string | undefined;
90
+ pollIntervalMillis?: number | undefined;
91
+ pollTimeoutMillis?: number | undefined;
89
92
  }>;
90
93
  type BlackForestLabsImageModelOptions = InferSchema<typeof blackForestLabsImageModelOptionsSchema>;
91
-
92
- declare const blackForestLabsVideoModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
93
- resolution?: "hd" | "fhd" | undefined;
94
- aspectRatio?: "21:9" | "2:1" | "16:9" | "4:3" | "1:1" | "3:4" | "9:16" | "auto" | undefined;
95
- keyframes?: string[] | [number, string][] | undefined;
96
- safetyTolerance?: number | undefined;
97
- draft?: boolean | undefined;
98
- draftCache?: string | undefined;
99
- version?: "latest" | undefined;
94
+ //#endregion
95
+ //#region src/black-forest-labs-video-model-options.d.ts
96
+ declare const blackForestLabsVideoModelOptionsSchema: import("@ai-sdk/provider-utils").LazySchema<{
97
+ resolution?: "hd" | "fhd" | undefined;
98
+ aspectRatio?: "21:9" | "2:1" | "16:9" | "4:3" | "1:1" | "3:4" | "9:16" | "auto" | undefined;
99
+ keyframes?: [number, string][] | string[] | undefined;
100
+ safetyTolerance?: number | undefined;
101
+ draft?: boolean | undefined;
102
+ draftCache?: string | undefined;
103
+ version?: "latest" | undefined;
100
104
  }>;
101
105
  type BlackForestLabsVideoModelOptions = InferSchema<typeof blackForestLabsVideoModelOptionsSchema>;
102
-
103
- declare const VERSION: string;
104
-
105
- export { type BlackForestLabsAspectRatio, type BlackForestLabsImageModelId, type BlackForestLabsImageModelOptions, type BlackForestLabsImageModelOptions as BlackForestLabsImageProviderOptions, type BlackForestLabsProvider, type BlackForestLabsProviderSettings, type BlackForestLabsVideoModelId, type BlackForestLabsVideoModelOptions, VERSION, blackForestLabs, createBlackForestLabs };
106
+ //#endregion
107
+ //#region src/version.d.ts
108
+ export declare const VERSION: string;
109
+ //#endregion
110
+ export type { BlackForestLabsAspectRatio, BlackForestLabsImageModelId, BlackForestLabsImageModelOptions, BlackForestLabsImageModelOptions as BlackForestLabsImageProviderOptions, BlackForestLabsProvider, BlackForestLabsProviderSettings, BlackForestLabsVideoModelId, BlackForestLabsVideoModelOptions };
111
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/black-forest-labs-image-settings.ts","../src/black-forest-labs-video-settings.ts","../src/black-forest-labs-provider.ts","../src/black-forest-labs-image-model-options.ts","../src/black-forest-labs-video-model-options.ts","../src/version.ts"],"mappings":";;;;KAAY;KAQA;;;KCPA;;;UCiBK;;;;EAIf;;;;EAKA;;;;EAKA,UAAU;;;;;EAMV,QAAQ;;;;;EAMR;;;;;EAMA;;UAGe,gCAAgC;;;;EAI/C,MAAM,SAAS,8BAA8B;;;;EAK7C,WAAW,SAAS,8BAA8B;;;;EAKlD,MAAM,SAAS,8BAA8B;;;;EAK7C,WAAW,SAAS,8BAA8B;;;;EAKlD,mBAAmB;;wBAKL,sBACd,UAAS,kCACR;qBA2DU,iBAAe;;;cCxIf,yEAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;KAyCvC,mCAAmC,mBACtC;;;cCoCI,yEAAsC;;;;;;;;;KAIvC,mCAAmC,mBACtC;;;qBCxFI"}