@ai-sdk/black-forest-labs 2.0.51 → 2.0.53
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 +17 -0
- package/dist/index.d.ts +100 -94
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +897 -1124
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/black-forest-labs-provider.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @ai-sdk/black-forest-labs
|
|
2
2
|
|
|
3
|
+
## 2.0.53
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ede5b89: chore: migrate package builds from tsup to tsdown
|
|
8
|
+
- Updated dependencies [ede5b89]
|
|
9
|
+
- @ai-sdk/provider@4.0.20
|
|
10
|
+
- @ai-sdk/provider-utils@5.0.52
|
|
11
|
+
|
|
12
|
+
## 2.0.52
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- c2511c1: fix: use standards-compliant User-Agent header
|
|
17
|
+
- Updated dependencies [c2511c1]
|
|
18
|
+
- @ai-sdk/provider-utils@5.0.51
|
|
19
|
+
|
|
3
20
|
## 2.0.51
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,105 +1,111 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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"}
|