From 4ee0537f06bac274d4cc9a5930b23c8e3242b040 Mon Sep 17 00:00:00 2001 From: "sdk-github-actions[bot]" Date: Fri, 5 Jun 2026 22:28:11 +0000 Subject: [PATCH] chore(release): auto --- .sdk.json | 2 +- package-lock.json | 4 +-- package.json | 2 +- src/environment.ts | 2 +- src/resources/v1/ai-image-editor/README.md | 26 +++++++++---------- .../v1/ai-image-editor/request-types.ts | 9 +++++++ src/resources/v1/ai-image-generator/README.md | 24 ++++++++--------- .../v1/ai-image-generator/request-types.ts | 9 +++++++ src/resources/v1/files/upload-urls/README.md | 2 +- .../v1/files/upload-urls/resource-client.ts | 2 +- ...-ai-image-editor-create-body-model-enum.ts | 5 ++++ ...mage-editor-create-body-resolution-enum.ts | 1 + src/types/v1-ai-image-editor-create-body.ts | 9 +++++++ ...-image-generator-create-body-model-enum.ts | 5 ++++ ...e-generator-create-body-resolution-enum.ts | 1 + .../v1-ai-image-generator-create-body.ts | 9 +++++++ ...iles-upload-urls-create-body-items-item.ts | 2 +- 17 files changed, 81 insertions(+), 33 deletions(-) diff --git a/.sdk.json b/.sdk.json index 649b59e..646364b 100644 --- a/.sdk.json +++ b/.sdk.json @@ -1,5 +1,5 @@ { - "id": "04345ae8-b8e3-4a3a-804d-3c759d394cf1", + "id": "b48fe3db-9277-4a77-a82d-9d6e235c59fb", "tracked_paths": [ { "editable": true, diff --git a/package-lock.json b/package-lock.json index 1bc03d4..10ecf69 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "magic-hour", - "version": "0.64.1", + "version": "0.65.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "magic-hour", - "version": "0.64.1", + "version": "0.65.0", "license": "MIT", "dependencies": { "make-api-request-js": "^0.2.1", diff --git a/package.json b/package.json index 33cc613..ffe9eb7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "magic-hour", - "version": "0.64.1", + "version": "0.65.0", "main": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { diff --git a/src/environment.ts b/src/environment.ts index 5e976c5..20cf6ae 100644 --- a/src/environment.ts +++ b/src/environment.ts @@ -1,4 +1,4 @@ export enum Environment { Environment = "https://api.magichour.ai", - MockServer = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.65.1", + MockServer = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.66.0", } diff --git a/src/resources/v1/ai-image-editor/README.md b/src/resources/v1/ai-image-editor/README.md index c1811aa..da38bca 100644 --- a/src/resources/v1/ai-image-editor/README.md +++ b/src/resources/v1/ai-image-editor/README.md @@ -54,19 +54,19 @@ Edit images with AI. #### Parameters -| Parameter | Required | Description | Example | -| ------------------- | :------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `assets` | ✓ | Provide the assets for image edit | `{"imageFilePaths": ["api-assets/id/1234.png", "api-assets/id/1235.png"]}` | -| `└─ imageFilePath` | ✗ | Deprecated: Please use `image_file_paths` instead as edits with multiple images are now supported. The image used in the edit. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details. | `"string"` | -| `└─ imageFilePaths` | ✗ | The image(s) used in the edit, maximum of 10 images. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details. | `["api-assets/id/1234.png", "api-assets/id/1235.png"]` | -| `style` | ✓ | | `{"prompt": "Give me sunglasses"}` | -| `└─ model` | ✗ | Deprecated: Please use `model` instead. The AI model to use for image editing. * `Nano Banana` - Precise, realistic edits with consistent results * `Seedream` - Creative, imaginative images with artistic freedom * `default` - Use the model we recommend, which will change over time. This is recommended unless you need a specific model. This is the default behavior. | `"Nano Banana"` | -| `└─ prompt` | ✓ | The prompt used to edit the image. | `"Give me sunglasses"` | -| `aspectRatio` | ✗ | The aspect ratio of the output image(s). If not specified, defaults to `auto`. | `"1:1"` | -| `imageCount` | ✗ | Number of images to generate. Maximum varies by model. Defaults to 1 if not specified. | `1.0` | -| `model` | ✗ | The AI model to use for image editing. Each model has different capabilities and costs. **Models:** - `default` - Use the model we recommend, which will change over time. This is recommended unless you need a specific model. This is the default behavior. - `qwen-edit` - from 10 credits/image - Supported resolutions: 640px, 1k, 2k - Available for tiers: free, creator, pro, business - Max additional input images: 2 - `nano-banana` - from 50 credits/image - Supported resolutions: 640px, 1k - Available for tiers: creator, pro, business - Max additional input images: 9 - `nano-banana-2` - from 100 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Max additional input images: 9 - `seedream-v4` - from 40 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Max additional input images: 9 - `nano-banana-pro` - from 150 credits/image - Supported resolutions: 1k, 2k, 4k - Available for tiers: creator, pro, business - Max additional input images: 9 - `seedream-v4.5` - from 50 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Max additional input images: 9 - `gpt-image-2` - from 50 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Max additional input images: 9 | `"default"` | -| `name` | ✗ | Give your image a custom name for easy identification. | `"My Ai Image Editor image"` | -| `resolution` | ✗ | Maximum resolution (longest edge) for the output image. **Options:** - `640px` — up to 640px - `1k` — up to 1024px - `2k` — up to 2048px - `4k` — up to 4096px - `auto` — **Deprecated.** Mapped server-side from your subscription tier to the best matching resolution the model supports **Per-model support:** - `qwen-edit` - 640px, 1k, 2k - `nano-banana` - 640px, 1k - `nano-banana-2` - 640px, 1k, 2k, 4k - `seedream-v4` - 640px, 1k, 2k, 4k - `nano-banana-pro` - 1k, 2k, 4k - `seedream-v4.5` - 640px, 1k, 2k, 4k - `gpt-image-2` - 640px, 1k, 2k, 4k Note: Resolution availability depends on the model and your subscription tier. | `"1k"` | +| Parameter | Required | Description | Example | +| ------------------- | :------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `assets` | ✓ | Provide the assets for image edit | `{"imageFilePaths": ["api-assets/id/1234.png", "api-assets/id/1235.png"]}` | +| `└─ imageFilePath` | ✗ | Deprecated: Please use `image_file_paths` instead as edits with multiple images are now supported. The image used in the edit. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details. | `"string"` | +| `└─ imageFilePaths` | ✗ | The image(s) used in the edit, maximum of 10 images. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details. | `["api-assets/id/1234.png", "api-assets/id/1235.png"]` | +| `style` | ✓ | | `{"prompt": "Give me sunglasses"}` | +| `└─ model` | ✗ | Deprecated: Please use `model` instead. The AI model to use for image editing. * `Nano Banana` - Precise, realistic edits with consistent results * `Seedream` - Creative, imaginative images with artistic freedom * `default` - Use the model we recommend, which will change over time. This is recommended unless you need a specific model. This is the default behavior. | `"Nano Banana"` | +| `└─ prompt` | ✓ | The prompt used to edit the image. | `"Give me sunglasses"` | +| `aspectRatio` | ✗ | The aspect ratio of the output image(s). If not specified, defaults to `auto`. | `"1:1"` | +| `imageCount` | ✗ | Number of images to generate. Maximum varies by model. Defaults to 1 if not specified. | `1.0` | +| `model` | ✗ | The AI model to use for image editing. Each model has different capabilities and costs. **Models:** - `default` - Use the model we recommend, which will change over time. This is recommended unless you need a specific model. This is the default behavior. - `qwen-edit` - from 10 credits/image - Supported resolutions: 640px, 1k, 2k - Available for tiers: free, creator, pro, business - Max additional input images: 2 - `flux-2-klein` - from 5 credits/image - Supported resolutions: 640px, 1k, 2k - Available for tiers: free, creator, pro, business - Max additional input images: 5 - `nano-banana` - from 50 credits/image - Supported resolutions: 640px, 1k - Available for tiers: creator, pro, business - Max additional input images: 9 - `nano-banana-2` - from 100 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Max additional input images: 9 - `seedream-v4` - from 40 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Max additional input images: 9 - `nano-banana-pro` - from 150 credits/image - Supported resolutions: 1k, 2k, 4k - Available for tiers: creator, pro, business - Max additional input images: 9 - `seedream-v4.5` - from 50 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Max additional input images: 9 - `gpt-image-2` - from 50 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Max additional input images: 9 | `"default"` | +| `name` | ✗ | Give your image a custom name for easy identification. | `"My Ai Image Editor image"` | +| `resolution` | ✗ | Maximum resolution (longest edge) for the output image. **Options:** - `640px` — up to 640px - `1k` — up to 1024px - `2k` — up to 2048px - `4k` — up to 4096px - `auto` — **Deprecated.** Mapped server-side from your subscription tier to the best matching resolution the model supports **Per-model support:** - `qwen-edit` - 640px, 1k, 2k - `flux-2-klein` - 640px, 1k, 2k - `nano-banana` - 640px, 1k - `nano-banana-2` - 640px, 1k, 2k, 4k - `seedream-v4` - 640px, 1k, 2k, 4k - `nano-banana-pro` - 1k, 2k, 4k - `seedream-v4.5` - 640px, 1k, 2k, 4k - `gpt-image-2` - 640px, 1k, 2k, 4k Note: Resolution availability depends on the model and your subscription tier. | `"1k"` | #### Example Snippet diff --git a/src/resources/v1/ai-image-editor/request-types.ts b/src/resources/v1/ai-image-editor/request-types.ts index b5de1b6..a765b15 100644 --- a/src/resources/v1/ai-image-editor/request-types.ts +++ b/src/resources/v1/ai-image-editor/request-types.ts @@ -39,6 +39,10 @@ export type CreateRequest = { * - Supported resolutions: 640px, 1k, 2k * - Available for tiers: free, creator, pro, business * - Max additional input images: 2 + * - `flux-2-klein` - from 5 credits/image + * - Supported resolutions: 640px, 1k, 2k + * - Available for tiers: free, creator, pro, business + * - Max additional input images: 5 * - `nano-banana` - from 50 credits/image * - Supported resolutions: 640px, 1k * - Available for tiers: creator, pro, business @@ -68,6 +72,7 @@ export type CreateRequest = { model?: | ( | "default" + | "flux-2-klein" | "gpt-image-2" | "nano-banana" | "nano-banana-2" @@ -93,6 +98,7 @@ export type CreateRequest = { * * **Per-model support:** * - `qwen-edit` - 640px, 1k, 2k + * - `flux-2-klein` - 640px, 1k, 2k * - `nano-banana` - 640px, 1k * - `nano-banana-2` - 640px, 1k, 2k, 4k * - `seedream-v4` - 640px, 1k, 2k, 4k @@ -120,6 +126,7 @@ export type External$CreateRequest = { model?: | ( | "default" + | "flux-2-klein" | "gpt-image-2" | "nano-banana" | "nano-banana-2" @@ -151,6 +158,7 @@ const SchemaIn$CreateRequest: z.ZodType< model: z .enum([ "default", + "flux-2-klein", "gpt-image-2", "nano-banana", "nano-banana-2", @@ -194,6 +202,7 @@ const SchemaOut$CreateRequest: z.ZodType< model: z .enum([ "default", + "flux-2-klein", "gpt-image-2", "nano-banana", "nano-banana-2", diff --git a/src/resources/v1/ai-image-generator/README.md b/src/resources/v1/ai-image-generator/README.md index 49fd32e..baa0c33 100644 --- a/src/resources/v1/ai-image-generator/README.md +++ b/src/resources/v1/ai-image-generator/README.md @@ -57,18 +57,18 @@ Create an AI image with advanced model selection and quality controls. #### Parameters -| Parameter | Required | Deprecated | Description | Example | -| ---------------- | :------: | :--------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | -| `imageCount` | ✓ | ✗ | Number of images to generate. Maximum varies by model. | `1` | -| `style` | ✓ | ✗ | The art style to use for image generation. | `{"prompt": "Cool image", "tool": "ai-anime-generator"}` | -| `└─ prompt` | ✓ | — | The prompt used for the image(s). | `"Cool image"` | -| `└─ qualityMode` | ✗ | ✓ | DEPRECATED: Use `model` field instead for explicit model selection. Legacy quality mode mapping: - `standard` → `z-image-turbo` model - `pro` → `seedream-v4` model If model is specified, it will take precedence over the legacy quality_mode field. | `"pro"` | -| `└─ tool` | ✗ | — | The art style to use for image generation. Defaults to 'general' if not provided. | `"ai-anime-generator"` | -| `aspectRatio` | ✗ | ✗ | The aspect ratio of the output image(s). If not specified, defaults to `1:1` (square). | `"1:1"` | -| `model` | ✗ | ✗ | The AI model to use for image generation. Each model has different capabilities and costs. **Models:** - `default` - Use the model we recommend, which will change over time. This is recommended unless you need a specific model. This is the default behavior. - `flux-schnell` - from 5 credits/image - Supported resolutions: 640px, 1k, 2k - Available for tiers: free, creator, pro, business - Image count allowed: 1, 2, 3, 4 - `z-image-turbo` - from 5 credits/image - Supported resolutions: 640px, 1k, 2k - Available for tiers: free, creator, pro, business - Image count allowed: 1, 2, 3, 4 - `seedream-v4` - from 40 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Image count allowed: 1, 2, 3, 4 - `nano-banana` - from 50 credits/image - Supported resolutions: 640px, 1k - Available for tiers: creator, pro, business - Image count allowed: 1, 2, 3, 4 - `nano-banana-2` - from 100 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Image count allowed: 1, 4, 9, 16 - `nano-banana-pro` - from 150 credits/image - Supported resolutions: 1k, 2k, 4k - Available for tiers: creator, pro, business - Image count allowed: 1, 4, 9, 16 - `gpt-image-2` - from 50 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Image count allowed: 1, 2, 3, 4 **Deprecated Enum Values:** - `seedream` - Use `seedream-v4` instead. | `"default"` | -| `name` | ✗ | ✗ | Give your image a custom name for easy identification. | `"My Ai Image image"` | -| `orientation` | ✗ | ✓ | DEPRECATED: Use `aspect_ratio` instead. The orientation of the output image(s). `aspect_ratio` takes precedence when `orientation` if both are provided. | `"landscape"` | -| `resolution` | ✗ | ✗ | Maximum resolution (longest edge) for the output image. **Options:** - `640px` — up to 640px - `1k` — up to 1024px - `2k` — up to 2048px - `4k` — up to 4096px - `auto` — **Deprecated.** Mapped server-side from your subscription tier to the best matching resolution the model supports **Per-model support:** - `flux-schnell` - 640px, 1k, 2k - `z-image-turbo` - 640px, 1k, 2k - `seedream-v4` - 640px, 1k, 2k, 4k - `nano-banana` - 640px, 1k - `nano-banana-2` - 640px, 1k, 2k, 4k - `nano-banana-pro` - 1k, 2k, 4k - `gpt-image-2` - 640px, 1k, 2k, 4k Note: Resolution availability depends on the model and your subscription tier. | `"auto"` | +| Parameter | Required | Deprecated | Description | Example | +| ---------------- | :------: | :--------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | +| `imageCount` | ✓ | ✗ | Number of images to generate. Maximum varies by model. | `1` | +| `style` | ✓ | ✗ | The art style to use for image generation. | `{"prompt": "Cool image", "tool": "ai-anime-generator"}` | +| `└─ prompt` | ✓ | — | The prompt used for the image(s). | `"Cool image"` | +| `└─ qualityMode` | ✗ | ✓ | DEPRECATED: Use `model` field instead for explicit model selection. Legacy quality mode mapping: - `standard` → `z-image-turbo` model - `pro` → `seedream-v4` model If model is specified, it will take precedence over the legacy quality_mode field. | `"pro"` | +| `└─ tool` | ✗ | — | The art style to use for image generation. Defaults to 'general' if not provided. | `"ai-anime-generator"` | +| `aspectRatio` | ✗ | ✗ | The aspect ratio of the output image(s). If not specified, defaults to `1:1` (square). | `"1:1"` | +| `model` | ✗ | ✗ | The AI model to use for image generation. Each model has different capabilities and costs. **Models:** - `default` - Use the model we recommend, which will change over time. This is recommended unless you need a specific model. This is the default behavior. - `flux-schnell` - from 5 credits/image - Supported resolutions: 640px, 1k, 2k - Available for tiers: free, creator, pro, business - Image count allowed: 1, 2, 3, 4 - `flux-2-klein` - from 5 credits/image - Supported resolutions: 640px, 1k, 2k - Available for tiers: free, creator, pro, business - Image count allowed: 1 - `z-image-turbo` - from 5 credits/image - Supported resolutions: 640px, 1k, 2k - Available for tiers: free, creator, pro, business - Image count allowed: 1, 2, 3, 4 - `seedream-v4` - from 40 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Image count allowed: 1, 2, 3, 4 - `nano-banana` - from 50 credits/image - Supported resolutions: 640px, 1k - Available for tiers: creator, pro, business - Image count allowed: 1, 2, 3, 4 - `nano-banana-2` - from 100 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Image count allowed: 1, 4, 9, 16 - `nano-banana-pro` - from 150 credits/image - Supported resolutions: 1k, 2k, 4k - Available for tiers: creator, pro, business - Image count allowed: 1, 4, 9, 16 - `gpt-image-2` - from 50 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Image count allowed: 1, 2, 3, 4 **Deprecated Enum Values:** - `seedream` - Use `seedream-v4` instead. | `"default"` | +| `name` | ✗ | ✗ | Give your image a custom name for easy identification. | `"My Ai Image image"` | +| `orientation` | ✗ | ✓ | DEPRECATED: Use `aspect_ratio` instead. The orientation of the output image(s). `aspect_ratio` takes precedence when `orientation` if both are provided. | `"landscape"` | +| `resolution` | ✗ | ✗ | Maximum resolution (longest edge) for the output image. **Options:** - `640px` — up to 640px - `1k` — up to 1024px - `2k` — up to 2048px - `4k` — up to 4096px - `auto` — **Deprecated.** Mapped server-side from your subscription tier to the best matching resolution the model supports **Per-model support:** - `flux-schnell` - 640px, 1k, 2k - `flux-2-klein` - 640px, 1k, 2k - `z-image-turbo` - 640px, 1k, 2k - `seedream-v4` - 640px, 1k, 2k, 4k - `nano-banana` - 640px, 1k - `nano-banana-2` - 640px, 1k, 2k, 4k - `nano-banana-pro` - 1k, 2k, 4k - `gpt-image-2` - 640px, 1k, 2k, 4k Note: Resolution availability depends on the model and your subscription tier. | `"auto"` | #### Example Snippet diff --git a/src/resources/v1/ai-image-generator/request-types.ts b/src/resources/v1/ai-image-generator/request-types.ts index 93bbfb5..e8b70f0 100644 --- a/src/resources/v1/ai-image-generator/request-types.ts +++ b/src/resources/v1/ai-image-generator/request-types.ts @@ -28,6 +28,10 @@ export type CreateRequest = { * - Supported resolutions: 640px, 1k, 2k * - Available for tiers: free, creator, pro, business * - Image count allowed: 1, 2, 3, 4 + * - `flux-2-klein` - from 5 credits/image + * - Supported resolutions: 640px, 1k, 2k + * - Available for tiers: free, creator, pro, business + * - Image count allowed: 1 * - `z-image-turbo` - from 5 credits/image * - Supported resolutions: 640px, 1k, 2k * - Available for tiers: free, creator, pro, business @@ -60,6 +64,7 @@ export type CreateRequest = { model?: | ( | "default" + | "flux-2-klein" | "flux-schnell" | "gpt-image-2" | "nano-banana" @@ -92,6 +97,7 @@ export type CreateRequest = { * * **Per-model support:** * - `flux-schnell` - 640px, 1k, 2k + * - `flux-2-klein` - 640px, 1k, 2k * - `z-image-turbo` - 640px, 1k, 2k * - `seedream-v4` - 640px, 1k, 2k, 4k * - `nano-banana` - 640px, 1k @@ -119,6 +125,7 @@ export type External$CreateRequest = { model?: | ( | "default" + | "flux-2-klein" | "flux-schnell" | "gpt-image-2" | "nano-banana" @@ -149,6 +156,7 @@ const SchemaIn$CreateRequest: z.ZodType< model: z .enum([ "default", + "flux-2-klein", "flux-schnell", "gpt-image-2", "nano-banana", @@ -191,6 +199,7 @@ const SchemaOut$CreateRequest: z.ZodType< model: z .enum([ "default", + "flux-2-klein", "flux-schnell", "gpt-image-2", "nano-banana", diff --git a/src/resources/v1/files/upload-urls/README.md b/src/resources/v1/files/upload-urls/README.md index 14d9ab1..c819bee 100644 --- a/src/resources/v1/files/upload-urls/README.md +++ b/src/resources/v1/files/upload-urls/README.md @@ -11,7 +11,7 @@ The response array will match the order of items in the request body. **Valid file extensions per asset type**: - video: mp4, m4v, mov, webm -- audio: mp3, wav, aac, flac, webm, m4a +- audio: mp3, wav, aac, flac, webm, m4a, opus, ogg, aiff, amr - image: png, jpg, jpeg, heic, heif, webp, avif, jp2, tiff, bmp - gif: gif, webp, webm diff --git a/src/resources/v1/files/upload-urls/resource-client.ts b/src/resources/v1/files/upload-urls/resource-client.ts index 01522c1..bd86f29 100644 --- a/src/resources/v1/files/upload-urls/resource-client.ts +++ b/src/resources/v1/files/upload-urls/resource-client.ts @@ -25,7 +25,7 @@ export class UploadUrlsClient extends CoreResourceClient { * * **Valid file extensions per asset type**: * - video: mp4, m4v, mov, webm - * - audio: mp3, wav, aac, flac, webm, m4a + * - audio: mp3, wav, aac, flac, webm, m4a, opus, ogg, aiff, amr * - image: png, jpg, jpeg, heic, heif, webp, avif, jp2, tiff, bmp * - gif: gif, webp, webm * diff --git a/src/types/v1-ai-image-editor-create-body-model-enum.ts b/src/types/v1-ai-image-editor-create-body-model-enum.ts index 1472644..52332a4 100644 --- a/src/types/v1-ai-image-editor-create-body-model-enum.ts +++ b/src/types/v1-ai-image-editor-create-body-model-enum.ts @@ -7,6 +7,10 @@ * - Supported resolutions: 640px, 1k, 2k * - Available for tiers: free, creator, pro, business * - Max additional input images: 2 + * - `flux-2-klein` - from 5 credits/image + * - Supported resolutions: 640px, 1k, 2k + * - Available for tiers: free, creator, pro, business + * - Max additional input images: 5 * - `nano-banana` - from 50 credits/image * - Supported resolutions: 640px, 1k * - Available for tiers: creator, pro, business @@ -35,6 +39,7 @@ */ export type V1AiImageEditorCreateBodyModelEnum = | "default" + | "flux-2-klein" | "gpt-image-2" | "nano-banana" | "nano-banana-2" diff --git a/src/types/v1-ai-image-editor-create-body-resolution-enum.ts b/src/types/v1-ai-image-editor-create-body-resolution-enum.ts index bf98040..70fde71 100644 --- a/src/types/v1-ai-image-editor-create-body-resolution-enum.ts +++ b/src/types/v1-ai-image-editor-create-body-resolution-enum.ts @@ -10,6 +10,7 @@ * * **Per-model support:** * - `qwen-edit` - 640px, 1k, 2k + * - `flux-2-klein` - 640px, 1k, 2k * - `nano-banana` - 640px, 1k * - `nano-banana-2` - 640px, 1k, 2k, 4k * - `seedream-v4` - 640px, 1k, 2k, 4k diff --git a/src/types/v1-ai-image-editor-create-body.ts b/src/types/v1-ai-image-editor-create-body.ts index 5018897..3914a87 100644 --- a/src/types/v1-ai-image-editor-create-body.ts +++ b/src/types/v1-ai-image-editor-create-body.ts @@ -39,6 +39,10 @@ export type V1AiImageEditorCreateBody = { * - Supported resolutions: 640px, 1k, 2k * - Available for tiers: free, creator, pro, business * - Max additional input images: 2 + * - `flux-2-klein` - from 5 credits/image + * - Supported resolutions: 640px, 1k, 2k + * - Available for tiers: free, creator, pro, business + * - Max additional input images: 5 * - `nano-banana` - from 50 credits/image * - Supported resolutions: 640px, 1k * - Available for tiers: creator, pro, business @@ -68,6 +72,7 @@ export type V1AiImageEditorCreateBody = { model?: | ( | "default" + | "flux-2-klein" | "gpt-image-2" | "nano-banana" | "nano-banana-2" @@ -93,6 +98,7 @@ export type V1AiImageEditorCreateBody = { * * **Per-model support:** * - `qwen-edit` - 640px, 1k, 2k + * - `flux-2-klein` - 640px, 1k, 2k * - `nano-banana` - 640px, 1k * - `nano-banana-2` - 640px, 1k, 2k, 4k * - `seedream-v4` - 640px, 1k, 2k, 4k @@ -120,6 +126,7 @@ export type External$V1AiImageEditorCreateBody = { model?: | ( | "default" + | "flux-2-klein" | "gpt-image-2" | "nano-banana" | "nano-banana-2" @@ -151,6 +158,7 @@ const SchemaIn$V1AiImageEditorCreateBody: z.ZodType< model: z .enum([ "default", + "flux-2-klein", "gpt-image-2", "nano-banana", "nano-banana-2", @@ -194,6 +202,7 @@ const SchemaOut$V1AiImageEditorCreateBody: z.ZodType< model: z .enum([ "default", + "flux-2-klein", "gpt-image-2", "nano-banana", "nano-banana-2", diff --git a/src/types/v1-ai-image-generator-create-body-model-enum.ts b/src/types/v1-ai-image-generator-create-body-model-enum.ts index 5712365..dff0356 100644 --- a/src/types/v1-ai-image-generator-create-body-model-enum.ts +++ b/src/types/v1-ai-image-generator-create-body-model-enum.ts @@ -7,6 +7,10 @@ * - Supported resolutions: 640px, 1k, 2k * - Available for tiers: free, creator, pro, business * - Image count allowed: 1, 2, 3, 4 + * - `flux-2-klein` - from 5 credits/image + * - Supported resolutions: 640px, 1k, 2k + * - Available for tiers: free, creator, pro, business + * - Image count allowed: 1 * - `z-image-turbo` - from 5 credits/image * - Supported resolutions: 640px, 1k, 2k * - Available for tiers: free, creator, pro, business @@ -38,6 +42,7 @@ */ export type V1AiImageGeneratorCreateBodyModelEnum = | "default" + | "flux-2-klein" | "flux-schnell" | "gpt-image-2" | "nano-banana" diff --git a/src/types/v1-ai-image-generator-create-body-resolution-enum.ts b/src/types/v1-ai-image-generator-create-body-resolution-enum.ts index 9898099..5ed7aa3 100644 --- a/src/types/v1-ai-image-generator-create-body-resolution-enum.ts +++ b/src/types/v1-ai-image-generator-create-body-resolution-enum.ts @@ -10,6 +10,7 @@ * * **Per-model support:** * - `flux-schnell` - 640px, 1k, 2k + * - `flux-2-klein` - 640px, 1k, 2k * - `z-image-turbo` - 640px, 1k, 2k * - `seedream-v4` - 640px, 1k, 2k, 4k * - `nano-banana` - 640px, 1k diff --git a/src/types/v1-ai-image-generator-create-body.ts b/src/types/v1-ai-image-generator-create-body.ts index 078ceaa..038606f 100644 --- a/src/types/v1-ai-image-generator-create-body.ts +++ b/src/types/v1-ai-image-generator-create-body.ts @@ -28,6 +28,10 @@ export type V1AiImageGeneratorCreateBody = { * - Supported resolutions: 640px, 1k, 2k * - Available for tiers: free, creator, pro, business * - Image count allowed: 1, 2, 3, 4 + * - `flux-2-klein` - from 5 credits/image + * - Supported resolutions: 640px, 1k, 2k + * - Available for tiers: free, creator, pro, business + * - Image count allowed: 1 * - `z-image-turbo` - from 5 credits/image * - Supported resolutions: 640px, 1k, 2k * - Available for tiers: free, creator, pro, business @@ -60,6 +64,7 @@ export type V1AiImageGeneratorCreateBody = { model?: | ( | "default" + | "flux-2-klein" | "flux-schnell" | "gpt-image-2" | "nano-banana" @@ -92,6 +97,7 @@ export type V1AiImageGeneratorCreateBody = { * * **Per-model support:** * - `flux-schnell` - 640px, 1k, 2k + * - `flux-2-klein` - 640px, 1k, 2k * - `z-image-turbo` - 640px, 1k, 2k * - `seedream-v4` - 640px, 1k, 2k, 4k * - `nano-banana` - 640px, 1k @@ -119,6 +125,7 @@ export type External$V1AiImageGeneratorCreateBody = { model?: | ( | "default" + | "flux-2-klein" | "flux-schnell" | "gpt-image-2" | "nano-banana" @@ -149,6 +156,7 @@ const SchemaIn$V1AiImageGeneratorCreateBody: z.ZodType< model: z .enum([ "default", + "flux-2-klein", "flux-schnell", "gpt-image-2", "nano-banana", @@ -191,6 +199,7 @@ const SchemaOut$V1AiImageGeneratorCreateBody: z.ZodType< model: z .enum([ "default", + "flux-2-klein", "flux-schnell", "gpt-image-2", "nano-banana", diff --git a/src/types/v1-files-upload-urls-create-body-items-item.ts b/src/types/v1-files-upload-urls-create-body-items-item.ts index f9887f0..0709b01 100644 --- a/src/types/v1-files-upload-urls-create-body-items-item.ts +++ b/src/types/v1-files-upload-urls-create-body-items-item.ts @@ -6,7 +6,7 @@ import * as z from "zod"; */ export type V1FilesUploadUrlsCreateBodyItemsItem = { /** - * The extension of the file to upload. Do not include the dot (.) before the extension. Possible extensions are mp4,m4v,mov,webm,mp3,wav,aac,flac,webm,m4a,png,jpg,jpeg,heic,heif,webp,avif,jp2,tiff,bmp,gif,webp,webm + * The extension of the file to upload. Do not include the dot (.) before the extension. Possible extensions are mp4,m4v,mov,webm,mp3,wav,aac,flac,webm,m4a,opus,ogg,aiff,amr,png,jpg,jpeg,heic,heif,webp,avif,jp2,tiff,bmp,gif,webp,webm */ extension: string; /**