Editing

AI-edit an existing generation

Edits an existing generation and saves the result as a new generation (the source is never modified). One synchronous model call; costs credits like a fresh generation (generate_* by output resolution).

Modes

ModeHow
Plain-text editinstructions only — "make the sky stormy"
Product placementaction: "bring" + reference_id — the reference's product is placed into the scene at true real-world scale, relit to match, worn/held/placed naturally
Swap/add specific itemsaction: "bring" + reference_id + items (names from GET /v1/detections)
Recolor itemsaction: "recolor" + reference_id + optional items
Remove itemsaction: "remove" + items (no reference needed). { "name": "person" } removes every person; { "id": 2 } (a detection id from GET /v1/detections on the base) removes only that one, located by its box
Add subjects to sceneaction: "add" + reference_id + optional blend_level 0-100
Merge two imagesaction: "merge" + reference_id + merge_bias (0 = reference dominates, 100 = base dominates) + merge_scope scene|items
Art-style transferaction: "style" + reference_id + style_intensity 0-100

reference_id accepts an asset or generation you own.

The base photo is generation_id or asset_id (an image uploaded with POST /v1/assets), never both. An asset base is only read: the result is a new generation with parent_id: null that records the asset as its source, and the upload is never changed or copied.

post/v1/restyle

Request

  • Base URL: https://nanostudiopro.com/api
  • URL: https://nanostudiopro.com/api/v1/restyle
  • Auth: HTTP bearer

Request body

generation_idstring

The base photo to edit: a generation. Pass this or asset_id.

asset_idstring

The base photo to edit: an uploaded asset (upload, product, background or reference). Mutually exclusive with generation_id.

project_idstring required

Project for the resulting generation.

action'bring' | 'recolor' | 'remove' | 'add' | 'merge' | 'style'
reference_idstring

Asset or generation providing the product/colors/style/content.

entity_idsstring[]

Saved characters, props or places (ids from GET /v1/entities) whose baked reference sheet to attach. Writing @slug in the prompt does the same — a look is @parent/look or its own slug — and the prompt is rewritten so the model knows which picture is whom. Sheets go after your own references, within the model's reference limit; the response's entities says which went in and which were dropped. Unknown @words are left as typed. To leave something out, write -@slug (that prop comes off every items sheet the request sends, and the words are removed from the prompt) or pass -<id> here; @slug/alone or <id>/alone sends the entity without its items sheet. The response's entities.excluded lists what was left out.

scan_idstring

With item ids: the scan_id they were read from (GET /v1/detections). Default: the base's newest scan.

instructionsstring

Free-text edit instructions.

blend_levelnumber

add: integration depth. Default 50.

merge_biasnumber

merge: 0 reference dominates, 100 base dominates. Default 50.

merge_scope'scene' | 'items'

merge only. Default scene.

style_intensitynumber

style: 0 subtle tint, 100 full reimagine. Default 75.

aspect_ratio'1:1' | '4:5' | '3:4' | '9:16' | '16:9' | '3:2' | '2:3'

Default: the source's.

resolution'1K' | '2K' | '4K'

Default: the source's. Drives credit cost.

Response

Edit complete; the new generation with a signed image URL.

Changes

No recorded changes to this operation across all 2 revisions of this API.