pixelkiln 0.99.0 → 0.100.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/ENDPOINTS.md CHANGED
@@ -86,8 +86,8 @@ not probed.
86
86
  | `GET /balance` | `doctor`, `gen` balance reads, gallery | Measured live | Free. Count is at `subscription.generations` ([Reproducing these numbers](#reproducing-these-numbers)). | Only the subscription shape is documented; a credit-only account's reply is not recorded. | Low |
87
87
  | `GET /pro-flash/cost` | Pro Flash estimates for `character` and `imageProFlash` | Measured live | Free quote. For `operation=character`: image 5 up to 96px, 6 to 208px, 9 above, plus rotations; two live jobs (7 and 2) billed exactly the quote ([Characters, measured](#characters-measured)). | Quotes for `create`, `edit` and `inpaint` are recorded from PixelLab's MCP `get_pro_flash_capabilities`, not from this route (roadmap, "Pro Flash for plain image create, edit, and inpaint"). | Low |
88
88
  | `GET /background-jobs/{id}` | every job poll; where the billed amount is read | Measured live | `usage` at the top level and again at `last_response.billing_usage`; confirmed for a `map` object (1), a standard character base (1) and the skeleton jobs ([Limits and billing](#limits-and-billing)). | Jobs are deleted 8 hours after finishing, so a bill not read in time is lost (the v3 base bill was). | Low |
89
- | `POST /create-image-pixflux` | `pixflux` | Measured live | 1 generation, PNG inline, about 10 s; `color_image` is a hard palette lock (130 badges, 65 of 65 in each set) ([Single-image generators, measured](#single-image-generators-measured)). Ran in `benchmarks/provider-environments/pixellab`. | None recorded. | Low |
90
- | `POST /map-objects` (+ `GET /map-objects/{id}`, falling back to `GET /objects`) | `map` | Measured live | 1 generation, job about 30 s; the job record expires after 8 hours but the image survives ([Object lifecycle](#object-lifecycle)). `color_image` returns 500. | The `scene` field (`background_image` + inpainting): "Unverified until a real call is billed" ([GENERATORS.md](./GENERATORS.md), `map`). | Low |
89
+ | `POST /create-image-pixflux` | `pixflux` | Measured live | 1 generation, PNG inline, about 10 s; `color_image` is a hard palette lock (130 badges, 65 of 65 in each set) ([Single-image generators, measured](#single-image-generators-measured)). Ran in `benchmarks/provider-environments/pixellab`. `init_image` with `init_image_strength` 30, 100, 300 and 800 each billed the usual 1 (November 2026; see [Init images](#init-images-measured)). | None recorded. | Low |
90
+ | `POST /map-objects` (+ `GET /map-objects/{id}`, falling back to `GET /objects`) | `map` | Measured live | 1 generation, job about 30 s; the job record expires after 8 hours but the image survives ([Object lifecycle](#object-lifecycle)). `color_image` returns 500. `init_image` at the same four strengths billed 1 each (November 2026; see [Init images](#init-images-measured)). | The `scene` field (`background_image` + inpainting): "Unverified until a real call is billed" ([GENERATORS.md](./GENERATORS.md), `map`). | Low |
91
91
  | `POST /generate-image-v2` | `imagePro` | Measured live | A 64×64 call billed 10 (40 before the cut) and 10 again with `target_palette`; the completed job was read and a candidate downloaded through `gen` ([October 2026 Pro price cut](#october-2026-pro-price-cut), [Target palette](#target-palette-target_palette)). | Canvases above 65536px² (15 and 25 tiers) are priced from the shared Pro ladder, not measured here; `reference_images` and `style_image` are unmodeled. | High |
92
92
  | `POST /create-image-pro-flash` | `imageProFlash` | Measured live | A 32×32 still with a four-colour `target_palette` billed 5, in only those colours (November 2026; [GENERATORS.md](./GENERATORS.md#target-palette)). | Larger canvases (quote 9 at 256px) and the style-image path were never billed. | Medium |
93
93
  | `POST /edit-image-pro-flash` | revision `engine: "pro-flash"`, `image-to-image` | Mock only | Quote 5 at 64px, provisional, from MCP (roadmap, "Pro Flash for plain image create, edit, and inpaint"). | Never billed; completed-job shape never read live; the `reference` edit method is unmodeled. | Medium |
@@ -119,7 +119,7 @@ not probed.
119
119
  | `POST /create-tiles-pro` (+ `GET /tiles-pro/{id}`) | `tiles` | Measured live | One numbered description, 4 tiles at 16px, with a Game Boy `target_palette`, billed 10, every candidate in the palette (November 2026). `GET` has no `status`: 423 while drawing ([Tilesets: measured once per kind](#tilesets-measured-once-per-kind)). | `tile_feature` sets (`roads`, `tileset`, `building`) and `tile_rules`; large tile-size × variation canvases that reach the top tier. | High |
120
120
  | `POST /create-tileset` (+ `GET /tilesets/{id}`) | `terrain`, top-down | Measured live | Pro 32px billed 15 (three sets, one connected through `lower_base_tile_id`, one with edge slope); Pro 64px billed 25 and returned 25 tiles at transition 0.5; standard sets billed 3 each (planned 4), one connected through `upper_base_tile_id` ([Tilesets: measured once per kind](#tilesets-measured-once-per-kind), October 2026). `target_palette` on Pro, mock only. In November 2026 five standard 16px sets billed 1 each, with `shape_seed`, side walls, `enhance: false`, walkable flags, and reference images ([Tileset options, November 2026](#tileset-options-november-2026-measured)). | Pro below 32px; standard above 32px; a standard set cannot connect to a Pro set. | High |
121
121
  | `POST /create-tileset-sidescroller` | `terrain`, `terrainOrientation: "sidescroller"` | Measured live | Since November 2026: a standard 16px set billed 1 and a pro 16px set billed 15; 16 tiles each; a standard request with `lower_base_tile_id` is refused with a 422. The older model billed 3 ([Tileset options, November 2026](#tileset-options-november-2026-measured)). | `lower_reference_image` (pro) and `transition_reference_image` (standard) are mock only; 32px. | High |
122
- | `POST /create-isometric-tile` (+ `GET /isometric-tiles/{id}`) | `isometricTile` | Measured live | One 32px `block` billed 1 generation, not the schema's `usd: 0.02` example ([Standalone isometric tile](#standalone-isometric-tile-schema-documented-cost-measured-once)). | Other sizes and shapes; flat pricing across 16 to 64px is an assumption. | Low |
122
+ | `POST /create-isometric-tile` (+ `GET /isometric-tiles/{id}`) | `isometricTile` | Measured live | One 32px `block` billed 1 generation, not the schema's `usd: 0.02` example ([Standalone isometric tile](#standalone-isometric-tile-schema-documented-cost-measured-once)). | Other sizes and shapes; flat pricing across 16 to 64px is an assumption. `init_image` is sent but mock only. | Low |
123
123
  | `POST /create-ui-asset` (+ `GET /ui-assets/{id}`) | `uiAsset` | Measured live | One 256×192 call billed 20, the low end of the quoted 20 to 40; the plan prices 40 ([UI panels](#ui-panels-one-endpoint-schema-documented-cost-unverified), September 2026). | A second size; `pixelkiln plan` over-reads. | High |
124
124
  | `POST /ui-assets/{id}/split` | `pixelkiln ui split` | Measured live | Free; a 256×192 template split into the 3 elements its `split_preview` listed. A second split is refused client-side ([UI split, states and 9-slice](#ui-split-states-and-9-slice-measured)). | Custom `boxes` are mock only. | Low |
125
125
  | `POST /ui-assets/states` | `pixelkiln ui states` | Measured live | One 86×38 element in 2 states quoted and billed 10; about a minute. State images differ in size from their element. | The 15 and 25 tiers, several elements in one call, and `target_palette` are mock only. | High |
@@ -218,6 +218,33 @@ set the row to Run live, not measured rather than leaving it Mock only.
218
218
 
219
219
  ---
220
220
 
221
+ ## Init images, measured
222
+
223
+ `init_image` and `init_image_strength` (1 to 999, default 300) on
224
+ `/create-image-pixflux`, `/map-objects` and `/create-isometric-tile`, wrapped
225
+ as an asset's `initImage` and `initImageStrength`
226
+ ([manifest reference](./MANIFEST.md#starting-from-an-image)). Measured on 14
227
+ November 2026 (Tier 3): a 64×64 knight as the starting image, the prompt "a
228
+ knight in golden armor with a red cape", `seed` 77, on both `pixflux` and
229
+ `map`. Ten calls, each billed 1 generation, the same as without an init image.
230
+
231
+ | `init_image_strength` | Result, the same on both generators |
232
+ |---|---|
233
+ | none sent (no init image) | a gold knight with a red cape |
234
+ | 30 | a new gold knight; the starting image sets only scale and placement |
235
+ | 100 | the starting silhouette and armor with gold trim and a red cape |
236
+ | 300 (the default) | the starting image lightly redrawn; the prompt's colors absent |
237
+ | 800 | the starting image, all but unchanged |
238
+
239
+ - The default holds far harder than a "300 of 999" suggests: at 300 the prompt
240
+ changed nothing visible. A restyle that keeps the shape wants about 100.
241
+ - The starting image and the output were both 64×64. Whether a different size
242
+ is accepted, scaled or refused was not tried.
243
+ - `/create-isometric-tile` takes the same two fields; PixelKiln sends them, with
244
+ mocked tests only.
245
+
246
+ ---
247
+
221
248
  ## Single-image generators, measured
222
249
 
223
250
  The endpoints that produce one standalone image. This is the decision that
package/docs/MANIFEST.md CHANGED
@@ -70,6 +70,8 @@ not merely a label edit.
70
70
  | `portrait` | object | `character` styles: a bust of a base or state's south sprite, `{ "of": "<asset>", "size": 64 }`; `size` is 16, 32, 48, 64 (default), 128, or 160. See [Portraits](./CHARACTERS.md#portraits). |
71
71
  | `outfit` | object | `character` styles: an existing loop's frames re-clothed from an outfit image, `{ "of": "<loop asset>", "reference": "<image>" }`, with optional `additionalInstructions`. See [Outfit transfer](./CHARACTERS.md#outfit-transfer). |
72
72
  | `mirror` | string | Another asset of the same style flipped left to right, made locally at no cost. See [Mirrors](./CHARACTERS.md#mirrors). |
73
+ | `initImage` | string | `pixflux`, `map` and `isometricTile` styles: a PNG to start the drawing from, relative to the manifest. See [Starting from an image](#starting-from-an-image). |
74
+ | `initImageStrength` | integer 1–999, default 300 | With `initImage`: how strongly the starting image holds. About 100 blends it with the prompt; 300 and up mostly returns it. |
73
75
  | `terrainReferences` | object | `terrain` styles: a PNG per terrain to take that terrain's look from, `{ "lower": "refs/water.png", "upper": "refs/sand.png", "transition": "refs/foam.png" }`, paths relative to the manifest. See [Terrain reference images](./TILES.md#terrain-reference-images). |
74
76
  | `derive` | object | Made from existing pixels by one local transform, at no cost, with no provider. See [Derived and external assets](#derived-and-external-assets). |
75
77
  | `external` | object | Built by a script or tool outside pixelkiln; pixelkiln records and tracks the file but never builds it. See [Derived and external assets](#derived-and-external-assets). |
@@ -526,6 +528,43 @@ their own page: [Characters](./CHARACTERS.md) and
526
528
  }
527
529
  ```
528
530
 
531
+ ## Starting from an image
532
+
533
+ A `pixflux`, `map` or `isometricTile` asset can start from a PNG instead of
534
+ from nothing:
535
+
536
+ ```json
537
+ "gold_knight": {
538
+ "prompt": "a knight in golden armor with a red cape",
539
+ "initImage": "art/knight.png",
540
+ "initImageStrength": 100
541
+ }
542
+ ```
543
+
544
+ PixelLab reworks the image toward the prompt. `initImageStrength` (1 to 999)
545
+ sets how strongly the starting image holds, and its default of 300 holds much
546
+ harder than the number suggests. Measured on a 64x64 knight with the prompt
547
+ above (November 2026, the same on `pixflux` and `map`):
548
+
549
+ | Strength | Result |
550
+ |---|---|
551
+ | 30 | The prompt wins: a new gold knight at about the same scale and placement. |
552
+ | 100 | A blend: the original silhouette and armor, with gold trim and a red cape. |
553
+ | 300 (default) | The starting image, lightly redrawn. No gold, no red. |
554
+ | 800 | The starting image, all but unchanged. |
555
+
556
+ So to restyle a sprite while keeping its shape, set about 100; leave the
557
+ default only when you want a faithful redraw. For a controlled edit of an
558
+ existing asset, with a parent the plan tracks, a
559
+ [revision](./REVISIONS.md) is the better tool; `initImage` is for a loose
560
+ starting file.
561
+
562
+ The file is hashed into the asset's identity, with the strength when it is
563
+ set, so replacing it marks the asset stale and renaming it does not. A missing
564
+ file is a manifest error, and a file changed between `plan` and `gen` is
565
+ refused at submit. It costs nothing extra: each of these billed the
566
+ generator's usual 1 generation.
567
+
529
568
  ## Controlled revisions
530
569
 
531
570
  ```jsonc
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelkiln",
3
- "version": "0.99.0",
3
+ "version": "0.100.0",
4
4
  "description": "Manifest-driven pixel-art generation, review, recovery, and packaging with deterministic provenance.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -1926,6 +1926,15 @@
1926
1926
  "type": "string",
1927
1927
  "minLength": 1
1928
1928
  },
1929
+ "initImage": {
1930
+ "type": "string",
1931
+ "minLength": 1
1932
+ },
1933
+ "initImageStrength": {
1934
+ "type": "integer",
1935
+ "minimum": 1,
1936
+ "maximum": 999
1937
+ },
1929
1938
  "terrainReferences": {
1930
1939
  "type": "object",
1931
1940
  "properties": {