runapi-seedream 0.5.0__tar.gz → 0.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,26 @@
1
+ Metadata-Version: 2.5
2
+ Name: runapi-seedream
3
+ Version: 0.7.0
4
+ Summary: RunAPI Seedream SDK for text-to-image and edit-image workflows in JavaScript, Python, Ruby, Go, Java, and PHP
5
+ Project-URL: Homepage, https://runapi.ai/models/seedream
6
+ Project-URL: Documentation, https://runapi.ai/docs/resources/sdks
7
+ Project-URL: Source, https://github.com/runapi-ai/seedream-sdk
8
+ Project-URL: Issues, https://github.com/runapi-ai/seedream-sdk/issues
9
+ Project-URL: Changelog, https://github.com/runapi-ai/seedream-sdk/blob/main/CHANGELOG.md
10
+ Project-URL: Release Notes, https://github.com/runapi-ai/seedream-sdk/releases/tag/python%2Fv0.7.0
11
+ Author-email: RunAPI <contact@runapi.ai>
12
+ License-Expression: Apache-2.0
13
+ Keywords: api,golang,gradle,image-api,image-generation,java,maven,python,ruby,runapi,runapi-ai,sdk,seedream,seedream-api,text-to-image,typescript
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Requires-Python: >=3.10
21
+ Requires-Dist: runapi-core~=0.10.1
22
+ Description-Content-Type: text/markdown
23
+
1
24
  # Seedream Python SDK for RunAPI
2
25
 
3
26
  The Seedream Python SDK is the language-specific package for Seedream on RunAPI. Use this package for image generation, image editing, and creative production workflows when your application needs request bodies, task status lookup, and consistent RunAPI errors in Python.
@@ -59,6 +82,14 @@ RunAPI-generated file URLs are temporary. Download and store generated images, v
59
82
 
60
83
  Use `seedream-5-pro-text-to-image` for generation, `seedream-5-pro-edit` for image editing, and `seedream-5-pro-layer-decomposition` to separate one image into a base image and ordered transparent layers.
61
84
 
85
+ ## Seedream 5.5
86
+
87
+ Use `seedream-5.5-text-to-image`, `seedream-5.5-edit`, or `seedream-5.5-layer-decomposition` with the existing generation, editing, and decomposition resources. Text-to-image requires `aspect_ratio`. Generation and editing use `output_resolution` (`1k`, `1.5k`, `2k`, default `2k`) and `background` (`auto`, `transparent`, `opaque`, default `auto`). Transparent output requires PNG.
88
+
89
+ Editing accepts 1-10 JPEG, PNG, or WebP sources up to 10 MB each and defaults `aspect_ratio` to `auto`. Prompts accept 5-5000 characters. These models accept no `output_quality`, `seed`, or `output_count`.
90
+
91
+ Decomposition accepts one JPEG, PNG, or WebP source up to 10 MB and an optional prompt up to 2000 characters. `size` accepts `auto`, `1K`, `1.5K`, or `2K`, default `auto`. `max_images` is an upper bound of 2-100 outputs including the base image, default 30. `text_recognition` defaults to `false`. `output_format` defaults to `png` and affects only the base image. Query `usage.generated_images` for the actual output count.
92
+
62
93
  ## Language notes
63
94
 
64
95
  Pass parameters as keyword arguments and catch the `runapi.seedream` error classes when building image jobs or scripts. The available resources are `text_to_image`, `edit_image`, and `decompose_layers`. Keep `RUNAPI_API_KEY` in the environment or your secret manager; never commit API keys or callback secrets.
@@ -1,20 +1,3 @@
1
- Metadata-Version: 2.5
2
- Name: runapi-seedream
3
- Version: 0.5.0
4
- Summary: RunAPI Seedream SDK for text-to-image and edit-image workflows in JavaScript, Python, Ruby, Go, Java, and PHP
5
- Project-URL: Homepage, https://runapi.ai/models/seedream
6
- Project-URL: Documentation, https://runapi.ai/docs/resources/sdks
7
- Project-URL: Source, https://github.com/runapi-ai/seedream-sdk
8
- Project-URL: Issues, https://github.com/runapi-ai/seedream-sdk/issues
9
- Project-URL: Changelog, https://github.com/runapi-ai/seedream-sdk/blob/main/CHANGELOG.md
10
- Project-URL: Release Notes, https://github.com/runapi-ai/seedream-sdk/releases/tag/python%2Fv0.5.0
11
- Author-email: RunAPI <contact@runapi.ai>
12
- License-Expression: Apache-2.0
13
- Keywords: api,golang,gradle,image-api,image-generation,java,maven,python,ruby,runapi,runapi-ai,sdk,seedream,seedream-api,text-to-image,typescript
14
- Requires-Python: >=3.9
15
- Requires-Dist: runapi-core~=0.10.1
16
- Description-Content-Type: text/markdown
17
-
18
1
  # Seedream Python SDK for RunAPI
19
2
 
20
3
  The Seedream Python SDK is the language-specific package for Seedream on RunAPI. Use this package for image generation, image editing, and creative production workflows when your application needs request bodies, task status lookup, and consistent RunAPI errors in Python.
