@sogni-ai/sogni-creative-agent-skill 3.49.1 → 3.51.1
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/.agents/skills/sogni-creative-agent-skill/SKILL.md +12 -3
- package/.agents/skills/sogni-creative-agent-skill/references/h3-video-loras.md +5 -0
- package/.agents/skills/sogni-creative-agent-skill/references/hosted-api.md +16 -0
- package/.agents/skills/sogni-creative-agent-skill/references/interactive-worlds.md +15 -1
- package/.agents/skills/sogni-creative-agent-skill/references/models.md +104 -11
- package/.agents/skills/sogni-creative-agent-skill/references/personal-loras.md +33 -0
- package/.agents/skills/sogni-creative-agent-skill/references/video-prompting.md +13 -0
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +25 -0
- package/README.md +18 -4
- package/SKILL.md +6 -6
- package/desktop-extension/manifest.json +1 -1
- package/desktop-extension/server/tools.mjs +3 -0
- package/generated/creative-agent-runtime.mjs +321 -5
- package/llm.txt +5 -2
- package/media-utilities.mjs +38 -5
- package/openclaw.plugin.json +1 -1
- package/package.json +3 -3
- package/plugin-skills/sogni-creative-agent/SKILL.md +8 -1
- package/references/h3-video-loras.md +5 -0
- package/references/hosted-api.md +16 -0
- package/references/interactive-worlds.md +15 -1
- package/references/models.md +104 -11
- package/references/personal-loras.md +33 -0
- package/references/video-prompting.md +13 -0
- package/scripts/sync-hermes-skill.mjs +1 -0
- package/skill-package.json +4 -1
- package/sogni-agent.mjs +400 -59
- package/version.mjs +1 -1
|
@@ -27,6 +27,9 @@ const GATING_POLICIES = [
|
|
|
27
27
|
"edit_image",
|
|
28
28
|
"restore_photo",
|
|
29
29
|
"upscale_image",
|
|
30
|
+
"image_to_3d",
|
|
31
|
+
"remove_background",
|
|
32
|
+
"segment_image",
|
|
30
33
|
"apply_style",
|
|
31
34
|
"refine_result",
|
|
32
35
|
"animate_photo",
|
|
@@ -63,6 +66,9 @@ const GATING_POLICIES = [
|
|
|
63
66
|
"edit_image",
|
|
64
67
|
"restore_photo",
|
|
65
68
|
"upscale_image",
|
|
69
|
+
"image_to_3d",
|
|
70
|
+
"remove_background",
|
|
71
|
+
"segment_image",
|
|
66
72
|
"apply_style",
|
|
67
73
|
"refine_result",
|
|
68
74
|
"animate_photo",
|
|
@@ -98,6 +104,9 @@ const GATING_POLICIES = [
|
|
|
98
104
|
"edit_image",
|
|
99
105
|
"restore_photo",
|
|
100
106
|
"upscale_image",
|
|
107
|
+
"image_to_3d",
|
|
108
|
+
"remove_background",
|
|
109
|
+
"segment_image",
|
|
101
110
|
"apply_style",
|
|
102
111
|
"refine_result",
|
|
103
112
|
"animate_photo",
|
|
@@ -134,6 +143,9 @@ const GATING_POLICIES = [
|
|
|
134
143
|
"edit_image",
|
|
135
144
|
"restore_photo",
|
|
136
145
|
"upscale_image",
|
|
146
|
+
"image_to_3d",
|
|
147
|
+
"remove_background",
|
|
148
|
+
"segment_image",
|
|
137
149
|
"apply_style",
|
|
138
150
|
"refine_result",
|
|
139
151
|
"animate_photo",
|
|
@@ -460,6 +472,33 @@ const REPAIR_RECIPES = [
|
|
|
460
472
|
"maxRetries": 0,
|
|
461
473
|
"repairNoteTemplate": "I need more details before I can run {{toolName}}. {{missingDetail}}"
|
|
462
474
|
},
|
|
475
|
+
{
|
|
476
|
+
"recipeId": "image_to_3d.user_input_incomplete",
|
|
477
|
+
"version": "1.0.0",
|
|
478
|
+
"toolName": "image_to_3d",
|
|
479
|
+
"errorCode": "USER_INPUT_INCOMPLETE",
|
|
480
|
+
"mode": "stopAndAsk",
|
|
481
|
+
"maxRetries": 0,
|
|
482
|
+
"repairNoteTemplate": "I need more details before I can run {{toolName}}. {{missingDetail}}"
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"recipeId": "remove_background.user_input_incomplete",
|
|
486
|
+
"version": "1.0.0",
|
|
487
|
+
"toolName": "remove_background",
|
|
488
|
+
"errorCode": "USER_INPUT_INCOMPLETE",
|
|
489
|
+
"mode": "stopAndAsk",
|
|
490
|
+
"maxRetries": 0,
|
|
491
|
+
"repairNoteTemplate": "I need more details before I can run {{toolName}}. {{missingDetail}}"
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
"recipeId": "segment_image.user_input_incomplete",
|
|
495
|
+
"version": "1.0.0",
|
|
496
|
+
"toolName": "segment_image",
|
|
497
|
+
"errorCode": "USER_INPUT_INCOMPLETE",
|
|
498
|
+
"mode": "stopAndAsk",
|
|
499
|
+
"maxRetries": 0,
|
|
500
|
+
"repairNoteTemplate": "I need more details before I can run {{toolName}}. {{missingDetail}}"
|
|
501
|
+
},
|
|
463
502
|
{
|
|
464
503
|
"recipeId": "apply_style.user_input_incomplete",
|
|
465
504
|
"version": "1.0.0",
|
|
@@ -649,6 +688,33 @@ const REPAIR_RECIPES = [
|
|
|
649
688
|
"maxRetries": 0,
|
|
650
689
|
"repairNoteTemplate": "You have hit the credit limit for this turn. Buy Spark Packs to continue: https://docs.sogni.ai/pricing/#spark-packs"
|
|
651
690
|
},
|
|
691
|
+
{
|
|
692
|
+
"recipeId": "image_to_3d.cost_limit_exceeded",
|
|
693
|
+
"version": "1.0.0",
|
|
694
|
+
"toolName": "image_to_3d",
|
|
695
|
+
"errorCode": "COST_LIMIT_EXCEEDED",
|
|
696
|
+
"mode": "stopAndAsk",
|
|
697
|
+
"maxRetries": 0,
|
|
698
|
+
"repairNoteTemplate": "You have hit the credit limit for this turn. Buy Spark Packs to continue: https://docs.sogni.ai/pricing/#spark-packs"
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
"recipeId": "remove_background.cost_limit_exceeded",
|
|
702
|
+
"version": "1.0.0",
|
|
703
|
+
"toolName": "remove_background",
|
|
704
|
+
"errorCode": "COST_LIMIT_EXCEEDED",
|
|
705
|
+
"mode": "stopAndAsk",
|
|
706
|
+
"maxRetries": 0,
|
|
707
|
+
"repairNoteTemplate": "You have hit the credit limit for this turn. Buy Spark Packs to continue: https://docs.sogni.ai/pricing/#spark-packs"
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
"recipeId": "segment_image.cost_limit_exceeded",
|
|
711
|
+
"version": "1.0.0",
|
|
712
|
+
"toolName": "segment_image",
|
|
713
|
+
"errorCode": "COST_LIMIT_EXCEEDED",
|
|
714
|
+
"mode": "stopAndAsk",
|
|
715
|
+
"maxRetries": 0,
|
|
716
|
+
"repairNoteTemplate": "You have hit the credit limit for this turn. Buy Spark Packs to continue: https://docs.sogni.ai/pricing/#spark-packs"
|
|
717
|
+
},
|
|
652
718
|
{
|
|
653
719
|
"recipeId": "apply_style.cost_limit_exceeded",
|
|
654
720
|
"version": "1.0.0",
|
|
@@ -838,6 +904,33 @@ const REPAIR_RECIPES = [
|
|
|
838
904
|
"maxRetries": 0,
|
|
839
905
|
"repairNoteTemplate": "I cannot find the asset that {{toolName}} needs. {{message}} Which uploaded or generated asset did you want?"
|
|
840
906
|
},
|
|
907
|
+
{
|
|
908
|
+
"recipeId": "image_to_3d.asset_not_found",
|
|
909
|
+
"version": "1.0.0",
|
|
910
|
+
"toolName": "image_to_3d",
|
|
911
|
+
"errorCode": "ASSET_NOT_FOUND",
|
|
912
|
+
"mode": "stopAndAsk",
|
|
913
|
+
"maxRetries": 0,
|
|
914
|
+
"repairNoteTemplate": "I cannot find the asset that {{toolName}} needs. {{message}} Which uploaded or generated asset did you want?"
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
"recipeId": "remove_background.asset_not_found",
|
|
918
|
+
"version": "1.0.0",
|
|
919
|
+
"toolName": "remove_background",
|
|
920
|
+
"errorCode": "ASSET_NOT_FOUND",
|
|
921
|
+
"mode": "stopAndAsk",
|
|
922
|
+
"maxRetries": 0,
|
|
923
|
+
"repairNoteTemplate": "I cannot find the asset that {{toolName}} needs. {{message}} Which uploaded or generated asset did you want?"
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"recipeId": "segment_image.asset_not_found",
|
|
927
|
+
"version": "1.0.0",
|
|
928
|
+
"toolName": "segment_image",
|
|
929
|
+
"errorCode": "ASSET_NOT_FOUND",
|
|
930
|
+
"mode": "stopAndAsk",
|
|
931
|
+
"maxRetries": 0,
|
|
932
|
+
"repairNoteTemplate": "I cannot find the asset that {{toolName}} needs. {{message}} Which uploaded or generated asset did you want?"
|
|
933
|
+
},
|
|
841
934
|
{
|
|
842
935
|
"recipeId": "apply_style.asset_not_found",
|
|
843
936
|
"version": "1.0.0",
|
|
@@ -1054,6 +1147,33 @@ const REPAIR_RECIPES = [
|
|
|
1054
1147
|
"maxRetries": 0,
|
|
1055
1148
|
"repairNoteTemplate": "{{toolName}} could not run: {{message}}"
|
|
1056
1149
|
},
|
|
1150
|
+
{
|
|
1151
|
+
"recipeId": "image_to_3d.workflow_validation_failed",
|
|
1152
|
+
"version": "1.0.0",
|
|
1153
|
+
"toolName": "image_to_3d",
|
|
1154
|
+
"errorCode": "WORKFLOW_VALIDATION_FAILED",
|
|
1155
|
+
"mode": "stopAndAsk",
|
|
1156
|
+
"maxRetries": 0,
|
|
1157
|
+
"repairNoteTemplate": "{{toolName}} could not run: {{message}}"
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
"recipeId": "remove_background.workflow_validation_failed",
|
|
1161
|
+
"version": "1.0.0",
|
|
1162
|
+
"toolName": "remove_background",
|
|
1163
|
+
"errorCode": "WORKFLOW_VALIDATION_FAILED",
|
|
1164
|
+
"mode": "stopAndAsk",
|
|
1165
|
+
"maxRetries": 0,
|
|
1166
|
+
"repairNoteTemplate": "{{toolName}} could not run: {{message}}"
|
|
1167
|
+
},
|
|
1168
|
+
{
|
|
1169
|
+
"recipeId": "segment_image.workflow_validation_failed",
|
|
1170
|
+
"version": "1.0.0",
|
|
1171
|
+
"toolName": "segment_image",
|
|
1172
|
+
"errorCode": "WORKFLOW_VALIDATION_FAILED",
|
|
1173
|
+
"mode": "stopAndAsk",
|
|
1174
|
+
"maxRetries": 0,
|
|
1175
|
+
"repairNoteTemplate": "{{toolName}} could not run: {{message}}"
|
|
1176
|
+
},
|
|
1057
1177
|
{
|
|
1058
1178
|
"recipeId": "apply_style.workflow_validation_failed",
|
|
1059
1179
|
"version": "1.0.0",
|
|
@@ -1243,6 +1363,33 @@ const REPAIR_RECIPES = [
|
|
|
1243
1363
|
"maxRetries": 0,
|
|
1244
1364
|
"repairNoteTemplate": "{{toolName}} rejected the arguments: {{message}}"
|
|
1245
1365
|
},
|
|
1366
|
+
{
|
|
1367
|
+
"recipeId": "image_to_3d.parameter_invalid",
|
|
1368
|
+
"version": "1.0.0",
|
|
1369
|
+
"toolName": "image_to_3d",
|
|
1370
|
+
"errorCode": "PARAMETER_INVALID",
|
|
1371
|
+
"mode": "stopAndAsk",
|
|
1372
|
+
"maxRetries": 0,
|
|
1373
|
+
"repairNoteTemplate": "{{toolName}} rejected the arguments: {{message}}"
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
"recipeId": "remove_background.parameter_invalid",
|
|
1377
|
+
"version": "1.0.0",
|
|
1378
|
+
"toolName": "remove_background",
|
|
1379
|
+
"errorCode": "PARAMETER_INVALID",
|
|
1380
|
+
"mode": "stopAndAsk",
|
|
1381
|
+
"maxRetries": 0,
|
|
1382
|
+
"repairNoteTemplate": "{{toolName}} rejected the arguments: {{message}}"
|
|
1383
|
+
},
|
|
1384
|
+
{
|
|
1385
|
+
"recipeId": "segment_image.parameter_invalid",
|
|
1386
|
+
"version": "1.0.0",
|
|
1387
|
+
"toolName": "segment_image",
|
|
1388
|
+
"errorCode": "PARAMETER_INVALID",
|
|
1389
|
+
"mode": "stopAndAsk",
|
|
1390
|
+
"maxRetries": 0,
|
|
1391
|
+
"repairNoteTemplate": "{{toolName}} rejected the arguments: {{message}}"
|
|
1392
|
+
},
|
|
1246
1393
|
{
|
|
1247
1394
|
"recipeId": "apply_style.parameter_invalid",
|
|
1248
1395
|
"version": "1.0.0",
|
|
@@ -1414,6 +1561,33 @@ const REPAIR_RECIPES = [
|
|
|
1414
1561
|
"maxRetries": 0,
|
|
1415
1562
|
"repairNoteTemplate": "The {{toolName}} worker failed. {{message}} Want me to try again or change the request?"
|
|
1416
1563
|
},
|
|
1564
|
+
{
|
|
1565
|
+
"recipeId": "image_to_3d.gpu_worker_failed",
|
|
1566
|
+
"version": "1.0.0",
|
|
1567
|
+
"toolName": "image_to_3d",
|
|
1568
|
+
"errorCode": "GPU_WORKER_FAILED",
|
|
1569
|
+
"mode": "stopAndAsk",
|
|
1570
|
+
"maxRetries": 0,
|
|
1571
|
+
"repairNoteTemplate": "The {{toolName}} worker failed. {{message}} Want me to try again or change the request?"
|
|
1572
|
+
},
|
|
1573
|
+
{
|
|
1574
|
+
"recipeId": "remove_background.gpu_worker_failed",
|
|
1575
|
+
"version": "1.0.0",
|
|
1576
|
+
"toolName": "remove_background",
|
|
1577
|
+
"errorCode": "GPU_WORKER_FAILED",
|
|
1578
|
+
"mode": "stopAndAsk",
|
|
1579
|
+
"maxRetries": 0,
|
|
1580
|
+
"repairNoteTemplate": "The {{toolName}} worker failed. {{message}} Want me to try again or change the request?"
|
|
1581
|
+
},
|
|
1582
|
+
{
|
|
1583
|
+
"recipeId": "segment_image.gpu_worker_failed",
|
|
1584
|
+
"version": "1.0.0",
|
|
1585
|
+
"toolName": "segment_image",
|
|
1586
|
+
"errorCode": "GPU_WORKER_FAILED",
|
|
1587
|
+
"mode": "stopAndAsk",
|
|
1588
|
+
"maxRetries": 0,
|
|
1589
|
+
"repairNoteTemplate": "The {{toolName}} worker failed. {{message}} Want me to try again or change the request?"
|
|
1590
|
+
},
|
|
1417
1591
|
{
|
|
1418
1592
|
"recipeId": "apply_style.gpu_worker_failed",
|
|
1419
1593
|
"version": "1.0.0",
|
|
@@ -1594,6 +1768,33 @@ const REPAIR_RECIPES = [
|
|
|
1594
1768
|
"maxRetries": 0,
|
|
1595
1769
|
"repairNoteTemplate": "The model {{toolName}} wanted is offline. {{message}} Pick a different model or try again later."
|
|
1596
1770
|
},
|
|
1771
|
+
{
|
|
1772
|
+
"recipeId": "image_to_3d.model_unavailable",
|
|
1773
|
+
"version": "1.0.0",
|
|
1774
|
+
"toolName": "image_to_3d",
|
|
1775
|
+
"errorCode": "MODEL_UNAVAILABLE",
|
|
1776
|
+
"mode": "stopAndAsk",
|
|
1777
|
+
"maxRetries": 0,
|
|
1778
|
+
"repairNoteTemplate": "The model {{toolName}} wanted is offline. {{message}} Pick a different model or try again later."
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
"recipeId": "remove_background.model_unavailable",
|
|
1782
|
+
"version": "1.0.0",
|
|
1783
|
+
"toolName": "remove_background",
|
|
1784
|
+
"errorCode": "MODEL_UNAVAILABLE",
|
|
1785
|
+
"mode": "stopAndAsk",
|
|
1786
|
+
"maxRetries": 0,
|
|
1787
|
+
"repairNoteTemplate": "The model {{toolName}} wanted is offline. {{message}} Pick a different model or try again later."
|
|
1788
|
+
},
|
|
1789
|
+
{
|
|
1790
|
+
"recipeId": "segment_image.model_unavailable",
|
|
1791
|
+
"version": "1.0.0",
|
|
1792
|
+
"toolName": "segment_image",
|
|
1793
|
+
"errorCode": "MODEL_UNAVAILABLE",
|
|
1794
|
+
"mode": "stopAndAsk",
|
|
1795
|
+
"maxRetries": 0,
|
|
1796
|
+
"repairNoteTemplate": "The model {{toolName}} wanted is offline. {{message}} Pick a different model or try again later."
|
|
1797
|
+
},
|
|
1597
1798
|
{
|
|
1598
1799
|
"recipeId": "apply_style.model_unavailable",
|
|
1599
1800
|
"version": "1.0.0",
|
|
@@ -1783,6 +1984,33 @@ const REPAIR_RECIPES = [
|
|
|
1783
1984
|
"maxRetries": 0,
|
|
1784
1985
|
"repairNoteTemplate": "{{toolName}} needs permission you have not granted yet. {{message}}"
|
|
1785
1986
|
},
|
|
1987
|
+
{
|
|
1988
|
+
"recipeId": "image_to_3d.permission_required",
|
|
1989
|
+
"version": "1.0.0",
|
|
1990
|
+
"toolName": "image_to_3d",
|
|
1991
|
+
"errorCode": "PERMISSION_REQUIRED",
|
|
1992
|
+
"mode": "stopAndAsk",
|
|
1993
|
+
"maxRetries": 0,
|
|
1994
|
+
"repairNoteTemplate": "{{toolName}} needs permission you have not granted yet. {{message}}"
|
|
1995
|
+
},
|
|
1996
|
+
{
|
|
1997
|
+
"recipeId": "remove_background.permission_required",
|
|
1998
|
+
"version": "1.0.0",
|
|
1999
|
+
"toolName": "remove_background",
|
|
2000
|
+
"errorCode": "PERMISSION_REQUIRED",
|
|
2001
|
+
"mode": "stopAndAsk",
|
|
2002
|
+
"maxRetries": 0,
|
|
2003
|
+
"repairNoteTemplate": "{{toolName}} needs permission you have not granted yet. {{message}}"
|
|
2004
|
+
},
|
|
2005
|
+
{
|
|
2006
|
+
"recipeId": "segment_image.permission_required",
|
|
2007
|
+
"version": "1.0.0",
|
|
2008
|
+
"toolName": "segment_image",
|
|
2009
|
+
"errorCode": "PERMISSION_REQUIRED",
|
|
2010
|
+
"mode": "stopAndAsk",
|
|
2011
|
+
"maxRetries": 0,
|
|
2012
|
+
"repairNoteTemplate": "{{toolName}} needs permission you have not granted yet. {{message}}"
|
|
2013
|
+
},
|
|
1786
2014
|
{
|
|
1787
2015
|
"recipeId": "apply_style.permission_required",
|
|
1788
2016
|
"version": "1.0.0",
|
|
@@ -2082,6 +2310,33 @@ const REPAIR_RECIPES = [
|
|
|
2082
2310
|
"maxRetries": 0,
|
|
2083
2311
|
"repairNoteTemplate": "{{toolName}} timed out. {{message}} Want me to retry, or simplify the request?"
|
|
2084
2312
|
},
|
|
2313
|
+
{
|
|
2314
|
+
"recipeId": "image_to_3d.provider_timeout",
|
|
2315
|
+
"version": "1.0.0",
|
|
2316
|
+
"toolName": "image_to_3d",
|
|
2317
|
+
"errorCode": "PROVIDER_TIMEOUT",
|
|
2318
|
+
"mode": "stopAndAsk",
|
|
2319
|
+
"maxRetries": 0,
|
|
2320
|
+
"repairNoteTemplate": "{{toolName}} timed out. {{message}} Want me to retry, or simplify the request?"
|
|
2321
|
+
},
|
|
2322
|
+
{
|
|
2323
|
+
"recipeId": "remove_background.provider_timeout",
|
|
2324
|
+
"version": "1.0.0",
|
|
2325
|
+
"toolName": "remove_background",
|
|
2326
|
+
"errorCode": "PROVIDER_TIMEOUT",
|
|
2327
|
+
"mode": "stopAndAsk",
|
|
2328
|
+
"maxRetries": 0,
|
|
2329
|
+
"repairNoteTemplate": "{{toolName}} timed out. {{message}} Want me to retry, or simplify the request?"
|
|
2330
|
+
},
|
|
2331
|
+
{
|
|
2332
|
+
"recipeId": "segment_image.provider_timeout",
|
|
2333
|
+
"version": "1.0.0",
|
|
2334
|
+
"toolName": "segment_image",
|
|
2335
|
+
"errorCode": "PROVIDER_TIMEOUT",
|
|
2336
|
+
"mode": "stopAndAsk",
|
|
2337
|
+
"maxRetries": 0,
|
|
2338
|
+
"repairNoteTemplate": "{{toolName}} timed out. {{message}} Want me to retry, or simplify the request?"
|
|
2339
|
+
},
|
|
2085
2340
|
{
|
|
2086
2341
|
"recipeId": "apply_style.provider_timeout",
|
|
2087
2342
|
"version": "1.0.0",
|
|
@@ -2271,6 +2526,33 @@ const REPAIR_RECIPES = [
|
|
|
2271
2526
|
"maxRetries": 0,
|
|
2272
2527
|
"repairNoteTemplate": "The {{toolName}} run was cancelled by the user. I will stop here unless you ask me to try again."
|
|
2273
2528
|
},
|
|
2529
|
+
{
|
|
2530
|
+
"recipeId": "image_to_3d.user_cancelled",
|
|
2531
|
+
"version": "1.0.0",
|
|
2532
|
+
"toolName": "image_to_3d",
|
|
2533
|
+
"errorCode": "USER_CANCELLED",
|
|
2534
|
+
"mode": "stopAndAsk",
|
|
2535
|
+
"maxRetries": 0,
|
|
2536
|
+
"repairNoteTemplate": "The {{toolName}} run was cancelled by the user. I will stop here unless you ask me to try again."
|
|
2537
|
+
},
|
|
2538
|
+
{
|
|
2539
|
+
"recipeId": "remove_background.user_cancelled",
|
|
2540
|
+
"version": "1.0.0",
|
|
2541
|
+
"toolName": "remove_background",
|
|
2542
|
+
"errorCode": "USER_CANCELLED",
|
|
2543
|
+
"mode": "stopAndAsk",
|
|
2544
|
+
"maxRetries": 0,
|
|
2545
|
+
"repairNoteTemplate": "The {{toolName}} run was cancelled by the user. I will stop here unless you ask me to try again."
|
|
2546
|
+
},
|
|
2547
|
+
{
|
|
2548
|
+
"recipeId": "segment_image.user_cancelled",
|
|
2549
|
+
"version": "1.0.0",
|
|
2550
|
+
"toolName": "segment_image",
|
|
2551
|
+
"errorCode": "USER_CANCELLED",
|
|
2552
|
+
"mode": "stopAndAsk",
|
|
2553
|
+
"maxRetries": 0,
|
|
2554
|
+
"repairNoteTemplate": "The {{toolName}} run was cancelled by the user. I will stop here unless you ask me to try again."
|
|
2555
|
+
},
|
|
2274
2556
|
{
|
|
2275
2557
|
"recipeId": "apply_style.user_cancelled",
|
|
2276
2558
|
"version": "1.0.0",
|
|
@@ -2426,6 +2708,39 @@ const REPAIR_RECIPES = [
|
|
|
2426
2708
|
}
|
|
2427
2709
|
];
|
|
2428
2710
|
const PROMPT_CONTRACTS = [
|
|
2711
|
+
{
|
|
2712
|
+
"contractId": "image_to_3d_v1",
|
|
2713
|
+
"version": "1.0.0",
|
|
2714
|
+
"toolName": "image_to_3d",
|
|
2715
|
+
"baseDescription": "Reconstruct a downloadable GLB from an original front image, optionally with left, back and right views of the same subject at consistent height and framing. Pass each view in its named slot; never invent views or substitute screenshots. Choose mesh and texture budgets for the intended use. The output is a 3D model, so do not send it to image or video tools.",
|
|
2716
|
+
"parameterDocs": {
|
|
2717
|
+
"sourceImageIndex": "Front view; negative indices select uploads.",
|
|
2718
|
+
"leftViewImageIndex": "Subject own left side toward camera (subject faces screen-left).",
|
|
2719
|
+
"backViewImageIndex": "Subject seen from behind.",
|
|
2720
|
+
"rightViewImageIndex": "Subject own right side toward camera (subject faces screen-right)."
|
|
2721
|
+
}
|
|
2722
|
+
},
|
|
2723
|
+
{
|
|
2724
|
+
"contractId": "remove_background_v1",
|
|
2725
|
+
"version": "1.0.0",
|
|
2726
|
+
"toolName": "remove_background",
|
|
2727
|
+
"baseDescription": "Use BiRefNet to remove an existing image background while preserving the original foreground. No prompt is needed. Return a transparent PNG by default, or an alpha mask when applyMask=false.",
|
|
2728
|
+
"parameterDocs": {
|
|
2729
|
+
"sourceImageIndex": "Original image to isolate.",
|
|
2730
|
+
"applyMask": "Default true: transparent cutout; false: mask."
|
|
2731
|
+
}
|
|
2732
|
+
},
|
|
2733
|
+
{
|
|
2734
|
+
"contractId": "segment_image_v1",
|
|
2735
|
+
"version": "1.0.0",
|
|
2736
|
+
"toolName": "segment_image",
|
|
2737
|
+
"baseDescription": "Select objects with SAM 3 using an object description, normalized original-image points, or boxes. Text can combine with boxes. Points can combine with at most one positive box and never with text. Output a binary mask by default or an original-pixel cutout with applyMask=true; do not repaint the source.",
|
|
2738
|
+
"parameterDocs": {
|
|
2739
|
+
"sourceImageIndex": "Original image to select from.",
|
|
2740
|
+
"maxInstances": "Keep the strongest N selections (1–16).",
|
|
2741
|
+
"applyMask": "True returns a cutout; false returns a mask."
|
|
2742
|
+
}
|
|
2743
|
+
},
|
|
2429
2744
|
{
|
|
2430
2745
|
"contractId": "restore_photo_v1",
|
|
2431
2746
|
"version": "1.0.0",
|
|
@@ -2535,7 +2850,7 @@ const PROMPT_CONTRACTS = [
|
|
|
2535
2850
|
"contractId": "edit_image_v1",
|
|
2536
2851
|
"version": "1.0.0",
|
|
2537
2852
|
"toolName": "edit_image",
|
|
2538
|
-
"baseDescription": "edit_image applies instruction-based edits to uploaded or generated images. Use when\nuploaded or reference images must guide identity or likeness.\n\nImage-to-Image prompt order: [IDENTITY LOCK] → [REQUESTED EDIT] → [REFERENCE ROLE\nMAPPING] → [POSE/COMPOSITION] → [STYLE] → [LIGHTING/REALISM] → [PRESERVE ALL\nUNMENTIONED DETAILS]. GOLDEN RULE: When editing a person, state which image owns\nidentity so it is not ambiguous. Describe only the DELTA — what changes. Don't\nrewrite the entire image; the base image already contains most of the truth. Default to minimal\nchange. For multi-image edits, assign one primary role per reference image (identity, pose,\noutfit, style, environment). Do not let a style/pose/clothing reference silently override the face.\nUse positive constraints — \"preserve exact facial likeness, face structure, eye shape, nose\nshape, mouth shape, jawline, skin tone, hairline, apparent age, and overall recognizability\"\n— not vague negatives like \"don't mess up the face\".\n\nKREA IDENTITY EDIT: Use model=\"krea-identity-edit\" whenever an edit of a referenced\nperson or character must keep likeness or character identity while changing clothing,\nhair or makeup, pose or position, face/head/body, background, lighting, or visual style.\nInfer that semantic intent in any language; never route from keyword or regex matching.\nAlso use it for a non-Pro single-character sheet. An explicitly requested model always\nwins. Use model=\"dark-beast-krea2-identity-edit\" only when the user explicitly requests\nthat model, its uncensored/community variant, or dark_beast_krea2_identity_edit_v1_2.\nThese models require one reference image, accept up to two context images, and work best\nat 512-2048 px. Let the model tier and worker choose current execution defaults, and do\nnot use negative prompts. Put the primary scene/base image first and an optional\nperson/detail reference second; reference them with context_image_0 and context_image_1\nwhen model_ref tokens are needed.\n\nKREA 2 IDENTITY EDIT PROMPTING: Use a concise 1-4 sentence delta instruction instead of\nthe generic 50-200 word expansion. Name the requested change and only the details that\nmust remain fixed; do not restate the whole image or dump a facial-feature inventory.\nWith two references, assign their roles compactly: base scene/image first, then the\nperson/detail/outfit/pose/style reference. Longer structured prompts remain appropriate\nfor character sheets, grids, editorial layouts, or exact visible text.\n\nUPLOADED IMAGE VARIANT SETS: When the user supplies a photo/portrait/reference image and\nasks for N distinct generated images deriving from that source while changing paired\nper-output details, prefer one edit_image call with sourceImageIndex=-1,\nnumberOfVariations=N, and ONE Dynamic Prompt branch with N complete options. Each option\nmust be a full concrete image prompt for one output, including the uploaded subject/reference\nanchor, requested pose or placement preservation, the specific changed appearance/style/role,\nclothing or surface details when relevant, setting/background, and any requested label text or\nvisual symbol. If one option is a remade original/preserved source and the rest are themed\nvariants, the original option should explicitly say to preserve the original clothing/wardrobe/outfit\nand background/setting, plus any requested added label, flag, logo, symbol, or prop.\nDo not call generate_image, analyze_image, or multiple serial edit_image calls first.\n\nSELECTION-GATED IMAGE STAGES: If the user asks for N image options and says they will pick\none before a later dance/video/animation, prefer one edit_image call with numberOfVariations=N\nand one Dynamic Prompt branch. After images are created, stop and ask the user to choose\nunless the user explicitly asked to run the later stage immediately.\n\nMULTI-PERSONA (COMBINED): When multiple personas must appear in the SAME scene, make\none edit_image call with all persona faces in one prompt and omit personaName.\nPer-persona splits (one call each with personaName set) are RARE — only when the user\nexplicitly asks for solo images of each person individually.\n\nSTORYBOARD IMAGE BATCH RULE: When rendering scene keyframes from a screenplay/storyboard,\nnumberOfVariations is only the count; the prompt should be one Dynamic Prompt branch with one\nfull keyframe prompt per scene:\n{scene 1 full keyframe prompt|scene 2 full keyframe prompt|...|scene N full keyframe prompt}.\nDo not set numberOfVariations=N with only the first scene prompt — that creates N versions of\nscene 1. For full project requests, one edit_image batch for all scene keyframes, then one\nanimate_photo batch for all video clips in parallel.\nException: if the storyboard/shot sheet is already uploaded and the user asks to make a\ntrailer/video/movie/clip from that uploaded board, do not extract panels or redraw keyframes.\nUse generate_video with Seedance references for one continuous clip unless the user explicitly\nasks for separate image keyframes or a storyboard sheet output.\n\nDIRECT UPLOADED GPT IMAGE
|
|
2853
|
+
"baseDescription": "edit_image applies instruction-based edits to uploaded or generated images. Use when\nuploaded or reference images must guide identity or likeness.\n\nImage-to-Image prompt order: [IDENTITY LOCK] → [REQUESTED EDIT] → [REFERENCE ROLE\nMAPPING] → [POSE/COMPOSITION] → [STYLE] → [LIGHTING/REALISM] → [PRESERVE ALL\nUNMENTIONED DETAILS]. GOLDEN RULE: When editing a person, state which image owns\nidentity so it is not ambiguous. Describe only the DELTA — what changes. Don't\nrewrite the entire image; the base image already contains most of the truth. Default to minimal\nchange. For multi-image edits, assign one primary role per reference image (identity, pose,\noutfit, style, environment). Do not let a style/pose/clothing reference silently override the face.\nUse positive constraints — \"preserve exact facial likeness, face structure, eye shape, nose\nshape, mouth shape, jawline, skin tone, hairline, apparent age, and overall recognizability\"\n— not vague negatives like \"don't mess up the face\".\n\nKREA IDENTITY EDIT: Use model=\"krea-identity-edit\" whenever an edit of a referenced\nperson or character must keep likeness or character identity while changing clothing,\nhair or makeup, pose or position, face/head/body, background, lighting, or visual style.\nInfer that semantic intent in any language; never route from keyword or regex matching.\nAlso use it for a non-Pro single-character sheet. An explicitly requested model always\nwins. Use model=\"dark-beast-krea2-identity-edit\" only when the user explicitly requests\nthat model, its uncensored/community variant, or dark_beast_krea2_identity_edit_v1_2.\nThese models require one reference image, accept up to two context images, and work best\nat 512-2048 px. Let the model tier and worker choose current execution defaults, and do\nnot use negative prompts. Put the primary scene/base image first and an optional\nperson/detail reference second; reference them with context_image_0 and context_image_1\nwhen model_ref tokens are needed.\n\nKREA 2 IDENTITY EDIT PROMPTING: Use a concise 1-4 sentence delta instruction instead of\nthe generic 50-200 word expansion. Name the requested change and only the details that\nmust remain fixed; do not restate the whole image or dump a facial-feature inventory.\nWith two references, assign their roles compactly: base scene/image first, then the\nperson/detail/outfit/pose/style reference. Longer structured prompts remain appropriate\nfor character sheets, grids, editorial layouts, or exact visible text.\n\nUPLOADED IMAGE VARIANT SETS: When the user supplies a photo/portrait/reference image and\nasks for N distinct generated images deriving from that source while changing paired\nper-output details, prefer one edit_image call with sourceImageIndex=-1,\nnumberOfVariations=N, and ONE Dynamic Prompt branch with N complete options. Each option\nmust be a full concrete image prompt for one output, including the uploaded subject/reference\nanchor, requested pose or placement preservation, the specific changed appearance/style/role,\nclothing or surface details when relevant, setting/background, and any requested label text or\nvisual symbol. If one option is a remade original/preserved source and the rest are themed\nvariants, the original option should explicitly say to preserve the original clothing/wardrobe/outfit\nand background/setting, plus any requested added label, flag, logo, symbol, or prop.\nDo not call generate_image, analyze_image, or multiple serial edit_image calls first.\n\nSELECTION-GATED IMAGE STAGES: If the user asks for N image options and says they will pick\none before a later dance/video/animation, prefer one edit_image call with numberOfVariations=N\nand one Dynamic Prompt branch. After images are created, stop and ask the user to choose\nunless the user explicitly asked to run the later stage immediately.\n\nMULTI-PERSONA (COMBINED): When multiple personas must appear in the SAME scene, make\none edit_image call with all persona faces in one prompt and omit personaName.\nPer-persona splits (one call each with personaName set) are RARE — only when the user\nexplicitly asks for solo images of each person individually.\n\nSTORYBOARD IMAGE BATCH RULE: When rendering scene keyframes from a screenplay/storyboard,\nnumberOfVariations is only the count; the prompt should be one Dynamic Prompt branch with one\nfull keyframe prompt per scene:\n{scene 1 full keyframe prompt|scene 2 full keyframe prompt|...|scene N full keyframe prompt}.\nDo not set numberOfVariations=N with only the first scene prompt — that creates N versions of\nscene 1. For full project requests, one edit_image batch for all scene keyframes, then one\nanimate_photo batch for all video clips in parallel.\nException: if the storyboard/shot sheet is already uploaded and the user asks to make a\ntrailer/video/movie/clip from that uploaded board, do not extract panels or redraw keyframes.\nUse generate_video with Seedance references for one continuous clip unless the user explicitly\nasks for separate image keyframes or a storyboard sheet output.\n\nDIRECT UPLOADED GPT IMAGE STORYBOARD SHEETS: If the user uploaded reference images and\nasks for one finished GPT Image storyboard/keyframe sheet now, call edit_image directly\nwith sourceImageIndex=-1, model=\"gpt-image-2.5-sunburst\", numberOfVariations=1, and the requested\ncanvas/aspect settings. Preserve another explicit GPT Image model named by the user.\nIf the user did not explicitly specify a storyboard page/canvas/sheet\nshape, default the GPT Image 2.5 storyboard sheet pixel dimensions to a balanced grid that hosts\nthe target cell aspect ratio natively (e.g., 12 cells with 9:16 portrait video target -> ~3:4\nportrait sheet around 1728x2304; 12 cells with 16:9 landscape video target -> ~4:3 landscape\nsheet around 2304x1728; 6 cells with 9:16 target -> ~27:32 portrait sheet around 1840x2176). Do\nNOT default the sheet to 2560x1440 landscape when cells are portrait — a landscape sheet with\na portrait-cell grid physically forces cells to ~4:3 landscape and the model will not render\n9:16 portrait rectangles inside it. Keep individual scene-cell/frame areas at the target video\naspect ratio. Do not call map_assets_for_model, analyze_image, generate_image, or a separate\nplanning tool first. The uploaded files are already available as references; describe their\nroles plainly in the edit_image prompt and generate the sheet in that call.\n\nDO NOT USE edit_image FOR UPLOADED REFERENCE LOOPED VIDEO SEGMENTS: If the user says the\nsame uploaded image/reference should be reused as the first frame and last frame of each\nscripted segment/scene/clip before stitching, they are explicitly asking to animate the\nuploaded image, not to generate new storyboard keyframes. Do not call edit_image for that\nrequest. Call animate_photo once with repeated uploaded source indices and per-scene prompts.",
|
|
2539
2854
|
"parameterDocs": {
|
|
2540
2855
|
"sourceImageIndex": "Index of uploaded/generated image. Use -1 for the first uploaded image.",
|
|
2541
2856
|
"numberOfVariations": "Number of output variants. When > 1, use a Dynamic Prompt branch with one complete prompt per output.",
|
|
@@ -2546,7 +2861,7 @@ const PROMPT_CONTRACTS = [
|
|
|
2546
2861
|
"contractId": "generate_image_v1",
|
|
2547
2862
|
"version": "1.1.0",
|
|
2548
2863
|
"toolName": "generate_image",
|
|
2549
|
-
"baseDescription": "generate_image creates images from text descriptions. Use for text-only image generation;\nuse edit_image when uploaded or reference images must guide identity/likeness.\nException: Z-image, Z-image Turbo, and Krea 2 Turbo image-to-image/enhancement requests\nuse generate_image with model=\"z-turbo\", model=\"z-image\", or model=\"krea-2-turbo\",\nsourceImageIndex=-1, and starting_image_strength; do not route explicit base-model\nZ-image Turbo or Krea 2 Turbo uploaded-image enhancement to edit_image because edit_image\ndoes not expose those base image-to-image models.\n\nMODEL CHOICE: If the user asks for Krea 2 Turbo, choose model=\"krea-2-turbo\". If they ask\nfor Dark Beast Krea 2, choose model=\"dark-beast-krea2\". If they ask for Dark Beast Z-Image\nTurbo, choose model=\"dark-beast-z-turbo\". If they ask for Chroma 1 HD, choose model=\"chroma1-hd\".\nIf they ask for anime or anime-style output without naming a model, choose model=\"one-obsession-v22\".\nBase Z-image and Krea 2 Turbo image-to-image/enhancement requests stay on generate_image with\nsourceImageIndex and starting_image_strength; identity-preserving Krea edits with reference\nphotos use edit_image instead.\n\nBATCH FAN-OUT DEFAULT (READ BEFORE ANYTHING ELSE BELOW):\nWhen the user explicitly asks for N images in the CURRENT turn, set numberOfVariations=N\nin one call. Avoid multiple serial generate_image calls unless the user explicitly wants\nindependent projects, isolated approvals, or per-output settings that cannot share one project.\nDo not omit numberOfVariations and try to \"generate the next one after this finishes\".\nTrigger phrasings:\n\"draw N\", \"make N\", \"give me N\", \"show me N\", \"render N\", \"create N\", \"generate N\",\n\"N more\", \"another N\", \"N as separate\", \"N separate images\", \"N different images\",\n\"N options\", \"N takes\", \"N versions\", \"N variations\", \"N pictures of\",\n\"all at the same time\", \"in parallel\", \"side by side as separate\".\n\nTHE PRIOR TURN DOES NOT ANCHOR THE CURRENT TURN. If the prior assistant turn used\nnumberOfVariations=1 with a composite \"N subjects in one image\" prompt, and the user\nnow says \"draw N more as separate images\" / \"as separate\" / \"separately\", DO NOT carry\nover numberOfVariations=1 from the prior call. The user is correcting that interpretation;\nset numberOfVariations=N for THIS call with one self-contained prompt per image via {|}\nDynamic Prompt branches. The new turn's count + separation language always wins over the\nprevious turn's pattern.\n\nWHEN BATCH FAN-OUT DOES NOT APPLY: numberOfVariations=1 with multiple subjects packed into\nONE prompt is correct only when the user clearly wants a SINGLE composite image (e.g.\n\"draw 2 goats in a meadow\" with no separation language, or explicit \"in one image\" / \"one\npicture of N\" / \"single image\" / \"composite\" / \"sheet\" / \"side-by-side composition\").\n\nIMAGE PROMPT ORDER: [SUBJECT] → [ATTRIBUTES] → [ACTION/POSE] → [CAMERA/FRAMING]\n→ [ENVIRONMENT] → [LIGHTING] → [STYLE/MEDIUM] → [MATERIALS/TEXTURES] →\n[SECONDARY DETAILS]. By default, start with the main subject and concrete observable\nattributes; use mood or atmosphere first only when the user explicitly asks for that shape.\nUse concrete nouns and observable adjectives — \"soft overcast daylight\" not \"nice lighting\".\nGood defaults when user is underspecified: medium shot for portraits, wide shot for\nenvironments, eye-level angle, soft natural light for realism.\n\nDYNAMIC PROMPTS: When numberOfVariations > 1, use Dynamic Prompt syntax to make each\nvariation meaningfully different — not just seed-different. Syntax: {a|b|c} cycles\nsequentially, {@a|b|c} picks randomly, {~a|b} paired cycling across groups. Rules: (1) Vary\nONLY what the user left unspecified — lock in everything they specified. (2) Match option\ncount to numberOfVariations so every result is unique. (3) Briefly tell the user what you're\nvarying without exposing raw {|} syntax unless the user asks to inspect the prompt.\n(4) Skip when: user wants consistency, prompt is fully\nspecified, user typed their own {|} syntax, or iterating on a specific result. (5) Do not put\nthe count or the word \"versions\"/\"variations\" inside the prompt — the prompt always describes\na single image. The multiplicity comes ONLY from numberOfVariations + the {|} syntax.\nLINKED VARIANTS: when multiple attributes must stay paired per result, use ONE top-level\nDynamic Prompt branch with one complete self-contained prompt per output. Do NOT split\nlinked fields into separate Dynamic Prompt groups. Treat every batch-wide requirement\nquantified as \"each\", \"every\", or \"all\" as a hard per-option invariant: repeat it inside\nEVERY option, including identity/pose continuity, clothing/style, the concrete setting, and\nliteral visible names, labels, captions, flags, logos, or symbols. A shared prefix or another\noption is never a substitute for a complete standalone option.\nEach option must name its actual styling, setting, accessories, and requested literal text or\nsymbol. Never emit meta-placeholders such as \"variant-specific background\", \"requested\nsymbol\", \"humorous alternate name\", or \"bake the name and symbol into the image\".\nWhen one option remakes/preserves an original and the others are themed variants, make the\noriginal option equally concrete: specify the original clothing and setting plus every\nrequested label, flag, logo, symbol, or prop; do not write only \"the original\".\n\nSELECTION-GATED IMAGE STAGES: If the user asks for N image options and says they will pick\none before a later dance/video/animation, call generate_image once with numberOfVariations=N.\nAfter images are created, stop and ask the user to choose unless the user explicitly asked\nto run the later stage immediately.\n\nIMAGE→VIDEO DIMENSION RULE: When generating an image that will feed into a video tool\n(animate_photo, sound_to_video, etc.), the image MUST be generated at the SAME aspect\nratio and dimensions as the target video. Default video aspect ratio is 16:9 landscape —\npass aspectRatio=\"16:9\" (or the user's specified/reference ratio) so the source image\nmatches the video output. Do not generate a square image for a widescreen video. Exception:\na composite GPT Image 2 storyboard/keyframe sheet for a later Seedance video is a board,\nnot a single source frame; unless the user explicitly specifies a storyboard page/canvas/sheet\nshape, default the sheet image dimensions to a balanced grid that hosts the target\nscene-cell/frame aspect natively (portrait video target -> portrait or square sheet whose\ncolumns x rows grid produces ~9:16 cells; landscape video target -> landscape sheet whose\nrows x columns grid produces ~16:9 cells). Each scene-cell/frame area preserves the target\nvideo aspect ratio.\n\nSTORYBOARD IMAGE BATCH RULE: When rendering scene keyframes from a screenplay/storyboard,\nnumberOfVariations is only the count; the prompt should be one Dynamic Prompt branch with one\nfull keyframe prompt per scene:\n{scene 1 full keyframe prompt|scene 2 full keyframe prompt|...|scene N full keyframe prompt}.\nDo not set numberOfVariations=N with only the first scene prompt — that creates N versions of\nscene 1. For full project requests, one generate_image batch for all scene keyframes, then\none animate_photo batch for all video clips in parallel.\n\nSTORYTELLING / BRAND / SOCIAL IMAGE PROMPTS: If generating a storyboard, ad concept,\ntrailer sheet, meme, creator post, or provocative social concept, make the first frame or\npanel immediately legible. Preserve the user's requested tone and audience. Use concrete\ncomposition, persona, product/brand role, caption placement, readable required text, and a\nclear visual transformation or punchline. For provocative adult social content, keep subjects\nclearly adult and consensual, PG-13/non-explicit, and avoid minor-coded styling or school-coded\nsettings while still optimizing visual magnet, persona, caption bait, and replay/comment value.\n\nGPT IMAGE 2 STORYBOARD SHEET → SEEDANCE AUTO-PROCEED: If the user asks to run the whole\nGPT Image 2 storyboard/keyframe sheet plus Seedance workflow without approval, the FIRST\ngenerate_image call must create ONE composite storyboard/keyframe sheet, not loose concept\nart and not separate keyframes. Use model=\"gpt-image-2\", numberOfVariations=1, and a\ncompiled storyboard prompt that literally includes: \"Create exactly N sequential video\nstoryboard frames as one composite storyboard image\", \"Target final video aspect ratio: X\",\na `SCENES:` section, and exactly N concrete scene entries named `SCENE_01`, `SCENE_02`,\netc. Each scene entry must include `Visual/Action:`, `Camera/Motion:`, `Dialogue/VO:`\n(use `[no dialogue]` when silent), `Audio/SFX:`, and any reference/visible-text notes\nneeded for that scene. Do not send only a source brief, storyboard concept, or generic\nlayout instructions as the prompt; malformed compiled storyboard prompts are blocked by\nquality audit instead of being repaired at runtime. If the user does not explicitly specify\na frame count, choose N with the shared storyboard density default: at least one key visual\nbeat about every 2 seconds, rounded up and clamped to 6-16 total storyboard frames\n(for example, a 60 second commercial defaults to N=16). Unless the user explicitly specifies another\nstoryboard page/canvas/sheet shape, default the GPT Image 2 storyboard sheet pixel dimensions\nto a balanced grid that hosts the target cell aspect natively: for a 9:16 portrait video,\npick a portrait-leaning sheet whose columns x rows grid produces ~9:16 cells (e.g., 12 cells\n-> ~3:4 sheet around 1728x2304, 6 cells -> ~27:32 around 1840x2176, 9 cells -> ~9:16 around\n1504x2672); for a 16:9 landscape video, pick a landscape sheet whose rows x columns grid\nproduces ~16:9 cells (e.g., 12 cells -> ~4:3 sheet around 2304x1728). Do not force landscape\n2560x1440 when cells are portrait — a landscape sheet with a portrait-cell grid cannot host\n9:16 cells without crushing them. Preserve the requested final video aspect ratio for every\nframe area. After\nthat image completes, call generate_video once using the generated storyboard board as\n@Image1/referenceImageIndices=[0], with skipPromptProcessing=false only when the user\nexplicitly wants the storyboard text rewritten; otherwise preserve the compiled shot guide\nand use skipPromptProcessing=true, expandPrompt=false.\n\nDO NOT USE generate_image FOR UPLOADED REFERENCE LOOPED VIDEO SEGMENTS: If the user says\nthe same uploaded image/reference should be reused as the first frame and last frame of each\nscripted segment/scene/clip before stitching, they are explicitly asking to animate the\nuploaded image, not to generate new storyboard keyframes. Do not call generate_image for\nthat request. Call animate_photo once with repeated uploaded source indices and per-scene\nprompts.\n\nREUSING RESULTS: When the user asks to redo, retry, or revise (e.g., \"try a new version\",\n\"redo the video with X\"), reuse the existing source images — do NOT regenerate them unless\nthe user explicitly asks for new images or describes changes to the images themselves.\nReference the existing result indices from the prior generation. If unsure whether the user\nwants new images, ask — don't regenerate by default.",
|
|
2864
|
+
"baseDescription": "generate_image creates images from text descriptions. Use for text-only image generation;\nuse edit_image when uploaded or reference images must guide identity/likeness.\nException: Z-image, Z-image Turbo, and Krea 2 Turbo image-to-image/enhancement requests\nuse generate_image with model=\"z-turbo\", model=\"z-image\", or model=\"krea-2-turbo\",\nsourceImageIndex=-1, and starting_image_strength; do not route explicit base-model\nZ-image Turbo or Krea 2 Turbo uploaded-image enhancement to edit_image because edit_image\ndoes not expose those base image-to-image models.\n\nMODEL CHOICE: If the user asks for Krea 2 Turbo, choose model=\"krea-2-turbo\". If they ask\nfor Dark Beast Krea 2, choose model=\"dark-beast-krea2\". If they ask for Dark Beast Z-Image\nTurbo, choose model=\"dark-beast-z-turbo\". If they ask for Chroma 1 HD, choose model=\"chroma1-hd\".\nIf they ask for anime or anime-style output without naming a model, choose model=\"one-obsession-v22\".\nBase Z-image and Krea 2 Turbo image-to-image/enhancement requests stay on generate_image with\nsourceImageIndex and starting_image_strength; identity-preserving Krea edits with reference\nphotos use edit_image instead.\n\nBATCH FAN-OUT DEFAULT (READ BEFORE ANYTHING ELSE BELOW):\nWhen the user explicitly asks for N images in the CURRENT turn, set numberOfVariations=N\nin one call. Avoid multiple serial generate_image calls unless the user explicitly wants\nindependent projects, isolated approvals, or per-output settings that cannot share one project.\nDo not omit numberOfVariations and try to \"generate the next one after this finishes\".\nTrigger phrasings:\n\"draw N\", \"make N\", \"give me N\", \"show me N\", \"render N\", \"create N\", \"generate N\",\n\"N more\", \"another N\", \"N as separate\", \"N separate images\", \"N different images\",\n\"N options\", \"N takes\", \"N versions\", \"N variations\", \"N pictures of\",\n\"all at the same time\", \"in parallel\", \"side by side as separate\".\n\nTHE PRIOR TURN DOES NOT ANCHOR THE CURRENT TURN. If the prior assistant turn used\nnumberOfVariations=1 with a composite \"N subjects in one image\" prompt, and the user\nnow says \"draw N more as separate images\" / \"as separate\" / \"separately\", DO NOT carry\nover numberOfVariations=1 from the prior call. The user is correcting that interpretation;\nset numberOfVariations=N for THIS call with one self-contained prompt per image via {|}\nDynamic Prompt branches. The new turn's count + separation language always wins over the\nprevious turn's pattern.\n\nWHEN BATCH FAN-OUT DOES NOT APPLY: numberOfVariations=1 with multiple subjects packed into\nONE prompt is correct only when the user clearly wants a SINGLE composite image (e.g.\n\"draw 2 goats in a meadow\" with no separation language, or explicit \"in one image\" / \"one\npicture of N\" / \"single image\" / \"composite\" / \"sheet\" / \"side-by-side composition\").\n\nIMAGE PROMPT ORDER: [SUBJECT] → [ATTRIBUTES] → [ACTION/POSE] → [CAMERA/FRAMING]\n→ [ENVIRONMENT] → [LIGHTING] → [STYLE/MEDIUM] → [MATERIALS/TEXTURES] →\n[SECONDARY DETAILS]. By default, start with the main subject and concrete observable\nattributes; use mood or atmosphere first only when the user explicitly asks for that shape.\nUse concrete nouns and observable adjectives — \"soft overcast daylight\" not \"nice lighting\".\nGood defaults when user is underspecified: medium shot for portraits, wide shot for\nenvironments, eye-level angle, soft natural light for realism.\n\nDYNAMIC PROMPTS: When numberOfVariations > 1, use Dynamic Prompt syntax to make each\nvariation meaningfully different — not just seed-different. Syntax: {a|b|c} cycles\nsequentially, {@a|b|c} picks randomly, {~a|b} paired cycling across groups. Rules: (1) Vary\nONLY what the user left unspecified — lock in everything they specified. (2) Match option\ncount to numberOfVariations so every result is unique. (3) Briefly tell the user what you're\nvarying without exposing raw {|} syntax unless the user asks to inspect the prompt.\n(4) Skip when: user wants consistency, prompt is fully\nspecified, user typed their own {|} syntax, or iterating on a specific result. (5) Do not put\nthe count or the word \"versions\"/\"variations\" inside the prompt — the prompt always describes\na single image. The multiplicity comes ONLY from numberOfVariations + the {|} syntax.\nLINKED VARIANTS: when multiple attributes must stay paired per result, use ONE top-level\nDynamic Prompt branch with one complete self-contained prompt per output. Do NOT split\nlinked fields into separate Dynamic Prompt groups. Treat every batch-wide requirement\nquantified as \"each\", \"every\", or \"all\" as a hard per-option invariant: repeat it inside\nEVERY option, including identity/pose continuity, clothing/style, the concrete setting, and\nliteral visible names, labels, captions, flags, logos, or symbols. A shared prefix or another\noption is never a substitute for a complete standalone option.\nEach option must name its actual styling, setting, accessories, and requested literal text or\nsymbol. Never emit meta-placeholders such as \"variant-specific background\", \"requested\nsymbol\", \"humorous alternate name\", or \"bake the name and symbol into the image\".\nWhen one option remakes/preserves an original and the others are themed variants, make the\noriginal option equally concrete: specify the original clothing and setting plus every\nrequested label, flag, logo, symbol, or prop; do not write only \"the original\".\n\nSELECTION-GATED IMAGE STAGES: If the user asks for N image options and says they will pick\none before a later dance/video/animation, call generate_image once with numberOfVariations=N.\nAfter images are created, stop and ask the user to choose unless the user explicitly asked\nto run the later stage immediately.\n\nIMAGE→VIDEO DIMENSION RULE: When generating an image that will feed into a video tool\n(animate_photo, sound_to_video, etc.), the image MUST be generated at the SAME aspect\nratio and dimensions as the target video. Default video aspect ratio is 16:9 landscape —\npass aspectRatio=\"16:9\" (or the user's specified/reference ratio) so the source image\nmatches the video output. Do not generate a square image for a widescreen video. Exception:\na composite GPT Image 2 storyboard/keyframe sheet for a later Seedance video is a board,\nnot a single source frame; unless the user explicitly specifies a storyboard page/canvas/sheet\nshape, default the sheet image dimensions to a balanced grid that hosts the target\nscene-cell/frame aspect natively (portrait video target -> portrait or square sheet whose\ncolumns x rows grid produces ~9:16 cells; landscape video target -> landscape sheet whose\nrows x columns grid produces ~16:9 cells). Each scene-cell/frame area preserves the target\nvideo aspect ratio.\n\nSTORYBOARD IMAGE BATCH RULE: When rendering scene keyframes from a screenplay/storyboard,\nnumberOfVariations is only the count; the prompt should be one Dynamic Prompt branch with one\nfull keyframe prompt per scene:\n{scene 1 full keyframe prompt|scene 2 full keyframe prompt|...|scene N full keyframe prompt}.\nDo not set numberOfVariations=N with only the first scene prompt — that creates N versions of\nscene 1. For full project requests, one generate_image batch for all scene keyframes, then\none animate_photo batch for all video clips in parallel.\n\nSTORYTELLING / BRAND / SOCIAL IMAGE PROMPTS: If generating a storyboard, ad concept,\ntrailer sheet, meme, creator post, or provocative social concept, make the first frame or\npanel immediately legible. Preserve the user's requested tone and audience. Use concrete\ncomposition, persona, product/brand role, caption placement, readable required text, and a\nclear visual transformation or punchline. For provocative adult social content, keep subjects\nclearly adult and consensual, PG-13/non-explicit, and avoid minor-coded styling or school-coded\nsettings while still optimizing visual magnet, persona, caption bait, and replay/comment value.\n\nGPT IMAGE STORYBOARD SHEET → SEEDANCE AUTO-PROCEED: If the user asks to run the whole\nGPT Image storyboard/keyframe sheet plus Seedance workflow without approval, the FIRST\ngenerate_image call must create ONE composite storyboard/keyframe sheet, not loose concept\nart and not separate keyframes. Default to model=\"gpt-image-2.5-sunburst\" and preserve another\nexplicit GPT Image model named by the user. Use numberOfVariations=1 and a\ncompiled storyboard prompt that literally includes: \"Create exactly N sequential video\nstoryboard frames as one composite storyboard image\", \"Target final video aspect ratio: X\",\na `SCENES:` section, and exactly N concrete scene entries named `SCENE_01`, `SCENE_02`,\netc. Each scene entry must include `Visual/Action:`, `Camera/Motion:`, `Dialogue/VO:`\n(use `[no dialogue]` when silent), `Audio/SFX:`, and any reference/visible-text notes\nneeded for that scene. Do not send only a source brief, storyboard concept, or generic\nlayout instructions as the prompt; malformed compiled storyboard prompts are blocked by\nquality audit instead of being repaired at runtime. If the user does not explicitly specify\na frame count, choose N with the shared storyboard density default: at least one key visual\nbeat about every 2 seconds, rounded up and clamped to 6-16 total storyboard frames\n(for example, a 60 second commercial defaults to N=16). Unless the user explicitly specifies another\nstoryboard page/canvas/sheet shape, default the GPT Image 2 storyboard sheet pixel dimensions\nto a balanced grid that hosts the target cell aspect natively: for a 9:16 portrait video,\npick a portrait-leaning sheet whose columns x rows grid produces ~9:16 cells (e.g., 12 cells\n-> ~3:4 sheet around 1728x2304, 6 cells -> ~27:32 around 1840x2176, 9 cells -> ~9:16 around\n1504x2672); for a 16:9 landscape video, pick a landscape sheet whose rows x columns grid\nproduces ~16:9 cells (e.g., 12 cells -> ~4:3 sheet around 2304x1728). Do not force landscape\n2560x1440 when cells are portrait — a landscape sheet with a portrait-cell grid cannot host\n9:16 cells without crushing them. Preserve the requested final video aspect ratio for every\nframe area. After\nthat image completes, call generate_video once using the generated storyboard board as\n@Image1/referenceImageIndices=[0], with skipPromptProcessing=false only when the user\nexplicitly wants the storyboard text rewritten; otherwise preserve the compiled shot guide\nand use skipPromptProcessing=true, expandPrompt=false.\n\nDO NOT USE generate_image FOR UPLOADED REFERENCE LOOPED VIDEO SEGMENTS: If the user says\nthe same uploaded image/reference should be reused as the first frame and last frame of each\nscripted segment/scene/clip before stitching, they are explicitly asking to animate the\nuploaded image, not to generate new storyboard keyframes. Do not call generate_image for\nthat request. Call animate_photo once with repeated uploaded source indices and per-scene\nprompts.\n\nREUSING RESULTS: When the user asks to redo, retry, or revise (e.g., \"try a new version\",\n\"redo the video with X\"), reuse the existing source images — do NOT regenerate them unless\nthe user explicitly asks for new images or describes changes to the images themselves.\nReference the existing result indices from the prior generation. If unsure whether the user\nwants new images, ask — don't regenerate by default.",
|
|
2550
2865
|
"parameterDocs": {
|
|
2551
2866
|
"prompt": "Text description. Put the subject first. Use Dynamic Prompt syntax when numberOfVariations > 1.",
|
|
2552
2867
|
"numberOfVariations": "Number of distinct outputs. Use Dynamic Prompt {|} syntax to vary one attribute per image. Never put the count in the prompt itself.",
|
|
@@ -2627,11 +2942,12 @@ const PROMPT_CONTRACTS = [
|
|
|
2627
2942
|
},
|
|
2628
2943
|
{
|
|
2629
2944
|
"contractId": "sound_to_video_v1",
|
|
2630
|
-
"version": "1.
|
|
2945
|
+
"version": "1.1.0",
|
|
2631
2946
|
"toolName": "sound_to_video",
|
|
2632
|
-
"baseDescription": "sound_to_video creates audio-synced video from an audio source. Works with uploaded audio\nfiles (mp3, m4a, wav) OR previously generated music from generate_music (auto-detected).\n\nWhen the user asks to \"turn that song/music into a video\" after generate_music, use\nsound_to_video — it will automatically find the generated audio.\n\nFor music visualization (syncing video to a specific song or audio track), use the\ngenerate_music → sound_to_video pipeline. Do NOT use animate_photo or generate_video for\naudio-driven visualization.\n\nanimate_photo and generate_video produce audio natively via LTX 2.5 or LTX 2.3 — never\npre-generate audio for those tools. sound_to_video is only for when the audio IS the primary creative\ninput driving the video output.\n\nPERSONA VOICE CLIPS: Persona voice clips returned by resolve_personas are voice identity\nreferences for LTX Audio ID, not audio tracks to synchronize. If the user explicitly asks\nfor a registered/persona/reference voice or voice clone, call resolve_personas first, then\nuse generate_video with ltx23 and voicePersonaName when there is no image source, or\nanimate_photo with ltx23 and voicePersonaName when an image/source frame should be\nanimated. Do not call sound_to_video for a persona voice clip unless a separate uploaded\naudio track is the primary sync driver.",
|
|
2947
|
+
"baseDescription": "sound_to_video creates audio-synced video from an audio source. Works with uploaded audio\nfiles (mp3, m4a, wav) OR previously generated music from generate_music (auto-detected).\n\nWhen the user asks to \"turn that song/music into a video\" after generate_music, use\nsound_to_video — it will automatically find the generated audio.\n\nFor music visualization (syncing video to a specific song or audio track), use the\ngenerate_music → sound_to_video pipeline. Do NOT use animate_photo or generate_video for\naudio-driven visualization.\n\nanimate_photo and generate_video produce audio natively via LTX 2.5 or LTX 2.3 — never\npre-generate audio for those tools. sound_to_video is only for when the audio IS the primary creative\ninput driving the video output.\n\nPERSONA VOICE CLIPS: Persona voice clips returned by resolve_personas are voice identity\nreferences for LTX Audio ID, not audio tracks to synchronize. If the user explicitly asks\nfor a registered/persona/reference voice or voice clone, call resolve_personas first, then\nuse generate_video with ltx23 and voicePersonaName when there is no image source, or\nanimate_photo with ltx23 and voicePersonaName when an image/source frame should be\nanimated. Do not call sound_to_video for a persona voice clip unless a separate uploaded\naudio track is the primary sync driver.\n\nMINIMAX H3 AUDIO GUIDE: only when the user asks for MiniMax H3 or FastH3 with an uploaded audio\ntrack, use sound_to_video with videoModel \"minimax-h3-fasth3-ia2v-turbo\" (first-frame image via\nsourceImageIndex), \"minimax-h3-fasth3-flfa2v-turbo\" (first frame via sourceImageIndex and last\nframe via endImageIndex) or \"minimax-h3-fasth3-a2v-turbo\" (audio only, no image). The audio\ndrives the picture from frame 0 and stays in the output. Clips are 124-362 frames at a fixed\n24 fps (about 5.2-15.1 seconds); audioStart picks the window. generateAudio=false, LoRAs and\nnegativePrompt are not supported. Add \"-2stage\" only for 1080p, 1440p or 2K H3 output (1080 or\n1440 targetResolution); 720p-class audio output stays on the regular selector. Never use these\nin place of the LTX 2.5 defaults when the user did not ask for MiniMax H3 or FastH3.",
|
|
2633
2948
|
"parameterDocs": {
|
|
2634
|
-
"audioSource": "Uploaded audio file or reference to a prior generate_music result. Auto-detected when omitted after generate_music."
|
|
2949
|
+
"audioSource": "Uploaded audio file or reference to a prior generate_music result. Auto-detected when omitted after generate_music.",
|
|
2950
|
+
"endImageIndex": "Last frame for the MiniMax H3 FastH3 first/last frame + audio selectors only, indexed like animate_photo (-1 first upload, -2 second upload, non-negative generated results)."
|
|
2635
2951
|
}
|
|
2636
2952
|
},
|
|
2637
2953
|
{
|
package/llm.txt
CHANGED
|
@@ -8,9 +8,12 @@ Current capabilities and limits: read `references/models.md` before answering
|
|
|
8
8
|
model-selection questions. Seedance 2.5 supports 1080p with
|
|
9
9
|
`--video -m seedance2-5 --target-resolution 1080`, 4–30s clips, MOV export,
|
|
10
10
|
and optional last-frame images. Other recent additions include FastH3
|
|
11
|
-
Two-Stage delivered 720p/1080p/2K,
|
|
11
|
+
Two-Stage delivered 720p/1080p/2K, FastH3 audio-to-video from an uploaded track
|
|
12
|
+
(`-m minimax-h3-fasth3-ia2v-turbo --ref first.png --ref-audio track.m4a`, or
|
|
13
|
+
`-flfa2v-turbo` / `-a2v-turbo`), GPT Image 2.5 Sunburst/Flare, SAM 3 object
|
|
12
14
|
masks, and promptless FlashVSR video upscaling to 1080p/1440p.
|
|
13
|
-
Direct CLI: Pixal3D uses `--image-to-3d original.png -o object.glb
|
|
15
|
+
Direct CLI: Pixal3D uses `--image-to-3d original.png -o object.glb` (add
|
|
16
|
+
`--left-view`, `--back-view`, `--right-view` for multi-view); BiRefNet
|
|
14
17
|
uses `--remove-background original.png -o cutout.png` (add `--matte` for a mask).
|
|
15
18
|
MiniMax Music 3 uses `--music -m music3`; Qwen3-TTS uses `--speech` with
|
|
16
19
|
`--speech-mode voice|clone|design`. Read the model reference for required inputs,
|
package/media-utilities.mjs
CHANGED
|
@@ -4,6 +4,8 @@ import {
|
|
|
4
4
|
} from '@sogni-ai/sogni-intelligence-client/media';
|
|
5
5
|
|
|
6
6
|
export const PIXAL3D_MODEL_ID = 'pixal3d_int8_i23d';
|
|
7
|
+
// A front view (--image-to-3d) plus any subset of three orbit views.
|
|
8
|
+
export const PIXAL3D_MULTIVIEW_MODEL_ID = 'pixal3d_multiview_int8_i23d';
|
|
7
9
|
export const BIREFNET_MODEL_ID = 'birefnet_image_background_removal_fp16';
|
|
8
10
|
export const MUSIC3_MODEL_ID = MusicModel.best;
|
|
9
11
|
export const MUSIC3_DEFAULTS = MUSIC_MODELS.best;
|
|
@@ -14,6 +16,17 @@ export const SPEECH_VALUE_FLAGS = {
|
|
|
14
16
|
'--voice-reference': 'voiceReference', '--voice-transcript': 'voiceTranscript'
|
|
15
17
|
};
|
|
16
18
|
|
|
19
|
+
// Pixal3D multi-view orbit views, named by the SUBJECT's own sides, not the
|
|
20
|
+
// viewer's: --left-view shows the subject turned so its own left side faces the
|
|
21
|
+
// camera (it faces screen-left), --right-view its own right side (it faces
|
|
22
|
+
// screen-right), --back-view the subject from behind. Templates that label the
|
|
23
|
+
// subject's right side "left" build a model turned 180 degrees.
|
|
24
|
+
export const PIXAL3D_VIEW_FLAGS = {
|
|
25
|
+
'--left-view': 'leftViewImage',
|
|
26
|
+
'--back-view': 'backViewImage',
|
|
27
|
+
'--right-view': 'rightViewImage'
|
|
28
|
+
};
|
|
29
|
+
|
|
17
30
|
export const MESH_FLAGS = {
|
|
18
31
|
'--mesh-faces': ['meshTargetFaces', 5000, 700000],
|
|
19
32
|
'--texture-size': ['textureSize', 1024, 4096],
|
|
@@ -31,7 +44,14 @@ export function prepareMediaUtilityOptions(options, explicit) {
|
|
|
31
44
|
options.speech = true;
|
|
32
45
|
options.speechMode = selectedSpeechMode;
|
|
33
46
|
}
|
|
47
|
+
const orbitViews = Object.keys(options.pixal3dViews);
|
|
34
48
|
if (options.model === PIXAL3D_MODEL_ID && !options.imageTo3d) fail('Pixal3D requires --image-to-3d <original-image>.');
|
|
49
|
+
if (options.model === PIXAL3D_MULTIVIEW_MODEL_ID && !options.imageTo3d) {
|
|
50
|
+
fail('Pixal3D multi-view requires --image-to-3d <front-view-image> plus --left-view, --back-view and/or --right-view.');
|
|
51
|
+
}
|
|
52
|
+
if (orbitViews.length && !options.imageTo3d) {
|
|
53
|
+
fail('--left-view, --back-view and --right-view add views to --image-to-3d, which takes the front view.');
|
|
54
|
+
}
|
|
35
55
|
if (options.model === BIREFNET_MODEL_ID && !options.removeBackground) fail('BiRefNet requires --remove-background <original-image>.');
|
|
36
56
|
if (Object.keys(options.meshSettings).length && !options.imageTo3d) fail('Mesh settings require --image-to-3d.');
|
|
37
57
|
if (options.matte && !options.removeBackground) fail('--matte requires --remove-background.');
|
|
@@ -74,8 +94,18 @@ export function prepareMediaUtilityOptions(options, explicit) {
|
|
|
74
94
|
if (options.prompt) fail('Pixal3D and BiRefNet are promptless; supply only the original image.');
|
|
75
95
|
if (options.count !== 1) fail('Image utilities accept one image and produce one result; --count must be 1.');
|
|
76
96
|
if (explicit.musicLanguage || explicit.seed || options.lastSeed) fail('Image utilities do not accept language or seed controls.');
|
|
77
|
-
const model = options.imageTo3d
|
|
78
|
-
|
|
97
|
+
const model = options.imageTo3d
|
|
98
|
+
? (orbitViews.length ? PIXAL3D_MULTIVIEW_MODEL_ID : PIXAL3D_MODEL_ID)
|
|
99
|
+
: BIREFNET_MODEL_ID;
|
|
100
|
+
if (explicit.model && options.model !== model) {
|
|
101
|
+
if (options.model === PIXAL3D_MULTIVIEW_MODEL_ID) {
|
|
102
|
+
fail(`${PIXAL3D_MULTIVIEW_MODEL_ID} needs --left-view, --back-view and/or --right-view; a front image alone uses ${PIXAL3D_MODEL_ID}.`);
|
|
103
|
+
}
|
|
104
|
+
if (options.model === PIXAL3D_MODEL_ID && orbitViews.length) {
|
|
105
|
+
fail(`${PIXAL3D_MODEL_ID} reconstructs from one image; orbit views use ${PIXAL3D_MULTIVIEW_MODEL_ID}.`);
|
|
106
|
+
}
|
|
107
|
+
fail('--model conflicts with the selected image utility.');
|
|
108
|
+
}
|
|
79
109
|
options.model = model;
|
|
80
110
|
const format = options.imageTo3d ? 'glb' : 'png';
|
|
81
111
|
if (options.outputFormat && options.outputFormat.toLowerCase() !== format) fail(`This mode produces ${format.toUpperCase()} only.`);
|
|
@@ -90,11 +120,12 @@ export function prepareMediaUtilityOptions(options, explicit) {
|
|
|
90
120
|
}
|
|
91
121
|
}
|
|
92
122
|
|
|
93
|
-
|
|
123
|
+
// viewBytes maps leftViewImage/backViewImage/rightViewImage to image bytes.
|
|
124
|
+
export function imageUtilityConfig(options, bytes, viewBytes = {}) {
|
|
94
125
|
return {
|
|
95
126
|
modelId: options.model, positivePrompt: '', startingImage: bytes,
|
|
96
127
|
numberOfMedia: 1, tokenType: options.tokenType || 'spark', waitForCompletion: false,
|
|
97
|
-
...(options.imageTo3d ? { ...options.meshSettings } : { applyMask: !options.matte, outputFormat: 'png' })
|
|
128
|
+
...(options.imageTo3d ? { ...options.meshSettings, ...viewBytes } : { applyMask: !options.matte, outputFormat: 'png' })
|
|
98
129
|
};
|
|
99
130
|
}
|
|
100
131
|
|
|
@@ -119,7 +150,9 @@ export function utilityResultMetadata(options) {
|
|
|
119
150
|
...(options.voiceReference ? { voiceReference: options.voiceReference } : {}),
|
|
120
151
|
...(options.voiceTranscript ? { voiceTranscript: options.voiceTranscript } : {}),
|
|
121
152
|
...(options.speechCreativity !== null ? { creativity: options.speechCreativity } : {}) };
|
|
122
|
-
if (options.imageTo3d) return { sourceImage: options.imageTo3d,
|
|
153
|
+
if (options.imageTo3d) return { sourceImage: options.imageTo3d,
|
|
154
|
+
...(Object.keys(options.pixal3dViews).length ? { orbitViews: { ...options.pixal3dViews } } : {}),
|
|
155
|
+
meshSettings: { shapeResolution: 1024, ...options.meshSettings } };
|
|
123
156
|
if (options.removeBackground) return { sourceImage: options.removeBackground, applyMask: !options.matte };
|
|
124
157
|
return {};
|
|
125
158
|
}
|