@sogni-ai/sogni-creative-agent-skill 3.11.1 → 3.12.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [3.12.0](https://github.com/Sogni-AI/sogni-creative-agent-skill/compare/v3.11.1...v3.12.0) (2026-07-05)
2
+
3
+
4
+ ### Features
5
+
6
+ * **unlimited:** surface plan entitlement and billing mode across the CLI ([373490f](https://github.com/Sogni-AI/sogni-creative-agent-skill/commit/373490fc30da1edea84d7928691ab419b44f5bcf))
7
+
1
8
  ## [3.11.1](https://github.com/Sogni-AI/sogni-creative-agent-skill/compare/v3.11.0...v3.11.1) (2026-07-05)
2
9
 
3
10
 
package/README.md CHANGED
@@ -51,6 +51,8 @@ With this skill, an agent can:
51
51
  - [Manual install from source](#manual-install-from-source)
52
52
  - [Verify your install](#verify-your-install)
53
53
  - [Upgrading safely from inside an agent](#upgrading-safely-from-inside-an-agent)
54
+ - [Claude Desktop](#claude-desktop)
55
+ - [Also works in OpenAI Codex](#also-works-in-openai-codex)
54
56
  - [Setup (Sogni API key)](#setup-sogni-api-key)
55
57
  - [Usage](#usage)
56
58
  - [CLI Reference](#cli-reference)
@@ -283,6 +285,24 @@ Don't use both — you'd get duplicate Sogni tools. The extension wraps the same
283
285
 
284
286
  Video/audio editing features need ffmpeg on your machine; the `npx` installer offers to install it for you.
285
287
 
288
+ ### Also works in OpenAI Codex
289
+
290
+ The same local MCP server runs in OpenAI Codex — the Codex CLI and IDE extension read MCP servers from `~/.codex/config.toml`. With the CLI installed globally (`npm i -g @sogni-ai/sogni-creative-agent-skill`), register it and start a new Codex session:
291
+
292
+ ```bash
293
+ codex mcp add sogni-creative-agent -- node "$(npm root -g)/@sogni-ai/sogni-creative-agent-skill/desktop-extension/server/index.mjs"
294
+ ```
295
+
296
+ Or write the `~/.codex/config.toml` entry yourself (use the absolute path from `npm root -g`):
297
+
298
+ ```toml
299
+ [mcp_servers.sogni-creative-agent]
300
+ command = "node"
301
+ args = ["/opt/homebrew/lib/node_modules/@sogni-ai/sogni-creative-agent-skill/desktop-extension/server/index.mjs"]
302
+ ```
303
+
304
+ Codex also runs the Skill natively (see [OpenAI Codex CLI](#openai-codex-cli)) — pick one integration per machine; running both gives Codex duplicate Sogni tools. The server finds your globally installed `sogni-agent`, ffmpeg, and saved credentials on its own, so no `env` block is needed.
305
+
286
306
  ---
287
307
 
288
308
  ## Setup (Sogni API key)
@@ -564,7 +584,7 @@ Uses SDXL Turbo (`coreml-sogniXLturbo_alpha1_ad`) at 1024×1024 by default. The
564
584
 
565
585
  Multi-angle mode (`--multi-angle` / `--angles-360`) auto-builds the `<sks>` prompt and applies the `multiple_angles` LoRA. `--angles-360-video` generates i2v clips between consecutive angles (including last → first) and concatenates them with `ffmpeg` into a seamless loop.
566
586
 
567
- `--balance` / `--balances` does not require a prompt and prints current `SPARK` and `SOGNI` balances before exiting.
587
+ `--balance` / `--balances` does not require a prompt and prints the account username, subscription plan (`Plan: Sogni Unlimited (active)` / `Plan: none`), and current `SPARK` and `SOGNI` balances before exiting. In `--json` mode the payload carries `username` and `subscription` fields (`null` when unavailable). `--doctor` likewise reports the authenticated user and an explicit `plan` check, so a wrong-account API key or a missing subscription is visible at a glance.
568
588
 
569
589
  ---
570
590
 
@@ -704,7 +724,9 @@ App Store and Google Play prices may differ from web pricing due to platform fee
704
724
  - **Not covered (Premium Spark only):** external-vendor models — **GPT Image 2** (`gpt-image-2`), **Seedance 2.0 / Seedance 2.0 Mini / Seedance 2.0 Fast** (`seedance-2-0`, `seedance-2-0-mini`, `seedance-2-0-fast`), and **HappyHorse 1.1** (`happyhorse-1.1-t2v`, `happyhorse-1.1-i2v`, `happyhorse-1.1-r2v`). These always require Premium Spark eligibility even with an active subscription; they never bill to the subscription and never fall back to SOGNI.
705
725
  - **Token choice stays yours:** selecting SOGNI (`--token-type sogni`) opts a job out of subscription coverage and spends SOGNI instead. Coverage applies when the active token is Spark.
706
726
 
707
- The CLI never sends `billingMode`/coverage hints itself; the server decides coverage from the account's verified entitlement and the resolved model. A subscription claim is never honored without a server-verified entitlement.
727
+ By default the CLI sends no `billingMode`/coverage hint; the server decides coverage from the account's verified entitlement and the resolved model, and a subscription claim is never honored without a server-verified entitlement. `--billing-mode` makes the choice explicit when you need it: `subscription` requires Unlimited coverage (the job fails instead of spending tokens), `tokens` opts out of coverage and bills Spark/SOGNI, and `auto` states the default server behavior explicitly.
728
+
729
+ With an active subscription, the CLI also skips its client-side "insufficient SPARK" pre-flight for covered video renders — a low token balance no longer blocks jobs the plan pays for. Vendor models and `--billing-mode tokens` keep the pre-flight, and the server remains authoritative either way.
708
730
 
709
731
  ### Free-trial usage limits
710
732
 
package/SKILL.md CHANGED
@@ -2,7 +2,7 @@
2
2
  name: sogni-creative-agent-skill
3
3
  description: "Sogni Creative Agent Skill: agent skill and CLI for image, video, and music generation using Sogni AI's decentralized GPU network. Supports personas (named people with saved reference photos and voice clips), persistent memories, custom personality, style transfer, angle synthesis, Seedance/HappyHorse/LTX/WAN video, music/lyrics, hosted chat, durable workflows, replay records, and multi-step creative workflows. Ask the agent to \"draw\", \"generate\", \"create an image\", \"make a video/animate\", \"make music\", \"apply a style\", or \"generate me as a superhero\"."
4
4
  metadata:
5
- version: "3.11.0"
5
+ version: "3.11.1"
6
6
  homepage: https://sogni.ai
7
7
  openclaw:
8
8
  emoji: "🎨"
@@ -191,6 +191,7 @@ sogni-agent doctor --json
191
191
  | `--photobooth` | Face transfer mode (with `--ref`) | - |
192
192
  | `--persona <name>` | Use a saved persona (photo + voice auto-attach) | - |
193
193
  | `--token-type spark\|sogni\|auto` | `auto` retries native models with SOGNI when SPARK is low | spark |
194
+ | `--billing-mode auto\|subscription\|tokens` | `subscription` requires Sogni Unlimited coverage; `tokens` opts out of it | server decides |
194
195
  | `--last`, `--last-image` | Inspect last render / reuse it as context or ref | - |
195
196
  | `--json` | Machine-parseable stdout (progress goes to stderr) | false |
196
197
  | `-q, --quiet` | Suppress progress output | false |
@@ -296,7 +297,7 @@ Failure (single JSON object on stdout, exit code 1; progress/warnings on stderr)
296
297
  }
297
298
  ```
298
299
 
299
- `--json --balance` → `{ "success": true, "type": "balance", "spark": 12.34, "sogni": 0.56 }`. `--last --json` wraps the last render record in a `{ "success": true, ... }` envelope and exits 1 with `errorCode: "NO_LAST_RENDER"` when nothing has been rendered. In `--json` mode stdout always carries exactly one JSON object — SSE workflow frames and progress lines go to stderr.
300
+ `--json --balance` → `{ "success": true, "type": "balance", "spark": 12.34, "sogni": 0.56, "username": "name", "subscription": { "active": true, "status": "active", "tier": "unlimited" } }` (`username`/`subscription` are `null` when unavailable; an active subscription means eligible renders are covered by Sogni Unlimited even when `spark` is low). `--last --json` wraps the last render record in a `{ "success": true, ... }` envelope and exits 1 with `errorCode: "NO_LAST_RENDER"` when nothing has been rendered. In `--json` mode stdout always carries exactly one JSON object — SSE workflow frames and progress lines go to stderr.
300
301
 
301
302
  ## Cost
302
303
 
@@ -31,6 +31,9 @@ The text block always keeps the full-resolution URL / saved path. Set
31
31
  pointing at this server inside the global npm package (preferred).
32
32
  2. The packed `.mcpb` is the manual drag-and-drop alternative
33
33
  (Claude Desktop → Settings → Extensions).
34
+ 3. OpenAI Codex uses the same server:
35
+ `codex mcp add sogni-creative-agent -- node <abs path to server/index.mjs>`
36
+ (the Codex CLI and IDE extension read `~/.codex/config.toml`).
34
37
 
35
38
  The server needs the CLI installed globally (`npm i -g @sogni-ai/sogni-creative-agent-skill`);
36
39
  when missing, every tool returns a hint to run `npx setup-sogni-agent-skill`.
@@ -2,7 +2,7 @@
2
2
  "manifest_version": "0.3",
3
3
  "name": "sogni-creative-agent",
4
4
  "display_name": "Sogni Creative Agent",
5
- "version": "3.11.0",
5
+ "version": "3.11.1",
6
6
  "description": "Generate images, video, and music on Sogni AI's decentralized GPU network — with personas, memories, and safe video editing tools.",
7
7
  "author": { "name": "Sogni AI", "url": "https://sogni.ai" },
8
8
  "homepage": "https://sogni.ai",
@@ -2,7 +2,7 @@
2
2
  "id": "sogni-creative-agent-skill",
3
3
  "name": "Sogni Creative Agent Skill — Image, Video & Music Generation",
4
4
  "description": "Agent skill and CLI for Sogni AI image, video, and music generation.",
5
- "version": "3.11.0",
5
+ "version": "3.11.1",
6
6
  "skills": [
7
7
  "."
8
8
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sogni-ai/sogni-creative-agent-skill",
3
- "version": "3.11.1",
3
+ "version": "3.12.0",
4
4
  "description": "Sogni Creative Agent Skill: agent skill and CLI for Sogni AI image, video, and music generation.",
5
5
  "type": "module",
6
6
  "main": "sogni-agent.mjs",
@@ -76,7 +76,7 @@
76
76
  "sogni-agent.mjs"
77
77
  ],
78
78
  "dependencies": {
79
- "@sogni-ai/sogni-intelligence-client": "3.5.1",
79
+ "@sogni-ai/sogni-intelligence-client": "3.7.0",
80
80
  "execa": "^9.6.1",
81
81
  "json5": "^2.2.3",
82
82
  "sharp": "^0.34.5"
@@ -3,7 +3,7 @@
3
3
  "private": true,
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "@sogni-ai/sogni-intelligence-client": "3.5.1",
6
+ "@sogni-ai/sogni-intelligence-client": "3.7.0",
7
7
  "execa": "^9.6.1",
8
8
  "json5": "^2.2.3",
9
9
  "sharp": "^0.34.5"
package/sogni-agent.mjs CHANGED
@@ -1271,6 +1271,41 @@ function requiresSparkOnlyToken(modelId) {
1271
1271
  return isGptImage2ModelSelection(modelId) || isSeedanceModel(modelId) || isHappyHorseModel(modelId);
1272
1272
  }
1273
1273
 
1274
+ // Attach the user's explicit --billing-mode to a project config. Omitted by
1275
+ // default so the server keeps deciding coverage (Unlimited members get 'auto'
1276
+ // coverage server-side; token payers are unaffected).
1277
+ function withBillingMode(config) {
1278
+ if (!options.billingMode) return config;
1279
+ return { ...config, billingMode: options.billingMode };
1280
+ }
1281
+
1282
+ // Best-effort Sogni Unlimited entitlement lookup. Returns null (never throws)
1283
+ // when the wrapper predates getSubscriptionStatus() or the request fails, so
1284
+ // callers degrade to balance-only behavior.
1285
+ async function fetchSubscriptionSnapshot(client, log) {
1286
+ if (typeof client?.getSubscriptionStatus !== 'function') return null;
1287
+ try {
1288
+ return await client.getSubscriptionStatus();
1289
+ } catch (err) {
1290
+ if (!options.quiet && typeof log === 'function') {
1291
+ log(`Warning: could not fetch subscription status (${err?.message || 'error'})`);
1292
+ }
1293
+ return null;
1294
+ }
1295
+ }
1296
+
1297
+ const SUBSCRIPTION_TIER_LABELS = {
1298
+ unlimited: 'Sogni Unlimited',
1299
+ unlimited_pro: 'Sogni Unlimited Pro',
1300
+ };
1301
+
1302
+ function describeSubscription(subscription) {
1303
+ if (!subscription || subscription.active !== true) return 'none';
1304
+ const tierKey = String(subscription.tier || '').toLowerCase();
1305
+ const label = SUBSCRIPTION_TIER_LABELS[tierKey] || subscription.tier || 'subscription';
1306
+ return `${label} (${subscription.status || 'active'})`;
1307
+ }
1308
+
1274
1309
  // HappyHorse 1.1 ships three discrete vendor models (no mini/fast). The shared
1275
1310
  // intel client only resolves the fully-qualified ids; accept the bare
1276
1311
  // `happyhorse` / `happyhorse-1.1` selector here so `-m happyhorse` works the way
@@ -1757,6 +1792,7 @@ const options = {
1757
1792
  strictSize: false,
1758
1793
  quality: null, // Quality tier: fast|hq|pro — auto-selects model, steps, dimensions
1759
1794
  tokenType: null,
1795
+ billingMode: null, // auto|subscription|tokens — omitted by default so the server decides coverage
1760
1796
  steps: null,
1761
1797
  guidance: null,
1762
1798
  outputFormat: null,
@@ -2039,6 +2075,11 @@ for (let i = 0; i < args.length; i++) {
2039
2075
  i++;
2040
2076
  options.tokenType = raw;
2041
2077
  cliSet.tokenType = true;
2078
+ } else if (arg === '--billing-mode') {
2079
+ const raw = requireFlagValue(args, i, arg);
2080
+ i++;
2081
+ options.billingMode = raw;
2082
+ cliSet.billingMode = true;
2042
2083
  } else if (arg === '--steps') {
2043
2084
  const raw = requireFlagValue(args, i, arg);
2044
2085
  i++;
@@ -2906,8 +2947,10 @@ General:
2906
2947
  --steps <num> Override steps (model-dependent)
2907
2948
  --guidance <num> Override guidance (model-dependent)
2908
2949
  --token-type <type> Token type: spark|sogni|auto (default: spark, auto retries with alternate)
2909
- --balance, --balances Show SPARK/SOGNI balances and exit
2910
- --doctor Health check: Node, credentials, ffmpeg, auth, config, version
2950
+ --billing-mode <mode> Billing: auto|subscription|tokens (default: server decides; "subscription"
2951
+ requires Sogni Unlimited coverage, "tokens" opts out of it)
2952
+ --balance, --balances Show account, plan, and SPARK/SOGNI balances and exit
2953
+ --doctor Health check: Node, credentials, ffmpeg, auth, plan, config, version
2911
2954
  --snooze-update Snooze the pending update reminder (1 day → 2 days → 1 week)
2912
2955
  --whats-new [version] Show bundled CHANGELOG entries (everything after <version> if given)
2913
2956
  --version, -V Show sogni-agent version and exit
@@ -3161,6 +3204,17 @@ if (options.tokenType) {
3161
3204
  options.tokenType = token;
3162
3205
  }
3163
3206
 
3207
+ if (options.billingMode) {
3208
+ const mode = String(options.billingMode).toLowerCase();
3209
+ if (mode !== 'auto' && mode !== 'subscription' && mode !== 'tokens') {
3210
+ fatalCliError('--billing-mode must be "auto", "subscription", or "tokens".', {
3211
+ code: 'INVALID_ARGUMENT',
3212
+ details: { flag: '--billing-mode', value: options.billingMode }
3213
+ });
3214
+ }
3215
+ options.billingMode = mode;
3216
+ }
3217
+
3164
3218
  if (options.apiTaskProfile) {
3165
3219
  const profile = String(options.apiTaskProfile).trim().toLowerCase();
3166
3220
  if (!VALID_API_TASK_PROFILES.has(profile)) {
@@ -7541,7 +7595,7 @@ async function runImageEditProjectWithEvents(client, editConfig, expectedCount,
7541
7595
  client.on(ClientEvent.JOB_FAILED, onFailed);
7542
7596
 
7543
7597
  try {
7544
- const projectResult = await client.createImageEditProject(editConfig);
7598
+ const projectResult = await client.createImageEditProject(withBillingMode(editConfig));
7545
7599
  projectId = projectResult?.project?.id || projectId;
7546
7600
 
7547
7601
  // Check for errors in the response (e.g., insufficient tokens)
@@ -7842,7 +7896,7 @@ async function runMultiAngleFlow(client, log) {
7842
7896
  if (options.autoResizeVideoAssets !== null) {
7843
7897
  clipConfig.autoResizeVideoAssets = options.autoResizeVideoAssets;
7844
7898
  }
7845
- const clipResult = await client.createVideoProject(clipConfig);
7899
+ const clipResult = await client.createVideoProject(withBillingMode(clipConfig));
7846
7900
 
7847
7901
  // Check for errors in the response (e.g., insufficient tokens)
7848
7902
  if (clipResult?.error || clipResult?.message) {
@@ -7929,6 +7983,15 @@ function buildVideoEstimateParams({ tokenType, steps }) {
7929
7983
 
7930
7984
  async function ensureSufficientVideoBalance(client, log) {
7931
7985
  if (!options.video || options.estimateVideoCost) return;
7986
+ // Sogni Unlimited bills covered video jobs to the subscription, so a low
7987
+ // token balance must not block them client-side. Vendor models
7988
+ // (Seedance/HappyHorse) always bill Premium Spark and keep the check, as
7989
+ // does an explicit --billing-mode tokens opt-out. The server stays
7990
+ // authoritative: an uncovered job still fails there with enriched guidance.
7991
+ if (options.billingMode !== 'tokens' && !requiresSparkOnlyToken(options.model)) {
7992
+ const subscription = await fetchSubscriptionSnapshot(client, log);
7993
+ if (subscription?.active === true) return;
7994
+ }
7932
7995
  const tokenType = options.tokenType || 'spark';
7933
7996
  const tokenLabel = tokenType.toUpperCase();
7934
7997
  let balance;
@@ -8062,9 +8125,19 @@ async function runDoctor() {
8062
8125
  });
8063
8126
  const authFlow = (async () => {
8064
8127
  await connectSogniClient(doctorClient);
8065
- return doctorClient.getBalance();
8128
+ const balance = await doctorClient.getBalance();
8129
+ // Identity + entitlement are best-effort: an old wrapper or a flaky
8130
+ // subscription endpoint must not fail the auth check itself.
8131
+ let accountInfo = null;
8132
+ if (typeof doctorClient.getAccountInfo === 'function') {
8133
+ try {
8134
+ accountInfo = await doctorClient.getAccountInfo();
8135
+ } catch { /* ignore */ }
8136
+ }
8137
+ const subscription = await fetchSubscriptionSnapshot(doctorClient, null);
8138
+ return { balance, accountInfo, subscription };
8066
8139
  })();
8067
- const balance = await Promise.race([
8140
+ const { balance, accountInfo, subscription } = await Promise.race([
8068
8141
  authFlow,
8069
8142
  new Promise((_, reject) => setTimeout(
8070
8143
  () => reject(Object.assign(new Error('timed out'), { code: 'DOCTOR_TIMEOUT' })),
@@ -8073,8 +8146,18 @@ async function runDoctor() {
8073
8146
  ]);
8074
8147
  const spark = Number.parseFloat(balance?.spark);
8075
8148
  const sogni = Number.parseFloat(balance?.sogni);
8149
+ const identity = accountInfo?.username ? `user ${accountInfo.username}, ` : '';
8076
8150
  add('auth', 'pass',
8077
- `API key accepted (SPARK ${Number.isFinite(spark) ? spark : '?'}, SOGNI ${Number.isFinite(sogni) ? sogni : '?'})`);
8151
+ `API key accepted (${identity}SPARK ${Number.isFinite(spark) ? spark : '?'}, SOGNI ${Number.isFinite(sogni) ? sogni : '?'})`);
8152
+ if (subscription) {
8153
+ if (subscription.active === true) {
8154
+ add('plan', 'pass', describeSubscription(subscription));
8155
+ } else if (Number.isFinite(spark) && spark <= 0 && Number.isFinite(sogni) && sogni <= 0) {
8156
+ add('plan', 'warn', 'no subscription and no token balance — renders will fail until you buy Spark Packs or subscribe');
8157
+ } else {
8158
+ add('plan', 'pass', 'none — renders bill Spark/SOGNI from this account\'s balance');
8159
+ }
8160
+ }
8078
8161
  } catch (err) {
8079
8162
  if (isInvalidApiKeyError(err)) {
8080
8163
  add('auth', 'fail', 'API key rejected — get a fresh key at https://dashboard.sogni.ai (account menu)');
@@ -8528,6 +8611,15 @@ async function main() {
8528
8611
  const balance = await client.getBalance();
8529
8612
  const spark = Number.parseFloat(balance?.spark);
8530
8613
  const sogni = Number.parseFloat(balance?.sogni);
8614
+ // Identity + plan make wrong-account and no-subscription states visible
8615
+ // (a low Spark balance is fine when Unlimited covers the renders).
8616
+ const subscription = await fetchSubscriptionSnapshot(client, log);
8617
+ let accountInfo = null;
8618
+ if (typeof client.getAccountInfo === 'function') {
8619
+ try {
8620
+ accountInfo = await client.getAccountInfo();
8621
+ } catch { /* identity display is best-effort */ }
8622
+ }
8531
8623
  if (options.json) {
8532
8624
  console.log(JSON.stringify({
8533
8625
  success: true,
@@ -8535,9 +8627,23 @@ async function main() {
8535
8627
  spark: Number.isFinite(spark) ? spark : null,
8536
8628
  sogni: Number.isFinite(sogni) ? sogni : null,
8537
8629
  tokenType: options.tokenType || 'spark',
8630
+ username: accountInfo?.username ?? null,
8631
+ subscription: subscription
8632
+ ? {
8633
+ active: subscription.active === true,
8634
+ status: subscription.status ?? null,
8635
+ tier: subscription.tier ?? null
8636
+ }
8637
+ : null,
8538
8638
  timestamp: new Date().toISOString()
8539
8639
  }));
8540
8640
  } else {
8641
+ if (accountInfo?.username) {
8642
+ console.log(`Account: ${accountInfo.username}`);
8643
+ }
8644
+ if (subscription) {
8645
+ console.log(`Plan: ${describeSubscription(subscription)}`);
8646
+ }
8541
8647
  console.log(`SPARK: ${formatTokenValue(spark)}`);
8542
8648
  console.log(`SOGNI: ${formatTokenValue(sogni)}`);
8543
8649
  }
@@ -9029,7 +9135,7 @@ async function main() {
9029
9135
  projectConfig.lastFrameStrength = options.lastFrameStrength;
9030
9136
  }
9031
9137
 
9032
- const videoResult = await client.createVideoProject(projectConfig);
9138
+ const videoResult = await client.createVideoProject(withBillingMode(projectConfig));
9033
9139
 
9034
9140
  // Check for errors in the response (e.g., insufficient tokens)
9035
9141
  if (videoResult?.error || videoResult?.message) {
@@ -9091,7 +9197,7 @@ async function main() {
9091
9197
  projectConfig.seed = options.seed;
9092
9198
  }
9093
9199
 
9094
- const audioResult = await client.createAudioProject(projectConfig);
9200
+ const audioResult = await client.createAudioProject(withBillingMode(projectConfig));
9095
9201
 
9096
9202
  if (audioResult?.error || audioResult?.message) {
9097
9203
  throw buildProjectResultError(audioResult);
@@ -9154,8 +9260,8 @@ async function main() {
9154
9260
  }
9155
9261
 
9156
9262
  const editResult = isGptImage2ModelSelection(options.model)
9157
- ? await client.createImageProject(editConfig)
9158
- : await client.createImageEditProject(editConfig);
9263
+ ? await client.createImageProject(withBillingMode(editConfig))
9264
+ : await client.createImageEditProject(withBillingMode(editConfig));
9159
9265
  if (editResult?.error || editResult?.message) {
9160
9266
  throw buildProjectResultError(editResult);
9161
9267
  }
@@ -9200,7 +9306,7 @@ async function main() {
9200
9306
  if (options.loras.length > 0) projectConfig.loras = options.loras;
9201
9307
  if (options.loraStrengths.length > 0) projectConfig.loraStrengths = options.loraStrengths;
9202
9308
 
9203
- const projectResult = await client.createImageProject(projectConfig);
9309
+ const projectResult = await client.createImageProject(withBillingMode(projectConfig));
9204
9310
 
9205
9311
  // Check for errors in the response (e.g., insufficient tokens)
9206
9312
  if (projectResult?.error || projectResult?.message) {
@@ -9269,7 +9375,7 @@ async function main() {
9269
9375
  projectConfig.seed = options.seed;
9270
9376
  }
9271
9377
 
9272
- const imageResult = await client.createImageProject(projectConfig);
9378
+ const imageResult = await client.createImageProject(withBillingMode(projectConfig));
9273
9379
  if (imageResult?.error || imageResult?.message) {
9274
9380
  throw buildProjectResultError(imageResult);
9275
9381
  }
@@ -9488,7 +9594,7 @@ async function main() {
9488
9594
  });
9489
9595
  });
9490
9596
 
9491
- const clip2Result = await client2.createVideoProject(projectConfig2);
9597
+ const clip2Result = await client2.createVideoProject(withBillingMode(projectConfig2));
9492
9598
 
9493
9599
  // Check for errors in the response (e.g., insufficient tokens)
9494
9600
  if (clip2Result?.error || clip2Result?.message) {
package/version.mjs CHANGED
@@ -1 +1 @@
1
- export const PACKAGE_VERSION = '3.11.0';
1
+ export const PACKAGE_VERSION = '3.11.1';