@@ -76,6 +59,14 @@ RunAPI-generated file URLs are temporary. Download and store generated images, v
76
59
 
77
60
  Use `seedream-5-pro-text-to-image` for generation, `seedream-5-pro-edit` for image editing, and `seedream-5-pro-layer-decomposition` to separate one image into a base image and ordered transparent layers.
78
61
 
62
+ ## Seedream 5.5
63
+
64
+ Use `seedream-5.5-text-to-image`, `seedream-5.5-edit`, or `seedream-5.5-layer-decomposition` with the existing generation, editing, and decomposition resources. Text-to-image requires `aspect_ratio`. Generation and editing use `output_resolution` (`1k`, `1.5k`, `2k`, default `2k`) and `background` (`auto`, `transparent`, `opaque`, default `auto`). Transparent output requires PNG.
65
+
66
+ Editing accepts 1-10 JPEG, PNG, or WebP sources up to 10 MB each and defaults `aspect_ratio` to `auto`. Prompts accept 5-5000 characters. These models accept no `output_quality`, `seed`, or `output_count`.
67
+
68
+ Decomposition accepts one JPEG, PNG, or WebP source up to 10 MB and an optional prompt up to 2000 characters. `size` accepts `auto`, `1K`, `1.5K`, or `2K`, default `auto`. `max_images` is an upper bound of 2-100 outputs including the base image, default 30. `text_recognition` defaults to `false`. `output_format` defaults to `png` and affects only the base image. Query `usage.generated_images` for the actual output count.
69
+
79
70
  ## Language notes
80
71
 
81
72
  Pass parameters as keyword arguments and catch the `runapi.seedream` error classes when building image jobs or scripts. The available resources are `text_to_image`, `edit_image`, and `decompose_layers`. Keep `RUNAPI_API_KEY` in the environment or your secret manager; never commit API keys or callback secrets.
@@ -4,10 +4,18 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "runapi-seedream"
7
- version = "0.5.0"
7
+ version = "0.7.0"
8
8
  description = "RunAPI Seedream SDK for text-to-image and edit-image workflows in JavaScript, Python, Ruby, Go, Java, and PHP"
9
9
  readme = "README.md"
10
- requires-python = ">=3.9"
10
+ requires-python = ">=3.10"
11
+ classifiers = [
12
+ "Programming Language :: Python :: 3",
13
+ "Programming Language :: Python :: 3.10",
14
+ "Programming Language :: Python :: 3.11",
15
+ "Programming Language :: Python :: 3.12",
16
+ "Programming Language :: Python :: 3.13",
17
+ "Programming Language :: Python :: 3.14",
18
+ ]
11
19
  license = "Apache-2.0"
12
20
  authors = [{ name = "RunAPI", email = "contact@runapi.ai" }]
13
21
  keywords = ["runapi", "runapi-ai", "seedream", "api", "sdk", "typescript", "python", "ruby", "golang", "java", "maven", "gradle", "image-generation", "text-to-image", "image-api", "seedream-api"]
@@ -19,7 +27,7 @@ Documentation = "https://runapi.ai/docs/resources/sdks"
19
27
  Source = "https://github.com/runapi-ai/seedream-sdk"
20
28
  Issues = "https://github.com/runapi-ai/seedream-sdk/issues"
21
29
  Changelog = "https://github.com/runapi-ai/seedream-sdk/blob/main/CHANGELOG.md"
22
- "Release Notes" = "https://github.com/runapi-ai/seedream-sdk/releases/tag/python%2Fv0.5.0"
30
+ "Release Notes" = "https://github.com/runapi-ai/seedream-sdk/releases/tag/python%2Fv0.7.0"
23
31
 
24
32
  [tool.hatch.build.targets.wheel]
25
33
  packages = ["src/runapi"]
@@ -201,3 +201,15 @@ def test_server_decides_unknown_models_and_params():
201
201
  assert sent[0] == {**params, "output_quality": "ultra"}
202
202
  assert result.id == "task_1"
203
203
  assert error.value.message == "output_quality is not supported"
204
+
205
+
206
+ @pytest.mark.parametrize("resource,params", [
207
+ ("text_to_image", {"model": "seedream-5.5-text-to-image", "prompt": "A glass teapot", "aspect_ratio": "1:1", "output_resolution": "1.5k", "output_format": "png", "background": "transparent"}),
208
+ ("edit_image", {"model": "seedream-5.5-edit", "prompt": "Restyle the teapot", "source_image_urls": ["https://cdn.runapi.ai/public/samples/image.jpg"], "aspect_ratio": "auto", "output_resolution": "2k", "background": "opaque"}),
209
+ ("decompose_layers", {"model": "seedream-5.5-layer-decomposition", "image_url": "https://cdn.runapi.ai/public/samples/image.jpg", "size": "1.5K", "max_images": 100, "text_recognition": False}),
210
+ ])
211
+ def test_seedream_55_request_contracts(resource, params):
212
+ fake = FakeHttp({"id": "task-55"})
213
+ client = SeedreamClient(api_key="k", http_client=fake)
214
+ assert getattr(client, resource).create(**params).id == "task-55"
215
+ assert fake.calls == [("post", f"/api/v1/seedream/{resource}", params)]