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": "2d2e243b-d0e8-481d-a9a7-b830be4131c0",
"id": "53e3a1c7-5db6-4850-bfe3-e16e89b5f60b",
"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.70.0"
MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.71.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 @@ -160,6 +160,7 @@ def create(
"qwen-edit",
"seedream-v4",
"seedream-v4.5",
"seedream-v5-pro",
]
],
type_utils.NotGiven,
Expand Down Expand Up @@ -221,6 +222,10 @@ def create(
- Supported resolutions: 640px, 1k, 2k, 4k
- Available for tiers: creator, pro, business
- Max additional input images: 9
- `seedream-v5-pro` - from 75 credits/image
- Supported resolutions: 640px, 1k, 2k
- 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
Expand All @@ -245,6 +250,7 @@ def create(
- `seedream-v4` - 640px, 1k, 2k, 4k
- `nano-banana-pro` - 1k, 2k, 4k
- `seedream-v4.5` - 640px, 1k, 2k, 4k
- `seedream-v5-pro` - 640px, 1k, 2k
- `gpt-image-2` - 640px, 1k, 2k, 4k

Note: Resolution availability depends on the model and your subscription tier.
Expand Down Expand Up @@ -437,6 +443,7 @@ async def create(
"qwen-edit",
"seedream-v4",
"seedream-v4.5",
"seedream-v5-pro",
]
],
type_utils.NotGiven,
Expand Down Expand Up @@ -498,6 +505,10 @@ async def create(
- Supported resolutions: 640px, 1k, 2k, 4k
- Available for tiers: creator, pro, business
- Max additional input images: 9
- `seedream-v5-pro` - from 75 credits/image
- Supported resolutions: 640px, 1k, 2k
- 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
Expand All @@ -522,6 +533,7 @@ async def create(
- `seedream-v4` - 640px, 1k, 2k, 4k
- `nano-banana-pro` - 1k, 2k, 4k
- `seedream-v4.5` - 640px, 1k, 2k, 4k
- `seedream-v5-pro` - 640px, 1k, 2k
- `gpt-image-2` - 640px, 1k, 2k, 4k

Note: Resolution availability depends on the model and your subscription tier.
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 @@ -140,6 +140,7 @@ def create(
"nano-banana-pro",
"seedream",
"seedream-v4",
"seedream-v5-pro",
"z-image-turbo",
]
],
Expand Down Expand Up @@ -191,6 +192,10 @@ def create(
- Supported resolutions: 640px, 1k, 2k, 4k
- Available for tiers: creator, pro, business
- Image count allowed: 1, 2, 3, 4
- `seedream-v5-pro` - from 75 credits/image
- Supported resolutions: 640px, 1k, 2k
- 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
Expand Down Expand Up @@ -233,6 +238,7 @@ def create(
- `flux-2-klein` - 640px, 1k, 2k
- `z-image-turbo` - 640px, 1k, 2k
- `seedream-v4` - 640px, 1k, 2k, 4k
- `seedream-v5-pro` - 640px, 1k, 2k
- `nano-banana` - 640px, 1k
- `nano-banana-2-lite` - 640px, 1k
- `nano-banana-2` - 640px, 1k, 2k, 4k
Expand Down Expand Up @@ -399,6 +405,7 @@ async def create(
"nano-banana-pro",
"seedream",
"seedream-v4",
"seedream-v5-pro",
"z-image-turbo",
]
],
Expand Down Expand Up @@ -450,6 +457,10 @@ async def create(
- Supported resolutions: 640px, 1k, 2k, 4k
- Available for tiers: creator, pro, business
- Image count allowed: 1, 2, 3, 4
- `seedream-v5-pro` - from 75 credits/image
- Supported resolutions: 640px, 1k, 2k
- 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
Expand Down Expand Up @@ -492,6 +503,7 @@ async def create(
- `flux-2-klein` - 640px, 1k, 2k
- `z-image-turbo` - 640px, 1k, 2k
- `seedream-v4` - 640px, 1k, 2k, 4k
- `seedream-v5-pro` - 640px, 1k, 2k
- `nano-banana` - 640px, 1k
- `nano-banana-2-lite` - 640px, 1k
- `nano-banana-2` - 640px, 1k, 2k, 4k
Expand Down
2 changes: 1 addition & 1 deletion magic_hour/resources/v1/body_swap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ res = await client.v1.body_swap.generate(

### Body Swap <a name="create"></a>

Swap a person into a scene image using Nano Banana 2. Credits depend on `resolution` (from 50 credits at 640px upward).
Swap a person into a scene image using Nano Banana 2 Lite (640px/1k) or Nano Banana 2 (2k/4k). Credits depend on `resolution` (from 50 credits at 640px upward).

**API Endpoint**: `POST /v1/body-swap`

Expand Down
4 changes: 2 additions & 2 deletions magic_hour/resources/v1/body_swap/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def create(
"""
Body Swap

Swap a person into a scene image using Nano Banana 2. Credits depend on `resolution` (from 50 credits at 640px upward).
Swap a person into a scene image using Nano Banana 2 Lite (640px/1k) or Nano Banana 2 (2k/4k). Credits depend on `resolution` (from 50 credits at 640px upward).

POST /v1/body-swap

Expand Down Expand Up @@ -242,7 +242,7 @@ async def create(
"""
Body Swap

Swap a person into a scene image using Nano Banana 2. Credits depend on `resolution` (from 50 credits at 640px upward).
Swap a person into a scene image using Nano Banana 2 Lite (640px/1k) or Nano Banana 2 (2k/4k). Credits depend on `resolution` (from 50 credits at 640px upward).

POST /v1/body-swap

Expand Down
4 changes: 2 additions & 2 deletions magic_hour/resources/v1/image_to_video/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ For detailed examples, see the [product page](https://magichour.ai/products/imag
| Parameter | Required | Deprecated | Description | Example |
| ------------------------ | :------: | :--------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| `assets` | ✓ | ✗ | Provide the assets for image-to-video. Sora 2 only supports images with an aspect ratio of `9:16` or `16:9`. | `{"end_image_file_path": "api-assets/id/1234.png", "image_file_path": "api-assets/id/1234.png"}` |
| `└─ end_image_file_path` | ✗ | — | The image to use as the last frame of the video. * **`ltx-2.3`**: Supports 480p, 720p, 1080p. * **`wan-2.2`**: Not supported * **`kling-2.5`**: Supports 1080p. * **`kling-3.0`**: Supports 720p, 1080p, 4k. * **`veo3.1-lite`**: Not supported * **`veo3.1`**: Not supported * **`seedance-1.5`**: Supports 480p, 720p, 1080p. * **`seedance-2.0-mini`**: Supports 480p, 720p. * **`seedance-2.0`**: Supports 480p, 720p. * **`sora-2`**: Not supported | `"api-assets/id/1234.png"` |
| `└─ end_image_file_path` | ✗ | — | The image to use as the last frame of the video. * **`ltx-2.3`**: Supports 480p, 720p, 1080p. * **`wan-2.2`**: Not supported * **`kling-2.5`**: Supports 1080p. * **`kling-3.0`**: Supports 720p, 1080p, 4k. * **`veo3.1-lite`**: Supports 720p, 1080p. Requires a duration of 8 seconds or less. * **`veo3.1`**: Supports 720p, 1080p. Requires a duration of 8 seconds or less. * **`seedance-1.5`**: Supports 480p, 720p, 1080p. * **`seedance-2.0-mini`**: Supports 480p, 720p. * **`seedance-2.0`**: Supports 480p, 720p. * **`sora-2`**: Not supported | `"api-assets/id/1234.png"` |
| `└─ image_file_path` | ✓ | — | The path of the image file. 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"` |
| `end_seconds` | ✓ | ✗ | The total duration of the output video in seconds. Supported durations depend on the chosen model: * **`ltx-2.3`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15 * **`kling-2.5`**: 5, 10 * **`kling-3.0`**: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`veo3.1-lite`**: 8, 16, 24, 32, 40, 48, 56 * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`seedance-1.5`**: 4, 5, 6, 7, 8, 9, 10, 11, 12 * **`seedance-2.0-mini`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`seedance-2.0`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`sora-2`**: 4, 8, 12, 24, 36, 48, 60 | `5.0` |
| `end_seconds` | ✓ | ✗ | The total duration of the output video in seconds. Supported durations depend on the chosen model: * **`ltx-2.3`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15 * **`kling-2.5`**: 5, 10 * **`kling-3.0`**: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`seedance-1.5`**: 4, 5, 6, 7, 8, 9, 10, 11, 12 * **`seedance-2.0-mini`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`seedance-2.0`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`sora-2`**: 4, 8, 12, 24, 36, 48, 60 | `5.0` |
| `audio` | ✗ | ✗ | Whether to include audio in the video. Defaults to `false` if not specified. Audio support varies by model: * **`ltx-2.3`**: Toggle-able: no additional credits for audio * **`wan-2.2`**: Not supported * **`kling-2.5`**: Toggle-able: no additional credits for audio * **`kling-3.0`**: Toggle-able: audio adds extra credits when enabled * **`veo3.1-lite`**: Toggle-able: audio adds extra credits when enabled * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled * **`seedance-1.5`**: Toggle-able: audio adds extra credits when enabled * **`seedance-2.0-mini`**: Toggle-able: no additional credits for audio * **`seedance-2.0`**: Toggle-able: no additional credits for audio * **`sora-2`**: Toggle-able: no additional credits for audio | `True` |
| `height` | ✗ | ✓ | `height` is deprecated and no longer influences the output video's resolution. This field is retained only for backward compatibility and will be removed in a future release. | `123` |
| `model` | ✗ | ✗ | The AI model to use for video generation. * `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.3`. * `ltx-2.3`: Fastest output. Best for rapid iteration. * `wan-2.2`: Strong physics, camera moves, and motion. * `kling-2.5`: Great for action, motion blur, and camera moves. * `kling-3.0`: Best overall quality for cinematic storytelling. * `veo3.1-lite`: Veo quality at a more accessible cost. * `veo3.1`: Google's model. Highest realism and detail. * `seedance-1.5`: Smooth, consistent motion with precision. * `seedance-2.0-mini`: Fast, consistent video with strong motion quality * `seedance-2.0`: Top quality with reference-to-video control. * `sora-2`: Open AI's model. Great for creativity and viral clips. If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`. | `"kling-3.0"` |
Expand Down
4 changes: 2 additions & 2 deletions magic_hour/resources/v1/image_to_video/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def create(
* **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15
* **`kling-2.5`**: 5, 10
* **`kling-3.0`**: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
* **`veo3.1-lite`**: 8, 16, 24, 32, 40, 48, 56
* **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56
* **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56
* **`seedance-1.5`**: 4, 5, 6, 7, 8, 9, 10, 11, 12
* **`seedance-2.0-mini`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
Expand Down Expand Up @@ -568,7 +568,7 @@ async def create(
* **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15
* **`kling-2.5`**: 5, 10
* **`kling-3.0`**: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
* **`veo3.1-lite`**: 8, 16, 24, 32, 40, 48, 56
* **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56
* **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56
* **`seedance-1.5`**: 4, 5, 6, 7, 8, 9, 10, 11, 12
* **`seedance-2.0-mini`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
Expand Down
Loading
Loading