magic-hour 0.98.0 → 0.98.1
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/README.md +20 -0
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +1 -1
- package/dist/resources/v1/ai-image-editor/request-types.d.ts +5 -0
- package/dist/resources/v1/ai-image-generator/request-types.d.ts +5 -0
- package/dist/types/v1-ai-image-editor-create-body-model-enum.d.ts +4 -0
- package/dist/types/v1-ai-image-editor-create-body-resolution-enum.d.ts +1 -0
- package/dist/types/v1-ai-image-editor-create-body.d.ts +5 -0
- package/dist/types/v1-ai-image-generator-create-body-model-enum.d.ts +4 -0
- package/dist/types/v1-ai-image-generator-create-body-resolution-enum.d.ts +1 -0
- package/dist/types/v1-ai-image-generator-create-body.d.ts +5 -0
- package/dist/types/v1-video-projects-get-response.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -200,6 +200,26 @@ try {
|
|
|
200
200
|
}
|
|
201
201
|
```
|
|
202
202
|
|
|
203
|
+
## Idempotent Requests
|
|
204
|
+
|
|
205
|
+
Project create endpoints accept an `Idempotency-Key` header, so you can safely retry a request without creating or paying for a second project. Repeating a key within 24 hours returns the original project. Keys are shared across your account, so use a new key, such as a UUID, for each project.
|
|
206
|
+
|
|
207
|
+
```ts
|
|
208
|
+
await client.v1.aiImageGenerator.create(
|
|
209
|
+
{ imageCount: 1, style: { prompt: "Cool image" } },
|
|
210
|
+
{ additionalHeaders: { "Idempotency-Key": "5f3c1b9e-8a41-4a0e-9d3e-2f6a1c7b9e10" } },
|
|
211
|
+
);
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
With `generate()`:
|
|
215
|
+
|
|
216
|
+
```ts
|
|
217
|
+
await client.v1.aiImageGenerator.generate(
|
|
218
|
+
{ imageCount: 1, style: { prompt: "Cool image" } },
|
|
219
|
+
{ additionalHeaders: { "Idempotency-Key": "5f3c1b9e-8a41-4a0e-9d3e-2f6a1c7b9e10" } },
|
|
220
|
+
);
|
|
221
|
+
```
|
|
222
|
+
|
|
203
223
|
## Logging
|
|
204
224
|
|
|
205
225
|
### Logging Levels
|
package/dist/environment.d.ts
CHANGED
package/dist/environment.js
CHANGED
|
@@ -4,5 +4,5 @@ exports.Environment = void 0;
|
|
|
4
4
|
var Environment;
|
|
5
5
|
(function (Environment) {
|
|
6
6
|
Environment["Environment"] = "https://api.magichour.ai";
|
|
7
|
-
Environment["MockServer"] = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.
|
|
7
|
+
Environment["MockServer"] = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.104.0";
|
|
8
8
|
})(Environment || (exports.Environment = Environment = {}));
|
|
@@ -46,6 +46,10 @@ export type CreateRequest = {
|
|
|
46
46
|
* - Supported resolutions: 640px, 1k
|
|
47
47
|
* - Available for tiers: creator, pro, business
|
|
48
48
|
* - Max additional input images: 9
|
|
49
|
+
* - `nano-banana-2` - from 100 credits/image
|
|
50
|
+
* - Supported resolutions: 640px, 1k, 2k, 4k
|
|
51
|
+
* - Available for tiers: creator, pro, business
|
|
52
|
+
* - Max additional input images: 9
|
|
49
53
|
* - `nano-banana-2-lite` - from 50 credits/image
|
|
50
54
|
* - Supported resolutions: 640px, 1k
|
|
51
55
|
* - Available for tiers: creator, pro, business
|
|
@@ -106,6 +110,7 @@ export type CreateRequest = {
|
|
|
106
110
|
* - `gpt-image-2.5-flare` - 640px, 1k, 2k, 4k
|
|
107
111
|
* - `krea-2` - 640px, 1k
|
|
108
112
|
* - `nano-banana` - 640px, 1k
|
|
113
|
+
* - `nano-banana-2` - 640px, 1k, 2k, 4k
|
|
109
114
|
* - `nano-banana-2-lite` - 640px, 1k
|
|
110
115
|
* - `nano-banana-2.1` - 640px, 1k, 2k, 4k
|
|
111
116
|
* - `nano-banana-pro` - 1k, 2k, 4k
|
|
@@ -45,6 +45,10 @@ export type CreateRequest = {
|
|
|
45
45
|
* - Supported resolutions: 640px, 1k
|
|
46
46
|
* - Available for tiers: creator, pro, business
|
|
47
47
|
* - Image count allowed: 1, 2, 3, 4
|
|
48
|
+
* - `nano-banana-2` - from 100 credits/image
|
|
49
|
+
* - Supported resolutions: 640px, 1k, 2k, 4k
|
|
50
|
+
* - Available for tiers: creator, pro, business
|
|
51
|
+
* - Image count allowed: 1, 4, 9, 16
|
|
48
52
|
* - `nano-banana-2-lite` - from 50 credits/image
|
|
49
53
|
* - Supported resolutions: 640px, 1k
|
|
50
54
|
* - Available for tiers: creator, pro, business
|
|
@@ -115,6 +119,7 @@ export type CreateRequest = {
|
|
|
115
119
|
* - `gpt-image-2.5-flare` - 640px, 1k, 2k, 4k
|
|
116
120
|
* - `krea-2` - 640px, 1k
|
|
117
121
|
* - `nano-banana` - 640px, 1k
|
|
122
|
+
* - `nano-banana-2` - 640px, 1k, 2k, 4k
|
|
118
123
|
* - `nano-banana-2-lite` - 640px, 1k
|
|
119
124
|
* - `nano-banana-2.1` - 640px, 1k, 2k, 4k
|
|
120
125
|
* - `nano-banana-pro` - 1k, 2k, 4k
|
|
@@ -27,6 +27,10 @@
|
|
|
27
27
|
* - Supported resolutions: 640px, 1k
|
|
28
28
|
* - Available for tiers: creator, pro, business
|
|
29
29
|
* - Max additional input images: 9
|
|
30
|
+
* - `nano-banana-2` - from 100 credits/image
|
|
31
|
+
* - Supported resolutions: 640px, 1k, 2k, 4k
|
|
32
|
+
* - Available for tiers: creator, pro, business
|
|
33
|
+
* - Max additional input images: 9
|
|
30
34
|
* - `nano-banana-2-lite` - from 50 credits/image
|
|
31
35
|
* - Supported resolutions: 640px, 1k
|
|
32
36
|
* - Available for tiers: creator, pro, business
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* - `gpt-image-2.5-flare` - 640px, 1k, 2k, 4k
|
|
16
16
|
* - `krea-2` - 640px, 1k
|
|
17
17
|
* - `nano-banana` - 640px, 1k
|
|
18
|
+
* - `nano-banana-2` - 640px, 1k, 2k, 4k
|
|
18
19
|
* - `nano-banana-2-lite` - 640px, 1k
|
|
19
20
|
* - `nano-banana-2.1` - 640px, 1k, 2k, 4k
|
|
20
21
|
* - `nano-banana-pro` - 1k, 2k, 4k
|
|
@@ -46,6 +46,10 @@ export type V1AiImageEditorCreateBody = {
|
|
|
46
46
|
* - Supported resolutions: 640px, 1k
|
|
47
47
|
* - Available for tiers: creator, pro, business
|
|
48
48
|
* - Max additional input images: 9
|
|
49
|
+
* - `nano-banana-2` - from 100 credits/image
|
|
50
|
+
* - Supported resolutions: 640px, 1k, 2k, 4k
|
|
51
|
+
* - Available for tiers: creator, pro, business
|
|
52
|
+
* - Max additional input images: 9
|
|
49
53
|
* - `nano-banana-2-lite` - from 50 credits/image
|
|
50
54
|
* - Supported resolutions: 640px, 1k
|
|
51
55
|
* - Available for tiers: creator, pro, business
|
|
@@ -106,6 +110,7 @@ export type V1AiImageEditorCreateBody = {
|
|
|
106
110
|
* - `gpt-image-2.5-flare` - 640px, 1k, 2k, 4k
|
|
107
111
|
* - `krea-2` - 640px, 1k
|
|
108
112
|
* - `nano-banana` - 640px, 1k
|
|
113
|
+
* - `nano-banana-2` - 640px, 1k, 2k, 4k
|
|
109
114
|
* - `nano-banana-2-lite` - 640px, 1k
|
|
110
115
|
* - `nano-banana-2.1` - 640px, 1k, 2k, 4k
|
|
111
116
|
* - `nano-banana-pro` - 1k, 2k, 4k
|
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
* - Supported resolutions: 640px, 1k
|
|
32
32
|
* - Available for tiers: creator, pro, business
|
|
33
33
|
* - Image count allowed: 1, 2, 3, 4
|
|
34
|
+
* - `nano-banana-2` - from 100 credits/image
|
|
35
|
+
* - Supported resolutions: 640px, 1k, 2k, 4k
|
|
36
|
+
* - Available for tiers: creator, pro, business
|
|
37
|
+
* - Image count allowed: 1, 4, 9, 16
|
|
34
38
|
* - `nano-banana-2-lite` - from 50 credits/image
|
|
35
39
|
* - Supported resolutions: 640px, 1k
|
|
36
40
|
* - Available for tiers: creator, pro, business
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* - `gpt-image-2.5-flare` - 640px, 1k, 2k, 4k
|
|
17
17
|
* - `krea-2` - 640px, 1k
|
|
18
18
|
* - `nano-banana` - 640px, 1k
|
|
19
|
+
* - `nano-banana-2` - 640px, 1k, 2k, 4k
|
|
19
20
|
* - `nano-banana-2-lite` - 640px, 1k
|
|
20
21
|
* - `nano-banana-2.1` - 640px, 1k, 2k, 4k
|
|
21
22
|
* - `nano-banana-pro` - 1k, 2k, 4k
|
|
@@ -45,6 +45,10 @@ export type V1AiImageGeneratorCreateBody = {
|
|
|
45
45
|
* - Supported resolutions: 640px, 1k
|
|
46
46
|
* - Available for tiers: creator, pro, business
|
|
47
47
|
* - Image count allowed: 1, 2, 3, 4
|
|
48
|
+
* - `nano-banana-2` - from 100 credits/image
|
|
49
|
+
* - Supported resolutions: 640px, 1k, 2k, 4k
|
|
50
|
+
* - Available for tiers: creator, pro, business
|
|
51
|
+
* - Image count allowed: 1, 4, 9, 16
|
|
48
52
|
* - `nano-banana-2-lite` - from 50 credits/image
|
|
49
53
|
* - Supported resolutions: 640px, 1k
|
|
50
54
|
* - Available for tiers: creator, pro, business
|
|
@@ -115,6 +119,7 @@ export type V1AiImageGeneratorCreateBody = {
|
|
|
115
119
|
* - `gpt-image-2.5-flare` - 640px, 1k, 2k, 4k
|
|
116
120
|
* - `krea-2` - 640px, 1k
|
|
117
121
|
* - `nano-banana` - 640px, 1k
|
|
122
|
+
* - `nano-banana-2` - 640px, 1k, 2k, 4k
|
|
118
123
|
* - `nano-banana-2-lite` - 640px, 1k
|
|
119
124
|
* - `nano-banana-2.1` - 640px, 1k, 2k, 4k
|
|
120
125
|
* - `nano-banana-pro` - 1k, 2k, 4k
|
|
@@ -70,7 +70,7 @@ export type V1VideoProjectsGetResponse = {
|
|
|
70
70
|
*/
|
|
71
71
|
totalFrameCost: number;
|
|
72
72
|
/**
|
|
73
|
-
* The type of the video project. Possible values are ANIMATION, AUTO_SUBTITLE, VIDEO_TO_VIDEO, FACE_SWAP, TEXT_TO_VIDEO, IMAGE_TO_VIDEO, LIP_SYNC, TALKING_PHOTO, AVATAR, VIDEO_UPSCALER, VIDEO_EDITOR, CHARACTER_REPLACE, VIDEO_COLORIZER, VIDEO_WATERMARK_REMOVER, VIDEO_COLOR_GRADER, VIDEO_TRANSLATOR, MUSIC_VIDEO, EXTEND, AUDIO_TO_VIDEO, VIDEO_EXPANDER, UGC_AD
|
|
73
|
+
* The type of the video project. Possible values are ANIMATION, AUTO_SUBTITLE, VIDEO_TO_VIDEO, FACE_SWAP, TEXT_TO_VIDEO, IMAGE_TO_VIDEO, LIP_SYNC, TALKING_PHOTO, AVATAR, VIDEO_UPSCALER, VIDEO_EDITOR, CHARACTER_REPLACE, VIDEO_COLORIZER, VIDEO_WATERMARK_REMOVER, VIDEO_COLOR_GRADER, VIDEO_TRANSLATOR, MUSIC_VIDEO, VIDEO_REMIXER, EXTEND, AUDIO_TO_VIDEO, VIDEO_EXPANDER, UGC_AD
|
|
74
74
|
*/
|
|
75
75
|
type: string;
|
|
76
76
|
/**
|