Campaign Generation

Generate a Campaign

For access to the campaign API, please Contact Us

The Campaign Generation API enables the creation of multiple ads (scenes) in various sizes and resolutions, all unified by the same branding, style, and messaging. This is essential for testing different ad variations, repurposing successful ad formats, and significantly reducing the manual effort required to create multiple ads.

BRIA's Campaign Generation API provides a unique and scalable solution for producing professional-grade ads while minimizing the need for time-consuming design work.

Template
Templates enable to repurpose and reuse well-design ads that share the same style, content and branded elements.It consists of multiple ads (“scenes”) and includes configurations for customizing the content at scale.

Smart Image Feature
A standout feature of BRIA's Campaign Generation API is its ability to seamlessly embed objects, products, and presenter images into another image (a "smart image"). This AI-powered capability allows for generating diverse backgrounds for the embedded image or extending the background to fit the ad's design perfectly.

How It Works
The Campaign Generation API works by sending a template ID along with inputs such as text, images, the main object with its background definition, and a brand ID (including logos, colors, and fonts). In response, the API generates a set of ad images.

Templates can be easily created using BRIA’s Campaign Editor application. Once a template is ready, it can be used to produce multiple ad versions with varying messaging, branding, and images.

Request
header Parameters
api_token
required
string

API token associated with the organization.

Request Body schema: application/json
template_id
string

The ID of the template to be used for generating the campaign scenes.

brand_id
string

The ID of the brand to be used across all scenes in the template.

canvas_color
string
Default: "#FFFFFF"

Canvas background color in hex format.

object

Smart image object for generating an image based on the embedded image, including the main object and its background definition (expand or generate_by_text).

Array of objects

List of text/images objects

Responses
200

Campaign generated successfully.

400

Bad request.

401

Unauthorized. Invalid API key or authentication token.

422

Value error in the request body.

500

Internal server error.

post/campaign-gen/create
Request samples
Response samples
application/json
{
  • "results": [
    ]
}

Get Brands

Get the list of brands associated with your token, used to customize campaigns with colors, fonts, and logos.

Request
header Parameters
api_token
required
string

API token associated with the organization.

Responses
200

Successfully retrieved list of brands.

401

Unauthorized. Invalid API key or authentication token.

get/campaign-gen/brands
Request samples
Response samples
application/json
[
  • {
    }
]

Get Templates

Get the list of templates associated with your token, used for campaign generation.

Request
header Parameters
api_token
required
string

API token associated with the organization.

Responses
200

Successfully retrieved list of templates.

401

Unauthorized. Invalid API key or authentication token.

get/campaign-gen/templates
Request samples
Response samples
application/json
[
  • {
    }
]

Get Template info by ID

Retrieve details for a specific template by template ID.

Request
path Parameters
template_id
required
string

The ID of the template.

header Parameters
api_token
required
string

API token associated with the organization.

Responses
200

Successfully retrieved template details.

401

Unauthorized. Invalid API key or authentication token.

404

Template not found for the provided template ID.

get/campaign-gen/templates/{template_id}
Request samples
Response samples
application/json
[
  • {
    }
]