Change, fix, re-roll or version visuals that Canvora already produced — targeted edits, variations, localization, edit history and revert — without paying to regenerate. Use when the user wants to tweak, fix, restyle, translate or undo an existing visual.
---
name: visual-refresh
version: 1.0.0
description: Change, fix, re-roll or version visuals that Canvora already produced — targeted edits, variations, localization, edit history and revert — without paying to regenerate. Use when the user wants to tweak, fix, restyle, translate or undo an existing visual.
homepage: https://canvora.ai/for-agents
metadata: {"openclaw":{"emoji":"🩹","requires":{"bins":["canvora"],"env":["CANVORA_API_KEY"]}}}
---
# Refining what already exists
The most expensive mistake an agent makes with Canvora is regenerating. A new
generation costs full price, throws away a design the user already liked, and
comes back different in ways they didn't ask for. Almost every "can you change
X" is a 3-credit edit.
Setup and credits: see the `canvora` skill.
## Pick the right operation
| The user says | Operation | Cost |
|---|---|---|
| "make the headline bigger", "change 73% to 78%", "warmer colors" | `edit` one output | **3** |
| "same thing in Spanish" | `localize` the generation | 10 per visual per language |
| "show me some other options" | `variations` | 10 per image (15 per carousel slide) |
| "go back to the previous one" | `revert_edit` (MCP) | **free** |
| "what did we change?" | `get_edit_history` (MCP) | free |
| "completely different message" | a new `generate` | full price — the only honest case |
If you're unsure between `edit` and `variations`: does the user want *this*
design fixed, or a *different* design? Fixed → edit. Different → variations.
## Targeted edits
```bash
# Preview first (prints Canvora's interpretation, spends nothing)
canvora edit $OUTPUT_ID --prompt "make the headline bigger and increase contrast"
# Execute
canvora edit $OUTPUT_ID --prompt "make the headline bigger and increase contrast" --yes --json
```
- Edits act on **one output**, identified by `outputId` (not the generation id).
Get it from `canvora status <generationId> --json`.
- Without `--yes` you get a preview of what it understood — show that to the
user when the instruction was ambiguous.
- "needs clarification" means the instruction was too vague. Re-prompt with a
concrete noun: *which* text, *which* element.
- One change per edit. "Bigger headline and swap the photo and make it blue" is
three edits, and each one preserves more of the design than a combined
instruction would.
## Whole-generation operations
```bash
# Every visual in the generation, new language, layout untouched
NEW=$(canvora localize $GENERATION_ID --language es | head -1)
canvora status "$NEW" --json # repeat every ~30s until completed
# Fresh takes on the same content
NEW=$(canvora variations $GENERATION_ID --count 2 | head -1)
canvora status "$NEW" --json
```
Drop `--json` on the capture and take `| head -1` — the first stdout line is
the bare new generation id (progress notes go to stderr). The same idiom works
for `generate`, `localize` and `variations`, so there is nothing to remember,
and it needs no `jq`.
**Always state the cost in the same message as the run** — announce it, don't
ask permission. `variations --count 2` on a 5-slide carousel is 10 new images
at 15 credits = 150. That surprises people. When you picked `--count` yourself,
confirm that number first.
Both of these fan out over the whole generation, so at 3+ outputs skip `--wait`
and poll `status`: your harness likely kills a shell command at 120s while the
work carries on server-side. Never re-run the command after a timeout — that
starts a second, separate job. See the `canvora` skill's "Long runs" section.
`--wait` is still fine when the source generation is a single visual.
Both need the Visual Editor feature (Starter plan or an active Campaign Pack).
A 403 is a plan gate, not an auth failure — say that, don't retry.
## Versioning (MCP clients)
- `get_edit_history({ output_id })` — every version of one visual
- `revert_edit({ generation_id, output_index, edit_id })` — go back, free
This is the safety net that makes editing worth trying: an edit the user
dislikes costs 3 credits and can be undone. Say that when they hesitate.
## When regeneration IS correct
Be honest about the three cases where refining won't help:
1. The **message** is wrong, not the design.
2. They need a **different format/size** — an edit can't reflow a 1:1 into 9:16.
3. The generation came back `partial` and slides are **missing** — the failed
ones were refunded; re-run for those specific slides.
## Quality checklist
- [ ] `edit` tried before anything more expensive
- [ ] Correct id used (`outputId` for edits, `generationId` for localize/variations)
- [ ] One change per edit; preview shown when the instruction was ambiguous
- [ ] Cost stated before `variations`/`localize`
- [ ] 403 explained as a plan gate
- [ ] Revert offered (MCP) so the user knows edits are reversible
don't have the plugin yet? install it then click "run inline in claude" again.
extracted implicit decision logic into explicit decision points, documented all inputs including api keys and plan requirements, added edge cases (rate limits, auth expiry, timeouts, partial generations, empty results), clarified the three operations (edit vs. variations vs. localize) with cost guidance, and separated preview from execute for edits with ambiguity handling.
edit, localize, create variations of, or revert changes to visuals canvora already generated. use this when the user wants to tweak a headline size, fix colors, translate to another language, explore alternatives, or undo an edit. never regenerate when a 3-credit edit will fix it. regeneration throws away approved designs, costs full price, and returns unexpected changes.
canvora cli and authentication
CANVORA_API_KEY env var (required, string). get from canvora dashboard.canvora binary in PATH. installed via your package manager or the canvora skill.identifiers
outputId: the specific visual you want to edit (string). retrieve via canvora status <generationId> --json.generationId: the parent generation, used for localize/variations/revert (string). returned from prior canvora generate call.editId: identifies a specific edit in the history, used only for revert (string). get from get_edit_history MCP call.outputIndex: zero-indexed position of a visual in the generation, used for revert (integer).external service: canvora api
CANVORA_API_KEY.mcp tools (if client supports mcp)
get_edit_history({ output_id }): returns array of edit records with timestamps and instructions.revert_edit({ generation_id, output_index, edit_id }): undoes a specific edit, returns updated visual.map the user request to the right operation. decide using the table below and the decision points section.
| user says | operation | cost | notes |
|---|---|---|---|
| "make headline bigger", "change 73% to 78%", "warmer colors", "swap this photo" | edit |
3 credits per edit | acts on one outputId. cheapest option for fixes. |
| "same thing in Spanish / German / French" | localize |
10 credits per visual per language | regenerates captions and text, keeps layout and design. async. |
| "show me other options", "give me variations" | variations |
10 credits per image (15 per carousel slide) | produces new designs from same brief. async. |
| "go back to the last version" | revert_edit (MCP only) |
free | undoes one edit. retrieves prior visual. |
| "what changes did we make?" | get_edit_history (MCP only) |
free | lists all edits applied to one visual. |
| "completely different message / angle / product" | generate |
full price (plan-dependent) | only honest case for regeneration. not part of this skill. |
input for step 1: user's request (text).
output for step 1: chosen operation (string: edit, localize, variations, revert_edit, get_edit_history, or none if unsure).
if the user has not provided an outputId or generationId, fetch it.
canvora status <generationId> --json
parse the json response. each object in the outputs array has an id field (the outputId) and an index field.
input for step 2: generationId (provided by user or from prior context).
output for step 2: outputId, generationId, and list of all outputs in that generation (json).
edits are single-change refinements. do not combine multiple changes in one prompt.
preview first (no cost, no commitment):
canvora edit <outputId> --prompt "<instruction>"
example: canvora edit abc123 --prompt "make the headline 50% larger".
review canvora's interpretation. if it shows "needs clarification", the instruction was too vague. re-prompt the user with concrete nouns: which element, which text, which color?
execute (costs 3 credits per edit):
canvora edit <outputId> --prompt "<instruction>" --yes --json
the json response includes the new outputId and edit metadata.
input for step 3a: outputId, instruction (plain-language description of one change).
output for step 3a: edited visual (canvora updates the generation in-place), JSON response with new outputId and edit record.
note: one edit per instruction. if the user says "bigger headline and swap photo and add blue", that is three edits; run step 3a three times. each incremental edit preserves more of the existing design than a combined instruction.
localize regenerates all captions and text in a generation for a target language. layout, images, and design stay the same. this is async; monitor with polling.
NEW=$(canvora localize <generationId> --language <lang_code> | head -1)
canvora status "$NEW" --json
repeat the status poll every 30s until the state field is completed or failed. lang_code examples: es (spanish), de (german), fr (french), ja (japanese). check canvora docs for full list.
announce the cost before running: 10 credits per visual per language. a 5-slide carousel in spanish is 5 visuals x 10 credits = 50 credits.
input for step 3b: generationId, target language code (string).
output for step 3b: new generationId (string). the new generation becomes a sibling of the original. all visuals are translated; design unchanged.
variations produces new designs based on the same brief. this is async; monitor with polling. each variation is a fresh take, not a refinement.
NEW=$(canvora variations <generationId> --count <N> | head -1)
canvora status "$NEW" --json
repeat the status poll every 30s until state is completed or failed.
announce the cost before running and confirm the count. a 5-slide carousel with --count 2 is 5 slides x 15 credits per slide x 2 variations = 150 credits. users are often surprised by this number.
input for step 3c: generationId, count (integer, usually 1-3).
output for step 3c: new generationId (string). the new generation is a separate generation with fresh designs.
retrieve all edits applied to one visual, in order.
get_edit_history({ output_id: "<outputId>" })
returns an array of edit records. each record includes the instruction, timestamp, and editId.
input for step 3d: outputId (string).
output for step 3d: array of edit objects, each with editId, instruction, timestamp, and status.
undo a specific edit and restore the visual to its prior state. costs 0 credits.
revert_edit({ generation_id: "<generationId>", output_index: <N>, edit_id: "<editId>" })
provide the generationId, the zero-indexed position of the visual in the generation (outputIndex), and the editId from the history. the visual reverts to the state before that edit.
input for step 3e: generationId, outputIndex, editId (all strings or integers as noted).
output for step 3e: restored visual (the previous version before the edit).
for step 3b and 3c, you issued a command that returns a new generationId. the work happens server-side; do not use --wait on 3+ output generations. instead, poll:
canvora status "<generationId>" --json
check the state field. valid states: pending, processing, completed, failed, partial.
completed: all visuals done. proceed.partial: some visuals done, some failed. the failed ones were refunded. show the user which completed and explain that the failed ones need a regenerate (not an edit, not a variation).failed: all visuals failed. check the error message. if 403, it is a plan gate (Visual Editor not available on this plan). if 429, canvora is rate-limited; wait 60s and retry. if 5xx, transient server issue; retry after 60s.pending or processing: not ready. wait 30s and poll again.max wait time: 300s (5 min). if still not done, explain to the user that the job is queued server-side and will complete in background. do not re-run the command.
input for step 4: generationId from step 3b or 3c output.
output for step 4: final state and completed visuals (json).
edit vs. variations: the user says "can you change that". ask yourself: does the user want this design fixed or a different design? if the fix is about size, color, text, or position on the existing layout, use edit (3 credits). if the user wants a fundamentally different take or is unsure which direction to go, use variations (10-15 credits per image).
instruction clarity: after step 3a preview, if canvora says "needs clarification", the user's instruction was too vague. do not execute. ask the user to specify which element: "which headline", "the top photo or the bottom one", "rgb blue or more cyan". concrete nouns, not adjectives.
plan gate (403 error): if localize or variations returns a 403 (forbidden), the user does not have Visual Editor enabled. do not retry. tell the user: "your plan does not include the Visual Editor feature. upgrade to Starter or add a Campaign Pack." edits always work on any plan.
rate limit (429): canvora api is rate-limited at 100 requests/min on standard tier. if you get 429, wait 60 seconds and retry once. if 429 again, tell the user: "canvora is throttled. try again in a few minutes." do not spam retries.
network timeout or 5xx during async (step 4): if polling times out or returns 5xx, the job is still running server-side. do not re-run step 3b or 3c. tell the user the job is in progress and will finish in background. suggest checking back in 2-3 min.
empty result set (no outputs in generation): if canvora status returns an empty outputs array, something went wrong with the original generation. it may have been deleted or never completed. tell the user: "the generation is not found or was not completed. please regenerate."
partial generation: if step 4 polls back with state: partial, some visuals succeeded and some failed. show the user which ones completed. explain that the failed ones were refunded and would need a fresh generate call, not an edit or variation.
when to recommend regenerate instead: be honest about these three cases:
partial with missing slides. the failed visuals were refunded. re-run generate to fill those specific slides.edit (step 3a):
outputId (the edited visual's id), generationId, edit metadata (timestamp, instruction, editId).localize (step 3b):
generationId (string, first line of stdout if captured with | head -1).state: completed, visuals are ready.variations (step 3c):
generationId (string, first line of stdout).state: completed, visuals are ready.get_edit_history (step 3d):
{ editId, instruction, timestamp, status }.revert_edit (step 3e):
edit success: user says "that's better" or "that's what i meant", or they accept the visual without further edits. the edited visual appears in the generation and can be downloaded.
localize success: user downloads the new generation and confirms text is translated and design is preserved.
variations success: user sees multiple new designs and picks one to refine further, or says "this one is closer."
revert success: user confirms the visual looks like the prior version. the edit no longer appears in get_edit_history.
get_edit_history success: user sees the full audit trail of changes and can reference past edits.
failure: canvora returns an error (403 plan gate, 429 rate limit, 5xx server error, or "needs clarification" on edit preview). user understands the reason and next step (upgrade plan, wait and retry, or provide more specific instruction).