Template GenAI

AI Tools

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

Field

Data Type

Requirement

Description

brandUrl

string

Mandatory

URL of the brand PDF or guidelines document

retailer

object

Mandatory

Retailer details

Retailer

string

Mandatory

Retailer identifier

retailer.name

string

Mandatory

Retailer display name

inventoryType

string

Mandatory

Inventory type (e.g. OnSite, OffSite)

requestId

string

Mandatory

Unique request ID for tracking the workflow

Sample Request

POST https://jivoxapis.api.jivox.com/v2/accounts/:accountId/tmplGenAI/sync-flow

Request Body

{ "brandUrl": "https://example.com/brand-guidelines.pdf", "retailer": { "id": "amazon-us", "name": "Amazon US" }, "inventoryType": "OnSite", "requestId": "req-20240510-001" }

Sample Response

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

{ "requestId": "req-20240510-001", "status": "INITIATED", "workflowId": "wf-abc123" }

Sync flow (upload)

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

Parameters

Field

Data Type

Requirement

Description

requestId

string

Mandatory

Unique request ID

retailerId

string

Mandatory

Retailer identifier

retailerName

string

Mandatory

Retailer display name

inventoryType

string

Mandatory

Inventory type (e.g. OnSite)

file

file

Mandatory

Brand document or asset file to upload

Sample Request

POST https://jivoxapis.api.jivox.com/v2/accounts/:accountId//tmplGenAI/sync-flow-upload Content-Type: multipart/form-data

Sample Response

{ "requestId": "req-20240510-002", "status": "INITIATED" }

Design brief

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

Parameters

Field

Data Type

Requirement

Description

requestId

string

Mandatory

Unique request ID

retailerId

string

Mandatory

Retailer identifier

retailerName

string

Mandatory

Retailer display name

inventoryType

string

Mandatory

Inventory type (e.g. OnSite)

brandUrl

string

Optional

Brand guidelines URL. If provided, brandBriefDoc is ignored

designBriefZip

file

One of designBriefZip/psdFile

Design brief as ZIP, PNG, JPG, JPEG, or WEBP file. Mutually exclusive with psdFile

psdFile

file

One of designBriefZip/psdFile

PSD source file. Mutually exclusive with designBriefZip

brandBriefDoc

file

Optional

Brand brief document (ignored if brandUrl is set)

Sample Request

POST https://jivoxapis.api.jivox.com/v2/accounts/:accountId/tmplGenAI/design-brief Content-Type: multipart/form-data

Sample Response

{ "requestId": "req-20240510-003", "status": "INITIATED" }

Get UI response

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

Sample Request

GET https://jivoxapis.api.jivox.com/v2/accounts/:accountId/tmplGenAI/ui-response/:requestId

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

GET https://jivoxapis.api.jivox.com/v2/accounts/:accountId/tmplGenAI/workflow-status/:requestId

Sample Response

{ "requestId": "req-20240510-001", "status": "IN_PROGRESS", "progress": 70 }

Get workflow result

Returns the final result of a completed Template Generation workflow.

Sample Request

GET https://jivoxapis.api.jivox.com/v2/accounts/:accountId/tmplGenAI/workflow-result/:requestId

Sample Response

{ "requestId": "req-20240510-001", "status": "COMPLETED", "templates": [ { "adUnitSize": "300x250", "html": "<div>...</div>" } ] }

Terminate request

Terminates an in-progress template generation workflow.

Sample Request

GET https://jivoxapis.api.jivox.com/v2/accounts/:accountId/tmplGenAI/terminate-request/:requestId

Sample Response

{ "requestId": "req-20240510-001", "status": "TERMINATED" }

Regenerate

Triggers an iterative template regeneration using an edit prompt.

Parameters

Field

Data Type

Requirement

Description

requestId

string

Mandatory

Original workflow request ID

conversationId

string

Optional

ID of the existing conversation to continue

templateHtml

string

Optional

Current HTML of the template being edited

editPrompt

string

Mandatory

User instruction for the regeneration (e.g. "Make the headline bolder").

adUnitSize

string

Optional

Target ad unit size (e.g. 300x250).

Sample Request

POST https://jivoxapis.api.jivox.com/v2/accounts/:accountId/tmplGenAI/regenerate

Request Body

{ "regenerateJobId": "rjob-789", "status": "INITIATED" }

Sample Response

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

{ "requestId": "req-20240510-001", "status": "INITIATED", "workflowId": "wf-abc123" }

Regenerate retry

Retries a regeneration from a specific major version.

Parameters

Field

Data Type

Requirement

Description

requestId

string

Mandatory

Original workflow request ID

conversationId

string

Mandatory

Conversation ID

majorVersion

integer

Mandatory

Major version number to retry from

Sample Request

POST https://jivoxapis.api.jivox.com/v2/accounts/:accountId/tmplGenAI/regenerate/retry

Request Body

{ "requestId": "req-20240510-001", "conversationId": "conv-456", "majorVersion": 2 }

Regenerate revert

Reverts a regeneration to a specific version.

Parameters

Field

Data Type

Requirement

Description

requestId

string

Mandatory

Original workflow request ID

conversationId

string

Mandatory

Conversation ID

version

string

Mandatory

Version string to revert to

Sample Request

POST https://jivoxapis.api.jivox.com/v2/accounts/:accountId/tmplGenAI/regenerate/revert

Request Body

{ "requestId": "req-20240510-001", "conversationId": "conv-456", "version": "2.1" }

Regenerate like

Records a positive feedback signal for a regenerated version.

Parameters

Field

Data Type

Requirement

Description

requestId

string

Mandatory

Original workflow request ID

conversationId

string

Mandatory

Conversation ID

version

string

Mandatory

Version being liked

likeValue

boolean

Mandatory

true to like, false to unlike.

Sample Request

POST https://jivoxapis.api.jivox.com/v2/accounts/:accountId/tmplGenAI/regenerate/like

Request Body

{ "requestId": "req-20240510-001", "conversationId": "conv-456", "version": "2.1", "likeValue": true }

Regenerate dislike

Records a negative feedback signal for a regenerated version.

Parameters

Field

Data Type

Requirement

Description

requestId

string

Mandatory

Original workflow request ID

conversationId

string

Mandatory

Conversation ID

version

string

Mandatory

Version being disliked

dislikeValue

boolean

Mandatory

true to dislike, false to remove dislike

Sample Request

POST https://jivoxapis.api.jivox.com/v2/accounts/:accountId/tmplGenAI/regenerate/dislike

Request Body

{ "requestId": "req-20240510-001", "conversationId": "conv-456", "version": "2.1" }

Get all conversations

Returns all regeneration conversations for a given workflow request.

Sample Request

GET https://jivoxapis.api.jivox.com/v2/accounts/:accountId/tmplGenAI/regenerate/conversations/:requestId

Sample Response

[ { "conversationId": "conv-456", "createdAt": "2024-05-10T09:00:00Z", "latestVersion": "2.1" } ]

Get conversation

Returns the details of a single regeneration conversation.

Sample Request

GET https://jivoxapis.api.jivox.com/v2/accounts/:accountId/tmplGenAI/regenerate/conversation/:conversationId

Get HTML by version

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

Sample Request

GET https://jivoxapis.api.jivox.com/v2/accounts/:accountId/tmplGenAI/regenerate/conversation/:conversationId/html/:version

Sample Response

Returns raw text/html content.

Get latest HTML

Returns the latest HTML output for a conversation.

Sample Request

GET https://jivoxapis.api.jivox.com/v2/accounts/:accountId/tmplGenAI/regenerate/conversation/:conversationId/html-latest

Sample Response

Returns raw text/html content.

Get minor versions

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

Sample Request

GET https://jivoxapis.api.jivox.com/v2/accounts/:accountId/tmplGenAI/regenerate/conversation/:conversationId/versions/:majorVersion

Sample Response

[ { "version": "2.0", "createdAt": "2024-05-10T09:10:00Z" }, { "version": "2.1", "createdAt": "2024-05-10T09:15:00Z" } ]

Get regenerate result

Returns the result for a specific regeneration job.

Sample Request

GET https://jivoxapis.api.jivox.com/v2/accounts/:accountId/tmplGenAI/regenerate/result/:regenerateJobId

Sample Response

{ "regenerateJobId": "rjob-789", "status": "COMPLETED", "html": "<div>...</div>", "version": "2.1" }