Skip to content

Add --background keep for sprite sheets that stay plain - #10

Merged
TheDesignFounder merged 1 commit into
mainfrom
feat/sprite-background-keep
Sep 27, 2026
Merged

TheDesignFounder merged 1 commit into
mainfrom
feat/sprite-background-keep

Conversation

@TheDesignFounder

Copy link
Copy Markdown
Owner

What

The gateway accepts options.background and GET /v1/capabilities advertises sprite_pricing.plain_frame_cents: 7. The CLI had no way to ask for it, and spriteCreditPrice knew only the transparent tier, so a plain sheet would have been quoted at roughly twice its cost.

  • --background <remove|keep> on dreamlayer sprite, in USAGE and the options list.
  • spriteCreditPrice(frameCount, background): keep is a flat 7 cents a frame with no tier. Twelve frames quote 5 credits instead of 9.9.
  • A spelled-out --background remove is normalised off the wire. remove is exactly what an absent field already means, and the server fingerprints the options it receives, so sending it would split one job into two idempotency identities.
  • A server whose sprite_pricing has no plain_frame_cents refuses --background keep before the reference image is uploaded, rather than paying to find out.
  • README documents the mode, the price, and that a frame that will not cut out is retried nearby and can ship with its background instead of failing the sheet.

Verification

pnpm test 86/86. Reverting the quote and the wire field drops two of the new tests, so they test the behaviour rather than themselves.

Not verified: no paid sprite job was run against a live provider.

🤖 Generated with Claude Code

The API accepts options.background and advertises the flat rate as
sprite_pricing.plain_frame_cents. The CLI had no way to ask for it and
spriteCreditPrice knew only the transparent tier, so a plain sheet would have
been quoted at roughly twice what it costs.

--background keep sends the option and quotes 7 cents a frame with no tier,
5 credits for twelve frames instead of 9.9. A spelled-out --background remove
is normalised off the wire so it stays the same job as an omitted one, and a
server whose capabilities lack plain_frame_cents is refused before the
reference image is uploaded.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@TheDesignFounder
TheDesignFounder merged commit 1b7fa2b into main Sep 27, 2026
1 check passed
@TheDesignFounder
TheDesignFounder deleted the feat/sprite-background-keep branch September 27, 2026 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant