Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .sdk.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "546e1877-5fc9-48f8-af87-100072c9c2fc",
"id": "a99332c4-395a-42e0-8a2d-833989f9bf84",
"tracked_paths": [
{
"editable": true,
Expand Down
2 changes: 1 addition & 1 deletion magic_hour/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.60.0"
MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.61.1"


def _get_base_url(
Expand Down
30 changes: 15 additions & 15 deletions magic_hour/resources/v1/ai_image_editor/README.md

Large diffs are not rendered by default.

104 changes: 64 additions & 40 deletions magic_hour/resources/v1/ai_image_editor/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ def create(
typing.Optional[str], type_utils.NotGiven
] = type_utils.NOT_GIVEN,
resolution: typing.Union[
typing.Optional[typing_extensions.Literal["2k", "4k", "auto"]],
typing.Optional[
typing_extensions.Literal["1k", "2k", "4k", "640px", "auto"]
],
type_utils.NotGiven,
] = type_utils.NOT_GIVEN,
request_options: typing.Optional[RequestOptions] = None,
Expand All @@ -184,40 +186,50 @@ def create(

**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` - 10 credits/image
- `qwen-edit` - from 10 credits/image
- Supported resolutions: 640px, 1k, 2k
- Available for tiers: free, creator, pro, business
- Image count allowed: 1
- Max additional input images: 2
- `nano-banana` - 50 credits/image
- `nano-banana` - from 50 credits/image
- Supported resolutions: 640px, 1k
- Available for tiers: free, creator, pro, business
- Image count allowed: 1
- Max additional input images: 9
- `nano-banana-2` - 100 credits/image
- `nano-banana-2` - from 100 credits/image
- Supported resolutions: 640px, 1k, 2k, 4k
- Available for tiers: free, creator, pro, business
- Image count allowed: 1
- Max additional input images: 9
- `seedream-v4` - 50 credits/image
- `seedream-v4` - from 40 credits/image
- Supported resolutions: 640px, 1k, 2k, 4k
- Available for tiers: free, creator, pro, business
- Image count allowed: 1
- Max additional input images: 9
- `nano-banana-pro` - 150 credits/image
- `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
- Max additional input images: 9
- `seedream-v4.5` - 100 credits/image
- `seedream-v4.5` - from 50 credits/image
- Supported resolutions: 640px, 1k, 2k, 4k
- Available for tiers: creator, pro, business
- Image count allowed: 1
- Max additional input images: 9

name: Give your image a custom name for easy identification.
resolution: Maximum resolution for the generated image.
resolution: Maximum resolution (longest edge) for the output image.

**Options:**
- `auto` - Automatic resolution (all tiers, default)
- `2k` - Up to 2048px (requires Pro or Business tier)
- `4k` - Up to 4096px (requires Business tier)

Note: Resolution availability depends on your subscription tier. Defaults to `auto` if not specified.
- `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

Note: Resolution availability depends on the model and your subscription tier.
assets: Provide the assets for image edit
style: V1AiImageEditorCreateBodyStyle
request_options: Additional options to customize the HTTP request
Expand All @@ -240,7 +252,7 @@ def create(
image_count=1.0,
model="default",
name="My Ai Image Editor image",
resolution="auto",
resolution="1k",
)
```
"""
Expand Down Expand Up @@ -412,7 +424,9 @@ async def create(
typing.Optional[str], type_utils.NotGiven
] = type_utils.NOT_GIVEN,
resolution: typing.Union[
typing.Optional[typing_extensions.Literal["2k", "4k", "auto"]],
typing.Optional[
typing_extensions.Literal["1k", "2k", "4k", "640px", "auto"]
],
type_utils.NotGiven,
] = type_utils.NOT_GIVEN,
request_options: typing.Optional[RequestOptions] = None,
Expand All @@ -431,40 +445,50 @@ async def create(

**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` - 10 credits/image
- `qwen-edit` - from 10 credits/image
- Supported resolutions: 640px, 1k, 2k
- Available for tiers: free, creator, pro, business
- Image count allowed: 1
- Max additional input images: 2
- `nano-banana` - 50 credits/image
- `nano-banana` - from 50 credits/image
- Supported resolutions: 640px, 1k
- Available for tiers: free, creator, pro, business
- Image count allowed: 1
- Max additional input images: 9
- `nano-banana-2` - 100 credits/image
- `nano-banana-2` - from 100 credits/image
- Supported resolutions: 640px, 1k, 2k, 4k
- Available for tiers: free, creator, pro, business
- Image count allowed: 1
- Max additional input images: 9
- `seedream-v4` - 50 credits/image
- `seedream-v4` - from 40 credits/image
- Supported resolutions: 640px, 1k, 2k, 4k
- Available for tiers: free, creator, pro, business
- Image count allowed: 1
- Max additional input images: 9
- `nano-banana-pro` - 150 credits/image
- `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
- Max additional input images: 9
- `seedream-v4.5` - 100 credits/image
- `seedream-v4.5` - from 50 credits/image
- Supported resolutions: 640px, 1k, 2k, 4k
- Available for tiers: creator, pro, business
- Image count allowed: 1
- Max additional input images: 9

name: Give your image a custom name for easy identification.
resolution: Maximum resolution for the generated image.
resolution: Maximum resolution (longest edge) for the output image.

**Options:**
- `auto` - Automatic resolution (all tiers, default)
- `2k` - Up to 2048px (requires Pro or Business tier)
- `4k` - Up to 4096px (requires Business tier)

Note: Resolution availability depends on your subscription tier. Defaults to `auto` if not specified.
- `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

Note: Resolution availability depends on the model and your subscription tier.
assets: Provide the assets for image edit
style: V1AiImageEditorCreateBodyStyle
request_options: Additional options to customize the HTTP request
Expand All @@ -487,7 +511,7 @@ async def create(
image_count=1.0,
model="default",
name="My Ai Image Editor image",
resolution="auto",
resolution="1k",
)
```
"""
Expand Down
Loading
Loading