luxin-cli 0.2.2 → 0.2.4

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/cli.md CHANGED
@@ -196,8 +196,8 @@ luxin claim code --json
196
196
  "agent_id": "agt_...",
197
197
  "code": "dc_...",
198
198
  "dashboard_url": "https://luxin.sh/dashboard#code=dc_...",
199
- "expires_at": "2026-07-30T18:15:00.000Z",
200
- "ttl_seconds": 900,
199
+ "expires_at": "2026-07-30T19:00:00.000Z",
200
+ "ttl_seconds": 3600,
201
201
  "single_use": true,
202
202
  "human_handoff": {
203
203
  "purpose": "hand_dashboard_link_to_human",
@@ -217,7 +217,7 @@ the code is the whole credential. The code travels in the URL fragment
217
217
  logs and analytics — keep it that way by sharing the link intact rather than
218
218
  rebuilding it as a query string.
219
219
 
220
- The code is single-use and expires (`data.ttl_seconds`, currently 15 minutes).
220
+ The code is single-use and expires (`data.ttl_seconds`, currently 60 minutes).
221
221
  The dashboard is read-only over your work — jobs, assets, quota, activity — plus
222
222
  the ability to open a credit checkout for you. It cannot create, edit, upload,
223
223
  or spend as you. Once your human has opened the link their session lasts days,
@@ -244,9 +244,41 @@ agent. It checks health, executable model availability, auth/quota when a token
244
244
  already exists, and payment rails, then returns one primary
245
245
  `data.next_command` plus machine-readable `data.next_command_copy_runnable`,
246
246
  `data.next_command_missing_inputs`, `data.next_command_effect`,
247
- `data.guide_warning`, `data.auth_ready`, `data.no_spend_evaluation`, and
248
- `data.guide_recovery`. Guide mode does not create a signup, provider job,
249
- dry-run job, payment object, credit debit, or asset.
247
+ `data.guide_warning`, and `data.output_mode`. Guide mode does not create a
248
+ signup, provider job, dry-run job, payment object, credit debit, or asset.
249
+
250
+ The guide shapes its response on state. When the guide is blocked
251
+ (`prompt_required`, `service_unreachable`, `no_executable_model`,
252
+ `auth_required`, `quota_required`) it returns every field, including the
253
+ self-fund, payment-recovery, and auth-handoff detail a blocked agent needs. When
254
+ `data.stage` is `ready_to_create` and `data.blocker` is `null`, nothing is
255
+ blocked on funding or auth, so the response is compact: it carries the decision
256
+ (`data.next_command`, `data.selection`, `data.cost`), the safety verdict
257
+ (`data.guide_warning`, `data.next_command_effect`), and the no-spend proof
258
+ (`data.no_spend_next_command` and its effect), and omits
259
+ `data.auth_ready`, `data.auth_handoff`, `data.escape_hatches`,
260
+ `data.guide_recovery`, `data.no_spend_evaluation`, the `data.self_fund_*`
261
+ fields, and the `data.recommended_no_spend_command` alias trio. The alias is a
262
+ documented duplicate of `data.no_spend_next_command`; dropping it is why
263
+ `data.guide_warning.recommended_command_field` names the base field in a
264
+ compact response. Resolve the no-spend command through that pointer and the
265
+ difference is invisible.
266
+
267
+ `data.output_mode` always says which shape you got and never leaves a missing
268
+ field ambiguous: `mode` is `ready_compact` or `full`, `omitted_fields` lists
269
+ every omitted key by name, `compacted_fields` lists sub-objects that are present
270
+ but emptied (`checks.quota.top_up`,
271
+ `checks.payments.preferred_method_summary`, `checks.payments.suggested_commands`),
272
+ and `full_output_command` is a copy-runnable rerun with `--explain` that returns
273
+ every field in every stage. Add `--explain` to `create --guide` / `edit --guide`
274
+ whenever you want the complete payload — debugging, harnesses, and
275
+ recovery loops should use it. `--explain` is a guide output mode; it requires
276
+ `--guide`.
277
+
278
+ One exception keeps the funding path intact: when a pre-wall top-up is actually
279
+ recommended (`data.self_fund_preparation.recommended` is `true`), the
280
+ `data.self_fund_*` fields stay in the compact response and are not listed in
281
+ `data.output_mode.omitted_fields`.
250
282
 
251
283
  ```bash
252
284
  IMAGE_SKILL_DISCOVERY_SOURCE=cli-md luxin create --guide --prompt "a compact field camera on a stainless workbench"
@@ -260,7 +292,10 @@ When `data.next_command_copy_runnable` is `false`, fill
260
292
  payment state changes. Do not run
261
293
  `doctor`, `models list`, `signup`, `whoami`, `usage quota`, `create --dry-run`,
262
294
  or payment commands as a setup checklist before the guide asks for them.
263
- For no-doc recovery loops, prefer `data.guide_recovery`: it names the current
295
+ For no-doc recovery loops, prefer `data.guide_recovery`. It is returned
296
+ whenever the guide is blocked; at an unblocked `ready_to_create` rerun the guide
297
+ with `--explain` (or run `data.output_mode.full_output_command`) to get it. It
298
+ names the current
264
299
  precondition (`precondition_code` / `precondition_message`), the safest
265
300
  no-spend command and field to run (`no_spend_command_field` /
266
301
  `no_spend_command`), the command to run after the precondition changes, and the
@@ -332,31 +367,69 @@ step.
332
367
  `false`, `data.guide_warning.spend_required` is `true`, and
333
368
  `data.guide_warning.recommended_command_field` is
334
369
  `recommended_no_spend_command`.
335
- `data.auth_ready.ready` is `true`,
336
- `data.auth_ready.next_command_requires_auth` is `true`, and
337
- `data.auth_ready.next_command_auth_ready` is `true`; the returned
338
- `data.next_command` can reuse the current saved config, env token, or stdin
339
- token context without exposing a raw token.
340
- `data.no_spend_evaluation.stop_here` is `true`,
341
- `data.no_spend_evaluation.next_command_is_live_create` is `true`, and
342
- `data.no_spend_evaluation.recommended_command_field` is
343
- `recommended_no_spend_command`. Run `data.next_command` for the first bounded
370
+ This stage returns the compact payload described above:
371
+ `data.output_mode.mode` is `ready_compact`. Auth is already usable, so the
372
+ returned `data.next_command` reuses the current saved config, env token, or
373
+ stdin token context without exposing a raw token; `data.auth_ready` and
374
+ `data.auth_handoff` are omitted here and returned under `--explain`.
375
+ Run `data.next_command` for the first bounded
344
376
  create only when media spend is allowed. If you are in a no-spend evaluation
345
377
  or only need proof that the path is ready, stop before `data.next_command` and
346
- run `data.recommended_no_spend_command` instead; it aliases
347
- `data.no_spend_next_command` and is the dry-run plan command. Its
378
+ run the dry-run plan command instead. Always resolve it as
379
+ `data[data.guide_warning.recommended_command_field]` rather than hardcoding a
380
+ field name: in this compact response that field is `no_spend_next_command`,
381
+ and in blocked or `--explain` responses it is the
382
+ `recommended_no_spend_command` alias. Its
348
383
  `data.no_spend_next_command_effect.label` is
349
384
  `dry_run_planned_job_no_provider_call_no_credit_debit_no_media_write`, with
350
385
  `no_spend`, `hosted_create_dry_run`, `planned_job`, and `plan_receipt` true,
351
386
  `activity_event: "job.planned"`, and provider call, credit debit, and media
352
387
  write false. It may create a recoverable planned job/activity receipt, but no
353
- provider execution, debit, downloadable asset, or media write. If the guide authenticated from
354
- env or stdin, prefer
388
+ provider execution, debit, downloadable asset, or media write.
389
+ Under `--explain` this stage also returns
390
+ `data.auth_ready.ready` `true`,
391
+ `data.auth_ready.next_command_requires_auth` `true`,
392
+ `data.auth_ready.next_command_auth_ready` `true`,
393
+ `data.no_spend_evaluation.stop_here` `true`,
394
+ `data.no_spend_evaluation.next_command_is_live_create` `true`,
395
+ `data.no_spend_evaluation.recommended_command_field`
396
+ `recommended_no_spend_command`, and `data.guide_recovery`. If the guide
397
+ authenticated from env or stdin, prefer
355
398
  `data.auth_handoff.next_command.with_env` or
356
399
  `data.auth_handoff.next_command.with_stdin` so auth follows the create.
357
400
 
401
+ For a no-spend or dry-run study, add `--no-spend` to `create --guide` for a
402
+ compact output mode. `data.no_spend_output_mode.enabled` is then `true` and the
403
+ live self-fund and payment command templates are omitted:
404
+ `data.self_fund_next_command`, `data.self_fund_next_command_label`,
405
+ `data.self_fund_handoff`, `data.self_fund_preparation`, and
406
+ `data.checks.payments.suggested_commands` are suppressed (each is listed in
407
+ `data.no_spend_output_mode.suppressed_fields`), so the safe dry-run is not
408
+ buried under quote/buy/payment workflow commands. The response still centers on
409
+ the dry-run command (`data.recommended_no_spend_command`, aliased by
410
+ `data.no_spend_next_command`), and the provider-call, credit-debit, and
411
+ media-write false proof in `data.mutation` is retained. The self-fund path
412
+ stays discoverable without dominating via
413
+ `data.no_spend_output_mode.self_fund_discovery`: its
414
+ `rerun_with_funding_command` re-runs the guide without `--no-spend` to surface
415
+ the funding templates, and `inspect_methods_command` is a read-only, no-spend
416
+ payment-method inspection (the same command as `data.escape_hatches.payment_methods`
417
+ when that field is present). `--no-spend` is a guide output mode; it
418
+ requires `--guide`, and for a no-spend planned job outside the guide use
419
+ `create --dry-run`.
420
+
421
+ `--no-spend` composes with the state-dependent shaping above: at an unblocked
422
+ `ready_to_create` the response is already compact, so
423
+ `data.output_mode.omitted_fields` and
424
+ `data.no_spend_output_mode.suppressed_fields` together describe what is missing.
425
+ At `ready_to_create` the plain guide (no flags) is now the smallest response;
426
+ reach for `--no-spend` when you want the suppression declared explicitly, and
427
+ for `--explain` when you want everything.
428
+
358
429
  Manual escape hatches are not prerequisites. Use them only when
359
- `data.next_command` / `data.escape_hatches` asks, or when the task genuinely
430
+ `data.next_command` / `data.escape_hatches` asks (`data.escape_hatches` is
431
+ returned when the guide is blocked and under `--explain`), or when the task
432
+ genuinely
360
433
  needs deeper capability, quota, payment, or planning detail:
361
434
 
362
435
  ```bash
@@ -1154,11 +1227,15 @@ luxin create --guide --prompt "A compact field camera on a stainless workbench"
1154
1227
 
1155
1228
  `create --guide` returns `schema: image-skill.create-guide.v1`,
1156
1229
  `stage`, `next_command`, `next_command_copy_runnable`,
1157
- `next_command_missing_inputs`, `guide_warning`, `auth_ready`,
1158
- `no_spend_evaluation`, `recommended_no_spend_command`,
1159
- `self_fund_next_command`, `self_fund_handoff`, `self_fund_preparation`,
1160
- `escape_hatches`, selected executable model and cost, auth/quota/payment
1161
- blockers, and mutation flags. All
1230
+ `next_command_missing_inputs`, `guide_warning`, `next_command_effect`,
1231
+ `recommended_no_spend_command` (aliased by `no_spend_next_command`) and its
1232
+ effect, `output_mode`, selected executable model and cost, auth/quota/payment
1233
+ blockers, and mutation flags. When the guide is blocked, and at any stage under
1234
+ `--explain`, it also returns `auth_ready`, `auth_handoff`,
1235
+ `no_spend_evaluation`, `guide_recovery`, `escape_hatches`,
1236
+ `self_fund_next_command`, `self_fund_handoff`, and `self_fund_preparation`;
1237
+ `output_mode.omitted_fields` names whichever of those the current response left
1238
+ out, and `output_mode.full_output_command` is the rerun that returns them. All
1162
1239
  mutation flags must be false in guide mode: no provider call, hosted create,
1163
1240
  signup, payment object, credit debit, or media write.
1164
1241
  For next-command safety, read `next_command_copy_runnable`,
@@ -1173,12 +1250,16 @@ from several arrays. It is `browserless_agent_self_fund` when the preferred
1173
1250
  rail is live money, browserless, agent initiated, and agent settleable;
1174
1251
  `human_payment_handoff` when a human/browser completion step is required; and
1175
1252
  `payment_method_inspection` when the guide cannot classify a direct top-up path.
1176
- In guide cost output, `cost.estimated_usd_per_image` is the estimated Image
1177
- Skill debit in dollars for one output, matching
1253
+ In guide cost output, `cost.estimated_usd_per_image` is the estimated Luxin
1254
+ debit in dollars for one output, matching
1178
1255
  `cost.estimated_debit_usd_per_image` and
1179
1256
  `cost.estimated_credits * cost.credit_unit_usd` when credit pricing is known.
1180
- `cost.estimated_provider_usd_per_image` is the upstream provider estimate for
1181
- transparency; do not use it as the amount the agent needs to fund.
1257
+ That is the amount the agent needs to fund.
1258
+ `cost.cheaper_alternative` names one available model that costs strictly fewer
1259
+ credits than the selection and still satisfies the brief, with its
1260
+ `model_id` and `estimated_credits`; it is null when the selection is already
1261
+ the cheapest model that satisfies the brief. Pass its `model_id` to `--model`
1262
+ to take it.
1182
1263
 
1183
1264
  ```bash
1184
1265
  luxin create \
@@ -1189,9 +1270,15 @@ luxin create \
1189
1270
  --json
1190
1271
  ```
1191
1272
 
1192
- Hosted defaults are quality-first. If an agent does not choose a model, Image
1193
- Skill selects the strongest available create capability for the requested
1194
- intent and budget, then records the decision in `request.selection`. Explicit
1273
+ Hosted defaults are intent-first. If an agent does not choose a model, Image
1274
+ Skill selects a create capability for the requested intent and budget, then
1275
+ records the decision in `request.selection`. `--intent draft` (or `cheap`,
1276
+ `budget`, `test`) selects the lowest-credit available model; `--intent final`
1277
+ (or `hero`, `product`, `campaign`, `deliverable`) selects the quality-first
1278
+ model; no intent, or `--intent explore`, selects a cost-efficient
1279
+ general-purpose model for iteration. A brief that states a reproducibility or
1280
+ aspect-ratio requirement still gets a model that can express it, even when a
1281
+ cheaper model cannot: capability outranks price. Explicit
1195
1282
  `--provider`, `--model`, namespaced model ids, and validated
1196
1283
  `model_parameters` always take precedence. For final/product/hero-style
1197
1284
  intents, Luxin may default an eligible quality-capability request to a
@@ -1364,7 +1451,28 @@ usage debits, media writes, or provider execution. In the first-run guide, this
1364
1451
  exact no-spend command behavior is exposed as
1365
1452
  `data.no_spend_next_command_effect` and
1366
1453
  `data.recommended_no_spend_command_effect`; the evaluator stop policy is exposed
1367
- as `data.no_spend_evaluation`.
1454
+ as `data.no_spend_evaluation` when the guide is blocked or run with `--explain`.
1455
+
1456
+ While the agent can still create, hosted `create` / `edit` responses no longer
1457
+ repeat the browserless top-up step tree. `data.next_actions.self_fund` keeps its
1458
+ recommendation, urgency, and command fields, but its `workflow` is replaced by
1459
+ `workflow_field: "quota.top_up.workflow"`, which points at the copy still
1460
+ carried in the same response. Once credits are exhausted and the agent is at the
1461
+ wall, `data.next_actions.self_fund.workflow` is inlined again, because that is
1462
+ the block the agent has to act on.
1463
+
1464
+ Every hosted `create` / `edit` response carries `data.mutation`, so a no-spend
1465
+ evaluator reads the proof instead of inferring it from `dry_run` plus a
1466
+ `planned` asset. On a dry run it reports `provider_call: false`,
1467
+ `credit_debit: false`, and `media_write: false` explicitly, alongside
1468
+ `hosted_create_dry_run: true` and, for an authenticated dry run,
1469
+ `planned_job: true`, `plan_receipt: true`, and `activity_event: "job.planned"`
1470
+ for the recoverable receipt the dry run does write. An anonymous dry run stores
1471
+ nothing and reports `planned_job: false` with `activity_event: null`. Each entry
1472
+ in `data.assets` is labelled: a dry-run placeholder is
1473
+ `label: "planned_placeholder_not_media"` with `placeholder: true` and
1474
+ `downloadable: false`, and real output is `label: "durable_media"` with
1475
+ `downloadable: true`.
1368
1476
 
1369
1477
  Minimum success data:
1370
1478
 
@@ -1377,22 +1485,24 @@ Minimum success data:
1377
1485
  "assets": [
1378
1486
  {
1379
1487
  "asset_id": "image_...",
1380
- "path": "https://media.image-skill.com/a/image_abc123.png",
1488
+ "path": "https://media.luxin.sh/a/image_abc123.png",
1381
1489
  "mime_type": "image/png",
1382
- "url": "https://media.image-skill.com/a/image_abc123.png",
1490
+ "url": "https://media.luxin.sh/a/image_abc123.png",
1383
1491
  "content_length": 333444,
1384
1492
  "width": 2048,
1385
1493
  "height": 2048
1386
1494
  }
1387
1495
  ],
1388
1496
  "cost": {
1389
- "estimated_usd": 0.07,
1497
+ "estimated_usd": 0.12,
1390
1498
  "credit_pricing": {
1391
1499
  "credit_unit_usd": 0.01,
1392
1500
  "credits_required": 12,
1393
- "estimated_provider_cost_usd": 0.07,
1394
- "estimated_revenue_usd": 0.12,
1395
- "pricing_confidence": "known"
1501
+ "estimated_charge_usd": 0.12,
1502
+ "self_fundable": true,
1503
+ "self_fund_block_reason": null,
1504
+ "pricing_confidence": "known",
1505
+ "pricing_source": "model_parameters"
1396
1506
  }
1397
1507
  },
1398
1508
  "request": {
@@ -1400,7 +1510,7 @@ Minimum success data:
1400
1510
  "selection": {
1401
1511
  "policy": "hosted_default_create_v1",
1402
1512
  "reason": "hosted default selected the strongest currently available quality-first create model",
1403
- "intent": "explore",
1513
+ "intent": "final",
1404
1514
  "capability": {
1405
1515
  "id": "is.image.generate.xai-grok-imagine-image-quality.v1"
1406
1516
  },
@@ -1488,7 +1598,9 @@ curl -sS https://api.luxin.sh/v1/create \
1488
1598
 
1489
1599
  Hosted free-preview create currently requires owned artifact storage and returns
1490
1600
  one `assets[]` entry per output with `assets[].url` under
1491
- `https://media.image-skill.com/...` on success.
1601
+ `https://media.luxin.sh/...` on success. Previously issued
1602
+ `https://media.image-skill.com/...` URLs remain valid and are still accepted
1603
+ wherever an asset URL is an input.
1492
1604
 
1493
1605
  ### `luxin upload`
1494
1606
 
@@ -1517,7 +1629,7 @@ Minimum success data:
1517
1629
  "asset_id": "image_...",
1518
1630
  "job_id": "job_...",
1519
1631
  "kind": "uploaded",
1520
- "url": "https://media.image-skill.com/a/image_abc123.png",
1632
+ "url": "https://media.luxin.sh/a/image_abc123.png",
1521
1633
  "mime_type": "image/png",
1522
1634
  "content_length": 12345
1523
1635
  },
@@ -1730,7 +1842,7 @@ Inspects an Luxin-owned asset URL or hosted asset id.
1730
1842
 
1731
1843
  ```bash
1732
1844
  luxin assets show \
1733
- https://media.image-skill.com/a/image_abc123.png \
1845
+ https://media.luxin.sh/a/image_abc123.png \
1734
1846
  --json
1735
1847
  ```
1736
1848
 
@@ -1751,7 +1863,7 @@ Minimum success data:
1751
1863
  "asset": {
1752
1864
  "asset_id": "image_...",
1753
1865
  "job_id": "job_...",
1754
- "url": "https://media.image-skill.com/a/image_abc123.png",
1866
+ "url": "https://media.luxin.sh/a/image_abc123.png",
1755
1867
  "mime_type": "image/png",
1756
1868
  "content_length": 12345,
1757
1869
  "width": 1024,
@@ -1779,7 +1891,7 @@ Downloads an Luxin-owned asset URL or hosted asset id to a local file.
1779
1891
 
1780
1892
  ```bash
1781
1893
  luxin assets get \
1782
- https://media.image-skill.com/a/image_abc123.png \
1894
+ https://media.luxin.sh/a/image_abc123.png \
1783
1895
  --output ./result.png \
1784
1896
  --json
1785
1897
  ```
@@ -1817,16 +1929,14 @@ Minimum success data:
1817
1929
  "state": "completed",
1818
1930
  "assets": [],
1819
1931
  "cost": {
1820
- "estimated_usd": 0.05,
1821
- "provider_reported_usd_ticks": null
1932
+ "estimated_usd": 0.05
1822
1933
  },
1823
1934
  "job": {
1824
1935
  "job_id": "job_...",
1825
1936
  "status": "completed",
1826
1937
  "assets": [],
1827
1938
  "cost": {
1828
- "estimated_usd": 0.05,
1829
- "provider_reported_usd_ticks": null
1939
+ "estimated_usd": 0.05
1830
1940
  }
1831
1941
  }
1832
1942
  }
package/commands.json CHANGED
@@ -421,6 +421,8 @@
421
421
  "docs_url": "https://luxin.sh/cli.md#luxin-create",
422
422
  "optional_flags": [
423
423
  "--guide",
424
+ "--no-spend",
425
+ "--explain",
424
426
  "--dry-run",
425
427
  "--model",
426
428
  "--aspect-ratio",
package/llms.txt CHANGED
@@ -58,15 +58,15 @@ Claim states:
58
58
  - revoked: token or agent disabled
59
59
 
60
60
  First-run guide loop:
61
- 1. Run luxin create --guide --prompt PROMPT. This is the canonical fresh-agent entrypoint and the only required first command. It performs read-only hosted reachability, executable model availability, auth/quota, and payment rail checks and returns data.stage, data.next_command, data.guide_warning, data.next_command_effect, data.auth_ready, data.no_spend_evaluation, data.guide_recovery, data.no_spend_next_command, data.no_spend_next_command_effect, data.self_fund_next_command, data.self_fund_handoff, data.self_fund_preparation, data.auth_handoff, data.escape_hatches, data.checks.quota.top_up, and data.mutation. Guide mode must report provider_call: false, hosted_create: false, hosted_signup: false, payment_object: false, credit_debit: false, and media_write: false.
62
- 2. Read data.guide_warning, then follow data.next_command when its next_command_safety is safe for the current spend policy. Prefer data.guide_recovery for no-doc recovery: data.guide_recovery.no_spend_command_field and data.guide_recovery.no_spend_command name the safest no-spend command, data.guide_recovery.live_create_command_field and data.guide_recovery.live_payment_command_field name fields that would spend, and data.guide_recovery.double_spend_guard tells you when to check error.recovery, jobs, activity, or payment status before any live retry. Do not run doctor, models list, signup, whoami, quota, dry-run, or payment commands as a setup checklist before the guide asks for them.
61
+ 1. Run luxin create --guide --prompt PROMPT. This is the canonical fresh-agent entrypoint and the only required first command. It performs read-only hosted reachability, executable model availability, auth/quota, and payment rail checks and returns data.stage, data.next_command, data.guide_warning, data.next_command_effect, data.no_spend_next_command, data.no_spend_next_command_effect, data.recommended_no_spend_command, data.output_mode, and data.mutation. The guide shapes the rest on state: while it is blocked it also returns data.auth_ready, data.no_spend_evaluation, data.guide_recovery, data.self_fund_next_command, data.self_fund_handoff, data.self_fund_preparation, data.auth_handoff, data.escape_hatches, and the full data.checks.quota.top_up. At an unblocked ready_to_create those are omitted because nothing is blocked on funding or auth. data.output_mode.mode is ready_compact or full, data.output_mode.omitted_fields names every omitted key, data.output_mode.compacted_fields names present-but-emptied sub-objects, and data.output_mode.full_output_command is a copy-runnable rerun with --explain that returns every field in every stage. Add --explain whenever you need the complete payload. Guide mode must report provider_call: false, hosted_create: false, hosted_signup: false, payment_object: false, credit_debit: false, and media_write: false.
62
+ 2. Read data.guide_warning, then follow data.next_command when its next_command_safety is safe for the current spend policy. Prefer data.guide_recovery for no-doc recovery; it is returned whenever the guide is blocked, and at an unblocked ready_to_create you get it by running data.output_mode.full_output_command: data.guide_recovery.no_spend_command_field and data.guide_recovery.no_spend_command name the safest no-spend command, data.guide_recovery.live_create_command_field and data.guide_recovery.live_payment_command_field name fields that would spend, and data.guide_recovery.double_spend_guard tells you when to check error.recovery, jobs, activity, or payment status before any live retry. Do not run doctor, models list, signup, whoami, quota, dry-run, or payment commands as a setup checklist before the guide asks for them.
63
63
  3. If data.stage is prompt_required, rerun data.next_command with the real prompt.
64
64
  4. If data.stage is auth_required, data.auth_ready.ready is false and data.guide_warning.next_command_safety is hosted_signup_no_spend_setup. Run data.next_command, then rerun the guide once. Hosted signup saves the restricted token to the public CLI config by default with 0600 permissions. If the configured config path is blocked, data.next_command sets LUXIN_CONFIG_PATH="$PWD/.luxin/config.json" and still runs a saved-config signup; do not switch to raw-token handoff unless recovery explicitly requires it. If the runtime intentionally uses --no-save --show-token, store the returned token in the agent runtime secret store, then rerun with IMAGE_SKILL_TOKEN or --token-stdin; data.auth_handoff.rerun_guide.with_env and data.auth_handoff.rerun_guide.with_stdin are copy-safe templates for that mode. Signup is anonymous by default: no contact inbox is required to get a restricted token. The optional --agent-contact flag takes an email-shaped durable contact inbox for the restricted agent identity, not a requirement to find an individual human; attach one later with luxin claim request --contact INBOX --json when funding or durability makes it worth having. Hosted signup returns the raw restricted token only when --show-token is set, and only once. When providing a contact, use an agent-owned inbox when available; otherwise use an operator, team, or sponsor inbox that can receive future claim, billing, or abuse notices. Never invent an inbox or borrow an unrelated human email just to fill the flag — omit it instead. example.invalid addresses are only appropriate inside documented harness or proof runs. --human-email remains accepted as a compatibility alias, but the guide must not teach it. Anonymous signups mint a fresh agent identity on every call; reuse the saved config instead of re-running signup. --save is accepted as a compatibility no-op for the default save behavior; use --no-save only when the runtime has a separate secret store and does not want local config.
65
- 5. At any guide stage, read data.checks.quota.top_up. When available is true, it includes recommended, recommendation_reason, preferred_payment_method, quote_command, quote_command_copy_runnable, quote_command_effect, and quote/buy/status command templates for the browserless x402 top-up path; recommended and urgency say whether to act now. On quota/payment recovery errors, read error.recovery.top_up: when delegated live-money quoting is allowed, error.recovery.suggested_command points at the direct quote to open the top-up path; use error.recovery.top_up.first_command for no-spend payment-method inspection when delegated spend authority is absent or unclear. If data.stage is quota_required, data.guide_warning.next_command_safety is live_money_payment_action and data.guide_warning.payment_top_up_path summarizes the live-money path. Run data.self_fund_next_command to start the top-up. It aliases data.next_command and is the first payment command, usually an x402 or Stripe quote. First read data.checks.payments.preferred_method_summary.top_up_path: browserless_agent_self_fund means a wallet-equipped agent can complete the preferred live-money rail without a browser; human_payment_handoff means the agent can create the payment attempt but a human/browser step must complete before credits are granted. If the guide authenticated from env or stdin, prefer data.self_fund_handoff.auth.next_command.with_env or data.self_fund_handoff.auth.next_command.with_stdin so auth follows the payment command. Then follow data.self_fund_handoff.payment_commands.buy and status, and rerun data.self_fund_handoff.after_next once credits are granted. If data.stage is ready_to_create, inspect data.self_fund_preparation before consuming the remaining free allowance; it mirrors top-up urgency, urgency_score, and urgency_reasons. When available and recommended are true, data.self_fund_preparation.quote_command is the pre-wall browserless x402 quote and, when copy-runnable, data.self_fund_next_command aliases it with a pre_wall label such as pre_wall_browserless_agent_payable_quote. The quote command creates an authenticated live-money quote/payment object, but data.self_fund_preparation.quote_command_effect must show no provider call, no hosted create, no credit debit, no media write, and no wallet settlement until a later buy/payment step. One Luxin credit is $0.01. Credit quotes grant prepaid value units; create/edit operations debit model-priced credits reported as cost.credit_pricing. Starter preview currently gives 50 lifetime credits plus a 50-job daily compatibility cap. Funded usage has no daily job cap; prepaid credits and credit reservations are its spend boundary.
65
+ 5. At any blocked guide stage, and at any stage under --explain, read data.checks.quota.top_up. When available is true, it includes recommended, recommendation_reason, preferred_payment_method, quote_command, quote_command_copy_runnable, quote_command_effect, and quote/buy/status command templates for the browserless x402 top-up path; recommended and urgency say whether to act now. On quota/payment recovery errors, read error.recovery.top_up: when delegated live-money quoting is allowed, error.recovery.suggested_command points at the direct quote to open the top-up path; use error.recovery.top_up.first_command for no-spend payment-method inspection when delegated spend authority is absent or unclear. If data.stage is quota_required, data.guide_warning.next_command_safety is live_money_payment_action and data.guide_warning.payment_top_up_path summarizes the live-money path. Run data.self_fund_next_command to start the top-up. It aliases data.next_command and is the first payment command, usually an x402 or Stripe quote. First read data.checks.payments.preferred_method_summary.top_up_path: browserless_agent_self_fund means a wallet-equipped agent can complete the preferred live-money rail without a browser; human_payment_handoff means the agent can create the payment attempt but a human/browser step must complete before credits are granted. If the guide authenticated from env or stdin, prefer data.self_fund_handoff.auth.next_command.with_env or data.self_fund_handoff.auth.next_command.with_stdin so auth follows the payment command. Then follow data.self_fund_handoff.payment_commands.buy and status, and rerun data.self_fund_handoff.after_next once credits are granted. If data.stage is ready_to_create and a pre-wall top-up is recommended, data.self_fund_preparation stays in the compact response; inspect it before consuming the remaining free allowance; it mirrors top-up urgency, urgency_score, and urgency_reasons. When available and recommended are true, data.self_fund_preparation.quote_command is the pre-wall browserless x402 quote and, when copy-runnable, data.self_fund_next_command aliases it with a pre_wall label such as pre_wall_browserless_agent_payable_quote. The quote command creates an authenticated live-money quote/payment object, but data.self_fund_preparation.quote_command_effect must show no provider call, no hosted create, no credit debit, no media write, and no wallet settlement until a later buy/payment step. One Luxin credit is $0.01. Credit quotes grant prepaid value units; create/edit operations debit model-priced credits reported as cost.credit_pricing. Starter preview currently gives 50 lifetime credits plus a 50-job daily compatibility cap. Funded usage has no daily job cap; prepaid credits and credit reservations are its spend boundary.
66
66
  5a. When data.stage is quota_required, data.self_fund_handoff mirrors top-up urgency, urgency_score, and urgency_reasons, and exposes first_safe_command plus first_safe_command_effect. Run first_safe_command, usually luxin credits methods --json, for no-spend rail inspection before quote/buy when delegated spend authority is absent or unclear.
67
- 6. If data.stage is ready_to_create, data.next_command is the first bounded live create. data.guide_warning.next_command_safety must be live_media_create_credit_debit, data.guide_warning.no_spend_safe must be false, data.guide_warning.spend_required must be true, and data.guide_warning.recommended_command_field must be recommended_no_spend_command. data.auth_ready.ready and data.auth_ready.next_command_auth_ready must be true; data.auth_ready.next_command_requires_auth must be true, and the command can reuse saved config, IMAGE_SKILL_TOKEN, or --token-stdin context without exposing a raw token. data.next_command_effect.label must be live_media_create_credit_debit and its provider_call, hosted_create, credit_debit, and media_write flags are true. data.no_spend_evaluation.stop_here must be true, data.no_spend_evaluation.next_command_is_live_create must be true, and data.no_spend_evaluation.recommended_command_field must be recommended_no_spend_command. Run data.next_command only when media spend is allowed. In no-spend evaluations, or when you only need to prove readiness without media/provider work, stop before data.next_command and run data.recommended_no_spend_command instead. data.recommended_no_spend_command must equal data.no_spend_next_command. data.no_spend_next_command_effect.label must be dry_run_planned_job_no_provider_call_no_credit_debit_no_media_write: no_spend, hosted_create_dry_run, planned_job, and plan_receipt are true; activity_event is job.planned; provider_call, credit_debit, and media_write are false. This dry-run may create a recoverable planned job/activity receipt but no provider execution, debit, downloadable asset, or media write. If the guide authenticated from env or stdin, prefer data.auth_handoff.next_command.with_env or data.auth_handoff.next_command.with_stdin so auth follows the live create. In guide cost output, cost.estimated_usd_per_image and cost.estimated_debit_usd_per_image are the Luxin debit dollars for one output; cost.estimated_provider_usd_per_image is only the upstream provider estimate. Use the guide's returned max_estimated_usd_per_image because it is sized to the credit debit the agent funds. Add --output-count N only after models show confirms the selected create model supports more than one output; credit_pricing.credits_required is the total debit across outputs, while max_estimated_usd_per_image remains a per-image Luxin debit guard.
67
+ 6. If data.stage is ready_to_create, data.next_command is the first bounded live create. data.guide_warning.next_command_safety must be live_media_create_credit_debit, data.guide_warning.no_spend_safe must be false, data.guide_warning.spend_required must be true, and data.guide_warning.recommended_command_field names whichever no-spend field this response carries, and that field is always present: read data[data.guide_warning.recommended_command_field] instead of hardcoding a name. This stage returns the compact payload, where it is no_spend_next_command because the recommended_no_spend_command alias trio is omitted; blocked and --explain responses keep the alias and name it instead. data.output_mode.mode is ready_compact. The returned command can reuse saved config, IMAGE_SKILL_TOKEN, or --token-stdin context without exposing a raw token. data.next_command_effect.label must be live_media_create_credit_debit and its provider_call, hosted_create, credit_debit, and media_write flags are true. Rerunning with --explain also returns data.recommended_no_spend_command and its label/effect, data.auth_ready.ready true, data.auth_ready.next_command_auth_ready true, data.auth_ready.next_command_requires_auth true, data.no_spend_evaluation.stop_here true, data.no_spend_evaluation.next_command_is_live_create true, data.no_spend_evaluation.recommended_command_field recommended_no_spend_command, data.guide_recovery, data.auth_handoff, and data.escape_hatches. Run data.next_command only when media spend is allowed. In no-spend evaluations, or when you only need to prove readiness without media/provider work, stop before data.next_command and run the field data.guide_warning.recommended_command_field names instead. When the alias is present it equals data.no_spend_next_command. data.no_spend_next_command_effect.label must be dry_run_planned_job_no_provider_call_no_credit_debit_no_media_write: no_spend, hosted_create_dry_run, planned_job, and plan_receipt are true; activity_event is job.planned; provider_call, credit_debit, and media_write are false. This dry-run may create a recoverable planned job/activity receipt but no provider execution, debit, downloadable asset, or media write. If the guide authenticated from env or stdin, rerun with --explain and prefer data.auth_handoff.next_command.with_env or data.auth_handoff.next_command.with_stdin so auth follows the live create. In guide cost output, cost.estimated_usd_per_image and cost.estimated_debit_usd_per_image are the Luxin debit dollars for one output. Use the guide's returned max_estimated_usd_per_image because it is sized to the credit debit the agent funds. Add --output-count N only after models show confirms the selected create model supports more than one output; credit_pricing.credits_required is the total debit across outputs, while max_estimated_usd_per_image remains a per-image Luxin debit guard.
68
68
  7. After create, prefer data.next_actions when present: inspect_job and inspect_asset are copy-runnable no-spend recovery commands, iterate_edit is the reusable-asset edit template, and self_fund is the promoted top-up quote handoff when quota.top_up.available is true. self_fund.recommended plus urgency, urgency_score, and urgency_reasons say whether to act now, and self_fund exposes first_safe_command plus first_safe_command_effect for no-spend rail inspection before quote/buy. When self_fund.recommended is true and the quote is copy-runnable, data.self_fund_next_command aliases data.next_actions.self_fund.quote_command and data.self_fund_next_command_effect proves the quote creates no provider call, hosted create, credit debit, media write, or wallet settlement. self_fund.quote_command is copy-runnable and omits --idempotency-key so the public CLI generates and returns one for retry safety; follow the quote response into buy/status. Otherwise use luxin jobs show JOB_ID to recover status, cost, safety, timestamps, and final assets; luxin assets get ASSET_URL_OR_ID --output ./result.png to fetch the generated asset without repeating provider work; and luxin activity list --subject JOB_ID to find ledger events, trace, usage, asset links, and any data.next_actions.self_fund handoff to cite or follow. Hosted asset-id assets show/get may also return data.next_actions.self_fund after generated work, so inspect that field before ending the session.
69
- 7a. Human handoff. When a create or edit produced a real asset, data.next_actions.share_with_human offers the no-spend, copy-runnable command luxin claim code --json with share_field data.dashboard_url. Run it and give your human the returned data.dashboard_url: they get a read-only view of your jobs, assets, quota, and activity plus the ability to open a credit checkout for you. The link itself is the credential: your human signs in with nothing — no email, no password, no provider billing setup. Hand over data.dashboard_url only — never your token, and never the raw data.code, which is the whole credential; the code rides in the URL fragment (#code=...), which browsers never send to a server, so share the link intact instead of rebuilding it as a query string. The code is single-use and expires (data.ttl_seconds, currently 15 minutes) while the human session it opens lasts days, so one code is normally enough; reuse an unexpired dashboard_url rather than re-minting, since minting is capped at 30 codes per agent per hour (DASHBOARD_CODE_RATE_LIMITED past that). Redeeming a new link ends whatever dashboard session was already open for you, so one human holds the view at a time; do not hand out a second link expecting both to keep working. luxin claim code needs the dashboard.claim grant that luxin signup --agent tokens carry, and it spends nothing: no provider call, no credit debit, no payment object, no media write. Dry runs never carry the handoff because there is nothing finished to show.
69
+ 7a. Human handoff. When a create or edit produced a real asset, data.next_actions.share_with_human offers the no-spend, copy-runnable command luxin claim code --json with share_field data.dashboard_url. Run it and give your human the returned data.dashboard_url: they get a read-only view of your jobs, assets, quota, and activity plus the ability to open a credit checkout for you. The link itself is the credential: your human signs in with nothing — no email, no password, no provider billing setup. Hand over data.dashboard_url only — never your token, and never the raw data.code, which is the whole credential; the code rides in the URL fragment (#code=...), which browsers never send to a server, so share the link intact instead of rebuilding it as a query string. The code is single-use and expires (data.ttl_seconds, currently 60 minutes) while the human session it opens lasts days, so one code is normally enough; reuse an unexpired dashboard_url rather than re-minting, since minting is capped at 30 codes per agent per hour (DASHBOARD_CODE_RATE_LIMITED past that). Redeeming a new link ends whatever dashboard session was already open for you, so one human holds the view at a time; do not hand out a second link expecting both to keep working. luxin claim code needs the dashboard.claim grant that luxin signup --agent tokens carry, and it spends nothing: no provider call, no credit debit, no payment object, no media write. Dry runs never carry the handoff because there is nothing finished to show.
70
70
  8. Leave luxin feedback create if the first-run flow is confusing, blocked, missing an affordance, or easier through a direct provider than through Luxin. Feedback auth uses saved config from default signup, IMAGE_SKILL_TOKEN, or --token-stdin; if signup or guide already saved config, run feedback create normally and do not copy a raw token. Never paste tokens into feedback title, body, evidence, issues, or logs. Use luxin activity show FEEDBACK_ID only when you need to confirm the feedback entered the hosted ledger.
71
71
 
72
72
  Manual escape hatches are not prerequisites. Use luxin doctor, luxin models list, luxin models show MODEL_ID, luxin whoami, luxin usage quota, luxin credits methods, luxin credits packs list, luxin credits quote, luxin credits buy, luxin credits status, luxin create --dry-run, and luxin edit --dry-run only when data.next_command or data.escape_hatches asks for them, or when the task genuinely needs deeper capability, quota, payment, or planning detail.
@@ -126,7 +126,7 @@ Hosted API endpoints:
126
126
  - GET https://api.luxin.sh/v1/credit-purchases/status returns durable payment state for Authorization: Bearer TOKEN. Query with exactly one of quote_id, payment_attempt_id, checkout_session_id, or receipt_id. Response includes state, quote, payment_attempt, receipt, credit_event, provider_event, limits, and next.
127
127
  - GET https://api.luxin.sh/v1/models returns the compact public model menu. Query params: available=true returns currently usable executable rows, executable=true returns runtime-wired rows regardless current availability, catalog_only=true returns source-backed catalog-only rows, operation=image.generate|image.edit narrows by operation, provider=fal|xai|openai narrows by provider, and details=true returns the full list with capability schemas. Default list output excludes catalog-only rows and omits parameter schemas so fresh agents see actionable choices first. Each compact row includes show_command; use GET https://api.luxin.sh/v1/models/MODEL_ID or luxin models show MODEL_ID --json before spending or passing model_parameters. The response summary includes total, returned, available, executable, cataloged_not_wired, provider split, execution_availability, first_actionable_model_ids, recommended filter commands, and catalog-inclusion flags. For runnable choices require both status: available and execution.model_execution_status: executable; provider-level availability alone is not enough. If a reachable provider has no runnable model for the requested operation, summary.execution_availability says so directly and includes the fastest --available --operation recovery command.
128
128
  - GET https://api.luxin.sh/v1/capabilities returns the hosted capability catalog, normalized controls, model-parameter schemas, auth requirements, and deprecation notices.
129
- - POST https://api.luxin.sh/v1/create creates or dry-runs bounded free-preview images when Authorization: Bearer TOKEN has quota and the relevant preview grant. Request JSON: prompt, optional model, optional intent, optional aspect_ratio, optional output_count, optional references[] for reference-capable create models, optional model_parameters, optional dry_run, optional max_estimated_usd_per_image, optional accept_unknown_cost. output_count defaults to 1 and must not exceed the selected model's max_outputs_per_request. If model is omitted, hosted defaults are quality-first and the response includes request.selection with the selected capability, defaulted provider-native controls, expected output class, and pricing. Agents should read cost.credit_pricing.credits_required instead of assuming one credit per operation; for output_count greater than 1 this is the total debit across outputs. max_estimated_usd_per_image is a per-image Luxin debit budget guard, not merely an upstream provider-cost guard. On dry_run responses, cost.credit_pricing.credits_required is the planned live execution debit, while quota.consumed_credits is the actual debit and remains 0. Authenticated hosted dry-runs also create a recoverable planned job: jobs show returns status planned with plan_receipt, and activity emits job.planned. Planned receipts do not create downloadable media assets, usage debits, or provider execution. references[] items use asset_id, role, index, optional reference_index for element_reference, and optional reference_task for reference_image; do not put URLs in references[].
129
+ - POST https://api.luxin.sh/v1/create creates or dry-runs bounded free-preview images when Authorization: Bearer TOKEN has quota and the relevant preview grant. Request JSON: prompt, optional model, optional intent, optional aspect_ratio, optional output_count, optional references[] for reference-capable create models, optional model_parameters, optional dry_run, optional max_estimated_usd_per_image, optional accept_unknown_cost. output_count defaults to 1 and must not exceed the selected model's max_outputs_per_request. If model is omitted, hosted defaults are intent-first: intent draft/cheap/budget/test selects the lowest-credit available model, intent final/hero/product/campaign/deliverable selects the quality-first model, and no intent (or explore) selects a cost-efficient general-purpose model for iteration, except that a stated reproducibility or aspect-ratio requirement always outranks price. The response includes request.selection with the selected capability, defaulted provider-native controls, expected output class, and pricing. Agents should read cost.credit_pricing.credits_required instead of assuming one credit per operation; for output_count greater than 1 this is the total debit across outputs. max_estimated_usd_per_image is a per-image Luxin debit budget guard, not merely an upstream provider-cost guard. On dry_run responses, cost.credit_pricing.credits_required is the planned live execution debit, while quota.consumed_credits is the actual debit and remains 0. Authenticated hosted dry-runs also create a recoverable planned job: jobs show returns status planned with plan_receipt, and activity emits job.planned. Planned receipts do not create downloadable media assets, usage debits, or provider execution. references[] items use asset_id, role, index, optional reference_index for element_reference, and optional reference_task for reference_image; do not put URLs in references[].
130
130
  - POST https://api.luxin.sh/v1/upload accepts client-normalized base64 raster image bytes when Authorization: Bearer TOKEN has asset.upload. Request JSON: source_kind, filename, remote_origin, mime_type, content_length, sha256, bytes_base64. Do not send local paths, full remote URLs, prompts, tokens, or provider credentials.
131
131
  - POST https://api.luxin.sh/v1/edit edits or dry-runs an Luxin-owned input asset when Authorization: Bearer TOKEN has quota and the relevant preview grant. Request JSON: input_asset_id, prompt, optional mask_asset_id for mask-capable models, optional references[] for reference-capable models, optional model, optional intent, optional aspect_ratio, optional output constraints, optional model_parameters, optional dry_run, optional max_estimated_usd_per_image, optional max_usd, optional accept_unknown_cost. On dry_run responses, ownership, prompt policy, masks, references, model_parameters, and budget guards are validated, quota.consumed_credits remains 0, a recoverable job.planned receipt is stored, and there is no provider call, media write, or credit debit. references[] items use asset_id, role, index, optional reference_index for element_reference, and optional reference_task for reference_image; do not put URLs in references[]. Current public references[] support covers Kling Image O1, Kling Image O3 image-to-image/text-to-image, Kling Image v3 image-to-image/text-to-image, Fal DreamO create, and xAI Grok Imagine image edit/quality edit. Kling references allow max 40 entries, max 10 contiguous element indexes from 0, one frontal per referenced element, and up to 3 reference images per element. DreamO references allow up to two contiguous reference_image indexes from 0, each with optional reference_task ip, id, or style. xAI edit references allow up to two contiguous reference_image indexes from 0 and do not accept reference_task; the primary input asset is the first source image. Reference assets must be owned PNG/JPEG/WebP, 10MB max, minimum 300px width/height, and aspect ratio 0.40-2.50. The public CLI uploads local paths or external URLs first for --input, --mask, --element-frontal, --element-reference, and --reference-image; do not send source bytes, external URLs, image_url, image_urls, mask_url, raw provider elements, frontal_image_url, reference_image_urls, first_image_url, second_image_url, images, or *_reference_task to /v1/edit or /v1/create. For Kling elements, --element-frontal IMAGE[@ELEMENT_INDEX] sends role element_frontal and --element-reference IMAGE[@ELEMENT_INDEX[:REFERENCE_INDEX]] sends role element_reference under top-level references[]. For DreamO create, --reference-image IMAGE[@INDEX[:TASK]] sends role reference_image with optional reference_task. For xAI edit, --reference-image IMAGE[@INDEX] supplies the second or third ordered source image.
132
132
  - GET https://api.luxin.sh/v1/assets/ASSET_ID returns hosted asset metadata for Authorization: Bearer TOKEN when the asset belongs to the actor organization.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "luxin-cli",
3
- "version": "0.2.2",
4
- "description": "Zero-setup durable creative-media CLI for agents (image + video + audio + 3D): guide-first creation, model and cost inspection, owned URLs, JSON recovery, payments, reusable assets, and feedback. Luxin is a creative-media runtime, unrelated to the luxon datetime library.",
3
+ "version": "0.2.4",
4
+ "description": "Image generation, image editing, video, audio, and image-to-3D for agents, with no API key to obtain first. The agent signs itself up, starts on free preview credits, and gets hosted media URLs, recoverable jobs, and cost receipts.",
5
5
  "type": "module",
6
6
  "private": false,
7
7
  "repository": {
@@ -20,7 +20,6 @@
20
20
  "SECURITY.md",
21
21
  "CONTRIBUTING.md",
22
22
  "CODE_OF_CONDUCT.md",
23
- "SKILL.md",
24
23
  "skill.md",
25
24
  "llms.txt",
26
25
  "cli.md",
package/skill.md CHANGED
@@ -1,13 +1,14 @@
1
1
  ---
2
2
  name: luxin
3
3
  description: >-
4
- AI image generation and editing for agents across text-to-image and
5
- image-to-image workflows, video generation, audio generation, and image-to-3D
6
- asset creation through one zero-setup hosted runtime. Use Luxin when an
7
- agent needs durable media URLs, recoverable jobs, model/cost inspection and
8
- stable JSON envelopes with capability-preserving parameters. Optional
9
- agent-funded credits work without a provider API key, OAuth app, local model
10
- or per-provider billing account.
4
+ Image generation and image editing for agents, plus video, audio, and
5
+ image-to-3D, through one hosted runtime with no API key to obtain first. The
6
+ agent signs itself up in one command, starts on free preview credits, and
7
+ creates on the next: no provider account to open, no billing to set up. Every
8
+ result returns a hosted media URL with no signature or expiry, a job id the
9
+ agent can re-fetch with jobs show, and a receipt for what the call cost. When
10
+ the preview credits run out, the agent hands its human one dashboard link to
11
+ fund more.
11
12
  homepage: https://luxin.sh
12
13
  docs: https://luxin.sh/llms.txt
13
14
  metadata:
@@ -39,7 +40,7 @@ JSON is the default. Do not add `--json` to examples.
39
40
  npm_config_update_notifier=false npx -y luxin-cli@latest create --guide --prompt "a compact field camera on a stainless workbench"
40
41
  ```
41
42
 
42
- The guide is a free, zero-spend planning call. Given current auth, quota, and payment state, it returns `data.next_command`, `data.next_command_copy_runnable`, `data.next_command_missing_inputs`, `data.stage`, `data.guide_warning`, `data.next_command_effect`, `data.auth_ready`, `data.no_spend_evaluation`, `data.guide_recovery`, `data.recommended_no_spend_command` (alias of `data.no_spend_next_command`), `data.no_spend_next_command_effect`, `data.self_fund_next_command`, `data.self_fund_handoff`, `data.self_fund_preparation`, `data.auth_handoff`, and `data.mutation`. It also preserves `data.checks.quota.top_up`, the same quota top-up recommendation returned by `usage quota`, so wallet-capable agents can see whether a browserless x402 top-up is recommended before the hard wall. Read `data.guide_warning` before running `data.next_command`: `next_command_safety` names whether the command is no-spend setup, read-only inspection, live-money payment action, or live media create. Run that next command only when `data.next_command_copy_runnable` is `true` and the warning says it is safe for your spend policy; when it is `false`, fill `data.next_command_missing_inputs` first. Prefer `data.guide_recovery` for no-doc recovery loops: it names the safest no-spend command and field, the live create or payment field that would spend, and the double-spend guard to check before any live retry. Repeat until `data.stage` is `ready_to_create`. At `ready_to_create`, `data.auth_ready.ready` and `data.auth_ready.next_command_auth_ready` are `true`: the returned create can reuse saved config, env token, or stdin token context without exposing a raw token. Read `data.self_fund_preparation` in this stage before spending the remaining free allowance: when `available` is true, it mirrors top-up `urgency`, `urgency_score`, and `urgency_reasons`; when `recommended` is true, `quote_command` creates an authenticated live-money quote/payment object but does not pay, settle a wallet transfer, debit credits, call a provider, or write media. When that quote is copy-runnable, `data.self_fund_next_command` aliases it with a `pre_wall_...` label such as `pre_wall_browserless_agent_payable_quote`, so you can open the quote path before the quota wall. Only a later buy/payment step can spend money. When `data.guide_warning.next_command_safety` is `live_media_create_credit_debit` and `data.no_spend_evaluation.stop_here` is `true`, `data.next_command` is the live create: run it only if media spend is allowed, otherwise stop before it and run `data.recommended_no_spend_command` for no-spend proof. The no-spend command is an authenticated hosted dry-run: it may create a recoverable `job.planned` receipt, but it has no provider call, credit debit, downloadable asset, or media write.
43
+ The guide is a free, zero-spend planning call. Given current auth, quota, and payment state, it returns `data.next_command`, `data.next_command_copy_runnable`, `data.next_command_missing_inputs`, `data.stage`, `data.guide_warning`, `data.next_command_effect`, `data.no_spend_next_command` and `data.no_spend_next_command_effect`, `data.output_mode`, and `data.mutation`. The guide shapes the rest on state. While it is blocked it also returns `data.recommended_no_spend_command` (a documented alias of `data.no_spend_next_command`) and its label/effect, `data.auth_ready`, `data.no_spend_evaluation`, `data.guide_recovery`, `data.self_fund_next_command`, `data.self_fund_handoff`, `data.self_fund_preparation`, `data.auth_handoff`, `data.escape_hatches`, and the full `data.checks.quota.top_up` recommendation returned by `usage quota` — everything a blocked agent needs to unblock itself. Once `data.stage` is `ready_to_create` and `data.blocker` is `null`, nothing is blocked on funding or auth, so those fields are omitted and the response is the decision plus the no-spend proof. `data.output_mode` always tells you which shape you got: `mode` is `ready_compact` or `full`, `omitted_fields` names every omitted key, `compacted_fields` names sub-objects that are present but emptied, and `full_output_command` is a copy-runnable rerun with `--explain` that returns everything in every stage. When a pre-wall top-up is actually recommended, the `data.self_fund_*` fields stay in the compact response. Read `data.guide_warning` before running `data.next_command`: `next_command_safety` names whether the command is no-spend setup, read-only inspection, live-money payment action, or live media create. Run that next command only when `data.next_command_copy_runnable` is `true` and the warning says it is safe for your spend policy; when it is `false`, fill `data.next_command_missing_inputs` first. Prefer `data.guide_recovery` for no-doc recovery loops: it names the safest no-spend command and field, the live create or payment field that would spend, and the double-spend guard to check before any live retry. Repeat until `data.stage` is `ready_to_create`. At `ready_to_create` auth is already usable: the returned create can reuse saved config, env token, or stdin token context without exposing a raw token, and `data.auth_ready.ready` and `data.auth_ready.next_command_auth_ready` are `true` when you rerun with `--explain`. When a pre-wall top-up is recommended, read `data.self_fund_preparation` in this stage before spending the remaining free allowance: when `available` is true, it mirrors top-up `urgency`, `urgency_score`, and `urgency_reasons`; when `recommended` is true, `quote_command` creates an authenticated live-money quote/payment object but does not pay, settle a wallet transfer, debit credits, call a provider, or write media. When that quote is copy-runnable, `data.self_fund_next_command` aliases it with a `pre_wall_...` label such as `pre_wall_browserless_agent_payable_quote`, so you can open the quote path before the quota wall. Only a later buy/payment step can spend money. When `data.guide_warning.next_command_safety` is `live_media_create_credit_debit` and `data.guide_warning.no_spend_safe` is `false` (`data.no_spend_evaluation.stop_here` says the same under `--explain`), `data.next_command` is the live create: run it only if media spend is allowed, otherwise stop before it and run the field `data.guide_warning.recommended_command_field` names — resolve it as `data[data.guide_warning.recommended_command_field]` rather than hardcoding, since the compact response names `no_spend_next_command` and the fuller ones name the alias. The no-spend command is an authenticated hosted dry-run: it may create a recoverable `job.planned` receipt, but it has no provider call, credit debit, downloadable asset, or media write.
43
44
 
44
45
  When `data.stage` is `quota_required`, `data.self_fund_handoff` mirrors top-up `urgency`, `urgency_score`, and `urgency_reasons`, and exposes `first_safe_command` with a no-spend inspection effect. Run that no-spend command first when you need to inspect rails or stay below delegated spend authority before opening the live-money quote path.
45
46
 
@@ -53,7 +54,7 @@ Minimum success envelope on a create or edit:
53
54
  "assets": [
54
55
  {
55
56
  "asset_id": "image_...",
56
- "url": "https://media.image-skill.com/a/image_...png",
57
+ "url": "https://media.luxin.sh/a/image_...png",
57
58
  "mime_type": "image/png"
58
59
  }
59
60
  ],
@@ -238,7 +239,7 @@ luxin claim code --json
238
239
 
239
240
  Give them `data.dashboard_url` and nothing else. They get a read-only view of your jobs, assets, quota, and activity, plus the ability to open a credit checkout for you. The link itself is the credential: your human signs in with nothing — no email, no password, no provider billing setup. Never share your token, and never quote the raw `data.code` in prompts, logs, issues, or feedback: the code is the whole credential. It rides in the URL fragment (`#code=...`), which browsers never send to a server, so share the link intact rather than rebuilding it as a query string.
240
241
 
241
- The code is single-use and expires (`data.ttl_seconds`, currently 15 minutes); the human session it opens lasts days. So one code is normally enough — reuse an unexpired `dashboard_url` instead of re-minting, and expect `DASHBOARD_CODE_RATE_LIMITED` past 30 codes per agent per hour. Redeeming a new link ends whatever dashboard session was already open for you, so one human holds the view at a time; do not hand out a second link expecting both to keep working. `claim code` needs the `dashboard.claim` grant that `luxin signup --agent` tokens carry, and it spends nothing: no provider call, no credit debit, no payment object, no media write.
242
+ The code is single-use and expires (`data.ttl_seconds`, currently 60 minutes); the human session it opens lasts days. So one code is normally enough — reuse an unexpired `dashboard_url` instead of re-minting, and expect `DASHBOARD_CODE_RATE_LIMITED` past 30 codes per agent per hour. Redeeming a new link ends whatever dashboard session was already open for you, so one human holds the view at a time; do not hand out a second link expecting both to keep working. `claim code` needs the `dashboard.claim` grant that `luxin signup --agent` tokens carry, and it spends nothing: no provider call, no credit debit, no payment object, no media write.
242
243
 
243
244
  Best moment: right after a create or edit produced real media, where the success envelope already carries `data.next_actions.share_with_human` with this command and `share_field: "data.dashboard_url"`. A human who can see finished work is a human who will fund the next run. Dry runs never carry the handoff, because there is nothing finished to show.
244
245
 
@@ -257,6 +258,8 @@ luxin models show openai.gpt-image-2
257
258
 
258
259
  `--available` filters to runnable rows (`status:"available"` and `execution.model_execution_status:"executable"`). Do not treat provider-level `status:"available"` as runnable. `--catalog-only` exposes research rows that are not runnable yet; inspect them, do not pass them to create or edit.
259
260
 
261
+ Aspect ratio is a normalized top-level control, not a `model_parameters` field: pass `--aspect-ratio 16:9` (API: top-level `aspect_ratio` on `/v1/create` and `/v1/edit`). Supported values are per-model — `models show MODEL_ID` lists them under `media.input.aspect_ratios.values`, and passing one a model does not expose fails before any spend. If you do not state a ratio, the model default applies, so put the ratio you need in the brief or pass the flag. `create --guide` reads an explicit ratio from your prompt, reports it as `selection.suggested_aspect_ratio`, prefers a model that can express it, and includes it in `data.next_command`.
262
+
260
263
  Pass model-specific controls through validated JSON, not invented top-level flags:
261
264
 
262
265
  ```bash
@@ -264,6 +267,7 @@ luxin create \
264
267
  --prompt-file ./prompt.md \
265
268
  --intent finalize \
266
269
  --model openai.gpt-image-2 \
270
+ --aspect-ratio 16:9 \
267
271
  --output-count 2 \
268
272
  --model-parameters-json '{"quality":"high","background":"opaque","output_format":"png"}' \
269
273
  --max-usd 0.80
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-image-generation
3
3
  description: >-
4
- Agent image generation for autonomous agents: text-to-image, prompt-to-image, and durable AI image output through Luxin's zero-setup hosted runtime. Use when an agent searches ClawHub or a skill marketplace for image generation but should not bring provider API keys, OAuth, local model setup, or per-provider billing. Start with the no-spend guide, then create hosted images with recoverable jobs, cost receipts, model parameters, stable JSON, and browserless x402 when available.
4
+ Image generation an autonomous agent can run with no human setup step: it signs itself up in one command, starts on free preview credits, and creates without an API key, a provider account, or a billing account. The --max-estimated-usd-per-image flag rejects a call whose quote is over budget before it spends. When the credits run out the agent hands its human one dashboard link to fund more.
5
5
  homepage: https://luxin.sh
6
6
  docs: https://luxin.sh/llms.txt
7
7
  metadata:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ai-audio-generation
3
3
  description: >-
4
- AI audio generation for agents through Luxin's zero-setup hosted creative runtime. Use when a prompt should become music, sound, or audio without provider credentials, OAuth, local runtime, or per-provider billing. Start with the no-spend guide, choose an audio model, and keep durable hosted audio URLs, recoverable jobs, cost receipts, stable JSON, payments, and feedback in one loop.
4
+ Generate music, sound effects, and ambience from a text prompt with no API key to obtain first. The agent signs itself up in one command and starts on free preview credits: no provider account to open, no billing to set up. Audio comes back as a wav at a hosted media URL with no signature or expiry, with a job id the agent can re-fetch and a receipt for what the call cost.
5
5
  homepage: https://luxin.sh
6
6
  docs: https://luxin.sh/llms.txt
7
7
  metadata:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ai-image-generation
3
3
  description: >-
4
- AI image generation for agents: text-to-image and prompt-to-image through Luxin's zero-setup hosted runtime. Use when an agent needs a generated image with no provider API key, OAuth, local runtime, or per-provider billing account. Start with the no-spend guide, then create durable hosted images with recoverable jobs, cost receipts, model parameters, stable JSON, and browserless x402 when available.
4
+ AI image generation from a text prompt, with no API key to obtain first. The agent signs itself up in one command and starts on free preview credits: no provider account to open, no billing to set up. Name a model or let the guide pick one, then get the image back as a hosted media URL with no signature or expiry, a job id the agent can re-fetch, and a receipt for what the call cost.
5
5
  homepage: https://luxin.sh
6
6
  docs: https://luxin.sh/llms.txt
7
7
  metadata:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ai-video-generation
3
3
  description: >-
4
- AI video generation for agents through Luxin's zero-setup hosted creative runtime. Use when a prompt should become a durable hosted video without provider credentials, OAuth, local runtime, or per-provider billing. Start with the no-spend guide, choose a video model, and keep model discovery, jobs, costs, URLs, JSON recovery, payments, and feedback in one loop.
4
+ Generate video from a text prompt with no API key to obtain first. The agent signs itself up in one command, starts on free preview credits, and gets back an mp4 at a hosted media URL with no signature or expiry: no provider account to open, no billing to set up. The create call runs the render and returns a job id the agent can re-fetch, plus a receipt for what the call cost.
5
5
  homepage: https://luxin.sh
6
6
  docs: https://luxin.sh/llms.txt
7
7
  metadata: