rosebud assets create
Make an asset with your credits, wait for it and save the file.
rosebud assets create --model <id> --prompt <text> [--max-credits <n>] [--out <file>] [options]create quotes the asset, refuses a quote above --max-credits, starts the job, waits for it and saves the file.
Options
| Option | Details |
|---|---|
--model <id> | A model ID from assets models. |
--prompt <text> | Fills the model's prompt input. |
--input name=value | Sets any other input the model lists. Repeat it for several. |
--input-json <file> | All inputs as one JSON object. |
--max-credits <n> | The most you'll pay. A higher quote stops with max_credits (exit 2) before anything is charged. |
--out <file> | Where to save the file. |
--force | Replace --out if it exists. |
--no-wait | Return the job at once. Check it with assets status. Can't be combined with --out. |
--timeout-ms <ms> | How long to wait for the job. Default 600000 (10 minutes). |
Example
rosebud assets create --model flux-2-flash --prompt 'green slime monster, side view' \
--input asset_type=sprite \
--max-credits 300 --out ./assets/slime.png{
"id": "41b8...",
"status": "succeeded",
"model": "flux-2-flash",
"credits": 300,
"charged_credits": 300,
"refunded_credits": 0,
"asset": { "id": "e2f0...", "name": "green slime monster", "category": "image", "format": "png", "url": "..." },
"error": null,
"file": "/home/sam/moon-garden/assets/slime.png"
}file is the absolute path of the saved file.
Retries and billing
- Credits are charged when the job starts and returned if generation fails. A failed job exits 3 with the reason.
- After an unknown result (exit 4), including a wait that ran out, run the identical command again. It resumes the same job instead of paying again. The result then has
resumed: true. - Once a create has finished, the same command makes a new asset.
- Identical creates run one at a time (
state_locked). To make variations in parallel, change the prompt or inputs. - While
createwaits for a job, throttled andbusyanswers are waited out. - After
key_expiredorinsufficient_scope, approve a new login (seerosebud login), then rerun the identical command.