From b670b2148f7d427ed70a8c0f19460b5a488194ba Mon Sep 17 00:00:00 2001 From: "sdk-github-actions[bot]" Date: Fri, 5 Jun 2026 22:28:03 +0000 Subject: [PATCH] chore(release): auto --- .sdk.json | 2 +- magic_hour/environment.py | 2 +- .../resources/v1/ai_image_editor/README.md | 26 +++++++++---------- .../resources/v1/ai_image_editor/client.py | 12 +++++++++ .../resources/v1/ai_image_generator/README.md | 24 ++++++++--------- .../resources/v1/ai_image_generator/client.py | 12 +++++++++ .../resources/v1/files/upload_urls/README.md | 2 +- .../resources/v1/files/upload_urls/client.py | 4 +-- .../params/v1_ai_image_editor_create_body.py | 7 +++++ .../v1_ai_image_generator_create_body.py | 7 +++++ ...iles_upload_urls_create_body_items_item.py | 2 +- pyproject.toml | 2 +- 12 files changed, 70 insertions(+), 32 deletions(-) diff --git a/.sdk.json b/.sdk.json index c59cf04..f084501 100644 --- a/.sdk.json +++ b/.sdk.json @@ -1,5 +1,5 @@ { - "id": "34fe0cae-af25-4fc9-90f3-9f7e689be4d3", + "id": "5ab133c6-92ce-43aa-9150-24f61ee303a2", "tracked_paths": [ { "editable": true, diff --git a/magic_hour/environment.py b/magic_hour/environment.py index e5b5511..b6503cd 100644 --- a/magic_hour/environment.py +++ b/magic_hour/environment.py @@ -6,7 +6,7 @@ class Environment(enum.Enum): """Pre-defined base URLs for the API""" ENVIRONMENT = "https://api.magichour.ai" - MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.65.1" + MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.66.0" def _get_base_url( diff --git a/magic_hour/resources/v1/ai_image_editor/README.md b/magic_hour/resources/v1/ai_image_editor/README.md index e197a59..81206a1 100644 --- a/magic_hour/resources/v1/ai_image_editor/README.md +++ b/magic_hour/resources/v1/ai_image_editor/README.md @@ -68,19 +68,19 @@ Edit images with AI. #### Parameters -| Parameter | Required | Description | Example | -| --------------------- | :------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `assets` | ✓ | Provide the assets for image edit | `{"image_file_paths": ["api-assets/id/1234.png", "api-assets/id/1235.png"]}` | -| `└─ image_file_path` | ✗ | 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"` | -| `└─ image_file_paths` | ✗ | 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"` | -| `aspect_ratio` | ✗ | The aspect ratio of the output image(s). If not specified, defaults to `auto`. | `"1:1"` | -| `image_count` | ✗ | 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 | `{"image_file_paths": ["api-assets/id/1234.png", "api-assets/id/1235.png"]}` | +| `└─ image_file_path` | ✗ | 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"` | +| `└─ image_file_paths` | ✗ | 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"` | +| `aspect_ratio` | ✗ | The aspect ratio of the output image(s). If not specified, defaults to `auto`. | `"1:1"` | +| `image_count` | ✗ | 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"` | #### Synchronous Client diff --git a/magic_hour/resources/v1/ai_image_editor/client.py b/magic_hour/resources/v1/ai_image_editor/client.py index 82514b9..14fb49b 100644 --- a/magic_hour/resources/v1/ai_image_editor/client.py +++ b/magic_hour/resources/v1/ai_image_editor/client.py @@ -151,6 +151,7 @@ def create( typing.Optional[ typing_extensions.Literal[ "default", + "flux-2-klein", "gpt-image-2", "nano-banana", "nano-banana-2", @@ -191,6 +192,10 @@ def create( - 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 @@ -228,6 +233,7 @@ def create( **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 @@ -416,6 +422,7 @@ async def create( typing.Optional[ typing_extensions.Literal[ "default", + "flux-2-klein", "gpt-image-2", "nano-banana", "nano-banana-2", @@ -456,6 +463,10 @@ async def create( - 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 @@ -493,6 +504,7 @@ async def create( **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/magic_hour/resources/v1/ai_image_generator/README.md b/magic_hour/resources/v1/ai_image_generator/README.md index 0ff6c6c..d18fd35 100644 --- a/magic_hour/resources/v1/ai_image_generator/README.md +++ b/magic_hour/resources/v1/ai_image_generator/README.md @@ -75,18 +75,18 @@ Create an AI image with advanced model selection and quality controls. #### Parameters -| Parameter | Required | Deprecated | Description | Example | -| ----------------- | :------: | :--------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | -| `image_count` | ✓ | ✗ | 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"` | -| `└─ quality_mode` | ✗ | ✓ | 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"` | -| `aspect_ratio` | ✗ | ✗ | 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 | +| ----------------- | :------: | :--------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | +| `image_count` | ✓ | ✗ | 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"` | +| `└─ quality_mode` | ✗ | ✓ | 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"` | +| `aspect_ratio` | ✗ | ✗ | 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"` | #### Synchronous Client diff --git a/magic_hour/resources/v1/ai_image_generator/client.py b/magic_hour/resources/v1/ai_image_generator/client.py index be2a45c..4f1dec8 100644 --- a/magic_hour/resources/v1/ai_image_generator/client.py +++ b/magic_hour/resources/v1/ai_image_generator/client.py @@ -131,6 +131,7 @@ def create( typing.Optional[ typing_extensions.Literal[ "default", + "flux-2-klein", "flux-schnell", "gpt-image-2", "nano-banana", @@ -177,6 +178,10 @@ def create( - 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 @@ -220,6 +225,7 @@ def create( **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 @@ -378,6 +384,7 @@ async def create( typing.Optional[ typing_extensions.Literal[ "default", + "flux-2-klein", "flux-schnell", "gpt-image-2", "nano-banana", @@ -424,6 +431,10 @@ async def create( - 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 @@ -467,6 +478,7 @@ async def create( **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/magic_hour/resources/v1/files/upload_urls/README.md b/magic_hour/resources/v1/files/upload_urls/README.md index 66c09df..b40225d 100644 --- a/magic_hour/resources/v1/files/upload_urls/README.md +++ b/magic_hour/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/magic_hour/resources/v1/files/upload_urls/client.py b/magic_hour/resources/v1/files/upload_urls/client.py index 108418a..950d312 100644 --- a/magic_hour/resources/v1/files/upload_urls/client.py +++ b/magic_hour/resources/v1/files/upload_urls/client.py @@ -29,7 +29,7 @@ def create( **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 @@ -96,7 +96,7 @@ async def create( **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/magic_hour/types/params/v1_ai_image_editor_create_body.py b/magic_hour/types/params/v1_ai_image_editor_create_body.py index ae39e47..b6c0946 100644 --- a/magic_hour/types/params/v1_ai_image_editor_create_body.py +++ b/magic_hour/types/params/v1_ai_image_editor_create_body.py @@ -39,6 +39,7 @@ class V1AiImageEditorCreateBody(typing_extensions.TypedDict): model: typing_extensions.NotRequired[ typing_extensions.Literal[ "default", + "flux-2-klein", "gpt-image-2", "nano-banana", "nano-banana-2", @@ -57,6 +58,10 @@ class V1AiImageEditorCreateBody(typing_extensions.TypedDict): - 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 @@ -104,6 +109,7 @@ class V1AiImageEditorCreateBody(typing_extensions.TypedDict): **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 @@ -141,6 +147,7 @@ class _SerializerV1AiImageEditorCreateBody(pydantic.BaseModel): model: typing.Optional[ typing_extensions.Literal[ "default", + "flux-2-klein", "gpt-image-2", "nano-banana", "nano-banana-2", diff --git a/magic_hour/types/params/v1_ai_image_generator_create_body.py b/magic_hour/types/params/v1_ai_image_generator_create_body.py index 270ab81..6736fdd 100644 --- a/magic_hour/types/params/v1_ai_image_generator_create_body.py +++ b/magic_hour/types/params/v1_ai_image_generator_create_body.py @@ -28,6 +28,7 @@ class V1AiImageGeneratorCreateBody(typing_extensions.TypedDict): model: typing_extensions.NotRequired[ typing_extensions.Literal[ "default", + "flux-2-klein", "flux-schnell", "gpt-image-2", "nano-banana", @@ -47,6 +48,10 @@ class V1AiImageGeneratorCreateBody(typing_extensions.TypedDict): - 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 @@ -106,6 +111,7 @@ class V1AiImageGeneratorCreateBody(typing_extensions.TypedDict): **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 @@ -141,6 +147,7 @@ class _SerializerV1AiImageGeneratorCreateBody(pydantic.BaseModel): model: typing.Optional[ typing_extensions.Literal[ "default", + "flux-2-klein", "flux-schnell", "gpt-image-2", "nano-banana", diff --git a/magic_hour/types/params/v1_files_upload_urls_create_body_items_item.py b/magic_hour/types/params/v1_files_upload_urls_create_body_items_item.py index d6c4cb8..d7e7125 100644 --- a/magic_hour/types/params/v1_files_upload_urls_create_body_items_item.py +++ b/magic_hour/types/params/v1_files_upload_urls_create_body_items_item.py @@ -9,7 +9,7 @@ class V1FilesUploadUrlsCreateBodyItemsItem(typing_extensions.TypedDict): extension: typing_extensions.Required[str] """ - 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 """ type_: typing_extensions.Required[ diff --git a/pyproject.toml b/pyproject.toml index 228be91..5914c4c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "magic_hour" -version = "0.65.1" +version = "0.66.0" description = "Python SDK for Magic Hour API" readme = "README.md" authors = []