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": "c188927d-3584-4a2a-b407-ed577a0b44bf",
"id": "41dbe050-66a7-40e4-a5c0-2c5e9bbe5a1d",
"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.86.0"
MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.87.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.

14 changes: 14 additions & 0 deletions magic_hour/resources/v1/ai_image_editor/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def generate(
"nano-banana",
"nano-banana-2",
"nano-banana-2-lite",
"nano-banana-2.1",
"nano-banana-pro",
"qwen-edit",
"qwen-image-2.1",
Expand Down Expand Up @@ -168,6 +169,7 @@ def create(
"nano-banana",
"nano-banana-2",
"nano-banana-2-lite",
"nano-banana-2.1",
"nano-banana-pro",
"qwen-edit",
"qwen-image-2.1",
Expand Down Expand Up @@ -231,6 +233,10 @@ def create(
- Supported resolutions: 640px, 1k
- Available for tiers: creator, pro, business
- Max additional input images: 9
- `nano-banana-2.1` - from 50 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
Expand Down Expand Up @@ -274,6 +280,7 @@ def create(
- `nano-banana` - 640px, 1k
- `nano-banana-2` - 640px, 1k, 2k, 4k
- `nano-banana-2-lite` - 640px, 1k
- `nano-banana-2.1` - 640px, 1k, 2k, 4k
- `nano-banana-pro` - 1k, 2k, 4k
- `qwen-edit` - 640px, 1k, 2k
- `qwen-image-2.1` - 640px, 1k, 2k
Expand Down Expand Up @@ -364,6 +371,7 @@ async def generate(
"nano-banana",
"nano-banana-2",
"nano-banana-2-lite",
"nano-banana-2.1",
"nano-banana-pro",
"qwen-edit",
"qwen-image-2.1",
Expand Down Expand Up @@ -479,6 +487,7 @@ async def create(
"nano-banana",
"nano-banana-2",
"nano-banana-2-lite",
"nano-banana-2.1",
"nano-banana-pro",
"qwen-edit",
"qwen-image-2.1",
Expand Down Expand Up @@ -542,6 +551,10 @@ async def create(
- Supported resolutions: 640px, 1k
- Available for tiers: creator, pro, business
- Max additional input images: 9
- `nano-banana-2.1` - from 50 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
Expand Down Expand Up @@ -585,6 +598,7 @@ async def create(
- `nano-banana` - 640px, 1k
- `nano-banana-2` - 640px, 1k, 2k, 4k
- `nano-banana-2-lite` - 640px, 1k
- `nano-banana-2.1` - 640px, 1k, 2k, 4k
- `nano-banana-pro` - 1k, 2k, 4k
- `qwen-edit` - 640px, 1k, 2k
- `qwen-image-2.1` - 640px, 1k, 2k
Expand Down
24 changes: 12 additions & 12 deletions magic_hour/resources/v1/ai_image_generator/README.md

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions magic_hour/resources/v1/ai_image_generator/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def generate(
"nano-banana",
"nano-banana-2",
"nano-banana-2-lite",
"nano-banana-2.1",
"nano-banana-pro",
"qwen-image-2.1",
"seedream",
Expand Down Expand Up @@ -151,6 +152,7 @@ def create(
"nano-banana",
"nano-banana-2",
"nano-banana-2-lite",
"nano-banana-2.1",
"nano-banana-pro",
"qwen-image-2.1",
"seedream",
Expand Down Expand Up @@ -223,6 +225,10 @@ def create(
- Supported resolutions: 640px, 1k
- Available for tiers: creator, pro, business
- Image count allowed: 1, 2, 3, 4
- `nano-banana-2.1` - from 50 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
Expand Down Expand Up @@ -269,6 +275,7 @@ def create(
- `nano-banana` - 640px, 1k
- `nano-banana-2` - 640px, 1k, 2k, 4k
- `nano-banana-2-lite` - 640px, 1k
- `nano-banana-2.1` - 640px, 1k, 2k, 4k
- `nano-banana-pro` - 1k, 2k, 4k
- `qwen-image-2.1` - 640px, 1k, 2k
- `seedream-v4` - 640px, 1k, 2k, 4k
Expand Down Expand Up @@ -355,6 +362,7 @@ async def generate(
"nano-banana",
"nano-banana-2",
"nano-banana-2-lite",
"nano-banana-2.1",
"nano-banana-pro",
"qwen-image-2.1",
"seedream",
Expand Down Expand Up @@ -451,6 +459,7 @@ async def create(
"nano-banana",
"nano-banana-2",
"nano-banana-2-lite",
"nano-banana-2.1",
"nano-banana-pro",
"qwen-image-2.1",
"seedream",
Expand Down Expand Up @@ -523,6 +532,10 @@ async def create(
- Supported resolutions: 640px, 1k
- Available for tiers: creator, pro, business
- Image count allowed: 1, 2, 3, 4
- `nano-banana-2.1` - from 50 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
Expand Down Expand Up @@ -569,6 +582,7 @@ async def create(
- `nano-banana` - 640px, 1k
- `nano-banana-2` - 640px, 1k, 2k, 4k
- `nano-banana-2-lite` - 640px, 1k
- `nano-banana-2.1` - 640px, 1k, 2k, 4k
- `nano-banana-pro` - 1k, 2k, 4k
- `qwen-image-2.1` - 640px, 1k, 2k
- `seedream-v4` - 640px, 1k, 2k, 4k
Expand Down
8 changes: 4 additions & 4 deletions magic_hour/resources/v1/ai_talking_photo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ res = await client.v1.ai_talking_photo.generate(

### AI Talking Photo <a name="create"></a>

Create a talking photo from an image and audio or text input.
Create a talking photo video from an image and an audio file.

**API Endpoint**: `POST /v1/ai-talking-photo`

Expand All @@ -84,7 +84,7 @@ Create a talking photo from an image and audio or text input.
| `end_seconds` | ✓ | The end time of the input audio in seconds. Maximum clip length depends on style.generation_mode: realistic 300s, prompted 45s. | `15.0` |
| `start_seconds` | ✓ | The start time of the input audio in seconds. Maximum clip length depends on style.generation_mode: realistic 300s, prompted 45s. | `0.0` |
| `max_resolution` | ✗ | Constrains the larger dimension (height or width) of the output video. Allows you to set a lower resolution than your plan's maximum if desired. The value is capped by your plan's max resolution. | `1024` |
| `name` | ✗ | Give your image a custom name for easy identification. | `"My Talking Photo image"` |
| `name` | ✗ | Give your video a custom name for easy identification. | `"My Talking Photo video"` |
| `style` | ✗ | Attributes used to dictate the style of the output | `{"generation_mode": "realistic"}` |
| `└─ generation_mode` | ✗ | Controls overall motion style. * `realistic` - Maintains likeness well, high quality, and reliable. * `prompted` - Slightly lower likeness; allows option to prompt scene. **Deprecated values (maintained for backward compatibility):** * `pro` - Deprecated: use `realistic` * `standard` - Deprecated: use `prompted` * `stable` - Deprecated: use `realistic` * `expressive` - Deprecated: use `prompted` | `"realistic"` |
| `└─ intensity` | ✗ | Note: this value is only applicable when generation_mode is `expressive`. The value can include up to 2 decimal places. * Lower values yield more stability but can suppress mouth movement. * Higher values increase motion and expressiveness, with a higher risk of distortion. | `123.0` |
Expand All @@ -105,7 +105,7 @@ res = client.v1.ai_talking_photo.create(
end_seconds=15.0,
start_seconds=0.0,
max_resolution=1024,
name="My Talking Photo image",
name="My Talking Photo video",
)
```

Expand All @@ -124,7 +124,7 @@ res = await client.v1.ai_talking_photo.create(
end_seconds=15.0,
start_seconds=0.0,
max_resolution=1024,
name="My Talking Photo image",
name="My Talking Photo video",
)
```

Expand Down
12 changes: 6 additions & 6 deletions magic_hour/resources/v1/ai_talking_photo/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ def create(
"""
AI Talking Photo

Create a talking photo from an image and audio or text input.
Create a talking photo video from an image and an audio file.

POST /v1/ai-talking-photo

Args:
max_resolution: Constrains the larger dimension (height or width) of the output video. Allows you to set a lower resolution than your plan's maximum if desired. The value is capped by your plan's max resolution.
name: Give your image a custom name for easy identification.
name: Give your video a custom name for easy identification.
style: Attributes used to dictate the style of the output
assets: Provide the assets for creating a talking photo
end_seconds: The end time of the input audio in seconds. Maximum clip length depends on style.generation_mode: realistic 300s, prompted 45s.
Expand All @@ -159,7 +159,7 @@ def create(
end_seconds=15.0,
start_seconds=0.0,
max_resolution=1024,
name="My Talking Photo image",
name="My Talking Photo video",
)
```
"""
Expand Down Expand Up @@ -293,13 +293,13 @@ async def create(
"""
AI Talking Photo

Create a talking photo from an image and audio or text input.
Create a talking photo video from an image and an audio file.

POST /v1/ai-talking-photo

Args:
max_resolution: Constrains the larger dimension (height or width) of the output video. Allows you to set a lower resolution than your plan's maximum if desired. The value is capped by your plan's max resolution.
name: Give your image a custom name for easy identification.
name: Give your video a custom name for easy identification.
style: Attributes used to dictate the style of the output
assets: Provide the assets for creating a talking photo
end_seconds: The end time of the input audio in seconds. Maximum clip length depends on style.generation_mode: realistic 300s, prompted 45s.
Expand All @@ -323,7 +323,7 @@ async def create(
end_seconds=15.0,
start_seconds=0.0,
max_resolution=1024,
name="My Talking Photo image",
name="My Talking Photo video",
)
```
"""
Expand Down
7 changes: 7 additions & 0 deletions magic_hour/types/params/v1_ai_image_editor_create_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class V1AiImageEditorCreateBody(typing_extensions.TypedDict):
"nano-banana",
"nano-banana-2",
"nano-banana-2-lite",
"nano-banana-2.1",
"nano-banana-pro",
"qwen-edit",
"qwen-image-2.1",
Expand Down Expand Up @@ -87,6 +88,10 @@ class V1AiImageEditorCreateBody(typing_extensions.TypedDict):
- Supported resolutions: 640px, 1k
- Available for tiers: creator, pro, business
- Max additional input images: 9
- `nano-banana-2.1` - from 50 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
Expand Down Expand Up @@ -140,6 +145,7 @@ class V1AiImageEditorCreateBody(typing_extensions.TypedDict):
- `nano-banana` - 640px, 1k
- `nano-banana-2` - 640px, 1k, 2k, 4k
- `nano-banana-2-lite` - 640px, 1k
- `nano-banana-2.1` - 640px, 1k, 2k, 4k
- `nano-banana-pro` - 1k, 2k, 4k
- `qwen-edit` - 640px, 1k, 2k
- `qwen-image-2.1` - 640px, 1k, 2k
Expand Down Expand Up @@ -184,6 +190,7 @@ class _SerializerV1AiImageEditorCreateBody(pydantic.BaseModel):
"nano-banana",
"nano-banana-2",
"nano-banana-2-lite",
"nano-banana-2.1",
"nano-banana-pro",
"qwen-edit",
"qwen-image-2.1",
Expand Down
7 changes: 7 additions & 0 deletions magic_hour/types/params/v1_ai_image_generator_create_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class V1AiImageGeneratorCreateBody(typing_extensions.TypedDict):
"nano-banana",
"nano-banana-2",
"nano-banana-2-lite",
"nano-banana-2.1",
"nano-banana-pro",
"qwen-image-2.1",
"seedream",
Expand Down Expand Up @@ -81,6 +82,10 @@ class V1AiImageGeneratorCreateBody(typing_extensions.TypedDict):
- Supported resolutions: 640px, 1k
- Available for tiers: creator, pro, business
- Image count allowed: 1, 2, 3, 4
- `nano-banana-2.1` - from 50 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
Expand Down Expand Up @@ -143,6 +148,7 @@ class V1AiImageGeneratorCreateBody(typing_extensions.TypedDict):
- `nano-banana` - 640px, 1k
- `nano-banana-2` - 640px, 1k, 2k, 4k
- `nano-banana-2-lite` - 640px, 1k
- `nano-banana-2.1` - 640px, 1k, 2k, 4k
- `nano-banana-pro` - 1k, 2k, 4k
- `qwen-image-2.1` - 640px, 1k, 2k
- `seedream-v4` - 640px, 1k, 2k, 4k
Expand Down Expand Up @@ -185,6 +191,7 @@ class _SerializerV1AiImageGeneratorCreateBody(pydantic.BaseModel):
"nano-banana",
"nano-banana-2",
"nano-banana-2-lite",
"nano-banana-2.1",
"nano-banana-pro",
"qwen-image-2.1",
"seedream",
Expand Down
2 changes: 1 addition & 1 deletion magic_hour/types/params/v1_ai_talking_photo_create_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class V1AiTalkingPhotoCreateBody(typing_extensions.TypedDict):

name: typing_extensions.NotRequired[str]
"""
Give your image a custom name for easy identification.
Give your video a custom name for easy identification.
"""

start_seconds: typing_extensions.Required[float]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "magic_hour"
version = "0.86.0"
version = "0.87.0"
description = "Python SDK for Magic Hour API"
readme = "README.md"
authors = []
Expand Down
4 changes: 2 additions & 2 deletions tests/test_v1_ai_talking_photo_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_create_200_success_all_params() -> None:
end_seconds=15.0,
start_seconds=0.0,
max_resolution=1024,
name="My Talking Photo image",
name="My Talking Photo video",
style={"generation_mode": "realistic", "intensity": 123.45, "prompt": "string"},
)
try:
Expand Down Expand Up @@ -76,7 +76,7 @@ async def test_await_create_200_success_all_params() -> None:
end_seconds=15.0,
start_seconds=0.0,
max_resolution=1024,
name="My Talking Photo image",
name="My Talking Photo video",
style={"generation_mode": "realistic", "intensity": 123.45, "prompt": "string"},
)
try:
Expand Down
Loading