@sogni-ai/sogni-client 5.63.4 → 5.65.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.
Files changed (37) hide show
  1. package/AGENTS.md +8 -0
  2. package/CHANGELOG.md +27 -0
  3. package/README.md +10 -0
  4. package/dist/Chat/_hostedToolsManifest.generated.js +14 -10
  5. package/dist/Chat/_hostedToolsManifest.generated.js.map +1 -1
  6. package/dist/Chat/modelRouting.d.ts +3 -0
  7. package/dist/Chat/modelRouting.js +15 -3
  8. package/dist/Chat/modelRouting.js.map +1 -1
  9. package/dist/Projects/createJobRequestMessage.js +7 -3
  10. package/dist/Projects/createJobRequestMessage.js.map +1 -1
  11. package/dist/Projects/index.js +1 -1
  12. package/dist/Projects/index.js.map +1 -1
  13. package/dist/lib/validation.d.ts +2 -0
  14. package/dist/lib/validation.js +20 -0
  15. package/dist/lib/validation.js.map +1 -1
  16. package/dist/version.d.ts +1 -1
  17. package/dist/version.js +1 -1
  18. package/dist-esm/Chat/_hostedToolsManifest.generated.js +14 -10
  19. package/dist-esm/Chat/_hostedToolsManifest.generated.js.map +1 -1
  20. package/dist-esm/Chat/modelRouting.js +16 -4
  21. package/dist-esm/Chat/modelRouting.js.map +1 -1
  22. package/dist-esm/Projects/createJobRequestMessage.js +7 -3
  23. package/dist-esm/Projects/createJobRequestMessage.js.map +1 -1
  24. package/dist-esm/Projects/index.js +1 -1
  25. package/dist-esm/Projects/index.js.map +1 -1
  26. package/dist-esm/lib/validation.js +19 -0
  27. package/dist-esm/lib/validation.js.map +1 -1
  28. package/dist-esm/version.js +1 -1
  29. package/llms-full.txt +4 -1
  30. package/llms.txt +10 -0
  31. package/package.json +2 -2
  32. package/src/Chat/_hostedToolsManifest.generated.ts +14 -10
  33. package/src/Chat/modelRouting.ts +24 -2
  34. package/src/Projects/createJobRequestMessage.ts +4 -0
  35. package/src/Projects/index.ts +1 -1
  36. package/src/lib/validation.ts +20 -0
  37. package/src/version.ts +1 -1
package/llms-full.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  # Sogni SDK - Complete LLM Reference
2
2
 
3
3
  > @sogni-ai/sogni-client - JavaScript/Node.js SDK for AI image, video, and audio generation
4
- > Version: 4.2.0-alpha.24 | License: ISC | Platform: Node.js & Browser
4
+ > Version: see package.json | License: ISC | Platform: Node.js & Browser
5
5
  > Repository: https://github.com/Sogni-AI/sogni-client
6
6
  > API Docs: https://sdk-docs.sogni.ai
7
7
 
