Template GenAI

The various methods for Template GenAI Settings are listed below:

  1. Sync flow
  2. Sync flow (upload)
  3. Design brief
  4. Get UI response
  5. Get workflow status
  6. Get workflow result
  7. Terminate request
  8. Regenerate
  9. Regenerate retry
  10. Regenerate revert
  11. Regenerate like
  12. Regenerate dislike
  13. Get all conversations
  14. Get conversation
  15. Get HTML by version
  16. Get latest HTML
  17. Get minor versions
  18. Get regenerate result

Sync flow

Triggers the template generation sync workflow using a brand URL.

Parameters

FieldData TypeRequirementDescription
brandUrlstringMandatoryURL of the brand PDF or guidelines document
retailerobjectMandatoryRetailer details
RetailerstringMandatoryRetailer identifier
retailer.namestringMandatoryRetailer display name
inventoryTypestringMandatoryInventory type (e.g. OnSite, OffSite)
requestIdstringMandatoryUnique request ID for tracking the workflow

Sample Request

HTTP
Copy

Request Body

JSON
Copy

Sample Response

Proxied JSON response from the GenAI service with workflow initiation details.

JSON
Copy

Sync flow (upload)

Triggers the template generation sync workflow through a multipart file upload.

Parameters

FieldData TypeRequirementDescription
requestIdstringMandatoryUnique request ID
retailerIdstringMandatoryRetailer identifier
retailerNamestringMandatoryRetailer display name
inventoryTypestringMandatoryInventory type (e.g. OnSite)
filefileMandatoryBrand document or asset file to upload

Sample Request

HTTP
Copy

Sample Response

JSON
Copy

Design brief

Triggers template generation, using a Design Brief ZIP, PSD file, or Brand Brief document. Either designBriefZip or psdFile must be provided.

Parameters

FieldData TypeRequirementDescription
requestIdstringMandatoryUnique request ID
retailerIdstringMandatoryRetailer identifier
retailerNamestringMandatoryRetailer display name
inventoryTypestringMandatoryInventory type (e.g. OnSite)
brandUrlstringOptionalBrand guidelines URL. If provided, brandBriefDoc is ignored
designBriefZipfileOne of designBriefZip/psdFileDesign brief as ZIP, PNG, JPG, JPEG, or WEBP file. Mutually exclusive with psdFile
psdFilefileOne of designBriefZip/psdFilePSD source file. Mutually exclusive with designBriefZip
brandBriefDocfileOptionalBrand brief document (ignored if brandUrl is set)

Sample Request

HTTP
Copy

Sample Response

JSON
Copy

Get UI response

Returns the UI-facing response for a template generation workflow.

Sample Request

HTTP
Copy

Sample Response

Proxied JSON response containing the UI state for the given request.

Get workflow status

Returns the current status of a template generation workflow.

Sample Request

HTTP
Copy

Sample Response

JSON
Copy

Get workflow result

Returns the final result of a completed Template Generation workflow.

Sample Request

HTTP
Copy

Sample Response

JSON
Copy

Terminate request

Terminates an in-progress template generation workflow.

Sample Request

HTTP
Copy

Sample Response

JSON
Copy

Regenerate

Triggers an iterative template regeneration using an edit prompt.

Parameters

FieldData TypeRequirementDescription
requestIdstringMandatoryOriginal workflow request ID
conversationIdstringOptionalID of the existing conversation to continue
templateHtmlstringOptionalCurrent HTML of the template being edited
editPromptstringMandatoryUser instruction for the regeneration (e.g. "Make the headline bolder").
adUnitSizestringOptionalTarget ad unit size (e.g. 300x250).

Sample Request

HTTP
Copy

Request Body

JSON
Copy

Sample Response

Proxied JSON response from the GenAI service with workflow initiation details.

JSON
Copy

Regenerate retry

Retries a regeneration from a specific major version.

Parameters

FieldData TypeRequirementDescription
requestIdstringMandatoryOriginal workflow request ID
conversationIdstringMandatoryConversation ID
majorVersionintegerMandatoryMajor version number to retry from

Sample Request

HTTP
Copy

Request Body

JSON
Copy

Regenerate revert

Reverts a regeneration to a specific version.

Parameters

FieldData TypeRequirementDescription
requestIdstringMandatoryOriginal workflow request ID
conversationIdstringMandatoryConversation ID
versionstringMandatoryVersion string to revert to

Sample Request

HTTP
Copy

Request Body

JSON
Copy

Regenerate like

Records a positive feedback signal for a regenerated version.

Parameters

FieldData TypeRequirementDescription
requestIdstringMandatoryOriginal workflow request ID
conversationIdstringMandatoryConversation ID
versionstringMandatoryVersion being liked
likeValuebooleanMandatorytrue to like, false to unlike.

Sample Request

HTTP
Copy

Request Body

JSON
Copy

Regenerate dislike

Records a negative feedback signal for a regenerated version.

Parameters

FieldData TypeRequirementDescription
requestIdstringMandatoryOriginal workflow request ID
conversationIdstringMandatoryConversation ID
versionstringMandatoryVersion being disliked
dislikeValuebooleanMandatorytrue to dislike, false to remove dislike

Sample Request

HTTP
Copy

Request Body

JSON
Copy

Get all conversations

Returns all regeneration conversations for a given workflow request.

Sample Request

HTTP
Copy

Sample Response

JSON
Copy

Get conversation

Returns the details of a single regeneration conversation.

Sample Request

HTTP
Copy

Get HTML by version

Returns the HTML output for a specific version within a conversation.

Sample Request

HTTP
Copy

Sample Response

Returns raw text/html content.

Get latest HTML

Returns the latest HTML output for a conversation.

Sample Request

HTTP
Copy

Sample Response

Returns raw text/html content.

Get minor versions

Returns all minor versions within a major version of a conversation.

Sample Request

HTTP
Copy

Sample Response

JSON
Copy

Get regenerate result

Returns the result for a specific regeneration job.

Sample Request

HTTP
Copy

Sample Response

JSON
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard