@ai-sdk/prodia 2.0.0-beta.2 → 2.0.0-beta.21
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 +148 -0
- package/README.md +2 -0
- package/dist/index.d.mts +34 -2
- package/dist/index.d.ts +34 -2
- package/dist/index.js +688 -150
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +701 -139
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -5
- package/src/index.ts +4 -0
- package/src/prodia-api.ts +198 -0
- package/src/prodia-image-model.ts +16 -196
- package/src/prodia-language-model-settings.ts +6 -0
- package/src/prodia-language-model.ts +412 -0
- package/src/prodia-provider.ts +40 -8
- package/src/prodia-video-model-settings.ts +7 -0
- package/src/prodia-video-model.ts +282 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,153 @@
|
|
|
1
1
|
# @ai-sdk/prodia
|
|
2
2
|
|
|
3
|
+
## 2.0.0-beta.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [3ae1786]
|
|
8
|
+
- @ai-sdk/provider-utils@5.0.0-beta.17
|
|
9
|
+
|
|
10
|
+
## 2.0.0-beta.20
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [176466a]
|
|
15
|
+
- @ai-sdk/provider@4.0.0-beta.10
|
|
16
|
+
- @ai-sdk/provider-utils@5.0.0-beta.16
|
|
17
|
+
|
|
18
|
+
## 2.0.0-beta.19
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [e311194]
|
|
23
|
+
- @ai-sdk/provider@4.0.0-beta.9
|
|
24
|
+
- @ai-sdk/provider-utils@5.0.0-beta.15
|
|
25
|
+
|
|
26
|
+
## 2.0.0-beta.18
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- Updated dependencies [34bd95d]
|
|
31
|
+
- Updated dependencies [008271d]
|
|
32
|
+
- @ai-sdk/provider@4.0.0-beta.8
|
|
33
|
+
- @ai-sdk/provider-utils@5.0.0-beta.14
|
|
34
|
+
|
|
35
|
+
## 2.0.0-beta.17
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Updated dependencies [b0c2869]
|
|
40
|
+
- Updated dependencies [7e26e81]
|
|
41
|
+
- @ai-sdk/provider-utils@5.0.0-beta.13
|
|
42
|
+
|
|
43
|
+
## 2.0.0-beta.16
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- Updated dependencies [46d1149]
|
|
48
|
+
- @ai-sdk/provider-utils@5.0.0-beta.12
|
|
49
|
+
|
|
50
|
+
## 2.0.0-beta.15
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- Updated dependencies [6fd51c0]
|
|
55
|
+
- @ai-sdk/provider-utils@5.0.0-beta.11
|
|
56
|
+
- @ai-sdk/provider@4.0.0-beta.7
|
|
57
|
+
|
|
58
|
+
## 2.0.0-beta.14
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- c29a26f: feat(provider): add support for provider references and uploading files as supported per provider
|
|
63
|
+
- Updated dependencies [c29a26f]
|
|
64
|
+
- @ai-sdk/provider-utils@5.0.0-beta.10
|
|
65
|
+
- @ai-sdk/provider@4.0.0-beta.6
|
|
66
|
+
|
|
67
|
+
## 2.0.0-beta.13
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- 38fc777: Add AI Gateway hint to provider READMEs
|
|
72
|
+
|
|
73
|
+
## 2.0.0-beta.12
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- Updated dependencies [2e17091]
|
|
78
|
+
- @ai-sdk/provider-utils@5.0.0-beta.9
|
|
79
|
+
|
|
80
|
+
## 2.0.0-beta.11
|
|
81
|
+
|
|
82
|
+
### Patch Changes
|
|
83
|
+
|
|
84
|
+
- Updated dependencies [986c6fd]
|
|
85
|
+
- Updated dependencies [493295c]
|
|
86
|
+
- @ai-sdk/provider-utils@5.0.0-beta.8
|
|
87
|
+
|
|
88
|
+
## 2.0.0-beta.10
|
|
89
|
+
|
|
90
|
+
### Patch Changes
|
|
91
|
+
|
|
92
|
+
- Updated dependencies [1f509d4]
|
|
93
|
+
- @ai-sdk/provider-utils@5.0.0-beta.7
|
|
94
|
+
- @ai-sdk/provider@4.0.0-beta.5
|
|
95
|
+
|
|
96
|
+
## 2.0.0-beta.9
|
|
97
|
+
|
|
98
|
+
### Patch Changes
|
|
99
|
+
|
|
100
|
+
- 5259a95: chore: add warning for providers that do not support new reasoning parameter
|
|
101
|
+
|
|
102
|
+
## 2.0.0-beta.8
|
|
103
|
+
|
|
104
|
+
### Patch Changes
|
|
105
|
+
|
|
106
|
+
- Updated dependencies [3887c70]
|
|
107
|
+
- @ai-sdk/provider-utils@5.0.0-beta.6
|
|
108
|
+
- @ai-sdk/provider@4.0.0-beta.4
|
|
109
|
+
|
|
110
|
+
## 2.0.0-beta.7
|
|
111
|
+
|
|
112
|
+
### Patch Changes
|
|
113
|
+
|
|
114
|
+
- Updated dependencies [776b617]
|
|
115
|
+
- @ai-sdk/provider-utils@5.0.0-beta.5
|
|
116
|
+
- @ai-sdk/provider@4.0.0-beta.3
|
|
117
|
+
|
|
118
|
+
## 2.0.0-beta.6
|
|
119
|
+
|
|
120
|
+
### Patch Changes
|
|
121
|
+
|
|
122
|
+
- Updated dependencies [61753c3]
|
|
123
|
+
- @ai-sdk/provider-utils@5.0.0-beta.4
|
|
124
|
+
|
|
125
|
+
## 2.0.0-beta.5
|
|
126
|
+
|
|
127
|
+
### Patch Changes
|
|
128
|
+
|
|
129
|
+
- e2bdcd6: feat(provider/prodia): Add LanguageModel and VideoModel support to the Prodia provider.
|
|
130
|
+
|
|
131
|
+
- **LanguageModel**: Supports Nano Banana (`inference.nano-banana.img2img.v2`) for img2img generation with text+image output via multipart form-data requests. Implements both `doGenerate` and `doStream`.
|
|
132
|
+
- **VideoModel**: Supports Wan 2.2 Lightning for text-to-video (`inference.wan2-2.lightning.txt2vid.v0`) and image-to-video (`inference.wan2-2.lightning.img2vid.v0`) generation.
|
|
133
|
+
- Extract shared multipart parsing and error handling infrastructure into `prodia-api.ts`.
|
|
134
|
+
|
|
135
|
+
## 2.0.0-beta.4
|
|
136
|
+
|
|
137
|
+
### Patch Changes
|
|
138
|
+
|
|
139
|
+
- Updated dependencies [f7d4f01]
|
|
140
|
+
- @ai-sdk/provider-utils@5.0.0-beta.3
|
|
141
|
+
- @ai-sdk/provider@4.0.0-beta.2
|
|
142
|
+
|
|
143
|
+
## 2.0.0-beta.3
|
|
144
|
+
|
|
145
|
+
### Patch Changes
|
|
146
|
+
|
|
147
|
+
- Updated dependencies [5c2a5a2]
|
|
148
|
+
- @ai-sdk/provider@4.0.0-beta.1
|
|
149
|
+
- @ai-sdk/provider-utils@5.0.0-beta.2
|
|
150
|
+
|
|
3
151
|
## 2.0.0-beta.2
|
|
4
152
|
|
|
5
153
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
The **[Prodia provider](https://ai-sdk.dev/providers/ai-sdk-providers/prodia)** for the [AI SDK](https://ai-sdk.dev/docs) adds image model support for the [Prodia API](https://docs.prodia.com/).
|
|
4
4
|
|
|
5
|
+
> **Deploying to Vercel?** With Vercel's AI Gateway you can access Prodia (and hundreds of models from other providers) — no additional packages, API keys, or extra cost. [Get started with AI Gateway](https://vercel.com/ai-gateway).
|
|
6
|
+
|
|
5
7
|
## Setup
|
|
6
8
|
|
|
7
9
|
The Prodia provider is available in the `@ai-sdk/prodia` module. You can install it with
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
2
2
|
import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
|
|
3
|
-
import { ProviderV4, ImageModelV4 } from '@ai-sdk/provider';
|
|
3
|
+
import { ProviderV4, LanguageModelV4, ImageModelV4, Experimental_VideoModelV4 } from '@ai-sdk/provider';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Prodia job types for image generation.
|
|
@@ -17,6 +17,26 @@ declare const prodiaImageModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
17
17
|
}>;
|
|
18
18
|
type ProdiaImageModelOptions = InferSchema<typeof prodiaImageModelOptionsSchema>;
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Prodia job types for language model (multimodal img2img).
|
|
22
|
+
*/
|
|
23
|
+
type ProdiaLanguageModelId = 'inference.nano-banana.img2img.v2' | (string & {});
|
|
24
|
+
|
|
25
|
+
declare const prodiaLanguageModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
26
|
+
aspectRatio?: "1:1" | "2:3" | "3:2" | "4:5" | "5:4" | "4:7" | "7:4" | "9:16" | "16:9" | "9:21" | "21:9" | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
type ProdiaLanguageModelOptions = InferSchema<typeof prodiaLanguageModelOptionsSchema>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Prodia job types for video generation.
|
|
32
|
+
*/
|
|
33
|
+
type ProdiaVideoModelId = 'inference.wan2-2.lightning.txt2vid.v0' | 'inference.wan2-2.lightning.img2vid.v0' | (string & {});
|
|
34
|
+
|
|
35
|
+
declare const prodiaVideoModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
36
|
+
resolution?: string | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
type ProdiaVideoModelOptions = InferSchema<typeof prodiaVideoModelOptionsSchema>;
|
|
39
|
+
|
|
20
40
|
interface ProdiaProviderSettings {
|
|
21
41
|
/**
|
|
22
42
|
* Prodia API key. Default value is taken from the `PRODIA_TOKEN` environment variable.
|
|
@@ -37,6 +57,10 @@ interface ProdiaProviderSettings {
|
|
|
37
57
|
fetch?: FetchFunction;
|
|
38
58
|
}
|
|
39
59
|
interface ProdiaProvider extends ProviderV4 {
|
|
60
|
+
/**
|
|
61
|
+
* Creates a language model for multimodal generation (img2img with text+image output).
|
|
62
|
+
*/
|
|
63
|
+
languageModel(modelId: ProdiaLanguageModelId): LanguageModelV4;
|
|
40
64
|
/**
|
|
41
65
|
* Creates a model for image generation.
|
|
42
66
|
*/
|
|
@@ -45,6 +69,14 @@ interface ProdiaProvider extends ProviderV4 {
|
|
|
45
69
|
* Creates a model for image generation.
|
|
46
70
|
*/
|
|
47
71
|
imageModel(modelId: ProdiaImageModelId): ImageModelV4;
|
|
72
|
+
/**
|
|
73
|
+
* Creates a model for video generation.
|
|
74
|
+
*/
|
|
75
|
+
video(modelId: ProdiaVideoModelId): Experimental_VideoModelV4;
|
|
76
|
+
/**
|
|
77
|
+
* Creates a model for video generation.
|
|
78
|
+
*/
|
|
79
|
+
videoModel(modelId: ProdiaVideoModelId): Experimental_VideoModelV4;
|
|
48
80
|
/**
|
|
49
81
|
* @deprecated Use `embeddingModel` instead.
|
|
50
82
|
*/
|
|
@@ -55,4 +87,4 @@ declare const prodia: ProdiaProvider;
|
|
|
55
87
|
|
|
56
88
|
declare const VERSION: string;
|
|
57
89
|
|
|
58
|
-
export { type ProdiaImageModelId, type ProdiaImageModelOptions, type ProdiaImageModelOptions as ProdiaImageProviderOptions, type ProdiaProvider, type ProdiaProviderSettings, VERSION, createProdia, prodia };
|
|
90
|
+
export { type ProdiaImageModelId, type ProdiaImageModelOptions, type ProdiaImageModelOptions as ProdiaImageProviderOptions, type ProdiaLanguageModelId, type ProdiaLanguageModelOptions, type ProdiaProvider, type ProdiaProviderSettings, type ProdiaVideoModelId, type ProdiaVideoModelOptions, VERSION, createProdia, prodia };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
2
2
|
import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
|
|
3
|
-
import { ProviderV4, ImageModelV4 } from '@ai-sdk/provider';
|
|
3
|
+
import { ProviderV4, LanguageModelV4, ImageModelV4, Experimental_VideoModelV4 } from '@ai-sdk/provider';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Prodia job types for image generation.
|
|
@@ -17,6 +17,26 @@ declare const prodiaImageModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
17
17
|
}>;
|
|
18
18
|
type ProdiaImageModelOptions = InferSchema<typeof prodiaImageModelOptionsSchema>;
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Prodia job types for language model (multimodal img2img).
|
|
22
|
+
*/
|
|
23
|
+
type ProdiaLanguageModelId = 'inference.nano-banana.img2img.v2' | (string & {});
|
|
24
|
+
|
|
25
|
+
declare const prodiaLanguageModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
26
|
+
aspectRatio?: "1:1" | "2:3" | "3:2" | "4:5" | "5:4" | "4:7" | "7:4" | "9:16" | "16:9" | "9:21" | "21:9" | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
type ProdiaLanguageModelOptions = InferSchema<typeof prodiaLanguageModelOptionsSchema>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Prodia job types for video generation.
|
|
32
|
+
*/
|
|
33
|
+
type ProdiaVideoModelId = 'inference.wan2-2.lightning.txt2vid.v0' | 'inference.wan2-2.lightning.img2vid.v0' | (string & {});
|
|
34
|
+
|
|
35
|
+
declare const prodiaVideoModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
36
|
+
resolution?: string | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
type ProdiaVideoModelOptions = InferSchema<typeof prodiaVideoModelOptionsSchema>;
|
|
39
|
+
|
|
20
40
|
interface ProdiaProviderSettings {
|
|
21
41
|
/**
|
|
22
42
|
* Prodia API key. Default value is taken from the `PRODIA_TOKEN` environment variable.
|
|
@@ -37,6 +57,10 @@ interface ProdiaProviderSettings {
|
|
|
37
57
|
fetch?: FetchFunction;
|
|
38
58
|
}
|
|
39
59
|
interface ProdiaProvider extends ProviderV4 {
|
|
60
|
+
/**
|
|
61
|
+
* Creates a language model for multimodal generation (img2img with text+image output).
|
|
62
|
+
*/
|
|
63
|
+
languageModel(modelId: ProdiaLanguageModelId): LanguageModelV4;
|
|
40
64
|
/**
|
|
41
65
|
* Creates a model for image generation.
|
|
42
66
|
*/
|
|
@@ -45,6 +69,14 @@ interface ProdiaProvider extends ProviderV4 {
|
|
|
45
69
|
* Creates a model for image generation.
|
|
46
70
|
*/
|
|
47
71
|
imageModel(modelId: ProdiaImageModelId): ImageModelV4;
|
|
72
|
+
/**
|
|
73
|
+
* Creates a model for video generation.
|
|
74
|
+
*/
|
|
75
|
+
video(modelId: ProdiaVideoModelId): Experimental_VideoModelV4;
|
|
76
|
+
/**
|
|
77
|
+
* Creates a model for video generation.
|
|
78
|
+
*/
|
|
79
|
+
videoModel(modelId: ProdiaVideoModelId): Experimental_VideoModelV4;
|
|
48
80
|
/**
|
|
49
81
|
* @deprecated Use `embeddingModel` instead.
|
|
50
82
|
*/
|
|
@@ -55,4 +87,4 @@ declare const prodia: ProdiaProvider;
|
|
|
55
87
|
|
|
56
88
|
declare const VERSION: string;
|
|
57
89
|
|
|
58
|
-
export { type ProdiaImageModelId, type ProdiaImageModelOptions, type ProdiaImageModelOptions as ProdiaImageProviderOptions, type ProdiaProvider, type ProdiaProviderSettings, VERSION, createProdia, prodia };
|
|
90
|
+
export { type ProdiaImageModelId, type ProdiaImageModelOptions, type ProdiaImageModelOptions as ProdiaImageProviderOptions, type ProdiaLanguageModelId, type ProdiaLanguageModelOptions, type ProdiaProvider, type ProdiaProviderSettings, type ProdiaVideoModelId, type ProdiaVideoModelOptions, VERSION, createProdia, prodia };
|