@@ -341,6 +341,8 @@ sogni.apiClient.on('disconnected', ({ code, reason }) => {
341
341
  ================================================================================ 4. IMAGE GENERATION
342
342
  ================================================================================
343
343
 
344
+ MOSS-Image SFT uses modelId `moss_image_sft_int8_convrot` (hosted selector `moss-image`). It generates from English/Chinese text or one complete literal JSON layout; it does not accept a starting image, guide image, or context image. Use 1024x1024, 50 steps, guidance 3, Euler and sgm_uniform as the author recipe. Supported dimensions are 512-2048 per edge, aligned to 16 pixels. Preserve layout JSON verbatim, including vertical bars in text. numberOfVariations changes seeds; use separate calls for different layouts instead of Dynamic Prompt choices inside JSON.
345
+
344
346
  BASIC IMAGE GENERATION:
345
347
 
346
348
  Projects accept optional `promptExpanded` (Python: `prompt_expanded`), a boolean reporting whether the submitted prompt was expanded. Omission means unknown; this does not enable expansion.
@@ -506,6 +508,7 @@ RECOMMENDED MODELS:
506
508
  | z_image_turbo_bf16 | Ultra-fast | 8 | 1 | Fastest generation |
507
509
  | z_image_bf16 | Quality | 20 | 3 | High quality Z-Image generation |
508
510
  | krea2_turbo_fp8_scaled | Fast | 8 | 1 | Distilled few-step, strong in-image text, up to 2K |
511
+ | flux3_image_klein_sd_int8_convrot | Generate + Edit | 16 | 1 (fixed) | FLUX 3 Image Klein: text-to-image, startingImage, and 1-10 optional context images; up to 4096px (4K); no negative prompt |
509
512
  | krea2_identity_edit_v1_2 | Edit | 10 | 1 | Best for transforming a person/character while keeping their likeness; 1-2 context images |
510
513
  | chroma1-hd_fp8_scaled | Quality | 26 | 3.8 | Final high-res Chroma (uncensored, LoRA-capable) |
511
514
  | qwen_image_edit_2511_fp8_lightning | Edit | 4 | 1 | Fast general-purpose editing; multi-image context |
package/llms.txt CHANGED
@@ -171,6 +171,11 @@ Keep `appSource` as the stable product/integration ID. Agent wrappers may additi
171
171
 
172
172
  ## 2. Image Generation
173
173
 
174
+ MOSS-Image SFT: `modelId: 'moss_image_sft_int8_convrot'` (hosted `moss-image`),
175
+ 1024×1024, 50 steps, guidance 3, Euler / `sgm_uniform`; 512–2048 px per edge,
176
+ multiples of 16. It accepts captions, tags or experimental JSON layouts and no
177
+ guide/reference images. Keep JSON layouts literal, including quoted text and boxes.
178
+
174
179
  ### Basic Parameters
175
180
 
176
181
  Projects accept optional `promptExpanded` (Python: `prompt_expanded`), a boolean reporting whether the submitted prompt was expanded. Omission means unknown; this does not enable expansion.
@@ -243,6 +248,7 @@ The full catalog is dynamic — enumerate it at runtime with
243
248
  | `z_image_turbo_bf16` | Z-Image Turbo — ultra-fast 8-step (free-tier eligible) |
244
249
  | `z_image_bf16` | Z-Image — high quality 20-50 step |
245
250
  | `krea2_turbo_fp8_scaled` | Krea 2 Turbo — few-step, strong in-image text, up to 2K |
251
+ | `flux3_image_klein_sd_int8_convrot` | FLUX 3 Image Klein (Black Forest Labs) — 16-step text-to-image, `startingImage`, and edits from 1-10 optional `contextImages`; 256-4096px (4K included), guidance fixed at 1, no negative prompt; write full scene captions |
246
252
  | `krea2_identity_edit_v1_2` | Krea 2 Identity Edit LoRA v1.2 — best for transforming a person or character while keeping their likeness; 1-2 reference images |
247
253
  | `chroma-v.46-flash_fp8` | Chroma v.46 Flash — fast, high quality |
248
254
  | `chroma-v48-detail-svd_fp8` | Chroma v.48 Detail — high detail |
@@ -270,6 +276,10 @@ Pick by what the edit has to preserve, not by step count or quality tier.
270
276
  - **Everything else** — use `qwen_image_edit_2511_fp8_lightning` (fast) or
271
277
  `qwen_image_edit_2511_fp8`: general-purpose photo transforms, in-image text
272
278
  edits, multi-person changes, and combining up to 3 reference images.
279
+ - **Compositions from up to 10 references** — `flux3_image_klein_sd_int8_convrot`
280
+ (FLUX 3 Image Klein) takes 1-10 `contextImages`. Describe the whole result as a
281
+ full scene caption and name references in order (the first image, the second
282
+ image); a negative prompt has no effect.
273
283
 
274
284
  A higher-step general-purpose editor does not beat the identity model at a
275
285
  likeness task — it reinterprets the subject instead of preserving it. When an
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "5.63.4",
6
+ "version": "5.65.0",
7
7
  "engines": {
8
8
  "node": ">=22"
9
9
  },
@@ -134,7 +134,7 @@
134
134
  "homepage": "https://github.com/Sogni-AI/sogni-client#readme",
135
135
  "dependencies": {
136
136
  "@lukeed/uuid": "^2.0.1",
137
- "@sogni-ai/sogni-protocol": "1.0.0-alpha.50",
137
+ "@sogni-ai/sogni-protocol": "1.0.0-alpha.52",
138
138
  "@types/js-cookie": "^3.0.6",
139
139
  "@types/lodash": "^4.17.23",
140
140
  "@types/ws": "^8.5.13",
@@ -29,6 +29,9 @@ export const SOGNI_HOSTED_TOOLS_MANIFEST: unknown = {
29
29
  "z-turbo",
30
30
  "z-image",
31
31
  "krea-2-turbo",
32
+ "moss-image",
33
+ "moss-image-8step",
34
+ "flux-3-klein",
32
35
  "dark-beast-krea2",
33
36
  "dark-beast-z-turbo",
34
37
  "chroma-v46-flash",
@@ -51,15 +54,15 @@ export const SOGNI_HOSTED_TOOLS_MANIFEST: unknown = {
51
54
  "pony-faetality",
52
55
  "dreamshaper-xl"
53
56
  ],
54
- "description": "DO NOT SET THIS PARAMETER unless the user names a specific model, asks for a very complex image render, asks for a video storyboard/storyboard sheet/contact sheet/panel layout image, asks for anime without naming a model, requests permitted NSFW/nudity content, or explicitly asks for Z-image/Z-image Turbo/Krea 2 Turbo image-to-image. The app auto-selects based on quality settings. Set \"gpt-image-2.5-flare\" when the user asks for a ChatGPT, OpenAI, GPT, or GPT Image image/model without naming a version. Set \"gpt-image-2\" only when the user explicitly names GPT Image 2, GPT-2, or gpt-image-2; GPT Image 2 is never a default. Set \"gpt-image-2.5-sunburst\" when the user explicitly requests very strong text rendering, and by default for video storyboards and other complex single-image renders that need dense labels, crisp typography, multi-panel composition, timing notes, foley notes, professional storyboard-sheet layout, or a comprehensive character/mascot/model sheet with turnarounds, expressions, accessories, palette swatches, and brand notes. Set \"one-obsession-v22\" when the user asks for an anime or anime-style image and has not named a specific image model. Set \"z-turbo\" when the user asks for Z-image Turbo; set \"z-image\" when they ask for Z-image without Turbo. Set \"krea-2-turbo\" when the user asks for Krea 2 Turbo. If the user names another image model, honor that requested model instead. A model preference usually does not change which tool to use; the Z-image and Krea 2 Turbo image-to-image exception uses sourceImageIndex plus starting_image_strength on this tool. NSFW rule: GPT Image models and Qwen image models CANNOT do nudity. For permitted NSFW/nudity content, prefer \"dark-beast-krea2\", then \"dark-beast-z-turbo\"; \"chroma1-hd\", \"pony-v7\", \"chroma-detail\", \"chroma-v46-flash\", and \"z-turbo\" are compatible fallbacks. GPT Image 2.5 adds two distinct models: use \"gpt-image-2.5-sunburst\" for an explicit Sunburst request and \"gpt-image-2.5-flare\" for an explicit Flare request. For GPT Image 2.5 without a named variant, use Flare. Preserve explicit GPT Image 2.0 as \"gpt-image-2\". Sunburst is positioned for difficult images and precise edits; Flare for faster everyday generation. Both generate and edit. Model choice is independent of rendering quality."
57
+ "description": "DO NOT SET THIS PARAMETER unless the user names a specific model, asks for a very complex image render, asks for a video storyboard/storyboard sheet/contact sheet/panel layout image, asks for anime without naming a model, requests permitted NSFW/nudity content, or explicitly asks for Z-image/Z-image Turbo/Krea 2 Turbo image-to-image. The app auto-selects based on quality settings. Set \"gpt-image-2.5-flare\" when the user asks for a ChatGPT, OpenAI, GPT, or GPT Image image/model without naming a version. Set \"gpt-image-2\" only when the user explicitly names GPT Image 2, GPT-2, or gpt-image-2; GPT Image 2 is never a default. Set \"gpt-image-2.5-sunburst\" when the user explicitly requests very strong text rendering, and by default for video storyboards and other complex single-image renders that need dense labels, crisp typography, multi-panel composition, timing notes, foley notes, professional storyboard-sheet layout, or a comprehensive character/mascot/model sheet with turnarounds, expressions, accessories, palette swatches, and brand notes. Set \"one-obsession-v22\" when the user asks for an anime or anime-style image and has not named a specific image model. Set \"z-turbo\" when the user asks for Z-image Turbo; set \"z-image\" when they ask for Z-image without Turbo. Set \"krea-2-turbo\" when the user asks for Krea 2 Turbo. Set \"flux-3-klein\" when the user asks for FLUX 3 or FLUX 3 Image Klein. If the user names another image model, honor that requested model instead. A model preference usually does not change which tool to use; the Z-image and Krea 2 Turbo image-to-image exception uses sourceImageIndex plus starting_image_strength on this tool. NSFW rule: GPT Image models and Qwen image models CANNOT do nudity. For permitted NSFW/nudity content, prefer \"dark-beast-krea2\", then \"dark-beast-z-turbo\"; \"chroma1-hd\", \"pony-v7\", \"chroma-detail\", \"chroma-v46-flash\", \"z-turbo\", \"moss-image\", and \"moss-image-8step\" are compatible fallbacks. GPT Image 2.5 adds two distinct models: use \"gpt-image-2.5-sunburst\" for an explicit Sunburst request and \"gpt-image-2.5-flare\" for an explicit Flare request. For GPT Image 2.5 without a named variant, use Flare. Preserve explicit GPT Image 2.0 as \"gpt-image-2\". Sunburst is positioned for difficult images and precise edits; Flare for faster everyday generation. Both generate and edit. Model choice is independent of rendering quality. Set \"moss-image\" when the user requests MOSS-Image or MOSS-Image SFT. Set \"moss-image-8step\" when the user requests MOSS 8-step or MOSS DMD; this preset uses 8 steps and guidance 1. Both MOSS presets are uncensored and support compatible Personal LoRAs. MOSS-Image SFT is text-to-image only; it has no uploaded-image instruction-editing input. For its JSON layouts, send one complete literal layout per call; numberOfVariations varies seeds. Use separate calls for different layouts, and do not put Dynamic Prompt choices inside layout JSON."
55
58
  },
56
59
  "width": {
57
60
  "type": "number",
58
- "description": "Output image width in pixels. Default: 1024. Supported bounds depend on the selected image model: Z-Image/Z-Image Turbo, Dark Beast Z-Image Turbo, Chroma, and legacy/specialized image models support 256-2048 on either edge; Krea 2 Turbo, Dark Beast KREA 2, and Qwen image models support 256-2560 on either edge; One Obsession v22 supports 256-1920 on either edge; GPT Image 2 supports flexible dimensions up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400. Set when the user specifies a width, exact pixel dimensions, or a named resolution (e.g., \"1280 wide\", \"1280x720\", \"720p\", \"1080x1920\", \"3840x2160\"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds; the renderer snaps to the nearest supported size internally, so do not ask the user to adjust by a few pixels."
61
+ "description": "Output image width in pixels. Default: 1024. Supported bounds depend on the selected image model: Z-Image/Z-Image Turbo, Dark Beast Z-Image Turbo, Chroma, and legacy/specialized image models support 256-2048 on either edge; Krea 2 Turbo, Dark Beast KREA 2, and Qwen image models support 256-2560 on either edge; FLUX 3 Image Klein supports 256-4096 on either edge, including 4K (3840x2160, 2160x3840, 4096x4096); One Obsession v22 supports 256-1920 on either edge; GPT Image 2 supports flexible dimensions up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400. Set when the user specifies a width, exact pixel dimensions, or a named resolution (e.g., \"1280 wide\", \"1280x720\", \"720p\", \"1080x1920\", \"3840x2160\"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds; the renderer snaps to the nearest supported size internally, so do not ask the user to adjust by a few pixels. MOSS-Image SFT supports 512-2048 pixels on either edge, aligned to multiples of 16."
59
62
  },
60
63
  "height": {
61
64
  "type": "number",
62
- "description": "Output image height in pixels. Default: 1024. Supported bounds depend on the selected image model: Z-Image/Z-Image Turbo, Dark Beast Z-Image Turbo, Chroma, and legacy/specialized image models support 256-2048 on either edge; Krea 2 Turbo, Dark Beast KREA 2, and Qwen image models support 256-2560 on either edge; One Obsession v22 supports 256-1920 on either edge; GPT Image 2 supports flexible dimensions up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400. Set when the user specifies a height, exact pixel dimensions, or a named resolution (e.g., \"720 high\", \"1280x720\", \"720p\", \"1080x1920\", \"2160x3840\"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds; the renderer snaps to the nearest supported size internally, so do not ask the user to adjust by a few pixels."
65
+ "description": "Output image height in pixels. Default: 1024. Supported bounds depend on the selected image model: Z-Image/Z-Image Turbo, Dark Beast Z-Image Turbo, Chroma, and legacy/specialized image models support 256-2048 on either edge; Krea 2 Turbo, Dark Beast KREA 2, and Qwen image models support 256-2560 on either edge; FLUX 3 Image Klein supports 256-4096 on either edge, including 4K (3840x2160, 2160x3840, 4096x4096); One Obsession v22 supports 256-1920 on either edge; GPT Image 2 supports flexible dimensions up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400. Set when the user specifies a height, exact pixel dimensions, or a named resolution (e.g., \"720 high\", \"1280x720\", \"720p\", \"1080x1920\", \"2160x3840\"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds; the renderer snaps to the nearest supported size internally, so do not ask the user to adjust by a few pixels. MOSS-Image SFT supports 512-2048 pixels on either edge, aligned to multiples of 16."
63
66
  },
64
67
  "numberOfVariations": {
65
68
  "type": "number",
@@ -135,7 +138,7 @@ export const SOGNI_HOSTED_TOOLS_MANIFEST: unknown = {
135
138
  "type": "string",
136
139
  "minLength": 1
137
140
  },
138
- "description": "Ordered LoRA IDs to apply to a compatible image model. Use only when the user explicitly requests LoRAs or asks for an effect one of these names directly. Stack up to 8 in one request; order matters because the adapters apply in sequence and do not commute. Keep this array positionally aligned with loraStrengths. The first render with an uncached LoRA takes longer to start while the worker downloads it.\n\nAccepted only by the five Krea 2 based models: krea2_turbo_fp8_scaled (text-to-image), krea2_identity_edit_v1_2 and krea2_identity_edit_sogni_v0_3_alpha (identity edit), and the dark_beast_krea2_fp8 / dark_beast_krea2_identity_edit_v1_2 community variants.\n\nBipolar sliders — each id names its POSITIVE direction, a negative strength applies the opposite, and 0 disables it: krea2-detail-enhancer, krea2-scene-complexity, krea2-realism (+ = photoreal), krea2-amateur, krea2-candid, krea2-zoom (+ = zoomed in), krea2-skin-detail, krea2-wetness, krea2-age, krea2-height, krea2-weight, krea2-hourglass-figure, krea2-breast, krea2-chest-firmness, krea2-nipple-projection, krea2-warm-light, krea2-afterlight (+ = golden), krea2-skin-tone (+ = darker), krea2-purple-grainy (+ = grainy and muted). Positive-only fine-tunes: krea2-realism-engine (photographic realism), krea2-bloomgirls (polished influencer look), krea2-mystic-x (uncensored adult), krea2-aberrant (industrial body horror), krea2-filter-bypass-2 and krea2-filter-bypass-3 (restore expressions, anatomy and poses the base model flattens; try the 2-vector first). Exact per-LoRA ranges, maturity flags and the full contract: GET /v1/loras/comfy?modelId=<model>. Personal imports use authenticated GET /v1/loras/personal/catalog: use an owned ready personal- id, its modelIds, strength range and requirements. Never invent ids or silently omit a requested personal LoRA."
141
+ "description": "Ordered LoRA IDs to apply to a compatible image model. Use only when the user explicitly requests LoRAs or asks for an effect one of these names directly. Stack up to 8 in one request; order matters because the adapters apply in sequence and do not commute. Keep this array positionally aligned with loraStrengths. The first render with an uncached LoRA takes longer to start while the worker downloads it.\n\nThe public Krea 2 catalog below is accepted by: krea2_turbo_fp8_scaled (text-to-image), krea2_identity_edit_v1_2 and krea2_identity_edit_sogni_v0_3_alpha (identity edit), and the dark_beast_krea2_fp8 / dark_beast_krea2_identity_edit_v1_2 community variants.\n\nBipolar sliders — each id names its POSITIVE direction, a negative strength applies the opposite, and 0 disables it: krea2-detail-enhancer, krea2-scene-complexity, krea2-realism (+ = photoreal), krea2-amateur, krea2-candid, krea2-zoom (+ = zoomed in), krea2-skin-detail, krea2-wetness, krea2-age, krea2-height, krea2-weight, krea2-hourglass-figure, krea2-breast, krea2-chest-firmness, krea2-nipple-projection, krea2-warm-light, krea2-afterlight (+ = golden), krea2-skin-tone (+ = darker), krea2-purple-grainy (+ = grainy and muted). Positive-only fine-tunes: krea2-realism-engine (photographic realism), krea2-bloomgirls (polished influencer look), krea2-mystic-x (uncensored adult), krea2-aberrant (industrial body horror), krea2-filter-bypass-2 and krea2-filter-bypass-3 (restore expressions, anatomy and poses the base model flattens; try the 2-vector first). Exact per-LoRA ranges, maturity flags and the full contract: GET /v1/loras/comfy?modelId=<model>. Personal imports use authenticated GET /v1/loras/personal/catalog: use an owned ready personal- id, its modelIds, strength range and requirements. Compatible Personal LoRAs also work with FLUX 3 Image Klein and both MOSS presets; a MOSS 8-step personal adapter stacks after its built-in DMD adapter. Never invent ids or silently omit a requested personal LoRA."
139
142
  },
140
143
  "loraStrengths": {
141
144
  "type": "array",
@@ -505,7 +508,7 @@ export const SOGNI_HOSTED_TOOLS_MANIFEST: unknown = {
505
508
  "type": "function",
506
509
  "function": {
507
510
  "name": "edit_image",
508
- "description": "Generate images guided by reference photos. Supports GPT Image 2 up to 16 images, Qwen up to 3 images, and Krea 2 Identity Edit / Dark Beast Krea 2 Identity Edit up to 2 images. Best for style-guided generation, combining elements from multiple images, ANY persona image creation, identity-preserving Krea edits, and any uploaded brand asset reuse — logos, brand marks, mascots, product shots, photos, screenshots, sketches, or character designs the user expects to appear in or guide the result. ALWAYS use this (never generate_image) when persona photos OR uploaded image assets meant for reuse are in context — even if a specific edit model is requested. Exception: explicit Z-image/Z-image Turbo/Krea 2 Turbo uploaded-image enhancement uses generate_image with sourceImageIndex and starting_image_strength because those base image-to-image models are not edit_image models. If a previous edit_image attempt did not preserve the uploaded asset well, stay on edit_image and tighten the prompt or switch model; generate_image has no access to the upload.",
511
+ "description": "Generate images guided by reference photos. Supports GPT Image 2 up to 16 images, FLUX 3 Image Klein up to 10 images, Qwen up to 3 images, and Krea 2 Identity Edit / Dark Beast Krea 2 Identity Edit up to 2 images. Best for style-guided generation, combining elements from multiple images, ANY persona image creation, identity-preserving Krea edits, and any uploaded brand asset reuse — logos, brand marks, mascots, product shots, photos, screenshots, sketches, or character designs the user expects to appear in or guide the result. ALWAYS use this (never generate_image) when persona photos OR uploaded image assets meant for reuse are in context — even if a specific edit model is requested. Exception: explicit Z-image/Z-image Turbo/Krea 2 Turbo uploaded-image enhancement uses generate_image with sourceImageIndex and starting_image_strength because those base image-to-image models are not edit_image models. If a previous edit_image attempt did not preserve the uploaded asset well, stay on edit_image and tighten the prompt or switch model; generate_image has no access to the upload.",
509
512
  "parameters": {
510
513
  "type": "object",
511
514
  "properties": {
@@ -522,9 +525,10 @@ export const SOGNI_HOSTED_TOOLS_MANIFEST: unknown = {
522
525
  "qwen-lightning",
523
526
  "qwen",
524
527
  "krea-identity-edit",
525
- "dark-beast-krea2-identity-edit"
528
+ "dark-beast-krea2-identity-edit",
529
+ "flux-3-klein"
526
530
  ],
527
- "description": "The app auto-selects Fast→Qwen Lightning and HQ/Pro→full Qwen only for ordinary identity-neutral edits. REQUIRED IDENTITY DEFAULT: set \"krea-identity-edit\" whenever an edit of a referenced person or character must keep likeness or character identity while changing clothing, hair or makeup, pose or position, face/head/body, background, lighting, or visual style. Infer that semantic intent in any language; never route from keyword or regex matching. Also use it for a non-Pro single-character sheet. This default applies even when the user did not name Krea; an explicitly requested model always wins. Set \"dark-beast-krea2-identity-edit\" only when the user explicitly requests that model, its uncensored/community variant, or dark_beast_krea2_identity_edit_v1_2. Set \"gpt-image-2\" only when the user explicitly names legacy GPT Image 2 (GPT Image 2, GPT-2, or gpt-image-2); it is never a default. A ChatGPT, OpenAI, GPT, or GPT Image edit request that names no version uses \"gpt-image-2.5-flare\". Set \"gpt-image-2.5-sunburst\" when precise typography, dense labels, or a professional multi-panel layout is the primary requirement; Pro character sheets use Sunburst unless the user names another model. If GPT Image 2.5 Sunburst is unavailable for detail-critical layout work, fall back to full \"qwen\", never \"qwen-lightning\". Krea identity edit models require at least one reference image, accept up to two context images, and work best at 512-2048px. Let the model tier and worker choose current steps, guidance, sampler, scheduler, grounding, and reference-boost defaults; do not send a negative prompt. When Krea is selected, override the generic prompt-length guidance with a concise 1-4 sentence delta instruction; name only the requested change and details that must remain fixed. Put the base scene/image first and an optional person/detail reference second. Z-image, Z-image Turbo, and base Krea 2 Turbo are generate_image img2img models, not edit_image selectors. If the user names another edit/image model, honor it. GPT Image 2 always processes input images at high fidelity; do not set input_fidelity. GPT Image 2.5 adds two distinct models: use \"gpt-image-2.5-sunburst\" for an explicit Sunburst request and \"gpt-image-2.5-flare\" for an explicit Flare request. For GPT Image 2.5 without a named variant, use Flare. Preserve explicit GPT Image 2.0 as \"gpt-image-2\". Sunburst is positioned for difficult images and precise edits; Flare for faster everyday generation. Both generate and edit. Model choice is independent of rendering quality."
531
+ "description": "The app auto-selects Fast→Qwen Lightning and HQ/Pro→full Qwen only for ordinary identity-neutral edits. REQUIRED IDENTITY DEFAULT: set \"krea-identity-edit\" whenever an edit of a referenced person or character must keep likeness or character identity while changing clothing, hair or makeup, pose or position, face/head/body, background, lighting, or visual style. Infer that semantic intent in any language; never route from keyword or regex matching. Also use it for a non-Pro single-character sheet. This default applies even when the user did not name Krea; an explicitly requested model always wins. Set \"dark-beast-krea2-identity-edit\" only when the user explicitly requests that model, its uncensored/community variant, or dark_beast_krea2_identity_edit_v1_2. Set \"gpt-image-2\" only when the user explicitly names legacy GPT Image 2 (GPT Image 2, GPT-2, or gpt-image-2); it is never a default. A ChatGPT, OpenAI, GPT, or GPT Image edit request that names no version uses \"gpt-image-2.5-flare\". Set \"gpt-image-2.5-sunburst\" when precise typography, dense labels, or a professional multi-panel layout is the primary requirement; Pro character sheets use Sunburst unless the user names another model. If GPT Image 2.5 Sunburst is unavailable for detail-critical layout work, fall back to full \"qwen\", never \"qwen-lightning\". Krea identity edit models require at least one reference image, accept up to two context images, and work best at 512-2048px. Set \"flux-3-klein\" when the user asks for FLUX 3 or FLUX 3 Image Klein; it accepts 1-10 reference images and works at 256-4096px, including 4K. For it, describe the whole result as a full scene caption that folds the requested change into a description of the reference, and refer to references in order (the first image, the second image); guidance is fixed and a negative prompt has no effect, so do not send one. Let the model tier and worker choose current steps, guidance, sampler, scheduler, grounding, and reference-boost defaults; do not send a negative prompt. When Krea is selected, override the generic prompt-length guidance with a concise 1-4 sentence delta instruction; name only the requested change and details that must remain fixed. Put the base scene/image first and an optional person/detail reference second. Z-image, Z-image Turbo, and base Krea 2 Turbo are generate_image img2img models, not edit_image selectors. If the user names another edit/image model, honor it. GPT Image 2 always processes input images at high fidelity; do not set input_fidelity. GPT Image 2.5 adds two distinct models: use \"gpt-image-2.5-sunburst\" for an explicit Sunburst request and \"gpt-image-2.5-flare\" for an explicit Flare request. For GPT Image 2.5 without a named variant, use Flare. Preserve explicit GPT Image 2.0 as \"gpt-image-2\". Sunburst is positioned for difficult images and precise edits; Flare for faster everyday generation. Both generate and edit. Model choice is independent of rendering quality."
528
532
  },
529
533
  "sourceImageIndex": {
530
534
  "type": "number",
@@ -538,11 +542,11 @@ export const SOGNI_HOSTED_TOOLS_MANIFEST: unknown = {
538
542
  },
539
543
  "width": {
540
544
  "type": "number",
541
- "description": "Output image width in pixels. Defaults to the context image width. Supported bounds depend on the selected edit model: Qwen edit models support 256-2560 on either edge; Krea 2 Identity Edit and Dark Beast Krea 2 Identity Edit work best from 512-2048 on either edge; GPT Image 2 supports flexible dimensions up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400. Set when the user specifies a width, exact pixel dimensions, or a named resolution (e.g., \"1280 wide\", \"1280x720\", \"720p\", \"3840x2160\"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds; the renderer snaps to the nearest supported size internally, so do not ask the user to adjust by a few pixels."
545
+ "description": "Output image width in pixels. Defaults to the context image width. Supported bounds depend on the selected edit model: Qwen edit models support 256-2560 on either edge; FLUX 3 Image Klein supports 256-4096 on either edge, including 4K; Krea 2 Identity Edit and Dark Beast Krea 2 Identity Edit work best from 512-2048 on either edge; GPT Image 2 supports flexible dimensions up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400. Set when the user specifies a width, exact pixel dimensions, or a named resolution (e.g., \"1280 wide\", \"1280x720\", \"720p\", \"3840x2160\"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds; the renderer snaps to the nearest supported size internally, so do not ask the user to adjust by a few pixels."
542
546
  },
543
547
  "height": {
544
548
  "type": "number",
545
- "description": "Output image height in pixels. Defaults to the context image height. Supported bounds depend on the selected edit model: Qwen edit models support 256-2560 on either edge; Krea 2 Identity Edit and Dark Beast Krea 2 Identity Edit work best from 512-2048 on either edge; GPT Image 2 supports flexible dimensions up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400. Set when the user specifies a height, exact pixel dimensions, or a named resolution (e.g., \"720 high\", \"1280x720\", \"720p\", \"2160x3840\"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds; the renderer snaps to the nearest supported size internally, so do not ask the user to adjust by a few pixels."
549
+ "description": "Output image height in pixels. Defaults to the context image height. Supported bounds depend on the selected edit model: Qwen edit models support 256-2560 on either edge; FLUX 3 Image Klein supports 256-4096 on either edge, including 4K; Krea 2 Identity Edit and Dark Beast Krea 2 Identity Edit work best from 512-2048 on either edge; GPT Image 2 supports flexible dimensions up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400. Set when the user specifies a height, exact pixel dimensions, or a named resolution (e.g., \"720 high\", \"1280x720\", \"720p\", \"2160x3840\"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds; the renderer snaps to the nearest supported size internally, so do not ask the user to adjust by a few pixels."
546
550
  },
547
551
  "aspectRatio": {
548
552
  "type": "string",
@@ -600,7 +604,7 @@ export const SOGNI_HOSTED_TOOLS_MANIFEST: unknown = {
600
604
  "type": "string",
601
605
  "minLength": 1
602
606
  },
603
- "description": "Ordered LoRA IDs for the edit. Public Krea sliders work with model=\"krea-identity-edit\" or model=\"dark-beast-krea2-identity-edit\". Ready personal imports also work on their listed compatible edit models, including Qwen; discover them through authenticated GET /v1/loras/personal/catalog and preserve their exact personal- IDs. GPT Image models do not support LoRAs. Use when the user asks to shift a trait such as age, build, skin, lighting or grain. Stack up to 8 in one request; order matters because the adapters apply in sequence and do not commute. Keep this array positionally aligned with loraStrengths. The first render with an uncached LoRA takes longer to start while the worker downloads it.\n\nBipolar sliders — each id names its POSITIVE direction, a negative strength applies the opposite, and 0 disables it: krea2-detail-enhancer, krea2-scene-complexity, krea2-realism (+ = photoreal), krea2-amateur, krea2-candid, krea2-zoom (+ = zoomed in), krea2-skin-detail, krea2-wetness, krea2-age, krea2-height, krea2-weight, krea2-hourglass-figure, krea2-breast, krea2-chest-firmness, krea2-nipple-projection, krea2-warm-light, krea2-afterlight (+ = golden), krea2-skin-tone (+ = darker), krea2-purple-grainy (+ = grainy and muted). Positive-only fine-tunes: krea2-realism-engine (photographic realism), krea2-bloomgirls (polished influencer look), krea2-mystic-x (uncensored adult), krea2-aberrant (industrial body horror), krea2-filter-bypass-2 and krea2-filter-bypass-3 (restore expressions, anatomy and poses the base model flattens; try the 2-vector first). Exact per-LoRA ranges, maturity flags and the full contract: GET /v1/loras/comfy?modelId=<model>. Personal imports use authenticated GET /v1/loras/personal/catalog: use an owned ready personal- id, its modelIds, strength range and requirements. Never invent ids or silently omit a requested personal LoRA."
607
+ "description": "Ordered LoRA IDs for the edit. Public Krea sliders work with model=\"krea-identity-edit\" or model=\"dark-beast-krea2-identity-edit\". Ready personal imports also work on their listed compatible edit models, including Qwen; discover them through authenticated GET /v1/loras/personal/catalog and preserve their exact personal- IDs. GPT Image models do not support LoRAs. Use when the user asks to shift a trait such as age, build, skin, lighting or grain. Stack up to 8 in one request; order matters because the adapters apply in sequence and do not commute. Keep this array positionally aligned with loraStrengths. The first render with an uncached LoRA takes longer to start while the worker downloads it.\n\nBipolar sliders — each id names its POSITIVE direction, a negative strength applies the opposite, and 0 disables it: krea2-detail-enhancer, krea2-scene-complexity, krea2-realism (+ = photoreal), krea2-amateur, krea2-candid, krea2-zoom (+ = zoomed in), krea2-skin-detail, krea2-wetness, krea2-age, krea2-height, krea2-weight, krea2-hourglass-figure, krea2-breast, krea2-chest-firmness, krea2-nipple-projection, krea2-warm-light, krea2-afterlight (+ = golden), krea2-skin-tone (+ = darker), krea2-purple-grainy (+ = grainy and muted). Positive-only fine-tunes: krea2-realism-engine (photographic realism), krea2-bloomgirls (polished influencer look), krea2-mystic-x (uncensored adult), krea2-aberrant (industrial body horror), krea2-filter-bypass-2 and krea2-filter-bypass-3 (restore expressions, anatomy and poses the base model flattens; try the 2-vector first). Exact per-LoRA ranges, maturity flags and the full contract: GET /v1/loras/comfy?modelId=<model>. Personal imports use authenticated GET /v1/loras/personal/catalog: use an owned ready personal- id, its modelIds, strength range and requirements. Compatible Personal LoRAs also work with FLUX 3 Image Klein and both MOSS presets; a MOSS 8-step personal adapter stacks after its built-in DMD adapter. Never invent ids or silently omit a requested personal LoRA."
604
608
  },
605
609
  "loraStrengths": {
606
610
  "type": "array",
@@ -9,7 +9,11 @@ import {
9
9
  isSeedance25Model,
10
10
  isWan3Model
11
11
  } from '../Projects/utils/index.js';
12
- import { isKreaIdentityEditModel, isQwenImageEditModel } from '../lib/validation.js';
12
+ import {
13
+ isFlux3ImageKleinModel,
14
+ isKreaIdentityEditModel,
15
+ isQwenImageEditModel
16
+ } from '../lib/validation.js';
13
17
 
14
18
  export {
15
19
  calculateVideoFrames,
@@ -98,6 +102,9 @@ export const PREFERRED_MODEL_IDS = {
98
102
  chromaFlash: 'chroma-v.46-flash_fp8',
99
103
  zTurbo: 'z_image_turbo_bf16',
100
104
  krea2Turbo: 'krea2_turbo_fp8_scaled',
105
+ mossImage: 'moss_image_sft_int8_convrot',
106
+ mossImage8Step: 'moss_image_sft_dmd8_int8_convrot',
107
+ flux3ImageKlein: 'flux3_image_klein_sd_int8_convrot',
101
108
  krea2IdentityEdit: 'krea2_identity_edit_v1_2',
102
109
  darkBeastKrea2IdentityEdit: 'dark_beast_krea2_identity_edit_v1_2',
103
110
  rtxVsr: 'rtx_vsr_pro'
@@ -235,6 +242,15 @@ function normalizeSelectorKey(value: string): string {
235
242
  .replace(/[_\s]+/g, '-');
236
243
  }
237
244
 
245
+ // FLUX 3 Image Klein is one model for text-to-image, start-image and
246
+ // 1-10 reference edits, so generate_image and edit_image share its selectors.
247
+ const FLUX3_IMAGE_KLEIN_SELECTORS: Record<string, string> = {
248
+ 'flux-3-klein': PREFERRED_MODEL_IDS.image.flux3ImageKlein,
249
+ 'flux3-klein': PREFERRED_MODEL_IDS.image.flux3ImageKlein,
250
+ 'flux-3-image-klein': PREFERRED_MODEL_IDS.image.flux3ImageKlein,
251
+ 'flux3-image-klein': PREFERRED_MODEL_IDS.image.flux3ImageKlein
252
+ };
253
+
238
254
  const GPT_IMAGE_25_SELECTORS: Record<string, string> = {
239
255
  'gpt-image-2.5-sunburst': PREFERRED_MODEL_IDS.image.gptImage25Sunburst,
240
256
  'gpt-image-2.5-flare': PREFERRED_MODEL_IDS.image.gptImage25Flare,
@@ -252,6 +268,10 @@ const IMAGE_MODEL_SELECTORS: Record<string, string> = {
252
268
  'z-turbo': 'z_image_turbo_bf16',
253
269
  'krea-2-turbo': 'krea2_turbo_fp8_scaled',
254
270
  'krea2-turbo': 'krea2_turbo_fp8_scaled',
271
+ 'moss-image': PREFERRED_MODEL_IDS.image.mossImage,
272
+ 'moss-image-sft': PREFERRED_MODEL_IDS.image.mossImage,
273
+ 'moss-image-8step': PREFERRED_MODEL_IDS.image.mossImage8Step,
274
+ ...FLUX3_IMAGE_KLEIN_SELECTORS,
255
275
  'z-image': 'z_image_bf16',
256
276
  'chroma-v46-flash': 'chroma-v.46-flash_fp8',
257
277
  'chroma-detail': 'chroma-v48-detail-svd_fp8',
@@ -289,6 +309,7 @@ const EDIT_IMAGE_MODEL_SELECTORS: Record<string, string> = {
289
309
  ...GPT_IMAGE_25_SELECTORS,
290
310
  'qwen-lightning': 'qwen_image_edit_2511_fp8_lightning',
291
311
  qwen: 'qwen_image_edit_2511_fp8',
312
+ ...FLUX3_IMAGE_KLEIN_SELECTORS,
292
313
  'krea-2-identity-edit': PREFERRED_MODEL_IDS.image.krea2IdentityEdit,
293
314
  'krea2-identity-edit': PREFERRED_MODEL_IDS.image.krea2IdentityEdit,
294
315
  'krea-identity-edit': PREFERRED_MODEL_IDS.image.krea2IdentityEdit,
@@ -595,7 +616,8 @@ export function isEditImageModel(modelId: string): boolean {
595
616
  modelId === PREFERRED_MODEL_IDS.image.gptImage25Sunburst ||
596
617
  modelId === PREFERRED_MODEL_IDS.image.gptImage25Flare ||
597
618
  isQwenImageEditModel(modelId) ||
598
- isKreaIdentityEditModel(modelId)
619
+ isKreaIdentityEditModel(modelId) ||
620
+ isFlux3ImageKleinModel(modelId)
599
621
  );
600
622
  }
601
623
 
@@ -1372,6 +1372,10 @@ function applyImageParams(
1372
1372
  params: ImageProjectParams,
1373
1373
  options: ImageModelOptions
1374
1374
  ) {
1375
+ if (['moss_image_sft_int8_convrot', 'moss_image_sft_dmd8_int8_convrot'].includes(params.modelId) &&
1376
+ (params.startingImage || params.contextImages?.length)) {
1377
+ throw new Error('MOSS-Image SFT generates from text and does not accept guide or reference images.');
1378
+ }
1375
1379
  const keyFrame: Record<string, any> = {
1376
1380
  ...inputKeyframe,
1377
1381
  sizePreset: params.sizePreset
@@ -2406,7 +2406,7 @@ class ProjectsApi extends ApiGroup<ProjectApiEvents> {
2406
2406
  await this.uploadCNImage(project.id, data.controlNet.image);
2407
2407
  }
2408
2408
 
2409
- // Context images (GPT Image 2 supports up to 16; Qwen Image Edit supports up to 3; Krea 2 Identity Edit and legacy Flux Kontext support up to 2)
2409
+ // Context images (GPT Image 2 supports up to 16; FLUX 3 Image Klein up to 10; Qwen Image Edit supports up to 3; Krea 2 Identity Edit and legacy Flux Kontext support up to 2)
2410
2410
  if (data.contextImages?.length) {
2411
2411
  const maxContextImages = getMaxContextImages(data.modelId);
2412
2412
  if (data.contextImages.length > maxContextImages) {
@@ -105,6 +105,13 @@ export function isKreaIdentityEditModel(modelId: string): boolean {
105
105
  return KREA_IDENTITY_EDIT_MODEL_IDS.has(modelId);
106
106
  }
107
107
 
108
+ /** FLUX 3 Image Klein renders text-to-image, start-image and edits from 1-10 references. */
109
+ const FLUX3_IMAGE_KLEIN_MODEL_ID = 'flux3_image_klein_sd_int8_convrot';
110
+
111
+ export function isFlux3ImageKleinModel(modelId: string): boolean {
112
+ return modelId === FLUX3_IMAGE_KLEIN_MODEL_ID;
113
+ }
114
+
108
115
  const RTX_VSR_MAX_EDGE = 15360;
109
116
 
110
117
  interface ImageSizeValidationOptions {
@@ -113,6 +120,9 @@ interface ImageSizeValidationOptions {
113
120
  }
114
121
 
115
122
  function getCustomImageSizeBounds(modelId?: string): { min: number; max: number } {
123
+ if (['moss_image_sft_int8_convrot', 'moss_image_sft_dmd8_int8_convrot'].includes(modelId || '')) {
124
+ return { min: 512, max: 2048 };
125
+ }
116
126
  if (modelId === 'rtx_vsr_pro') {
117
127
  return { min: 512, max: RTX_VSR_MAX_EDGE };
118
128
  }
@@ -122,6 +132,9 @@ function getCustomImageSizeBounds(modelId?: string): { min: number; max: number
122
132
  if (isGptImageModel(modelId)) {
123
133
  return { min: 256, max: 3840 };
124
134
  }
135
+ if (modelId && isFlux3ImageKleinModel(modelId)) {
136
+ return { min: 256, max: 4096 };
137
+ }
125
138
  if (modelId && EXTENDED_IMAGE_SIZE_MODEL_IDS.has(modelId)) {
126
139
  return { min: 256, max: 2560 };
127
140
  }
@@ -212,8 +225,10 @@ export function isComfyModel(modelId: string): boolean {
212
225
  'z_image_',
213
226
  'dark_beast_z_image_',
214
227
  'krea2_',
228
+ 'moss_image_',
215
229
  'dark_beast_krea2_',
216
230
  'qwen_image_',
231
+ 'flux3_',
217
232
  'rtx_vsr_',
218
233
  'flashvsr_',
219
234
  'wan_',
@@ -227,15 +242,20 @@ export function isComfyModel(modelId: string): boolean {
227
242
  /**
228
243
  * Get the maximum number of context images supported by a model.
229
244
  * - GPT Image 2: 16 images
245
+ * - FLUX 3 Image Klein: 10 images (optional)
230
246
  * - Qwen Image Edit: 3 images
231
247
  * - Krea 2 Identity Edit: 2 images
232
248
  * - Legacy Flux Kontext matching: 2 images
233
249
  * - Default: 3 images
234
250
  */
235
251
  export function getMaxContextImages(modelId: string): number {
252
+ if (['moss_image_sft_int8_convrot', 'moss_image_sft_dmd8_int8_convrot'].includes(modelId || '')) return 0;
236
253
  if (isGptImageModel(modelId)) {
237
254
  return 16;
238
255
  }
256
+ if (isFlux3ImageKleinModel(modelId)) {
257
+ return 10;
258
+ }
239
259
  if (QWEN_IMAGE_MODEL_IDS.has(modelId)) {
240
260
  return 3;
241
261
  }
package/src/version.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED by scripts/generate-version.mjs — do not edit.
2
2
  // Source of truth: package.json version.
3
- export const LIB_VERSION = '5.63.4';
3
+ export const LIB_VERSION = '5.65.0';