@runapi.ai/seedream 0.5.1 → 0.6.0
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.
- package/README.md +8 -0
- package/dist/index.d.mts +41 -9
- package/dist/index.d.ts +41 -9
- package/package.json +1 -1
- package/skills/seedream/README.md +3 -0
- package/skills/seedream/SKILL.md +3 -0
package/README.md
CHANGED
|
@@ -34,6 +34,14 @@ RunAPI-generated file URLs are temporary. Download and store generated images, v
|
|
|
34
34
|
|
|
35
35
|
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.
|
|
36
36
|
|
|
37
|
+
## Seedream 5.5
|
|
38
|
+
|
|
39
|
+
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.
|
|
40
|
+
|
|
41
|
+
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`.
|
|
42
|
+
|
|
43
|
+
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.
|
|
44
|
+
|
|
37
45
|
## Language notes
|
|
38
46
|
|
|
39
47
|
Use the TypeScript types in `src/types.ts` and the resource classes under `src/resources` when building image applications. The package exposes `textToImage`, `editImage`, and `decomposeLayers`. Keep `RUNAPI_API_KEY` in the environment or your secret manager; never commit API keys or callback secrets.
|
package/dist/index.d.mts
CHANGED
|
@@ -2,12 +2,12 @@ import { TaskResponse, AsyncTaskStatus, HttpClient, RequestOptions, PollingOptio
|
|
|
2
2
|
export { AuthenticationError, InsufficientCreditsError, NetworkError, NotFoundError, RateLimitError, RunApiError, ServiceUnavailableError, TaskFailedError, TaskTimeoutError, TimeoutError, ValidationError } from '@runapi.ai/core';
|
|
3
3
|
|
|
4
4
|
/** Union of all Seedream model identifiers across text-to-image and edit endpoints. */
|
|
5
|
-
type SeedreamModel = 'seedream-4.5-text-to-image' | 'seedream-4.5-edit' | 'seedream-5-lite-text-to-image' | 'seedream-5-lite-edit' | 'seedream-5-pro-text-to-image' | 'seedream-5-pro-edit' | 'seedream-5-pro-layer-decomposition' | 'seedream-v4-text-to-image' | 'seedream-v4-edit';
|
|
5
|
+
type SeedreamModel = 'seedream-4.5-text-to-image' | 'seedream-4.5-edit' | 'seedream-5-lite-text-to-image' | 'seedream-5-lite-edit' | 'seedream-5-pro-text-to-image' | 'seedream-5-pro-edit' | 'seedream-5-pro-layer-decomposition' | 'seedream-5.5-text-to-image' | 'seedream-5.5-edit' | 'seedream-5.5-layer-decomposition' | 'seedream-v4-text-to-image' | 'seedream-v4-edit';
|
|
6
6
|
/** Models accepted by the text-to-image endpoint. */
|
|
7
|
-
type TextToImageModel = 'seedream-4.5-text-to-image' | 'seedream-5-lite-text-to-image' | 'seedream-5-pro-text-to-image' | 'seedream-v4-text-to-image';
|
|
7
|
+
type TextToImageModel = 'seedream-5.5-text-to-image' | 'seedream-4.5-text-to-image' | 'seedream-5-lite-text-to-image' | 'seedream-5-pro-text-to-image' | 'seedream-v4-text-to-image';
|
|
8
8
|
/** Models accepted by the edit-image endpoint. */
|
|
9
|
-
type EditImageModel = 'seedream-4.5-edit' | 'seedream-5-lite-edit' | 'seedream-5-pro-edit' | 'seedream-v4-edit';
|
|
10
|
-
type DecomposeLayersModel = 'seedream-5-pro-layer-decomposition';
|
|
9
|
+
type EditImageModel = 'seedream-5.5-edit' | 'seedream-4.5-edit' | 'seedream-5-lite-edit' | 'seedream-5-pro-edit' | 'seedream-v4-edit';
|
|
10
|
+
type DecomposeLayersModel = 'seedream-5-pro-layer-decomposition' | 'seedream-5.5-layer-decomposition';
|
|
11
11
|
type AspectRatio = '1:1' | '4:3' | '3:4' | '16:9' | '9:16' | '2:3' | '3:2' | '21:9';
|
|
12
12
|
/** Quality preset for 4.5, 5-Lite, and 5 Pro models. */
|
|
13
13
|
type OutputQuality = 'basic' | 'high';
|
|
@@ -88,16 +88,48 @@ interface GenerationV4EditParams extends V4GenerationBaseParams {
|
|
|
88
88
|
/** Source image URLs to edit (up to 10 for V4 models). */
|
|
89
89
|
source_image_urls: string[];
|
|
90
90
|
}
|
|
91
|
-
type
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
type Generation55OutputParams = {
|
|
92
|
+
background?: 'auto' | 'opaque';
|
|
93
|
+
output_format?: OutputFormat;
|
|
94
|
+
} | {
|
|
95
|
+
background: 'transparent';
|
|
96
|
+
output_format?: 'png';
|
|
97
|
+
};
|
|
98
|
+
interface Generation55BaseParams {
|
|
99
|
+
/** Prompt of 5-5000 characters. */
|
|
100
|
+
prompt: string;
|
|
101
|
+
/** Output resolution tier (default: "2k"). */
|
|
102
|
+
output_resolution?: '1k' | '1.5k' | '2k';
|
|
103
|
+
enable_safety_checker?: boolean;
|
|
104
|
+
callback_url?: string;
|
|
105
|
+
}
|
|
106
|
+
type Generation55TextParams = Generation55BaseParams & Generation55OutputParams & {
|
|
107
|
+
model: 'seedream-5.5-text-to-image';
|
|
108
|
+
aspect_ratio: AspectRatio;
|
|
109
|
+
};
|
|
110
|
+
type Generation55EditParams = Generation55BaseParams & Generation55OutputParams & {
|
|
111
|
+
model: 'seedream-5.5-edit';
|
|
112
|
+
aspect_ratio?: AspectRatio | 'auto';
|
|
113
|
+
/** One to ten JPEG, PNG, or WebP source images, each up to 10 MB. */
|
|
114
|
+
source_image_urls: string[];
|
|
115
|
+
};
|
|
116
|
+
type TextToImageParams = Generation45TextParams | Generation5LiteTextParams | Generation5ProTextParams | Generation55TextParams | GenerationV4TextParams;
|
|
117
|
+
type EditImageParams = Generation45EditImageParams | Generation5LiteEditParams | Generation5ProEditParams | Generation55EditParams | GenerationV4EditParams;
|
|
118
|
+
interface DecomposeLayersBaseParams {
|
|
95
119
|
image_url: string;
|
|
96
120
|
prompt?: string;
|
|
97
121
|
size?: 'auto' | '1K' | '1.5K' | '2K';
|
|
98
122
|
output_format?: OutputFormat;
|
|
99
123
|
callback_url?: string;
|
|
100
124
|
}
|
|
125
|
+
type DecomposeLayersParams = DecomposeLayersBaseParams & ({
|
|
126
|
+
model: 'seedream-5-pro-layer-decomposition';
|
|
127
|
+
} | {
|
|
128
|
+
model: 'seedream-5.5-layer-decomposition';
|
|
129
|
+
/** Maximum images including the base image, 2-100 (default: 30). */
|
|
130
|
+
max_images?: number;
|
|
131
|
+
text_recognition?: boolean;
|
|
132
|
+
});
|
|
101
133
|
interface TaskCreateResponse {
|
|
102
134
|
id: string;
|
|
103
135
|
}
|
|
@@ -262,4 +294,4 @@ declare class SeedreamClient extends BaseClient {
|
|
|
262
294
|
constructor(options?: ClientOptions);
|
|
263
295
|
}
|
|
264
296
|
|
|
265
|
-
export { type AspectRatio, type Background, type BoundingBox, type CompletedDecomposeLayersResponse, type CompletedEditImageResponse, type CompletedTextToImageResponse, type DecomposeLayersModel, type DecomposeLayersParams, type DecomposeLayersResponse, type EditImageModel, type EditImageParams, type EditImageResponse, type Generation45EditImageParams, type Generation45TextParams, type Generation5LiteEditParams, type Generation5LiteTextParams, type Generation5ProEditParams, type Generation5ProTextParams, type GenerationV4EditParams, type GenerationV4TextParams, type Image, type Layer, type OutputFormat, type OutputQuality, SeedreamClient, type SeedreamModel, type TaskCreateResponse, type TextToImageModel, type TextToImageParams, type TextToImageResponse, type V4OutputResolution };
|
|
297
|
+
export { type AspectRatio, type Background, type BoundingBox, type CompletedDecomposeLayersResponse, type CompletedEditImageResponse, type CompletedTextToImageResponse, type DecomposeLayersModel, type DecomposeLayersParams, type DecomposeLayersResponse, type EditImageModel, type EditImageParams, type EditImageResponse, type Generation45EditImageParams, type Generation45TextParams, type Generation55EditParams, type Generation55TextParams, type Generation5LiteEditParams, type Generation5LiteTextParams, type Generation5ProEditParams, type Generation5ProTextParams, type GenerationV4EditParams, type GenerationV4TextParams, type Image, type Layer, type OutputFormat, type OutputQuality, SeedreamClient, type SeedreamModel, type TaskCreateResponse, type TextToImageModel, type TextToImageParams, type TextToImageResponse, type V4OutputResolution };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,12 +2,12 @@ import { TaskResponse, AsyncTaskStatus, HttpClient, RequestOptions, PollingOptio
|
|
|
2
2
|
export { AuthenticationError, InsufficientCreditsError, NetworkError, NotFoundError, RateLimitError, RunApiError, ServiceUnavailableError, TaskFailedError, TaskTimeoutError, TimeoutError, ValidationError } from '@runapi.ai/core';
|
|
3
3
|
|
|
4
4
|
/** Union of all Seedream model identifiers across text-to-image and edit endpoints. */
|
|
5
|
-
type SeedreamModel = 'seedream-4.5-text-to-image' | 'seedream-4.5-edit' | 'seedream-5-lite-text-to-image' | 'seedream-5-lite-edit' | 'seedream-5-pro-text-to-image' | 'seedream-5-pro-edit' | 'seedream-5-pro-layer-decomposition' | 'seedream-v4-text-to-image' | 'seedream-v4-edit';
|
|
5
|
+
type SeedreamModel = 'seedream-4.5-text-to-image' | 'seedream-4.5-edit' | 'seedream-5-lite-text-to-image' | 'seedream-5-lite-edit' | 'seedream-5-pro-text-to-image' | 'seedream-5-pro-edit' | 'seedream-5-pro-layer-decomposition' | 'seedream-5.5-text-to-image' | 'seedream-5.5-edit' | 'seedream-5.5-layer-decomposition' | 'seedream-v4-text-to-image' | 'seedream-v4-edit';
|
|
6
6
|
/** Models accepted by the text-to-image endpoint. */
|
|
7
|
-
type TextToImageModel = 'seedream-4.5-text-to-image' | 'seedream-5-lite-text-to-image' | 'seedream-5-pro-text-to-image' | 'seedream-v4-text-to-image';
|
|
7
|
+
type TextToImageModel = 'seedream-5.5-text-to-image' | 'seedream-4.5-text-to-image' | 'seedream-5-lite-text-to-image' | 'seedream-5-pro-text-to-image' | 'seedream-v4-text-to-image';
|
|
8
8
|
/** Models accepted by the edit-image endpoint. */
|
|
9
|
-
type EditImageModel = 'seedream-4.5-edit' | 'seedream-5-lite-edit' | 'seedream-5-pro-edit' | 'seedream-v4-edit';
|
|
10
|
-
type DecomposeLayersModel = 'seedream-5-pro-layer-decomposition';
|
|
9
|
+
type EditImageModel = 'seedream-5.5-edit' | 'seedream-4.5-edit' | 'seedream-5-lite-edit' | 'seedream-5-pro-edit' | 'seedream-v4-edit';
|
|
10
|
+
type DecomposeLayersModel = 'seedream-5-pro-layer-decomposition' | 'seedream-5.5-layer-decomposition';
|
|
11
11
|
type AspectRatio = '1:1' | '4:3' | '3:4' | '16:9' | '9:16' | '2:3' | '3:2' | '21:9';
|
|
12
12
|
/** Quality preset for 4.5, 5-Lite, and 5 Pro models. */
|
|
13
13
|
type OutputQuality = 'basic' | 'high';
|
|
@@ -88,16 +88,48 @@ interface GenerationV4EditParams extends V4GenerationBaseParams {
|
|
|
88
88
|
/** Source image URLs to edit (up to 10 for V4 models). */
|
|
89
89
|
source_image_urls: string[];
|
|
90
90
|
}
|
|
91
|
-
type
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
type Generation55OutputParams = {
|
|
92
|
+
background?: 'auto' | 'opaque';
|
|
93
|
+
output_format?: OutputFormat;
|
|
94
|
+
} | {
|
|
95
|
+
background: 'transparent';
|
|
96
|
+
output_format?: 'png';
|
|
97
|
+
};
|
|
98
|
+
interface Generation55BaseParams {
|
|
99
|
+
/** Prompt of 5-5000 characters. */
|
|
100
|
+
prompt: string;
|
|
101
|
+
/** Output resolution tier (default: "2k"). */
|
|
102
|
+
output_resolution?: '1k' | '1.5k' | '2k';
|
|
103
|
+
enable_safety_checker?: boolean;
|
|
104
|
+
callback_url?: string;
|
|
105
|
+
}
|
|
106
|
+
type Generation55TextParams = Generation55BaseParams & Generation55OutputParams & {
|
|
107
|
+
model: 'seedream-5.5-text-to-image';
|
|
108
|
+
aspect_ratio: AspectRatio;
|
|
109
|
+
};
|
|
110
|
+
type Generation55EditParams = Generation55BaseParams & Generation55OutputParams & {
|
|
111
|
+
model: 'seedream-5.5-edit';
|
|
112
|
+
aspect_ratio?: AspectRatio | 'auto';
|
|
113
|
+
/** One to ten JPEG, PNG, or WebP source images, each up to 10 MB. */
|
|
114
|
+
source_image_urls: string[];
|
|
115
|
+
};
|
|
116
|
+
type TextToImageParams = Generation45TextParams | Generation5LiteTextParams | Generation5ProTextParams | Generation55TextParams | GenerationV4TextParams;
|
|
117
|
+
type EditImageParams = Generation45EditImageParams | Generation5LiteEditParams | Generation5ProEditParams | Generation55EditParams | GenerationV4EditParams;
|
|
118
|
+
interface DecomposeLayersBaseParams {
|
|
95
119
|
image_url: string;
|
|
96
120
|
prompt?: string;
|
|
97
121
|
size?: 'auto' | '1K' | '1.5K' | '2K';
|
|
98
122
|
output_format?: OutputFormat;
|
|
99
123
|
callback_url?: string;
|
|
100
124
|
}
|
|
125
|
+
type DecomposeLayersParams = DecomposeLayersBaseParams & ({
|
|
126
|
+
model: 'seedream-5-pro-layer-decomposition';
|
|
127
|
+
} | {
|
|
128
|
+
model: 'seedream-5.5-layer-decomposition';
|
|
129
|
+
/** Maximum images including the base image, 2-100 (default: 30). */
|
|
130
|
+
max_images?: number;
|
|
131
|
+
text_recognition?: boolean;
|
|
132
|
+
});
|
|
101
133
|
interface TaskCreateResponse {
|
|
102
134
|
id: string;
|
|
103
135
|
}
|
|
@@ -262,4 +294,4 @@ declare class SeedreamClient extends BaseClient {
|
|
|
262
294
|
constructor(options?: ClientOptions);
|
|
263
295
|
}
|
|
264
296
|
|
|
265
|
-
export { type AspectRatio, type Background, type BoundingBox, type CompletedDecomposeLayersResponse, type CompletedEditImageResponse, type CompletedTextToImageResponse, type DecomposeLayersModel, type DecomposeLayersParams, type DecomposeLayersResponse, type EditImageModel, type EditImageParams, type EditImageResponse, type Generation45EditImageParams, type Generation45TextParams, type Generation5LiteEditParams, type Generation5LiteTextParams, type Generation5ProEditParams, type Generation5ProTextParams, type GenerationV4EditParams, type GenerationV4TextParams, type Image, type Layer, type OutputFormat, type OutputQuality, SeedreamClient, type SeedreamModel, type TaskCreateResponse, type TextToImageModel, type TextToImageParams, type TextToImageResponse, type V4OutputResolution };
|
|
297
|
+
export { type AspectRatio, type Background, type BoundingBox, type CompletedDecomposeLayersResponse, type CompletedEditImageResponse, type CompletedTextToImageResponse, type DecomposeLayersModel, type DecomposeLayersParams, type DecomposeLayersResponse, type EditImageModel, type EditImageParams, type EditImageResponse, type Generation45EditImageParams, type Generation45TextParams, type Generation55EditParams, type Generation55TextParams, type Generation5LiteEditParams, type Generation5LiteTextParams, type Generation5ProEditParams, type Generation5ProTextParams, type GenerationV4EditParams, type GenerationV4TextParams, type Image, type Layer, type OutputFormat, type OutputQuality, SeedreamClient, type SeedreamModel, type TaskCreateResponse, type TextToImageModel, type TextToImageParams, type TextToImageResponse, type V4OutputResolution };
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"runapi": {
|
|
4
4
|
"slug": "seedream"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.6.0",
|
|
7
7
|
"description": "RunAPI Seedream SDK for text-to-image and edit-image workflows in JavaScript, Python, Ruby, Go, Java, and PHP",
|
|
8
8
|
"main": "./dist/index.js",
|
|
9
9
|
"module": "./dist/index.mjs",
|
|
@@ -78,6 +78,9 @@ const url = result.images[0].url;
|
|
|
78
78
|
- [5 pro text to image](https://runapi.ai/models/seedream/5-pro-text-to-image)
|
|
79
79
|
- [5 pro edit](https://runapi.ai/models/seedream/5-pro-edit)
|
|
80
80
|
- [5 pro layer decomposition](https://runapi.ai/models/seedream/5-pro-layer-decomposition)
|
|
81
|
+
- [5.5 text to image](https://runapi.ai/models/seedream/5.5-text-to-image)
|
|
82
|
+
- [5.5 edit](https://runapi.ai/models/seedream/5.5-edit)
|
|
83
|
+
- [5.5 layer decomposition](https://runapi.ai/models/seedream/5.5-layer-decomposition)
|
|
81
84
|
- [v4 text to image](https://runapi.ai/models/seedream/v4-text-to-image)
|
|
82
85
|
- [v4 edit](https://runapi.ai/models/seedream/v4-edit)
|
|
83
86
|
|
package/skills/seedream/SKILL.md
CHANGED
|
@@ -119,5 +119,8 @@ Use this route only for application or production-code integration. Open the cur
|
|
|
119
119
|
- `seedream-5-pro-edit`: https://runapi.ai/models/seedream/5-pro-edit.md
|
|
120
120
|
- `seedream-5-pro-layer-decomposition`: https://runapi.ai/models/seedream/5-pro-layer-decomposition.md
|
|
121
121
|
- `seedream-5-pro-text-to-image`: https://runapi.ai/models/seedream/5-pro-text-to-image.md
|
|
122
|
+
- `seedream-5.5-edit`: https://runapi.ai/models/seedream/5.5-edit.md
|
|
123
|
+
- `seedream-5.5-layer-decomposition`: https://runapi.ai/models/seedream/5.5-layer-decomposition.md
|
|
124
|
+
- `seedream-5.5-text-to-image`: https://runapi.ai/models/seedream/5.5-text-to-image.md
|
|
122
125
|
- `seedream-v4-edit`: https://runapi.ai/models/seedream/v4-edit.md
|
|
123
126
|
- `seedream-v4-text-to-image`: https://runapi.ai/models/seedream/v4-text-to-image.md
|