draw
Composite a cut-out product photo into a generated studio, concrete, or warm scene without regenerating the product, returning a composite asset and fidelity receipt.
Instructions
Stage the real product into a generated scene. Fidelity Lock applies.
Args: asset: Asset handle (asset://) of the cut-out product layer produced by cut_out (kind foreground_png, chained to a source photo). Anything else is refused before any billing. scene_prompt: Scene preferences compiled into a versioned StageSpec. Only studio, concrete and warm selections are recognized; unmatched prose is dropped. The result discloses the compiled stage_spec and this limitation. Arbitrary rooms and source-camera matching are not supported by the fixed template. The scene text describes the environment only and must never name the product: before any spend it is screened against the cut concept (the scene guard, recorded on the receipt as scene_guard), and a prompt naming the product is refused with SCENE_NAMES_PRODUCT, because naming it makes the image model paint its own copy of the product into the scene.
The background plate is generated by muse-image-1.0 (billed through the spend-cap choke point at the per-image rate) and stored as a background_plate asset; deterministic code then fits the PLATE to the product's dimensions and composites the stored product layer onto it. The product layer is never regenerated, restyled, scaled, or "improved" by a model, and it is never sent to the image model. Returns the composite's asset handle, its fidelity receipt (source / foreground / mask / plate hashes, transformations, the measured changed-opaque-pixel count), and an image preview. The receipt is also persisted beside the composite in the asset store as <asset_id>.receipt.json, enriched with the billed cost and call attribution, so it survives a client dropping the return value and verify_receipt_from_disk can pick it up from the store alone. If the compositor ever measured changed opaque pixels, the tool returns a FIDELITY_VIOLATION error instead of presenting the composite under a false receipt.
Failures return a structured error: NOT_CONFIGURED (no META_API_KEY; checked before billing, so no ledger write), IMAGE_REFUSED / BAD_IMAGE_RESPONSE / IMAGE_CALL_FAILED (the plate call failed; its reservation stays counted as spend). A failed draw never falls back to regenerating the product, and in live mode it never silently substitutes the placeholder plate. Measurable plate rejection retries once; a horizon-placement mismatch goes straight to a disclosed studio-gray fallback without buying an identical second attempt.
Offline dev mode: with AGENTHAND_DRAW_PLACEHOLDER_PLATE=1 the plate is the deterministic local placeholder and no API call is made. That flag exists for tests and no-key demos only.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"asset": "<asset>",
"scene_prompt": "<scene_prompt>"
},
"name": "draw"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset | Yes | ||
| scene_prompt | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |