CartVisualCreate account

Should a live fashion catalog use synchronous or asynchronous FASHN Agent Images?

Use the synchronous endpoint when the caller can wait for the complete response. Use the asynchronous run endpoint for a catalog editor whose request can close before generation finishes. The asynchronous submission returns a run ID and the status lookup eventually returns the results. FASHN documents about 40 seconds for one default image in the synchronous path, with longer waits for multi-step requests. FASHN labels the Agent Images endpoint Experimental.

Published ยท By CartVisual editorial team

Decide at the page boundary

In a merchandising script that waits for its output and writes one result to a folder, a synchronous request can be easier to follow. In a catalog admin page, a staff member might close a tab after starting a dress preview. Use a stored run ID so the next visit can recover that request without starting a second generation. Save the listing ID, input revision and FASHN run ID together before presenting an in-progress status.

What the API returns What the catalog should show
A run ID from POST /v1/agent/images/run Request accepted. Keep the current product image visible.
A status of processing Still working. FASHN documents no partial results at this stage.
A status of completed Review completed prediction entries and their result images against the current SKU before publishing.
A status of failed Show a failure or retry decision even if the status lookup returned HTTP 200.

Poll the existing run with GET /v1/agent/status/{id}. If you use a completion webhook, route it into the same update for that ID so the store handles one completed job once. The Agent includes intermediate operations in its prediction list. An earlier completed image does not necessarily match the final catalog requirement. Check the required garment variant, pose or packshot framing before selecting one result.

Source

Related decisions

Browse ecommerce creative workflows