image-skill 0.1.7 → 0.1.8

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.
@@ -0,0 +1,1263 @@
1
+ # Image Skill CLI Contract
2
+
3
+ Status: preview hosted-product contract.
4
+
5
+ The `image-skill` thin CLI/client gives agents a stable way to call the hosted Image Skill service, parse JSON responses, receive artifacts, and leave feedback.
6
+
7
+ Public contract URLs:
8
+
9
+ - `https://image-skill.com`
10
+ - `https://image-skill.com/skill.md`
11
+ - `https://image-skill.com/llms.txt`
12
+ - `https://image-skill.com/cli.md`
13
+ - `https://api.image-skill.com`
14
+
15
+ ## Global Rules
16
+
17
+ - Every command that agents use must support `--json`.
18
+ - JSON output must use the standard envelope from `https://image-skill.com/llms.txt`.
19
+ - Commands must have deterministic exit codes.
20
+ - Commands must emit service telemetry unless running in a documented no-telemetry test mode.
21
+ - Commands must not print secrets after initial creation.
22
+ - File-writing commands must avoid overwriting inputs unless `--overwrite` is explicit.
23
+ - Expensive commands must expose quota, claim, cost, and budget guard failures clearly.
24
+ - Public feedback commands submit to hosted product memory by default.
25
+
26
+ ## Exit Codes
27
+
28
+ | Code | Meaning |
29
+ | ---- | -------------------------------------- |
30
+ | 0 | Success |
31
+ | 1 | Generic failure |
32
+ | 2 | Invalid arguments |
33
+ | 3 | Auth required or invalid token |
34
+ | 4 | Capability denied |
35
+ | 5 | Quota exceeded |
36
+ | 6 | Content policy denied |
37
+ | 7 | Provider failure |
38
+ | 8 | Timeout |
39
+ | 9 | Filesystem or artifact storage failure |
40
+
41
+ ## Commands
42
+
43
+ ### `image-skill doctor`
44
+
45
+ Checks thin CLI/client health, hosted service reachability, auth state, local output permissions, and telemetry status.
46
+
47
+ ```bash
48
+ image-skill doctor --json
49
+ ```
50
+
51
+ ### `image-skill signup --agent`
52
+
53
+ Bootstraps restricted agent access.
54
+
55
+ ```bash
56
+ image-skill signup --agent \
57
+ --agent-contact agent-ops@example.com \
58
+ --agent-name creative-agent \
59
+ --runtime codex \
60
+ --save \
61
+ --json
62
+ ```
63
+
64
+ `--save` stores the returned `isk_r_` token in the public CLI config with 0600
65
+ permissions and redacts it from stdout. Use `--show-token` only when the agent
66
+ runtime has a separate secret store and needs the raw token once. Do not paste
67
+ tokens into prompts, logs, issue text, or feedback.
68
+
69
+ In this preview contract, `--agent-contact` is the accountable contact,
70
+ sponsor, operator, or agent inbox for the restricted agent identity. If no
71
+ individual human is in the loop, use a durable operator/team/agent inbox that
72
+ can receive future claim, billing, or abuse notices. Do not invent a person or
73
+ use a throwaway inbox.
74
+ `example.invalid` addresses are only appropriate inside documented harness or
75
+ proof runs. `--human-email` remains accepted as a compatibility alias for
76
+ `--agent-contact`.
77
+
78
+ For shell-based agent runtimes, store the token outside prompts and then expose
79
+ it as:
80
+
81
+ ```bash
82
+ export IMAGE_SKILL_TOKEN="isk_r_..."
83
+ ```
84
+
85
+ If the agent runtime can hand secrets to a command over stdin, avoid exporting
86
+ the token and use `--token-stdin` instead:
87
+
88
+ ```bash
89
+ printf '%s\n' "$IMAGE_SKILL_TOKEN" | image-skill usage quota --token-stdin --json
90
+ ```
91
+
92
+ `--api-base-url` is an advanced preview/test override; production public agents
93
+ should omit it.
94
+
95
+ ### Local Config And Install
96
+
97
+ Prefer package execution in fresh agent sandboxes:
98
+
99
+ ```bash
100
+ npm exec --yes --package image-skill@latest -- image-skill doctor --json
101
+ ```
102
+
103
+ Global install is optional, not the primary path. If `npm install -g image-skill`
104
+ or `npx image-skill@latest ...` hits prefix/cache `EACCES`, retry with writable
105
+ package-manager paths instead of cloning private source:
106
+
107
+ ```bash
108
+ export npm_config_cache="${npm_config_cache:-$PWD/.npm-cache}"
109
+ export npm_config_prefix="${npm_config_prefix:-$PWD/.npm-global}"
110
+ export PATH="$npm_config_prefix/bin:$PATH"
111
+ npm exec --yes --package image-skill@latest -- image-skill doctor --json
112
+ ```
113
+
114
+ Saved auth state defaults to
115
+ `${XDG_CONFIG_HOME:-~/.config}/image-skill/config.json`. If that location is
116
+ read-only, set a writable config path before `signup --save`:
117
+
118
+ ```bash
119
+ export IMAGE_SKILL_CONFIG_PATH="$PWD/.image-skill/config.json"
120
+ npm exec --yes --package image-skill@latest -- image-skill signup --agent \
121
+ --agent-contact agent-ops@example.com \
122
+ --agent-name creative-agent \
123
+ --runtime codex \
124
+ --save \
125
+ --json
126
+ ```
127
+
128
+ Config write failures return `PUBLIC_CLI_CONFIG_WRITE_FAILED` with a structured
129
+ `error.recovery.suggested_command`. Agents should follow that recovery field,
130
+ then continue with `whoami`, `usage quota`, `models list`, and the requested
131
+ creative flow.
132
+
133
+ ### `image-skill whoami`
134
+
135
+ Shows current actor, organization, claim state, token class, and grants.
136
+
137
+ ```bash
138
+ image-skill whoami --json
139
+ ```
140
+
141
+ ### `image-skill usage quota`
142
+
143
+ Canonical pre-spend check. Shows remaining credits, job limits, model limits,
144
+ and reset windows before create/edit.
145
+
146
+ ```bash
147
+ image-skill usage quota --json
148
+ ```
149
+
150
+ `image-skill quota --json` remains a compatibility alias.
151
+
152
+ Hosted API equivalent:
153
+
154
+ ```bash
155
+ curl -sS https://api.image-skill.com/v1/quota \
156
+ -H "authorization: Bearer $IMAGE_SKILL_TOKEN"
157
+ ```
158
+
159
+ ### `image-skill credits methods`
160
+
161
+ Machine-readable payment rail discovery. Use this before quoting or buying so
162
+ agents can tell which rails are available, whether live money can move, whether
163
+ browser/human action is required, and which command to try next.
164
+
165
+ ```bash
166
+ image-skill credits methods --json
167
+ ```
168
+
169
+ Minimum success data shape:
170
+
171
+ ```json
172
+ {
173
+ "contract_version": "image-skill.payment-methods.v1",
174
+ "credit_unit_cents": 1,
175
+ "currency": "USD",
176
+ "quote_endpoint": "/v1/credit-quotes",
177
+ "packs_endpoint": "/v1/credit-packs",
178
+ "status_endpoint": "/v1/credit-purchases/status",
179
+ "methods": [
180
+ {
181
+ "method_id": "fake",
182
+ "available": true,
183
+ "live_money": false,
184
+ "buyer_modes": ["agent_only", "hybrid", "human_only"],
185
+ "requires_browser": false,
186
+ "purchase_endpoint": "/v1/credit-purchases"
187
+ },
188
+ {
189
+ "method_id": "stripe_checkout",
190
+ "available": true,
191
+ "live_money": true,
192
+ "buyer_modes": ["hybrid", "human_only"],
193
+ "requires_browser": true,
194
+ "default_pack_id": "starter-500",
195
+ "purchase_endpoint": "/v1/credit-purchases/stripe-checkout-sessions"
196
+ }
197
+ ]
198
+ }
199
+ ```
200
+
201
+ `available` is environment-dependent. `available:false` means the rail is known
202
+ but not currently usable in the queried environment; read `unavailable_reason`
203
+ and `recovery`.
204
+
205
+ Hosted API equivalent:
206
+
207
+ ```bash
208
+ curl -sS https://api.image-skill.com/v1/payment-methods
209
+ ```
210
+
211
+ ### `image-skill credits packs list`
212
+
213
+ Lists the recommended Image Skill credit packs for Stripe Checkout. Packs are
214
+ the default live-money buying UX because agents get obvious starter choices and
215
+ Stripe Checkout avoids tiny card-fee traps. Exact custom quotes are still
216
+ supported when an agent already knows the required credit budget.
217
+
218
+ ```bash
219
+ image-skill credits packs list --json
220
+ ```
221
+
222
+ Minimum success data:
223
+
224
+ ```json
225
+ {
226
+ "credit_unit_cents": 1,
227
+ "credit_unit_usd": 0.01,
228
+ "currency": "USD",
229
+ "default_pack_id": "starter-500",
230
+ "packs": [
231
+ {
232
+ "pack_id": "starter-500",
233
+ "name": "Starter",
234
+ "credits": 500,
235
+ "amount_cents": 500,
236
+ "currency": "USD"
237
+ }
238
+ ],
239
+ "custom_quotes": {
240
+ "supported": true,
241
+ "min_credits": 1,
242
+ "max_credits": 5000
243
+ }
244
+ }
245
+ ```
246
+
247
+ Hosted API equivalent:
248
+
249
+ ```bash
250
+ curl -sS https://api.image-skill.com/v1/credit-packs
251
+ ```
252
+
253
+ ### `image-skill credits quote`
254
+
255
+ Requests a bounded credit quote from the hosted service. By default this uses
256
+ the harness-safe fake/test settlement rail; agents can request Stripe Checkout
257
+ terms with `--payment-method stripe_checkout`. A quote never grants credits.
258
+ One Image Skill credit is a stable user-facing value unit worth `$0.01`.
259
+ Creative operations can consume more than one credit based on the selected
260
+ model's provider cost and Image Skill's margin policy; inspect
261
+ `models show MODEL_ID --json` and operation `cost.credit_pricing` for the exact
262
+ debit before spending.
263
+
264
+ ```bash
265
+ image-skill credits quote --credits 10 --json
266
+ ```
267
+
268
+ For retry-stable automation, provide an explicit non-secret idempotency key:
269
+
270
+ ```bash
271
+ image-skill credits quote \
272
+ --credits 10 \
273
+ --idempotency-key quote-run-001 \
274
+ --json
275
+ ```
276
+
277
+ Idempotency keys are scoped to the current hosted agent identity and exact
278
+ quote request. Reusing a key with different credits, pack, or payment method
279
+ returns a structured `error.recovery.suggested_command` with a fresh
280
+ idempotency key for the attempted quote terms.
281
+
282
+ For Stripe Checkout terms, prefer a named pack:
283
+
284
+ ```bash
285
+ image-skill credits quote \
286
+ --pack starter-500 \
287
+ --payment-method stripe_checkout \
288
+ --idempotency-key stripe-pack-quote-run-001 \
289
+ --json
290
+ ```
291
+
292
+ For exact custom Stripe Checkout terms, request the provider and bounded credit
293
+ amount explicitly:
294
+
295
+ ```bash
296
+ image-skill credits quote \
297
+ --credits 137 \
298
+ --payment-method stripe_checkout \
299
+ --idempotency-key exact-quote-run-001 \
300
+ --json
301
+ ```
302
+
303
+ Minimum success data:
304
+
305
+ ```json
306
+ {
307
+ "quote_id": "quote_...",
308
+ "state": "created",
309
+ "credits": 10,
310
+ "price_amount_cents": 10,
311
+ "currency": "USD",
312
+ "expires_at": "2026-05-08T20:00:00.000Z",
313
+ "accepted_payment_method": "fake",
314
+ "idempotency_key": "quote-run-001",
315
+ "pack_id": null,
316
+ "pack": null,
317
+ "live_money": false
318
+ }
319
+ ```
320
+
321
+ Hosted API equivalent:
322
+
323
+ ```bash
324
+ curl -sS https://api.image-skill.com/v1/credit-quotes \
325
+ -H "authorization: Bearer $IMAGE_SKILL_TOKEN" \
326
+ -H "content-type: application/json" \
327
+ -d '{"pack_id":"starter-500","payment_method":"stripe_checkout","idempotency_key":"stripe-pack-quote-run-001"}'
328
+ ```
329
+
330
+ ### `image-skill credits buy`
331
+
332
+ Creates a live-provider payment action for a previously returned quote. Stripe
333
+ Checkout is the first supported provider. This creates a hosted Stripe Checkout
334
+ Session and returns an `action_required` response with
335
+ `checkout_handoff_url`; credits are granted only after verified Stripe webhook
336
+ fulfillment succeeds. Session creation itself must not mutate credit balances.
337
+
338
+ Agents should present or open `checkout_handoff_url` for humans. It is a short
339
+ Image Skill URL that redirects to Stripe Checkout and is safe to copy from
340
+ mobile terminals, SSH clients, and wrapped chat output. `checkout_url` remains
341
+ the Stripe compatibility fallback and is fragment-stripped by current API/CLI
342
+ responses for human copy/paste; do not ask a person to copy it when
343
+ `checkout_handoff_url` is present.
344
+
345
+ If a stale server or older client exposes a raw Stripe URL with a long `#...`
346
+ fragment, remove the fragment and use `checkout_compact_url` for human
347
+ copy/paste. Present any fallback Stripe URL in a fenced code block so terminal
348
+ wrapping does not corrupt it.
349
+
350
+ ```bash
351
+ image-skill credits buy \
352
+ --provider stripe \
353
+ --quote-id quote_... \
354
+ --idempotency-key stripe-buy-run-001 \
355
+ --json
356
+ ```
357
+
358
+ Minimum success data:
359
+
360
+ ```json
361
+ {
362
+ "state": "action_required",
363
+ "quote_id": "quote_...",
364
+ "payment_attempt_id": "payatt_...",
365
+ "provider": "stripe",
366
+ "accepted_payment_method": "stripe_checkout",
367
+ "checkout_session_id": "cs_...",
368
+ "checkout_handoff_url": "https://api.image-skill.com/pay/payatt_...",
369
+ "checkout_compact_url": "https://checkout.stripe.com/c/pay/cs_...",
370
+ "checkout_url": "https://checkout.stripe.com/c/pay/cs_...",
371
+ "credits": 500,
372
+ "amount_cents": 500,
373
+ "currency": "USD",
374
+ "live_money": true,
375
+ "next": {
376
+ "human_action": "open_checkout_url",
377
+ "checkout_handoff_url": "https://api.image-skill.com/pay/payatt_...",
378
+ "checkout_compact_url": "https://checkout.stripe.com/c/pay/cs_...",
379
+ "fallback_checkout_url": "https://checkout.stripe.com/c/pay/cs_...",
380
+ "after_payment": "open checkout_handoff_url, or checkout_compact_url if only a Stripe URL is available, then poll image-skill credits status --payment-attempt-id PAYMENT_ATTEMPT_ID --json or image-skill usage quota --json; credits are granted only after verified webhook fulfillment"
381
+ }
382
+ }
383
+ ```
384
+
385
+ Hosted API equivalent:
386
+
387
+ ```bash
388
+ curl -sS https://api.image-skill.com/v1/credit-purchases/stripe-checkout-sessions \
389
+ -H "authorization: Bearer $IMAGE_SKILL_TOKEN" \
390
+ -H "content-type: application/json" \
391
+ -d '{"quote_id":"quote_...","idempotency_key":"stripe-buy-run-001"}'
392
+ ```
393
+
394
+ ### `image-skill credits status`
395
+
396
+ Shows the durable state of a quote, Stripe Checkout attempt, Checkout Session,
397
+ or receipt. Use this after `credits buy` so agents do not have to infer payment
398
+ state from quota deltas or activity text.
399
+
400
+ ```bash
401
+ image-skill credits status \
402
+ --payment-attempt-id payatt_... \
403
+ --json
404
+ ```
405
+
406
+ Exactly one reference flag is required: `--quote-id`,
407
+ `--payment-attempt-id`, `--checkout-session-id`, or `--receipt-id`.
408
+
409
+ Minimum action-required data:
410
+
411
+ ```json
412
+ {
413
+ "state": "action_required",
414
+ "quote": {
415
+ "quote_id": "quote_...",
416
+ "credits": 500,
417
+ "price_amount_cents": 500,
418
+ "accepted_payment_method": "stripe_checkout",
419
+ "pack_id": "starter-500"
420
+ },
421
+ "payment_attempt": {
422
+ "payment_attempt_id": "payatt_...",
423
+ "checkout_session_id": "cs_...",
424
+ "checkout_handoff_url": "https://api.image-skill.com/pay/payatt_...",
425
+ "checkout_compact_url": "https://checkout.stripe.com/c/pay/cs_...",
426
+ "checkout_url": "https://checkout.stripe.com/c/pay/cs_...",
427
+ "attempt_status": "requires_action"
428
+ },
429
+ "receipt": null,
430
+ "credit_event": null,
431
+ "next": {
432
+ "retry_after_seconds": 10,
433
+ "human_action": "open_checkout_url",
434
+ "checkout_handoff_url": "https://api.image-skill.com/pay/payatt_...",
435
+ "checkout_compact_url": "https://checkout.stripe.com/c/pay/cs_..."
436
+ }
437
+ }
438
+ ```
439
+
440
+ Minimum success data includes `state: "succeeded"`, `receipt`,
441
+ `credit_event`, and the updated hosted `limits`.
442
+
443
+ Hosted API equivalent:
444
+
445
+ ```bash
446
+ curl -sS "https://api.image-skill.com/v1/credit-purchases/status?payment_attempt_id=payatt_..." \
447
+ -H "authorization: Bearer $IMAGE_SKILL_TOKEN"
448
+ ```
449
+
450
+ ### `image-skill credits fake-purchase`
451
+
452
+ Confirms a previously returned fake/test quote and grants bounded
453
+ payment-backed credits in the hosted credit ledger. This command is deliberately
454
+ named `fake-purchase` because it is a harness-safe settlement precursor:
455
+ `live_money:false`, no live money moved, and no payment credential is accepted.
456
+
457
+ ```bash
458
+ image-skill credits fake-purchase \
459
+ --quote-id quote_... \
460
+ --idempotency-key purchase-run-001 \
461
+ --json
462
+ ```
463
+
464
+ `--idempotency-key` is required because the command mutates credit state even
465
+ though the settlement rail is fake/test-only.
466
+
467
+ Minimum success data:
468
+
469
+ ```json
470
+ {
471
+ "state": "succeeded",
472
+ "quote_id": "quote_...",
473
+ "receipt_id": "receipt_...",
474
+ "credit_event_id": "credit_event_...",
475
+ "credits_granted": 10,
476
+ "amount_cents": 10,
477
+ "currency": "USD",
478
+ "accepted_payment_method": "fake",
479
+ "idempotency_key": "purchase-run-001",
480
+ "balance_after": 10,
481
+ "live_money": false
482
+ }
483
+ ```
484
+
485
+ Hosted API equivalent:
486
+
487
+ ```bash
488
+ curl -sS https://api.image-skill.com/v1/credit-purchases \
489
+ -H "authorization: Bearer $IMAGE_SKILL_TOKEN" \
490
+ -H "content-type: application/json" \
491
+ -d '{"quote_id":"quote_...","idempotency_key":"purchase-run-001"}'
492
+ ```
493
+
494
+ Do not pass card data, wallet secrets, provider receipts, Stripe secrets, MPP
495
+ tokens, SPTs, or any payment credential to credits commands. Stripe Checkout
496
+ collects payment details only on Stripe-hosted pages. The public request fields
497
+ are `credits`, `pack_id`, `payment_method`, `quote_id`, status reference IDs,
498
+ and `idempotency_key`.
499
+
500
+ ### `image-skill models`
501
+
502
+ First-run creative discovery. Lists public models and shows the full
503
+ capability-preserving schema for one model.
504
+
505
+ ```bash
506
+ image-skill models --json
507
+ image-skill models list --json
508
+ image-skill models show MODEL_ID --json
509
+ ```
510
+
511
+ Hosted API equivalents:
512
+
513
+ ```bash
514
+ curl -sS https://api.image-skill.com/v1/models
515
+ curl -sS https://api.image-skill.com/v1/models/xai.grok-imagine-image
516
+ ```
517
+
518
+ `models show` exposes operation support, media input/output types, parameter
519
+ schemas, defaults and fixed controls, cost and latency class, safety behavior,
520
+ and migration hints. Agents should inspect it before assuming a model supports
521
+ seeds, masks, reference images, transparent backgrounds, arbitrary aspect
522
+ ratios, image-size presets, output counts, resolution controls, safety
523
+ controls, or provider-native options.
524
+
525
+ Image Skill standardizes common controls so agents can work quickly, but it
526
+ must not flatten rich model capabilities into coarse universal categories.
527
+ Use `model_parameters` for rare or model-specific parameters advertised by the
528
+ capability schema.
529
+
530
+ Current executable provider-native controls include:
531
+
532
+ - Fal FLUX.1 dev: `model_parameters.image_size` for presets such as
533
+ `square_hd`, plus `seed`.
534
+ - Fal FLUX Pro 1.1 Ultra Create: `model_parameters.seed` and
535
+ `model_parameters.raw`; optional reference-image controls remain cataloged
536
+ for inspection but are not executable on the create-only path.
537
+ - Fal Z-Image Turbo Create/Edit: `model_parameters.image_size` for
538
+ `square_hd`, `square`, portrait/landscape presets, and `auto` on edit; costs
539
+ are quoted from requested megapixels when the output size is explicit.
540
+ - Fal Nano Banana 2 Edit: `model_parameters.resolution` for `0.5K`, `1K`,
541
+ `2K`, and `4K`, plus `seed`.
542
+ - Fal Ideogram V2 Edit: `model_parameters.expand_prompt`, `seed`, and
543
+ `style`; pass masks as top-level `--mask` / `mask_asset_id`, not as
544
+ provider `mask_url`.
545
+ - Fal Gemini 3 Pro Image Preview Create/Edit:
546
+ `model_parameters.resolution` for `1K`, `2K`, and `4K`, plus `seed`; 4K is
547
+ quoted as the higher-priced provider tier.
548
+ - Fal Nano Banana Pro Create/Edit: `model_parameters.resolution` for `1K`,
549
+ `2K`, and `4K`, plus `seed`; 4K is quoted as the higher-priced provider tier.
550
+ - Fal FLUX Pro Kontext Pro/Max Edit: `model_parameters.seed`; guidance scale
551
+ and aspect-ratio controls remain cataloged for inspection but are not
552
+ executable until their UX and receipt behavior are represented.
553
+ - Fal Bytedance Seedream 4.5 Create/Edit: `model_parameters.image_size` for
554
+ `square_hd`, `square`, portrait/landscape presets, `auto_2K`, and
555
+ `auto_4K`, plus `seed`; multi-output and multi-reference controls remain
556
+ cataloged but fixed for hosted accounting.
557
+ - Fal Bytedance Seedream 5.0 Lite Create/Edit:
558
+ `model_parameters.image_size` for `square_hd`, `square`, portrait/landscape
559
+ presets, `auto_2K`, and `auto_3K`; multi-output and multi-reference controls
560
+ remain cataloged but fixed for hosted accounting.
561
+ - xAI Grok Imagine Image Quality: `model_parameters.resolution` for `1k` and
562
+ `2k`; 2k is priced from the higher provider tier. Create supports top-level
563
+ `--output-count` up to the model's advertised `max_outputs_per_request`,
564
+ currently mapped to xAI's documented `n` batch parameter.
565
+ - GPT Image 1.5 create/edit: documented fixed sizes `1024x1024`,
566
+ `1024x1536`, and `1536x1024`, output format, compression, transparent or
567
+ opaque background, moderation, and the upstream provider-native quality
568
+ parameter. GPT Image 1.5 create quotes output-token estimates when quality
569
+ and concrete size are known; GPT Image 1.5 create supports top-level
570
+ `--output-count` up to the model's advertised `max_outputs_per_request`,
571
+ currently mapped to OpenAI's `n` parameter. GPT Image 1.5 edit accepts
572
+ low/high `input_fidelity` and remains preflight unknown-cost until usage is
573
+ returned.
574
+ - GPT Image 2 create/edit: size, output format, compression, background,
575
+ moderation, and the upstream provider-native quality parameter. GPT Image 2
576
+ create quotes request-aware output-token estimates when quality and concrete
577
+ size are known; GPT Image 2 create supports top-level `--output-count` up to
578
+ the model's advertised `max_outputs_per_request`, currently mapped to
579
+ OpenAI's `n` parameter. GPT Image 2 edit remains preflight unknown-cost, then
580
+ records usage-priced provider cost when OpenAI returns token usage.
581
+
582
+ Inspect each model before use; provider-native controls are available only
583
+ through validated `model_parameters`.
584
+
585
+ ### `image-skill capabilities`
586
+
587
+ Schema-language view over the same capability catalog. Use this when you need
588
+ the capability abstraction directly rather than starting from a model.
589
+
590
+ ```bash
591
+ image-skill capabilities --json
592
+ image-skill capabilities list --json
593
+ image-skill capabilities show CAPABILITY_ID --json
594
+ ```
595
+
596
+ ### `image-skill create`
597
+
598
+ Creates an image or plans a zero-cost dry run.
599
+
600
+ ```bash
601
+ image-skill create \
602
+ --prompt "A compact field camera on a stainless workbench" \
603
+ --intent explore \
604
+ --aspect-ratio 1:1 \
605
+ --max-estimated-usd-per-image 0.05 \
606
+ --json
607
+ ```
608
+
609
+ Hosted defaults are quality-first. If an agent does not choose a model, Image
610
+ Skill selects the strongest available create capability for the requested
611
+ intent and budget, then records the decision in `request.selection`. Explicit
612
+ `--provider`, `--model`, namespaced model ids, and validated
613
+ `model_parameters` always take precedence. For final/product/hero-style
614
+ intents, Image Skill may default an eligible quality-capability request to a
615
+ higher output tier only when `--max-estimated-usd-per-image` is high enough for
616
+ that tier; otherwise it stays on a lower-cost quality tier or chooses a cheaper
617
+ capability within the budget and tells agents what happened in the selection
618
+ receipt.
619
+
620
+ Preview-compatible richer shape:
621
+
622
+ ```bash
623
+ image-skill create \
624
+ --prompt "Campaign-ready product image of a compact field camera" \
625
+ --intent finalize \
626
+ --model MODEL_ID \
627
+ --aspect-ratio 1:1 \
628
+ --output-count 2 \
629
+ --max-estimated-usd-per-image 0.07 \
630
+ --model-parameters-json '{"seed":1234}' \
631
+ --json
632
+ ```
633
+
634
+ Use `--output-count N` only when `models show MODEL_ID --json` advertises
635
+ `media.output.max_outputs_per_request` greater than `1`. `--output-count` is a
636
+ top-level Image Skill create control; do not pass provider-native `n` through
637
+ `model_parameters` unless the selected model schema explicitly advertises that
638
+ field. Credit pricing and `cost.credit_pricing.credits_required` are total
639
+ operation debits across all requested outputs. `--max-estimated-usd-per-image`
640
+ and raw API `max_estimated_usd_per_image` remain per-image budget guards.
641
+
642
+ For create models with wired reference support, pass owned reference assets
643
+ with the model's advertised reference role. Kling element routes use
644
+ `--element-frontal IMAGE[@ELEMENT_INDEX]` and
645
+ `--element-reference IMAGE[@ELEMENT_INDEX[:REFERENCE_INDEX]]`; flat
646
+ reference-image routes use `--reference-image IMAGE[@INDEX]`; Fal DreamO also
647
+ accepts `:TASK` where `TASK` is `ip`, `id`, or `style`. The public CLI uploads
648
+ local paths and external URLs first, then
649
+ sends top-level `references[]` entries with Image Skill `asset_id` values to
650
+ `/v1/create`. Do not pass provider-native `elements`, `frontal_image_url`,
651
+ `reference_image_urls`, `first_image_url`, `second_image_url`, `images`, or
652
+ `*_reference_task` through `model_parameters`; provider-private URLs are
653
+ resolved server-side after ownership and media-policy validation.
654
+
655
+ ```bash
656
+ image-skill create \
657
+ --model fal.kling-image-o3-text-to-image \
658
+ --prompt "Place the same character in a clean studio campaign" \
659
+ --element-frontal ./character-front.png@0 \
660
+ --element-reference ./character-side.webp@0:0 \
661
+ --output-count 2 \
662
+ --max-estimated-usd-per-image 0.06 \
663
+ --json
664
+ ```
665
+
666
+ ```bash
667
+ image-skill create \
668
+ --model fal.dreamo \
669
+ --prompt "Studio portrait preserving identity with a bolder editorial style" \
670
+ --reference-image ./identity.png@0:id \
671
+ --reference-image ./style.webp@1:style \
672
+ --model-parameters-json '{"image_size":{"width":1280,"height":720}}' \
673
+ --max-estimated-usd-per-image 0.06 \
674
+ --json
675
+ ```
676
+
677
+ High-resolution examples:
678
+
679
+ ```bash
680
+ image-skill create \
681
+ --prompt "Campaign-ready product image of a compact field camera" \
682
+ --intent final \
683
+ --max-estimated-usd-per-image 0.07 \
684
+ --json
685
+
686
+ image-skill create \
687
+ --prompt "Campaign-ready product image of a compact field camera" \
688
+ --model fal.gemini-3-pro-image-preview \
689
+ --model-parameters-json '{"resolution":"4K"}' \
690
+ --max-estimated-usd-per-image 0.30 \
691
+ --json
692
+
693
+ image-skill create \
694
+ --prompt "Campaign-ready product image of a compact field camera" \
695
+ --model xai.grok-imagine-image-quality \
696
+ --model-parameters-json '{"resolution":"2k"}' \
697
+ --max-estimated-usd-per-image 0.07 \
698
+ --json
699
+
700
+ image-skill edit \
701
+ --input-asset-id image_... \
702
+ --prompt "preserve the subject and make this campaign-ready" \
703
+ --model fal.nano-banana-2-edit \
704
+ --model-parameters-json '{"resolution":"4K"}' \
705
+ --accept-unknown-cost \
706
+ --json
707
+ ```
708
+
709
+ `model_parameters` must be validated against the selected model/capability
710
+ schema before any provider call or paid reservation. Unknown fields fail closed
711
+ unless the capability explicitly allows additional properties. This is how
712
+ Image Skill preserves rare model controls without turning every
713
+ provider-specific parameter into a top-level flag.
714
+ In the current preview, Fal create/edit, xAI quality generation, and OpenAI GPT
715
+ Image 2 expose the executable provider-native controls listed in the selected
716
+ model schema. GPT Image 2 create has request-aware output-token credit quotes
717
+ for concrete quality/size requests; GPT Image 2 edit still requires
718
+ unknown-cost acceptance before execution, but records usage-priced provider cost
719
+ after execution when OpenAI returns token usage. Provider-native controls remain
720
+ visible for planning and fail closed until their capability schema marks them
721
+ executable. Hosted
722
+ `create --dry-run` validates `model_parameters` against the selected model,
723
+ returns accepted keys/provenance and request-aware credit pricing for planning,
724
+ and never executes provider controls or consumes credits.
725
+ For dry-run responses, `cost.credit_pricing.credits_required` is the planned
726
+ live execution debit for the selected model. The actual debit for the dry run is
727
+ `quota.consumed_credits: 0`.
728
+
729
+ Minimum success data:
730
+
731
+ ```json
732
+ {
733
+ "job_id": "job_...",
734
+ "capability": {
735
+ "id": "is.image.generate.preview.v1"
736
+ },
737
+ "assets": [
738
+ {
739
+ "asset_id": "image_...",
740
+ "path": "https://media.image-skill.com/a/image_abc123.png",
741
+ "mime_type": "image/png",
742
+ "url": "https://media.image-skill.com/a/image_abc123.png",
743
+ "content_length": 333444,
744
+ "width": 1024,
745
+ "height": 1024
746
+ }
747
+ ],
748
+ "cost": {
749
+ "estimated_usd": 0.05,
750
+ "credit_pricing": {
751
+ "credit_unit_usd": 0.01,
752
+ "credits_required": 9,
753
+ "estimated_provider_cost_usd": 0.05,
754
+ "estimated_revenue_usd": 0.09,
755
+ "pricing_confidence": "known"
756
+ }
757
+ },
758
+ "request": {
759
+ "output_count": 1,
760
+ "selection": {
761
+ "policy": "hosted_default_create_v1",
762
+ "reason": "hosted default selected the strongest currently available quality-first create model",
763
+ "intent": "explore",
764
+ "capability": {
765
+ "id": "is.image.generate.xai-grok-imagine-image-quality.v1"
766
+ },
767
+ "model_parameters": {
768
+ "keys": ["resolution"],
769
+ "defaults_applied": ["resolution=1k"],
770
+ "source": "default_policy"
771
+ },
772
+ "output": {
773
+ "resolution_class": "1k",
774
+ "expected_width": null,
775
+ "expected_height": null,
776
+ "expected_min_short_edge": 1024
777
+ }
778
+ }
779
+ },
780
+ "safety": {
781
+ "status": "allowed"
782
+ }
783
+ }
784
+ ```
785
+
786
+ When hosted artifact storage is configured, `url` is an Image Skill-owned URL.
787
+ Agents should prefer `assets[].url` over provider-origin URLs and should not
788
+ need provider account access to fetch outputs.
789
+
790
+ Hosted create does not accept `--output-dir`. A future download/fetch command
791
+ may add CLI-side local file convenience while preserving hosted artifact URLs as
792
+ the source of truth.
793
+
794
+ If provider generation succeeds but artifact storage fails, the command returns
795
+ `ARTIFACT_STORAGE_WRITE_FAILED` with exit `9` and `retryable: false`. Agents
796
+ should not retry the whole create blindly, because that may duplicate paid
797
+ provider spend.
798
+
799
+ Hosted free-preview API equivalent:
800
+
801
+ ```bash
802
+ curl -sS https://api.image-skill.com/v1/create \
803
+ -H "authorization: Bearer $IMAGE_SKILL_TOKEN" \
804
+ -H "content-type: application/json" \
805
+ -d '{
806
+ "prompt": "A compact field camera on a stainless workbench",
807
+ "intent": "explore",
808
+ "aspect_ratio": "1:1",
809
+ "output_count": 1,
810
+ "max_estimated_usd_per_image": 0.05,
811
+ "model_parameters": {
812
+ "seed": 1234
813
+ }
814
+ }'
815
+ ```
816
+
817
+ Hosted free-preview create currently requires owned artifact storage and returns
818
+ one `assets[]` entry per output with `assets[].url` under
819
+ `https://media.image-skill.com/...` on success.
820
+
821
+ ### `image-skill upload`
822
+
823
+ Normalizes a local image path or remote image URL into an Image Skill-owned
824
+ input asset for later edit workflows.
825
+
826
+ ```bash
827
+ image-skill upload ./source.png --json
828
+ image-skill upload https://example.com/source.png --json
829
+ ```
830
+
831
+ The CLI reads local files and remote URLs client-side, then sends image bytes to
832
+ `POST /v1/upload`. The hosted API does not fetch arbitrary remote URLs in this
833
+ preview. This keeps server-side URL fetching out of the public upload path.
834
+
835
+ Minimum success data:
836
+
837
+ ```json
838
+ {
839
+ "request": {
840
+ "source_kind": "local_path",
841
+ "filename": "source.png",
842
+ "remote_origin": null
843
+ },
844
+ "asset": {
845
+ "asset_id": "image_...",
846
+ "job_id": "job_...",
847
+ "kind": "uploaded",
848
+ "url": "https://media.image-skill.com/a/image_abc123.png",
849
+ "mime_type": "image/png",
850
+ "content_length": 12345
851
+ },
852
+ "upload": {
853
+ "bytes": 12345,
854
+ "mime_type": "image/png",
855
+ "sha256": "...",
856
+ "policy": {
857
+ "status": "allowed"
858
+ }
859
+ }
860
+ }
861
+ ```
862
+
863
+ Supported preview MIME types are `image/png`, `image/jpeg`, `image/webp`,
864
+ `image/gif`, and `image/avif`. Unsupported input returns
865
+ `INPUT_POLICY_DENIED` with exit `6`. Responses never include local paths, raw
866
+ bytes, base64 payloads, full remote URLs, bucket names, or object keys.
867
+
868
+ ### `image-skill edit`
869
+
870
+ Edits an Image Skill-owned input asset or client-normalized local/remote image
871
+ with one hosted provider-backed edit model.
872
+
873
+ ```bash
874
+ image-skill edit \
875
+ --input ASSET_ID_OR_PATH_OR_URL \
876
+ --mask MASK_ASSET_ID_OR_PATH_OR_URL \
877
+ --prompt "Remove the background and keep natural object shadows" \
878
+ --accept-unknown-cost \
879
+ --json
880
+ ```
881
+
882
+ If `--input` is a local path or external URL, the public CLI first normalizes it
883
+ through the same upload resolver as `image-skill upload`, then sends only the
884
+ resulting `asset_id` to `POST /v1/edit`. If `--input` is an Image Skill asset id
885
+ or owned asset URL, edit uses that owned asset directly.
886
+ For models with wired mask support, `--mask` follows the same upload/asset-id
887
+ resolver and sends only `mask_asset_id`; never pass provider-native `mask_url`
888
+ through `model_parameters`.
889
+ For models with wired reference support, pass owned reference assets with the
890
+ model's advertised reference role. Kling element routes use
891
+ `--element-frontal IMAGE[@ELEMENT_INDEX]` and
892
+ `--element-reference IMAGE[@ELEMENT_INDEX[:REFERENCE_INDEX]]`; flat
893
+ reference-image routes use `--reference-image IMAGE[@INDEX[:TASK]]`. The
894
+ public CLI uploads local paths and external URLs first, then sends top-level
895
+ `references[]` entries with Image Skill `asset_id` values. For Kling element
896
+ routes, `--element-frontal ./front.png@0` becomes role `element_frontal` for
897
+ element index `0`, and `--element-reference ./side.webp@0:0` becomes role
898
+ `element_reference` for the same element with reference slot `0`. For DreamO
899
+ create, `--reference-image ./identity.png@0:id` becomes role
900
+ `reference_image`, index `0`, and `reference_task` `id`. For xAI edit,
901
+ `--reference-image ./reference.png@0` becomes the second ordered source image;
902
+ the primary `--input` asset remains the first source image. Do not pass
903
+ provider-native `elements`, `image_url`, `image_urls`, `frontal_image_url`,
904
+ `reference_image_urls`, `first_image_url`, `second_image_url`, `images`, or
905
+ `*_reference_task` through `model_parameters`; provider-private URLs are
906
+ resolved server-side after ownership and media-policy validation.
907
+ Current public `references[]` support covers Kling Image O1, Kling Image O3
908
+ image-to-image/text-to-image, Kling Image v3 image-to-image/text-to-image, and
909
+ Fal DreamO create plus xAI Grok Imagine image edit/quality edit. Kling requests
910
+ may contain at most 40 reference entries across at most 10 contiguous element
911
+ indexes starting at `0`; each referenced element requires one frontal image and
912
+ may include up to three additional reference images. DreamO accepts up to two
913
+ contiguous `reference_image` indexes starting at `0`, each with optional
914
+ `reference_task` `ip`, `id`, or `style`. xAI edit accepts up to two contiguous
915
+ `reference_image` indexes starting at `0` and does not accept `reference_task`.
916
+ Reference assets must be Image Skill-owned PNG, JPEG, or WebP images with
917
+ known non-empty byte length up to 10MB, known width and height of at least
918
+ 300px, and aspect ratio from 0.40 to 2.50.
919
+
920
+ ```bash
921
+ image-skill edit \
922
+ --model fal.kling-image-o3-image-to-image \
923
+ --input ./starting-frame.png \
924
+ --element-frontal ./character-front.png@0 \
925
+ --element-reference ./character-side.webp@0:0 \
926
+ --prompt "Place the same character in a clean studio product portrait" \
927
+ --accept-unknown-cost \
928
+ --json
929
+ ```
930
+
931
+ Direct `/v1/edit` callers use the same owned-asset contract:
932
+
933
+ ```json
934
+ {
935
+ "input_asset_id": "image_starting_frame",
936
+ "model": "fal.kling-image-o3-image-to-image",
937
+ "prompt": "Place the same character in a clean studio product portrait",
938
+ "references": [
939
+ {
940
+ "asset_id": "image_character_front",
941
+ "role": "element_frontal",
942
+ "index": 0
943
+ },
944
+ {
945
+ "asset_id": "image_character_side",
946
+ "role": "element_reference",
947
+ "index": 0,
948
+ "reference_index": 0
949
+ }
950
+ ]
951
+ }
952
+ ```
953
+
954
+ Preview hosted create/edit supports model-specific provider-backed paths such
955
+ as Fal Gemini 3 Pro Image Preview Create (`fal.gemini-3-pro-image-preview`),
956
+ Fal Nano Banana 2 Edit (`fal.nano-banana-2-edit`), Fal Ideogram V2 Edit
957
+ (`fal.ideogram-v2-edit`), Fal Gemini 3 Pro Image
958
+ Preview Edit (`fal.gemini-3-pro-image-preview-edit`), Fal FLUX Pro 1.1 Ultra
959
+ Create (`fal.flux-pro-v1-1-ultra`), Fal FLUX Pro Kontext Edit
960
+ (`fal.flux-pro-kontext`), Fal FLUX Pro Kontext Max Edit
961
+ (`fal.flux-pro-kontext-max`), Fal Seedream 5.0 Lite Create
962
+ (`fal.bytedance-seedream-v5-lite-text-to-image`), Fal Seedream 5.0 Lite Edit
963
+ (`fal.bytedance-seedream-v5-lite-edit`), Fal Seedream 4.5 Create
964
+ (`fal.bytedance-seedream-v4-5-text-to-image`), Fal Seedream 4.5 Edit
965
+ (`fal.bytedance-seedream-v4-5-edit`), Fal Nano Banana Pro Create
966
+ (`fal.nano-banana-pro`), Fal Nano Banana Pro Edit
967
+ (`fal.nano-banana-pro-edit`), GPT Image 1.5 Create
968
+ (`openai.gpt-image-1.5`), GPT Image 1.5 Edit
969
+ (`openai.gpt-image-1.5-edit`), and GPT Image 2 Edit
970
+ (`openai.gpt-image-2-edit`) when their provider credentials are configured.
971
+ Fal Gemini 3 Pro Image Preview create/edit has known per-image pricing: 1K/2K
972
+ requests quote `$0.15` provider cost and 4K quotes the doubled provider tier.
973
+ Fal Nano Banana Pro create/edit uses the same `$0.15` standard and doubled 4K
974
+ provider tier. Fal FLUX Pro 1.1 Ultra Create quotes `$0.06` provider cost per
975
+ image. Fal FLUX Pro Kontext Edit quotes `$0.04` provider cost per image, and
976
+ Fal FLUX Pro Kontext Max Edit quotes `$0.08` provider cost per image. Fal
977
+ Seedream 4.5 create/edit quotes `$0.04` provider cost per image.
978
+ Fal Seedream 5.0 Lite create/edit quotes `$0.035` provider cost per image. Fal
979
+ Z-Image Turbo create/edit quotes `$0.005/MP` when `image_size` is explicit or
980
+ derived from aspect ratio; edit `auto` remains unknown-cost. GPT Image 1.5
981
+ create quotes output-token estimates for concrete quality/size requests using
982
+ OpenAI's fixed-size token table; GPT Image 1.5 edit remains preflight
983
+ unknown-cost because edit input image/text tokens are provider-metered, then
984
+ records usage-priced provider cost when OpenAI returns token usage. GPT Image 2
985
+ create quotes output-token estimates for concrete quality/size requests. GPT
986
+ Image 2 edit remains preflight unknown-cost because edit input image/text tokens
987
+ are provider-metered, then records usage-priced provider cost when OpenAI
988
+ returns token usage. Other edit paths without machine-readable pricing require
989
+ `--accept-unknown-cost` until a stable price source is captured. Responses
990
+ include a new generated asset URL, job id, safety state, quota consumption, and
991
+ input asset metadata where
992
+ applicable. Responses do not include raw prompts, source bytes, base64
993
+ payloads, local paths, full external URLs, bucket names, or object keys.
994
+
995
+ Provider/model names in this paragraph are preview provenance, not the primary
996
+ public UX. The public selection surface should be Image Skill capabilities and
997
+ model-parameter schemas; provider/model details belong in explicit
998
+ provenance/debug output.
999
+
1000
+ ### `image-skill assets show`
1001
+
1002
+ Inspects an Image Skill-owned asset URL or hosted asset id.
1003
+
1004
+ ```bash
1005
+ image-skill assets show \
1006
+ https://media.image-skill.com/a/image_abc123.png \
1007
+ --json
1008
+ ```
1009
+
1010
+ For asset-id lookup, use hosted auth:
1011
+
1012
+ ```bash
1013
+ image-skill assets show image_... --json
1014
+ ```
1015
+
1016
+ Minimum success data:
1017
+
1018
+ ```json
1019
+ {
1020
+ "request": {
1021
+ "reference": "image_...",
1022
+ "reference_type": "asset_id"
1023
+ },
1024
+ "asset": {
1025
+ "asset_id": "image_...",
1026
+ "job_id": "job_...",
1027
+ "url": "https://media.image-skill.com/a/image_abc123.png",
1028
+ "mime_type": "image/png",
1029
+ "content_length": 12345,
1030
+ "width": 1024,
1031
+ "height": 1024,
1032
+ "source": "hosted_metadata"
1033
+ }
1034
+ }
1035
+ ```
1036
+
1037
+ External URLs are rejected. Older assets created before hosted asset metadata
1038
+ was recorded may still be inspectable by Image Skill-owned URL.
1039
+
1040
+ ### `image-skill assets get`
1041
+
1042
+ Downloads an Image Skill-owned asset URL or hosted asset id to a local file.
1043
+
1044
+ ```bash
1045
+ image-skill assets get \
1046
+ https://media.image-skill.com/a/image_abc123.png \
1047
+ --output ./result.png \
1048
+ --json
1049
+ ```
1050
+
1051
+ The command refuses to overwrite existing files unless `--overwrite` is
1052
+ explicit. It verifies byte length when the asset server provides a
1053
+ `content-length` header.
1054
+
1055
+ ### `image-skill jobs show`
1056
+
1057
+ Inspects a hosted Image Skill job visible to the authenticated agent.
1058
+
1059
+ ```bash
1060
+ image-skill jobs show job_... --json
1061
+ ```
1062
+
1063
+ Output includes public job status, trace id, timestamps, capability id, cost
1064
+ summary, safety status, and Image Skill-owned asset metadata. Provider/model
1065
+ provenance is available only through explicit provenance/debug affordances for
1066
+ authorized actors. Default output does not include raw prompts, generated bytes, provider
1067
+ credentials, DB/storage keys, bucket names, or local paths.
1068
+
1069
+ ### `image-skill jobs wait`
1070
+
1071
+ Waits for a hosted Image Skill job to reach a terminal status.
1072
+
1073
+ ```bash
1074
+ image-skill jobs wait job_... --timeout-ms 30000 --poll-interval-ms 1000 --json
1075
+ ```
1076
+
1077
+ Completed jobs return immediately. Non-terminal jobs poll until completion,
1078
+ failure, cancellation, or deterministic timeout.
1079
+
1080
+ ### `image-skill activity list`
1081
+
1082
+ Lists recent hosted activity ledger events visible to the authenticated agent.
1083
+
1084
+ ```bash
1085
+ image-skill activity list --limit 20 --json
1086
+ image-skill activity list --subject job_... --json
1087
+ ```
1088
+
1089
+ Activity is the ledger, not the work queue. Use it to find recent event IDs,
1090
+ related job IDs, asset IDs, usage IDs, feedback IDs, trace IDs, status changes,
1091
+ and product-memory writes. Use `jobs show` or `jobs wait` when you need
1092
+ operational recovery, polling, retry judgment, or final job assets.
1093
+
1094
+ Minimum success data:
1095
+
1096
+ ```json
1097
+ {
1098
+ "events": [
1099
+ {
1100
+ "event_id": "evt_...",
1101
+ "type": "job.completed",
1102
+ "occurred_at": "2026-05-05T19:00:23.000Z",
1103
+ "summary": "Create job completed",
1104
+ "operation": "create",
1105
+ "subject": {
1106
+ "type": "job",
1107
+ "id": "job_..."
1108
+ },
1109
+ "links": {
1110
+ "job_id": "job_...",
1111
+ "asset_ids": ["image_..."],
1112
+ "feedback_id": null,
1113
+ "usage_event_id": "usage_..."
1114
+ },
1115
+ "status": "completed",
1116
+ "cost": {
1117
+ "estimated_usd": 0.025
1118
+ }
1119
+ }
1120
+ ],
1121
+ "source": "hosted_activity_ledger"
1122
+ }
1123
+ ```
1124
+
1125
+ The ledger hides provider and storage implementation details by default. It is
1126
+ safe to cite `evt_...`, `job_...`, `image_...`, `usage_...`, `feedback_id`,
1127
+ and `trace_id` values in feedback.
1128
+
1129
+ Hosted API equivalent:
1130
+
1131
+ ```bash
1132
+ curl -sS "https://api.image-skill.com/v1/activity?limit=20&subject=job_..." \
1133
+ -H "authorization: Bearer $IMAGE_SKILL_TOKEN"
1134
+ ```
1135
+
1136
+ ### `image-skill activity show`
1137
+
1138
+ Shows one hosted activity event or the latest events related to one subject.
1139
+
1140
+ ```bash
1141
+ image-skill activity show evt_... --json
1142
+ image-skill activity show job_... --json
1143
+ image-skill activity show image_... --json
1144
+ image-skill activity show sig_... --json
1145
+ ```
1146
+
1147
+ `activity show` accepts activity event IDs plus job, asset, usage, feedback, and
1148
+ trace references. When the reference is a subject rather than one exact event,
1149
+ the response includes matching ledger events so an agent can cite the right
1150
+ event without reading telemetry logs.
1151
+
1152
+ Hosted API equivalent:
1153
+
1154
+ ```bash
1155
+ curl -sS https://api.image-skill.com/v1/activity/evt_... \
1156
+ -H "authorization: Bearer $IMAGE_SKILL_TOKEN"
1157
+ ```
1158
+
1159
+ ### Activity Event Registry
1160
+
1161
+ Activity `type` values are stable public contract values. Do not infer new
1162
+ event names from provider responses or telemetry logs; use only the registry
1163
+ below.
1164
+
1165
+ | Event type | Subject | Operation | Emitted when | Stable links |
1166
+ | ------------------------------------------ | ---------- | ----------- | ----------------------------------------------------------------- | ------------------------------------------------------------------ |
1167
+ | `job.completed` | `job` | create/edit | A hosted create or edit job reaches a terminal state. | `job_id`, `asset_ids`, `usage_event_id` |
1168
+ | `asset.created` | `asset` | create/edit | A hosted create or edit produces an output asset. | `job_id`, `asset_ids`, `usage_event_id` |
1169
+ | `asset.uploaded` | `asset` | upload | A public edit workflow uploads or imports input media. | `job_id`, `asset_ids`, `usage_event_id` |
1170
+ | `usage.credit_consumed` | `usage` | usage | A creative operation records a preview-credit entry. | `job_id`, `usage_event_id` |
1171
+ | `feedback.created` | `feedback` | feedback | Hosted agent feedback is accepted into product memory. | `feedback_id` |
1172
+ | `feedback.github_queue.processed` | `feedback` | feedback | Feedback is processed by the GitHub implementation queue handoff. | `feedback_id` |
1173
+ | `payment.checkout_session.created` | `payment` | payment | A Stripe Checkout session is created and awaits external action. | `quote_id`, `payment_attempt_id`, `checkout_session_id` |
1174
+ | `credits.payment_backed_granted` | `credit` | credits | Verified payment or fake-payment proof grants paid credits. | `quote_id`, `receipt_id`, `credit_event_id` |
1175
+ | `credits.payment_backed_refunded` | `credit` | credits | A Stripe refund debits payment-backed credits. | `quote_id`, `receipt_id`, `payment_reversal_id`, `credit_event_id` |
1176
+ | `credits.payment_backed_disputed` | `credit` | credits | A Stripe dispute debit applies to payment-backed credits. | `quote_id`, `receipt_id`, `payment_reversal_id`, `credit_event_id` |
1177
+ | `credits.payment_backed_reinstated` | `credit` | credits | Stripe dispute funds were reinstated and recorded. | `quote_id`, `receipt_id`, `payment_reversal_id` |
1178
+ | `credits.payment_backed_reversal_pending` | `credit` | credits | A reversal was recorded but could not be fully applied. | `quote_id`, `receipt_id`, `payment_reversal_id` |
1179
+ | `credits.payment_backed_reversal_rejected` | `credit` | credits | A reversal was rejected because it could not safely reconcile. | `quote_id`, `receipt_id`, `payment_reversal_id` |
1180
+
1181
+ `feedback.github_queue.processed` includes `details.github_queue` with
1182
+ machine-readable lifecycle fields such as `state`, `reason`, `issue_urls`,
1183
+ `issue_numbers`, `mode`, and `github_mutation`. Agents should use it to learn
1184
+ whether submitted feedback was promoted, skipped, deduped, blocked, or already
1185
+ mirrored without reading private repository artifacts.
1186
+
1187
+ If a response includes an event type outside this registry, treat it as a
1188
+ contract bug and submit `image-skill feedback create --json` with the event ID
1189
+ and trace ID.
1190
+
1191
+ ### `image-skill feedback create`
1192
+
1193
+ Leaves structured product feedback in hosted Image Skill product memory.
1194
+ At minimum, provide `--title` and `--body`; Image Skill accepts narrative
1195
+ feedback and adds quality guidance server-side. Use the structured fields below
1196
+ when the agent already knows them.
1197
+
1198
+ ```bash
1199
+ image-skill feedback create \
1200
+ --type user_feedback \
1201
+ --title "Short concrete title" \
1202
+ --body "What happened, what was expected, and why it matters" \
1203
+ --command "Command or workflow observed" \
1204
+ --expected "Expected result" \
1205
+ --actual "Actual result" \
1206
+ --proof-needed "What would prove this is handled" \
1207
+ --surface cli,docs \
1208
+ --evidence trace:TRACE_ID \
1209
+ --severity medium \
1210
+ --confidence high \
1211
+ --next-state watch \
1212
+ --json
1213
+ ```
1214
+
1215
+ Hosted feedback requires `IMAGE_SKILL_TOKEN` and persists through
1216
+ `https://api.image-skill.com/v1/feedback`. The hosted API fails closed if
1217
+ durable hosted feedback storage is unavailable.
1218
+
1219
+ JSON errors may include `error.recovery` with machine-readable fields such as
1220
+ `required_flag`, `suggested_command`, `docs_url`, or `retry_after_seconds`.
1221
+ Agents should prefer those fields over parsing prose error messages. For
1222
+ example, `BUDGET_REQUIRES_CONFIRMATION` returns
1223
+ `required_flag: "--accept-unknown-cost"`.
1224
+
1225
+ `whoami`, `usage quota`, `quota`, `credits quote`, `credits buy`,
1226
+ `credits status`, `credits fake-purchase`, `create`, `activity list`,
1227
+ `activity show`, and `feedback create` accept `--token-stdin` for stdin-based
1228
+ secret handoff.
1229
+ `credits methods` and `credits packs list` do not require auth.
1230
+
1231
+ Feedback should avoid raw prompts, provider keys, generated image bytes, source
1232
+ image bytes, and private user data.
1233
+
1234
+ Hosted API equivalent:
1235
+
1236
+ ```bash
1237
+ curl -sS https://api.image-skill.com/v1/feedback \
1238
+ -H "authorization: Bearer $IMAGE_SKILL_TOKEN" \
1239
+ -H "content-type: application/json" \
1240
+ -d '{
1241
+ "type": "user_feedback",
1242
+ "title": "Short concrete title",
1243
+ "body": "What happened, what was expected, and why it matters",
1244
+ "command": "Command or workflow observed",
1245
+ "expected": "Expected result",
1246
+ "actual": "Actual result",
1247
+ "proof_needed": "What would prove this is handled",
1248
+ "surface": ["cli", "docs"],
1249
+ "evidence": ["trace:TRACE_ID"],
1250
+ "severity": "medium",
1251
+ "confidence": "high",
1252
+ "next_state": "watch"
1253
+ }'
1254
+ ```
1255
+
1256
+ ### Planned Resource Commands
1257
+
1258
+ `jobs list`, `assets list`, `assets delete`, and async job cancellation are
1259
+ planned public resource commands. They are not part of the current public
1260
+ allowlist until the hosted service backs them and this contract lists their
1261
+ exact command shapes. `activity list/show` is available now for ledger
1262
+ readback, but it is not a substitute for future job listing, cancellation, or
1263
+ retry controls.