Campaign Generation (coming soon)

Generate Campaign

Description

The campaign_generator Route enables users to create visual campaigns for various ad channels using a visual_id. This route facilitates the generation of templates featuring diverse layouts that incorporate elements like text, logos, and calls to action (CTA), tailored to various resolutions (placements) and target audiences.

Ad backgrounds are expanded to fit the necessary layout specifications.

Examples

original image (Generated by Bria):

Results:

Request
path Parameters
visual_id
required
string
header Parameters
api_token
required
string
Request Body schema: application/json
required
sid
string

Session ID. Optional. obtained from a previous route response. Optional.

preset_id
string

Preset id. Optional. The brand preset that defines which logo, colors and typography should be used. If one isn’t provided, and some or none of the following are not provided (header1_color, header1_font, header1_size,header1_color, header1_font, header1_size, logo), the default public brand will be used.

template_id
string

Template ID, Mandatory. template_id or layout_ids must be provided. You can contact Bria to get your own templates and layouts.

layout_ids
Array of strings

Layout IDs, Mandatory. the ids of the layouts to generate. template_id or layout_ids must be provided. You can contact Bria to get your own templates and layouts.

logo
string

Logo URL. Optional. Supported inputs include public image URL or a URL inside Bria s3.

cta
string

CTA image URL. Optional. Supported inputs include public image URL or a URL inside Bria s3.

header1_text
string

Header1 text. Optional.

header1_font
string

Header1 font. Optional. Supported inputs include public ttf URL or a URL inside Bria s3.

header1_size
integer

Header1 size. Optional.

header1_color
Array of integers

Header1 color in hex format. Optional.

header2_text
string

Header2 text. Optional.

header2_font
string

Header2 font. Optional. Supported inputs include public tiff URL or a URL inside Bria s3.

header2_size
integer

Header2 size. Optional.

header2_color
Array of integers

Header2 color in hex format. Optional.

seed
integer

Seed used for image expansion. Optional. Use this to recreate the same ad.

background_type
string
Default: "original"

Background type. Optional.

Enum: "original" "generated" "solid"
bg_prompt
string

Background generation prompt. Mandatory when background_type is generated. Bria currently supports prompts in English only.

bg_seed
integer

Background seed. Optional. Relevant when background_type is generated.

bg_color
string

Background color in hex code. Mandatory when background_type is solid.

Responses
200

Successful response with generated campaign visuals.

400

Bad request.

404

Specified Image does not exist.

405

Method not allowed.

429

Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

post/{visual_id}/campaign_generator
Request samples
Response samples
application/json
{
  • "ads": [
    ]
}