@assemblyline-agents/higgsfield 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 OpenEve contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,92 @@
1
+ # @assemblyline-agents/higgsfield
2
+
3
+ Official Assembly Line connection plugin for Higgsfield's CLI-first coding-agent
4
+ workflow. Higgsfield remains a normal developer-selectable connection; its
5
+ transport runs the official CLI inside the active agent sandbox rather than
6
+ launching a process on the Assembly Line gateway.
7
+
8
+ ## Install and select
9
+
10
+ ```sh
11
+ assembly-line add higgsfield agent
12
+ ```
13
+
14
+ This creates `connections/higgsfield.ts`:
15
+
16
+ ```ts
17
+ import { defineHiggsfieldConnection } from "@assemblyline-agents/higgsfield";
18
+
19
+ export default defineHiggsfieldConnection({
20
+ access: {
21
+ read: true,
22
+ write: false
23
+ }
24
+ });
25
+ ```
26
+
27
+ Enable generation and editing only after choosing an approval policy:
28
+
29
+ ```ts
30
+ write: { approval: "always" }
31
+ ```
32
+
33
+ The connection exposes `higgsfield__read` for discovery, status, cost, history,
34
+ and polling, plus `higgsfield__write` for upload, generation, training,
35
+ editing, reframing, and assembly. The write operation can create remote assets
36
+ and consume account credits.
37
+
38
+ Assign it to a subagent with the same connection abstraction:
39
+
40
+ ```ts
41
+ export default defineSubagent({
42
+ description: "Create and edit social video.",
43
+ connections: ["higgsfield"]
44
+ });
45
+ ```
46
+
47
+ `assembly-line add` also copies the bundled `higgsfield-generate`,
48
+ `higgsfield-soul-id`, and `higgsfield-product-photoshoot` skills.
49
+
50
+ ## Why the transport is a sandbox CLI
51
+
52
+ The connection definition compiles as `protocol: "cli"` and
53
+ `transport: "sandbox"`. Tool discovery, subagent scoping, access policy,
54
+ approval, tracing, and developer selection stay in the connection layer. At
55
+ execution time, Assembly Line invokes the reviewed command in the active run
56
+ sandbox, where it can consume `/files/...` attachments and write results to
57
+ `/workspace`.
58
+
59
+ Model-authored shell source is never accepted. The plugin validates the
60
+ official command surface, Assembly Line shell-quotes each argument, hydrates logical
61
+ input paths, and adds `--json --no-color`.
62
+
63
+ ## Sandbox setup
64
+
65
+ Install the official CLI in the sandbox image or template:
66
+
67
+ ```sh
68
+ curl -fsSL https://raw.githubusercontent.com/higgsfield-ai/cli/main/install.sh | sh
69
+ ```
70
+
71
+ Then authenticate interactively inside the persistent sandbox belonging to
72
+ that user:
73
+
74
+ ```sh
75
+ higgsfield auth login
76
+ ```
77
+
78
+ Do not bake CLI credentials into a shared image or reuse one authenticated
79
+ sandbox across unrelated users. Higgsfield's current CLI login is
80
+ browser-based OAuth with a loopback callback, so sandbox provisioning must
81
+ make that login reachable. If the sandbox is ephemeral, retain the user's
82
+ authenticated CLI home with a user-scoped snapshot or persistent volume.
83
+
84
+ The plugin rejects auth-token, website repository-token, and secret-management
85
+ commands.
86
+
87
+ Official references:
88
+
89
+ - https://higgsfield.ai/cli
90
+ - https://higgsfield.ai/skills
91
+ - https://github.com/higgsfield-ai/cli
92
+ - https://github.com/higgsfield-ai/skills
@@ -0,0 +1,19 @@
1
+ import { type ConnectionDefinition, type ConnectionPluginAccessSelection } from "@assemblyline-agents/core";
2
+ export interface HiggsfieldConnectionOptions {
3
+ /** Executable path only. Shell fragments and extra arguments are not accepted. */
4
+ command?: string;
5
+ description?: string;
6
+ access: ConnectionPluginAccessSelection;
7
+ readTimeoutMs?: number;
8
+ writeTimeoutMs?: number;
9
+ maxOutputChars?: number;
10
+ required?: boolean;
11
+ subject?: ConnectionDefinition["subject"];
12
+ }
13
+ export interface HiggsfieldToolInput {
14
+ /** Official Higgsfield CLI arguments, excluding the `higgsfield` executable. */
15
+ args: string[];
16
+ }
17
+ export declare function defineHiggsfieldConnection(options: HiggsfieldConnectionOptions): import("@assemblyline-agents/core").SandboxCliConnectionDefinition;
18
+ export declare const openevePlugin: import("@assemblyline-agents/core").PluginModule;
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,+BAA+B,EAGrC,MAAM,2BAA2B,CAAC;AAgEnC,MAAM,WAAW,2BAA2B;IAC1C,kFAAkF;IAClF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,+BAA+B,CAAC;IACxC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,mBAAmB;IAClC,gFAAgF;IAChF,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,2BAA2B,sEAuB9E;AAED,eAAO,MAAM,aAAa,kDAA0C,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,185 @@
1
+ import { connectionPluginMetadata, definePlugin, defineSandboxCliPluginConnection } from "@assemblyline-agents/core";
2
+ const PLUGIN = connectionPluginMetadata("higgsfield");
3
+ const DEFAULT_READ_TIMEOUT_MS = 10 * 60_000;
4
+ const DEFAULT_WRITE_TIMEOUT_MS = 30 * 60_000;
5
+ const MAX_ARGUMENTS = 160;
6
+ const MAX_ARGUMENT_LENGTH = 32_000;
7
+ const READ_COMMANDS = new Set([
8
+ "account:status",
9
+ "account:transactions",
10
+ "generate:cost",
11
+ "generate:get",
12
+ "generate:list",
13
+ "generate:wait",
14
+ "model:get",
15
+ "model:list",
16
+ "preset:list",
17
+ "soul-id:get",
18
+ "soul-id:list",
19
+ "soul-id:wait",
20
+ "upload:list",
21
+ "voices:get",
22
+ "voices:list",
23
+ "workflow:get",
24
+ "workflow:list",
25
+ "workspace:list",
26
+ "workspace:status"
27
+ ]);
28
+ const MARKETING_READ_RESOURCES = new Set([
29
+ "ad-formats",
30
+ "ad-references",
31
+ "avatars",
32
+ "brand-kits",
33
+ "hooks",
34
+ "products",
35
+ "settings",
36
+ "webproducts"
37
+ ]);
38
+ const WRITE_COMMANDS = new Set([
39
+ "generate:create",
40
+ "generate:workflow",
41
+ "marketplace-cards:create",
42
+ "preset:resolve",
43
+ "product-photoshoot:create",
44
+ "soul-id:create",
45
+ "upload:create",
46
+ "workspace:set",
47
+ "workspace:unset"
48
+ ]);
49
+ const MARKETING_WRITE_COMMANDS = new Set([
50
+ "ad-references:create",
51
+ "avatars:create",
52
+ "brand-kits:fetch",
53
+ "dtc-ads:generate",
54
+ "products:create",
55
+ "products:fetch",
56
+ "webproducts:create",
57
+ "webproducts:fetch"
58
+ ]);
59
+ export function defineHiggsfieldConnection(options) {
60
+ return defineSandboxCliPluginConnection(PLUGIN, {
61
+ ...(options.command ? { command: options.command } : {}),
62
+ ...(options.description ? { description: options.description } : {}),
63
+ access: options.access,
64
+ tools: [
65
+ higgsfieldTool("read", "Inspect Higgsfield models, workflows, jobs, media, account state, and generation cost.", validateReadCommand, options.readTimeoutMs ?? DEFAULT_READ_TIMEOUT_MS),
66
+ higgsfieldTool("write", "Create, upload, train, edit, reframe, or assemble media with Higgsfield.", validateWriteCommand, options.writeTimeoutMs ?? DEFAULT_WRITE_TIMEOUT_MS)
67
+ ],
68
+ ...(options.maxOutputChars !== undefined ? { maxOutputChars: options.maxOutputChars } : {}),
69
+ ...(options.required !== undefined ? { required: options.required } : {}),
70
+ ...(options.subject ? { subject: options.subject } : {})
71
+ });
72
+ }
73
+ export const openevePlugin = definePlugin({ connections: [PLUGIN] });
74
+ function higgsfieldTool(name, description, validateCommand, timeoutMs) {
75
+ return {
76
+ name,
77
+ description,
78
+ inputSchema: higgsfieldInputSchema(),
79
+ build(input) {
80
+ const args = validatedArguments(input);
81
+ validateCommand(args);
82
+ return {
83
+ args: [...args, "--json", "--no-color"],
84
+ cwd: "/workspace",
85
+ timeoutMs,
86
+ hydratePaths: sandboxInputPaths(args)
87
+ };
88
+ }
89
+ };
90
+ }
91
+ function higgsfieldInputSchema() {
92
+ return {
93
+ type: "object",
94
+ properties: {
95
+ args: {
96
+ type: "array",
97
+ description: "Canonical Higgsfield CLI arguments. Do not include the executable, --json, or --no-color.",
98
+ items: { type: "string" },
99
+ minItems: 1,
100
+ maxItems: MAX_ARGUMENTS
101
+ }
102
+ },
103
+ required: ["args"],
104
+ additionalProperties: false
105
+ };
106
+ }
107
+ function validatedArguments(input) {
108
+ const argsValue = input && typeof input === "object" && !Array.isArray(input)
109
+ ? input.args
110
+ : undefined;
111
+ if (!Array.isArray(argsValue) || argsValue.length === 0) {
112
+ throw new Error("Higgsfield requires a non-empty args array.");
113
+ }
114
+ if (argsValue.length > MAX_ARGUMENTS) {
115
+ throw new Error(`Higgsfield accepts at most ${MAX_ARGUMENTS} arguments per call.`);
116
+ }
117
+ const args = argsValue.map((argument) => {
118
+ if (typeof argument !== "string")
119
+ throw new Error("Every Higgsfield argument must be a string.");
120
+ if (argument.includes("\0"))
121
+ throw new Error("Higgsfield arguments cannot contain NUL bytes.");
122
+ if (argument.length > MAX_ARGUMENT_LENGTH) {
123
+ throw new Error(`A Higgsfield argument exceeded ${MAX_ARGUMENT_LENGTH} characters.`);
124
+ }
125
+ return argument;
126
+ });
127
+ if (args.includes("--json") || args.includes("--no-color")) {
128
+ throw new Error("OpenEve adds --json and --no-color automatically; omit them from args.");
129
+ }
130
+ return args;
131
+ }
132
+ function validateReadCommand(args) {
133
+ if (args.includes("--help") || args.includes("-h"))
134
+ return;
135
+ if (args[0] === "version")
136
+ return;
137
+ const command = `${args[0] ?? ""}:${args[1] ?? ""}`;
138
+ if (READ_COMMANDS.has(command))
139
+ return;
140
+ if (args[0] === "marketing-studio"
141
+ && MARKETING_READ_RESOURCES.has(args[1] ?? "")
142
+ && (args[2] === "list" || args[2] === "get"))
143
+ return;
144
+ throw new Error(`Higgsfield read tool does not allow "${args.slice(0, 3).join(" ")}". Use the write tool for approved mutations.`);
145
+ }
146
+ function validateWriteCommand(args) {
147
+ if (args[0] === "auth") {
148
+ throw new Error("Higgsfield auth commands are never exposed to agents. Authenticate the user-scoped sandbox interactively.");
149
+ }
150
+ if (args[0] === "website" && (args[1] === "repo-access" || args[1] === "secrets")) {
151
+ throw new Error("Credential-returning Higgsfield website commands are not exposed to agents.");
152
+ }
153
+ const command = `${args[0] ?? ""}:${args[1] ?? ""}`;
154
+ if (WRITE_COMMANDS.has(command))
155
+ return;
156
+ if (args[0] === "marketing-studio"
157
+ && MARKETING_WRITE_COMMANDS.has(`${args[1] ?? ""}:${args[2] ?? ""}`))
158
+ return;
159
+ throw new Error(`Higgsfield write tool does not allow "${args.slice(0, 3).join(" ")}".`);
160
+ }
161
+ function sandboxInputPaths(args) {
162
+ const paths = new Set();
163
+ for (const argument of args) {
164
+ const candidates = [argument];
165
+ const equals = argument.indexOf("=");
166
+ if (equals >= 0)
167
+ candidates.push(argument.slice(equals + 1));
168
+ for (let candidate of candidates) {
169
+ if (candidate.startsWith("@"))
170
+ candidate = candidate.slice(1);
171
+ if (candidate === "/files"
172
+ || candidate.startsWith("/files/")
173
+ || candidate === "/memory"
174
+ || candidate.startsWith("/memory/")
175
+ || candidate === "/skills"
176
+ || candidate.startsWith("/skills/")
177
+ || candidate === "/history"
178
+ || candidate.startsWith("/history/")) {
179
+ paths.add(candidate);
180
+ }
181
+ }
182
+ }
183
+ return [...paths];
184
+ }
185
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,YAAY,EACZ,gCAAgC,EAKjC,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,GAAG,wBAAwB,CAAC,YAAY,CAAE,CAAC;AACvD,MAAM,uBAAuB,GAAG,EAAE,GAAG,MAAM,CAAC;AAC5C,MAAM,wBAAwB,GAAG,EAAE,GAAG,MAAM,CAAC;AAC7C,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEnC,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC;IAC5B,gBAAgB;IAChB,sBAAsB;IACtB,eAAe;IACf,cAAc;IACd,eAAe;IACf,eAAe;IACf,WAAW;IACX,YAAY;IACZ,aAAa;IACb,aAAa;IACb,cAAc;IACd,cAAc;IACd,aAAa;IACb,YAAY;IACZ,aAAa;IACb,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,kBAAkB;CACnB,CAAC,CAAC;AAEH,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAC;IACvC,YAAY;IACZ,eAAe;IACf,SAAS;IACT,YAAY;IACZ,OAAO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blyline-agents/higgsfield",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "exports": {
6
+ ".": {
7
+ "types": "./dist/index.d.ts",
8
+ "default": "./dist/index.js"
9
+ }
10
+ },
11
+ "dependencies": {
12
+ "@assemblyline-agents/core": "0.1.0"
13
+ },
14
+ "description": "Official OpenEve sandbox CLI connection and skills for Higgsfield creative media workflows.",
15
+ "files": [
16
+ "dist",
17
+ "skills"
18
+ ],
19
+ "engines": {
20
+ "node": ">=22.19.0"
21
+ },
22
+ "license": "MIT",
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/jasonbadeaux/openeve.git",
26
+ "directory": "packages/higgsfield"
27
+ },
28
+ "bugs": {
29
+ "url": "https://github.com/jasonbadeaux/openeve/issues"
30
+ },
31
+ "homepage": "https://github.com/jasonbadeaux/openeve#readme",
32
+ "author": "OpenEve contributors",
33
+ "keywords": [
34
+ "openeve",
35
+ "ai",
36
+ "agents",
37
+ "higgsfield",
38
+ "video",
39
+ "creative",
40
+ "media",
41
+ "plugin"
42
+ ],
43
+ "publishConfig": {
44
+ "access": "public"
45
+ },
46
+ "scripts": {
47
+ "build": "tsc -p tsconfig.json",
48
+ "check": "tsc -p tsconfig.json --noEmit"
49
+ }
50
+ }
@@ -0,0 +1,133 @@
1
+ ---
2
+ name: higgsfield-generate
3
+ description: Generate, analyze, transform, or reframe images, video, 3D assets, and audio with the official Higgsfield CLI. Use for image or video generation, image-to-video, existing-video analysis, Draw to Edit, vertical reframing, Marketing Studio ads, 3D creation, or generated audio. Do not use for local cutting or stitching when FFmpeg or Remotion is the better tool.
4
+ ---
5
+
6
+ # Higgsfield Generate
7
+
8
+ Use the reviewed `higgsfield__read` and `higgsfield__write` connection tools. They run the
9
+ official `higgsfield` CLI inside the same sandbox that owns `/files` and
10
+ `/workspace`.
11
+
12
+ Pass CLI arguments as an array without the executable:
13
+
14
+ ```json
15
+ {"args":["model","list"]}
16
+ ```
17
+
18
+ Assembly Line adds `--json --no-color`. Never include either flag yourself. Never use
19
+ Higgsfield auth commands; if the CLI reports an expired or missing session, ask
20
+ the user to run `higgsfield auth login` interactively in their persistent
21
+ sandbox.
22
+
23
+ ## Operating rules
24
+
25
+ 1. Use `higgsfield__read` for discovery, account status, cost, job history, and
26
+ polling.
27
+ 2. Use `higgsfield__write` for uploads, generation, workflows, and training.
28
+ These calls require approval because they create remote state or
29
+ consume credits.
30
+ 3. Pass `/files/...` or `/workspace/...` media paths directly. The CLI
31
+ auto-uploads supported local files; do not pre-upload unless a later step
32
+ needs a reusable upload ID.
33
+ 4. Prefer `--wait` for generation so one call returns the completed job. Use
34
+ `--wait-timeout 20m` when a longer job needs it.
35
+ 5. Return result URLs and a concise summary. Do not dump raw job IDs or large
36
+ JSON unless the user asks.
37
+ 6. Do not silently replace video understanding with random or sparse frame
38
+ sampling. Use Virality Predictor for supported creative analysis, or state
39
+ the limitation.
40
+
41
+ ## Discover before generating
42
+
43
+ Start with the full catalog when the exact model or feature is uncertain:
44
+
45
+ ```json
46
+ {"args":["model","list"]}
47
+ ```
48
+
49
+ Then inspect the chosen model:
50
+
51
+ ```json
52
+ {"args":["model","get","seedance_2_0"]}
53
+ ```
54
+
55
+ Workflows are separate:
56
+
57
+ ```json
58
+ {"args":["workflow","list"]}
59
+ {"args":["workflow","get","reframe"]}
60
+ ```
61
+
62
+ Do not conclude that a feature is unavailable from a filtered or semantic
63
+ search alone. Check the unfiltered model or workflow list.
64
+
65
+ ## Current quality defaults
66
+
67
+ - General images, graphic design, typography, and on-image text: GPT Image 2.
68
+ - Serious video, multi-shot motion, image-to-video, and video references:
69
+ Seedance 2.0.
70
+ - Character, cartoon, stylized, or reference-driven images: Nano Banana 2;
71
+ Lite for speed, Pro for harder briefs.
72
+ - Ads, UGC, product demos, unboxing, presenters, and brand workflows:
73
+ Marketing Studio.
74
+ - Text-to-audio, sound effects, ambience, foley, and music-like audio:
75
+ Seed Audio 1.0.
76
+
77
+ Resolve the current CLI ID with `model list`; model availability changes.
78
+
79
+ ## Generation
80
+
81
+ Examples below are `args` for `higgsfield__write`:
82
+
83
+ ```json
84
+ {"args":["generate","create","gpt_image_2","--prompt","neon city at dusk","--aspect_ratio","16:9","--resolution","2k","--wait"]}
85
+ ```
86
+
87
+ ```json
88
+ {"args":["generate","create","seedance_2_0","--prompt","camera dollies in","--start-image","/files/first.png","--duration","12","--resolution","4k","--wait"]}
89
+ ```
90
+
91
+ ```json
92
+ {"args":["generate","create","seed_audio","--prompt","cinematic rain ambience with distant thunder","--wait"]}
93
+ ```
94
+
95
+ For a prior job, use `higgsfield__read`:
96
+
97
+ ```json
98
+ {"args":["generate","get","<job_id>"]}
99
+ {"args":["generate","wait","<job_id>"]}
100
+ ```
101
+
102
+ ## Existing video
103
+
104
+ Read [references/workflows.md](references/workflows.md) before editing or
105
+ reframing an existing video. Read
106
+ [references/media-inputs.md](references/media-inputs.md) before passing video,
107
+ image, or audio references.
108
+
109
+ Higgsfield currently provides:
110
+
111
+ - `draw_to_video` for editing a source video from an edited/sketched frame at a
112
+ timestamp.
113
+ - `reframe` for converting a source video to a new aspect ratio.
114
+ - `brain_activity`, customer-facing name Virality Predictor, for finished-video
115
+ hook, attention, retention, and virality analysis.
116
+
117
+ Higgsfield is not a general timeline editor. Use sandbox FFmpeg or Remotion for
118
+ precise cuts, concatenation, audio replacement, captions, or deterministic
119
+ stitching; use Higgsfield for generative transformations and supported
120
+ server-side assembly.
121
+
122
+ ## Errors
123
+
124
+ - `Session expired` or `Not authenticated`: ask the user to authenticate the
125
+ same persistent, user-scoped sandbox.
126
+ - `Missing required params`: ask only for the missing user input.
127
+ - `Unknown params`: inspect the live model or workflow schema.
128
+ - Timeout: rejoin the existing job with `generate wait`; do not submit a
129
+ duplicate.
130
+
131
+ Source contract: Higgsfield's official CLI and skills documentation at
132
+ https://github.com/higgsfield-ai/cli and
133
+ https://github.com/higgsfield-ai/skills.
@@ -0,0 +1,34 @@
1
+ # Higgsfield Media Inputs
2
+
3
+ Pass local sandbox paths or existing Higgsfield UUIDs directly. The CLI
4
+ auto-uploads local paths and detects upload IDs versus completed job IDs.
5
+
6
+ Supported local extensions include:
7
+
8
+ - Images: PNG, JPEG, WebP, GIF
9
+ - Video: MP4, MOV, WebM
10
+ - Audio: MP3, WAV, M4A, OGG
11
+
12
+ Common flags:
13
+
14
+ - `--image`: image reference
15
+ - `--start-image`: first-frame reference
16
+ - `--end-image`: last-frame reference
17
+ - `--video`: video reference or analyzed video
18
+ - `--audio`: audio reference
19
+ - `--image-references`, `--video-references`, `--audio-references`: repeated
20
+ reference-array inputs when exposed by the model schema
21
+
22
+ Inspect `model get <model_id>` before assuming a media role. Important current
23
+ contracts:
24
+
25
+ - `seedance_2_0` accepts image, start image, end image, video, and audio.
26
+ - `brain_activity` accepts exactly one video and returns a text analysis report.
27
+ - `grok_video_v15` requires one start image.
28
+ - `gemini_omni` accepts up to seven image references or one video reference,
29
+ with lower image limits when video is also present.
30
+ - `multi_image_to_3d` accepts one to four images.
31
+ - `seed_audio` may use audio or image references, but not both together.
32
+
33
+ Do not pass `--generate-audio` to Seedance 2.0. Use `--audio` for its reference
34
+ audio.
@@ -0,0 +1,41 @@
1
+ # Higgsfield Video Workflows
2
+
3
+ Inspect the live workflow before submission:
4
+
5
+ ```json
6
+ {"args":["workflow","get","draw_to_video"]}
7
+ {"args":["workflow","get","reframe"]}
8
+ ```
9
+
10
+ ## Draw to Video
11
+
12
+ Use when the user supplies a source video, an edited or sketched frame, its
13
+ timestamp, and an edit instruction:
14
+
15
+ ```json
16
+ {"args":["generate","workflow","draw_to_video","--video","/files/source.mp4","--sketch","/files/frame.png","--timestamp","3.2","--prompt","make the jacket red","--wait"]}
17
+ ```
18
+
19
+ `--image` is an alias for `--sketch`.
20
+
21
+ ## Reframe
22
+
23
+ Use for aspect-ratio conversion:
24
+
25
+ ```json
26
+ {"args":["generate","workflow","reframe","--video","/files/source.mp4","--aspect-ratio","9:16","--resolution","720p","--wait"]}
27
+ ```
28
+
29
+ Optional parameters include `--mode std|pro`, `--start-image`, image references
30
+ for Pro mode, and `--folder-id`.
31
+
32
+ ## Cost and results
33
+
34
+ Cost uses `generate cost workflow`:
35
+
36
+ ```json
37
+ {"args":["generate","cost","workflow","reframe","--duration","7.1","--resolution","1080p"]}
38
+ ```
39
+
40
+ Workflow jobs are normal generation jobs. Retrieve them with `generate get` or
41
+ `generate wait`, not `workflow get`.
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: higgsfield-product-photoshoot
3
+ description: Generate brand-quality Higgsfield product photography through the official product-photoshoot prompt enhancer. Use for studio shots, lifestyle scenes, hero banners, Pinterest pins, social carousels, ad creative packs, virtual try-on, conceptual product visuals, or restyling an existing product image.
4
+ ---
5
+
6
+ # Higgsfield Product Photoshoot
7
+
8
+ Use the approval-gated `higgsfield__write` connection tool with
9
+ `product-photoshoot create`. Do not bypass the backend prompt enhancer with a
10
+ generic GPT Image command.
11
+
12
+ Choose the most specific mode:
13
+
14
+ - `product_shot`: neutral, studio, catalog, or storefront image
15
+ - `lifestyle_scene`: product in a real environment
16
+ - `closeup_product_with_person`: hands, partial face, or demonstration
17
+ - `moodboard_pin`: vertical Pinterest-native visual
18
+ - `hero_banner`: wide website or campaign header
19
+ - `social_carousel`: connected multi-slide set
20
+ - `ad_creative_pack`: coordinated paid-social variants
21
+ - `virtual_model_tryout`: product worn or used by a generated model
22
+ - `conceptual_product`: surreal, floating, splash, or CGI-style visual
23
+ - `restyle`: change an existing image's mood or season while preserving subject
24
+
25
+ Ask only for unresolved essentials: product/reference image, use case or mode,
26
+ count, and desired mood. Pass `/files/...` paths directly:
27
+
28
+ ```json
29
+ {"args":["product-photoshoot","create","--mode","lifestyle_scene","--prompt","cold-brew bottle on a sunlit kitchen counter for Instagram","--image","/files/bottle.jpg","--count","3"]}
30
+ ```
31
+
32
+ Use `--count 1..10` for variants. Let the backend choose aspect ratio unless
33
+ the user explicitly requests one; supported overrides are `1:1`, `4:5`,
34
+ `5:4`, `3:4`, `4:3`, `2:3`, `3:2`, `9:16`, and `16:9`.
35
+
36
+ Return the image URLs as a short list. Do not expose the enhanced prompt, raw
37
+ job JSON, or internal model IDs.
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: higgsfield-soul-id
3
+ description: Train and reuse a Higgsfield Soul Character from a person's photos for identity-consistent image or cinematic generation. Use when the user asks to train their face, create a digital twin, build a reusable personal avatar, or preserve identity across generated media.
4
+ ---
5
+
6
+ # Higgsfield Soul Character
7
+
8
+ Use `higgsfield__read` for account and Soul lookup. Use the approval-gated
9
+ `higgsfield__write` connection tool for training.
10
+
11
+ Before submission:
12
+
13
+ 1. Check account status; Soul training requires a paid Higgsfield plan.
14
+ 2. Collect a name and 5–20 well-lit face photos with varied angles.
15
+ 3. Choose `--soul-2` for image generation or `--soul-cinematic` for cinematic
16
+ use. Default to `--soul-2`.
17
+
18
+ Pass `/files/...` paths directly; the CLI auto-uploads them:
19
+
20
+ ```json
21
+ {"args":["soul-id","create","--name","Alice","--soul-2","--image","/files/alice-1.jpg","--image","/files/alice-2.jpg","--image","/files/alice-3.jpg","--image","/files/alice-4.jpg","--image","/files/alice-5.jpg"]}
22
+ ```
23
+
24
+ Wait without duplicating the training job:
25
+
26
+ ```json
27
+ {"args":["soul-id","wait","<soul_id>"]}
28
+ ```
29
+
30
+ Use the resulting reference in generation:
31
+
32
+ ```json
33
+ {"args":["generate","create","text2image_soul_v2","--prompt","cinematic portrait at dusk","--soul-id","<reference_id>","--quality","2k","--wait"]}
34
+ ```
35
+
36
+ Do not expose raw IDs in normal chat unless needed. Respect likeness consent;
37
+ never infer permission to train or reuse another person's identity.