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": "1be4520e-0bec-4a18-81cf-2488a9d303f8",
"id": "0270e04f-dd51-4f01-9578-99d683c4ee44",
"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.62.0"
MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.63.0"


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

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions magic_hour/resources/v1/ai_image_editor/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def create(
typing.Optional[
typing_extensions.Literal[
"default",
"gpt-image-2",
"nano-banana",
"nano-banana-2",
"nano-banana-pro",
Expand Down Expand Up @@ -207,6 +208,10 @@ def create(
- 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
Expand All @@ -228,6 +233,7 @@ def create(
- `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.
assets: Provide the assets for image edit
Expand Down Expand Up @@ -410,6 +416,7 @@ async def create(
typing.Optional[
typing_extensions.Literal[
"default",
"gpt-image-2",
"nano-banana",
"nano-banana-2",
"nano-banana-pro",
Expand Down Expand Up @@ -466,6 +473,10 @@ async def create(
- 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
Expand All @@ -487,6 +498,7 @@ async def create(
- `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.
assets: Provide the assets for image edit
Expand Down
24 changes: 12 additions & 12 deletions magic_hour/resources/v1/ai_image_generator/README.md

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions magic_hour/resources/v1/ai_image_generator/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def create(
typing_extensions.Literal[
"default",
"flux-schnell",
"gpt-image-2",
"nano-banana",
"nano-banana-2",
"nano-banana-pro",
Expand Down Expand Up @@ -196,6 +197,10 @@ def create(
- 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.
Expand All @@ -220,6 +225,7 @@ def create(
- `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.
image_count: Number of images to generate. Maximum varies by model.
Expand Down Expand Up @@ -373,6 +379,7 @@ async def create(
typing_extensions.Literal[
"default",
"flux-schnell",
"gpt-image-2",
"nano-banana",
"nano-banana-2",
"nano-banana-pro",
Expand Down Expand Up @@ -437,6 +444,10 @@ async def create(
- 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.
Expand All @@ -461,6 +472,7 @@ async def create(
- `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.
image_count: Number of images to generate. Maximum varies by model.
Expand Down
5 changes: 2 additions & 3 deletions magic_hour/resources/v1/body_swap/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
type_utils,
)


logger = get_sdk_logger(__name__)


Expand Down Expand Up @@ -208,9 +209,7 @@ async def generate(
assets["person_file_path"] = await file_client.upload_file(
file=person_file_path
)
assets["scene_file_path"] = await file_client.upload_file(
file=scene_file_path
)
assets["scene_file_path"] = await file_client.upload_file(file=scene_file_path)

create_response = await self.create(
assets=assets,
Expand Down
2 changes: 1 addition & 1 deletion magic_hour/resources/v1/files/upload_urls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The response array will match the order of items in the request body.

- video: mp4, m4v, mov, webm
- audio: mp3, wav, aac, flac, webm, m4a
- image: png, jpg, jpeg, heic, webp, avif, jp2, tiff, bmp
- image: png, jpg, jpeg, heic, heif, webp, avif, jp2, tiff, bmp
- gif: gif, webp, webm

> Note: `gif` is only supported for face swap API `video_file_path` field.
Expand Down
4 changes: 2 additions & 2 deletions magic_hour/resources/v1/files/upload_urls/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def create(
**Valid file extensions per asset type**:
- video: mp4, m4v, mov, webm
- audio: mp3, wav, aac, flac, webm, m4a
- image: png, jpg, jpeg, heic, webp, avif, jp2, tiff, bmp
- image: png, jpg, jpeg, heic, heif, webp, avif, jp2, tiff, bmp
- gif: gif, webp, webm

> Note: `gif` is only supported for face swap API `video_file_path` field.
Expand Down Expand Up @@ -97,7 +97,7 @@ async def create(
**Valid file extensions per asset type**:
- video: mp4, m4v, mov, webm
- audio: mp3, wav, aac, flac, webm, m4a
- image: png, jpg, jpeg, heic, webp, avif, jp2, tiff, bmp
- image: png, jpg, jpeg, heic, heif, webp, avif, jp2, tiff, bmp
- gif: gif, webp, webm

> Note: `gif` is only supported for face swap API `video_file_path` field.
Expand Down
Loading
Loading