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.
- package/CHANGELOG.md +53 -0
- package/PROVENANCE.md +78 -0
- package/README.md +48 -10
- package/bin/image-skill.mjs +564 -8
- package/cli.md +340 -44
- package/llms.txt +45 -24
- package/package.json +22 -4
- package/skill.md +225 -23
- package/skills/image-skill/SKILL.md +562 -0
- package/skills/image-skill/references/cli.md +1263 -0
- package/skills/image-skill/references/llms.txt +248 -0
package/cli.md
CHANGED
|
@@ -331,9 +331,21 @@ curl -sS https://api.image-skill.com/v1/credit-quotes \
|
|
|
331
331
|
|
|
332
332
|
Creates a live-provider payment action for a previously returned quote. Stripe
|
|
333
333
|
Checkout is the first supported provider. This creates a hosted Stripe Checkout
|
|
334
|
-
Session and returns an `action_required` response with
|
|
335
|
-
are granted only after verified Stripe webhook
|
|
336
|
-
creation itself must not mutate credit balances.
|
|
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.
|
|
337
349
|
|
|
338
350
|
```bash
|
|
339
351
|
image-skill credits buy \
|
|
@@ -353,14 +365,19 @@ Minimum success data:
|
|
|
353
365
|
"provider": "stripe",
|
|
354
366
|
"accepted_payment_method": "stripe_checkout",
|
|
355
367
|
"checkout_session_id": "cs_...",
|
|
356
|
-
"
|
|
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_...",
|
|
357
371
|
"credits": 500,
|
|
358
372
|
"amount_cents": 500,
|
|
359
373
|
"currency": "USD",
|
|
360
374
|
"live_money": true,
|
|
361
375
|
"next": {
|
|
362
376
|
"human_action": "open_checkout_url",
|
|
363
|
-
"
|
|
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"
|
|
364
381
|
}
|
|
365
382
|
}
|
|
366
383
|
```
|
|
@@ -404,14 +421,18 @@ Minimum action-required data:
|
|
|
404
421
|
"payment_attempt": {
|
|
405
422
|
"payment_attempt_id": "payatt_...",
|
|
406
423
|
"checkout_session_id": "cs_...",
|
|
407
|
-
"
|
|
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_...",
|
|
408
427
|
"attempt_status": "requires_action"
|
|
409
428
|
},
|
|
410
429
|
"receipt": null,
|
|
411
430
|
"credit_event": null,
|
|
412
431
|
"next": {
|
|
413
432
|
"retry_after_seconds": 10,
|
|
414
|
-
"human_action": "open_checkout_url"
|
|
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_..."
|
|
415
436
|
}
|
|
416
437
|
}
|
|
417
438
|
```
|
|
@@ -506,12 +527,60 @@ must not flatten rich model capabilities into coarse universal categories.
|
|
|
506
527
|
Use `model_parameters` for rare or model-specific parameters advertised by the
|
|
507
528
|
capability schema.
|
|
508
529
|
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
`model_parameters
|
|
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`.
|
|
515
584
|
|
|
516
585
|
### `image-skill capabilities`
|
|
517
586
|
|
|
@@ -537,29 +606,125 @@ image-skill create \
|
|
|
537
606
|
--json
|
|
538
607
|
```
|
|
539
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
|
+
|
|
540
620
|
Preview-compatible richer shape:
|
|
541
621
|
|
|
542
622
|
```bash
|
|
543
623
|
image-skill create \
|
|
544
|
-
--prompt-
|
|
624
|
+
--prompt "Campaign-ready product image of a compact field camera" \
|
|
545
625
|
--intent finalize \
|
|
546
626
|
--model MODEL_ID \
|
|
547
627
|
--aspect-ratio 1:1 \
|
|
548
|
-
--
|
|
549
|
-
--max-usd 0.
|
|
628
|
+
--output-count 2 \
|
|
629
|
+
--max-estimated-usd-per-image 0.07 \
|
|
550
630
|
--model-parameters-json '{"seed":1234}' \
|
|
551
631
|
--json
|
|
552
632
|
```
|
|
553
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
|
+
|
|
554
709
|
`model_parameters` must be validated against the selected model/capability
|
|
555
710
|
schema before any provider call or paid reservation. Unknown fields fail closed
|
|
556
711
|
unless the capability explicitly allows additional properties. This is how
|
|
557
712
|
Image Skill preserves rare model controls without turning every
|
|
558
713
|
provider-specific parameter into a top-level flag.
|
|
559
|
-
In the current preview, Fal create/edit
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
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`.
|
|
563
728
|
|
|
564
729
|
Minimum success data:
|
|
565
730
|
|
|
@@ -574,19 +739,44 @@ Minimum success data:
|
|
|
574
739
|
"asset_id": "image_...",
|
|
575
740
|
"path": "https://media.image-skill.com/a/image_abc123.png",
|
|
576
741
|
"mime_type": "image/png",
|
|
577
|
-
"url": "https://media.image-skill.com/a/image_abc123.png"
|
|
742
|
+
"url": "https://media.image-skill.com/a/image_abc123.png",
|
|
743
|
+
"content_length": 333444,
|
|
744
|
+
"width": 1024,
|
|
745
|
+
"height": 1024
|
|
578
746
|
}
|
|
579
747
|
],
|
|
580
748
|
"cost": {
|
|
581
|
-
"estimated_usd": 0.
|
|
749
|
+
"estimated_usd": 0.05,
|
|
582
750
|
"credit_pricing": {
|
|
583
751
|
"credit_unit_usd": 0.01,
|
|
584
|
-
"credits_required":
|
|
585
|
-
"estimated_provider_cost_usd": 0.
|
|
586
|
-
"estimated_revenue_usd": 0.
|
|
752
|
+
"credits_required": 9,
|
|
753
|
+
"estimated_provider_cost_usd": 0.05,
|
|
754
|
+
"estimated_revenue_usd": 0.09,
|
|
587
755
|
"pricing_confidence": "known"
|
|
588
756
|
}
|
|
589
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
|
+
},
|
|
590
780
|
"safety": {
|
|
591
781
|
"status": "allowed"
|
|
592
782
|
}
|
|
@@ -616,6 +806,7 @@ curl -sS https://api.image-skill.com/v1/create \
|
|
|
616
806
|
"prompt": "A compact field camera on a stainless workbench",
|
|
617
807
|
"intent": "explore",
|
|
618
808
|
"aspect_ratio": "1:1",
|
|
809
|
+
"output_count": 1,
|
|
619
810
|
"max_estimated_usd_per_image": 0.05,
|
|
620
811
|
"model_parameters": {
|
|
621
812
|
"seed": 1234
|
|
@@ -624,7 +815,8 @@ curl -sS https://api.image-skill.com/v1/create \
|
|
|
624
815
|
```
|
|
625
816
|
|
|
626
817
|
Hosted free-preview create currently requires owned artifact storage and returns
|
|
627
|
-
`assets[]
|
|
818
|
+
one `assets[]` entry per output with `assets[].url` under
|
|
819
|
+
`https://media.image-skill.com/...` on success.
|
|
628
820
|
|
|
629
821
|
### `image-skill upload`
|
|
630
822
|
|
|
@@ -681,6 +873,7 @@ with one hosted provider-backed edit model.
|
|
|
681
873
|
```bash
|
|
682
874
|
image-skill edit \
|
|
683
875
|
--input ASSET_ID_OR_PATH_OR_URL \
|
|
876
|
+
--mask MASK_ASSET_ID_OR_PATH_OR_URL \
|
|
684
877
|
--prompt "Remove the background and keep natural object shadows" \
|
|
685
878
|
--accept-unknown-cost \
|
|
686
879
|
--json
|
|
@@ -690,16 +883,114 @@ If `--input` is a local path or external URL, the public CLI first normalizes it
|
|
|
690
883
|
through the same upload resolver as `image-skill upload`, then sends only the
|
|
691
884
|
resulting `asset_id` to `POST /v1/edit`. If `--input` is an Image Skill asset id
|
|
692
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
|
+
```
|
|
693
953
|
|
|
694
|
-
Preview hosted edit supports model-specific provider-backed
|
|
695
|
-
Fal
|
|
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
|
|
696
970
|
(`openai.gpt-image-2-edit`) when their provider credentials are configured.
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
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.
|
|
703
994
|
|
|
704
995
|
Provider/model names in this paragraph are preview provenance, not the primary
|
|
705
996
|
public UX. The public selection surface should be Image Skill capabilities and
|
|
@@ -871,16 +1162,21 @@ Activity `type` values are stable public contract values. Do not infer new
|
|
|
871
1162
|
event names from provider responses or telemetry logs; use only the registry
|
|
872
1163
|
below.
|
|
873
1164
|
|
|
874
|
-
| Event type
|
|
875
|
-
|
|
|
876
|
-
| `job.completed`
|
|
877
|
-
| `asset.created`
|
|
878
|
-
| `asset.uploaded`
|
|
879
|
-
| `usage.credit_consumed`
|
|
880
|
-
| `feedback.created`
|
|
881
|
-
| `feedback.github_queue.processed`
|
|
882
|
-
| `payment.checkout_session.created`
|
|
883
|
-
| `credits.payment_backed_granted`
|
|
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` |
|
|
884
1180
|
|
|
885
1181
|
`feedback.github_queue.processed` includes `details.github_queue` with
|
|
886
1182
|
machine-readable lifecycle fields such as `state`, `reason`, `issue_urls`,
|