Add --background keep for sprite sheets that stay plain - #10
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The gateway accepts
options.backgroundandGET /v1/capabilitiesadvertisessprite_pricing.plain_frame_cents: 7. The CLI had no way to ask for it, andspriteCreditPriceknew only the transparent tier, so a plain sheet would have been quoted at roughly twice its cost.--background <remove|keep>ondreamlayer sprite, inUSAGEand the options list.spriteCreditPrice(frameCount, background):keepis a flat 7 cents a frame with no tier. Twelve frames quote 5 credits instead of 9.9.--background removeis normalised off the wire.removeis 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.sprite_pricinghas noplain_frame_centsrefuses--background keepbefore the reference image is uploaded, rather than paying to find out.Verification
pnpm test86/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