Generate, Refine, and Share an Image
This guide creates an image, performs a second image-to-image pass, and shares the finished file with a human.
-
Choose a current model.
Terminal window usetrawsn image modelsusetrawsn image models <model-id> schema --mode text-to-image -
Generate the first version.
Terminal window usetrawsn image generate \--prompt "cat in a tiny chef hat, editorial studio portrait" \--model <model-id> \-o chef-cat.png -
Inspect image-to-image controls.
Terminal window usetrawsn image models <model-id> schema --mode image-to-image -
Refine the local file.
Terminal window usetrawsn image generate \--prompt "add warm window light; preserve the cat and chef hat" \--model <model-id> \--mode image-to-image \--param images=./chef-cat.png \-o chef-cat-warm.png -
Upload only the finished result.
Terminal window usetrawsn drive upload chef-cat-warm.png --parent-path /deliverablesusetrawsn drive share --src-path /deliverables/chef-cat-warm.png --expires 7d
Automate the returned link
Section titled “Automate the returned link”SHARE_URL=$(usetrawsn drive share \ --src-path /deliverables/chef-cat-warm.png \ --expires 7d | jq -r '.url')printf 'Shareable image: %s\n' "$SHARE_URL"Keep share expiration as short as the collaboration requires.