How to Generate Dynamic Creative Optimizations of Adverts

Get started generating multiple customised versions of audio content in minutes with AudioStack API.

Why is Dynamic Creative Optimisation Important?

DCO stands for dynamic creative optimisation. In advertising, DCO technology rapidly builds multiple iterations of an ad using the same base creative, while tailoring parts of the ad based on audiences, context and past performance. This helps the ad resonate with consumers.

In today’s world, consumers can see thousands of ads a day. Therefore, it’s more important than ever for brands to engage customers with messaging and creative that resonates. DCO helps advertisers and agencies deliver more relevant, informative and impactful ad experiences.

In addition, DCO helps advertisers improve scale and efficiency. Rather than creating multiple versions of the same ad for different locales and audiences, DCO does it for them.

AudioStack API enables users to leverage dynamic creative optimisation for advertising and other commercial applications. Seamlessly customise and fine-tune audio content for targeted and engaging advertising campaigns, by generating multiple, tailored versions of audio advertising content rapidly. Check out this example to get started in minutes.


Pre-Requisites for this API Recipe

You will need to have set up your development environment and installed AudioStack to complete this tutorial. Follow the steps here to get set up.

Now you're ready to get going, copy and paste the code below into a new python file and run it. Don't forget to add your API key into line 5.

import audiostack
import os

audiostack.api_key = "APIKEY"

text = """<as:section name="main"> 
  Hey <as:placeholder id="username"> </as:placeholder>. At your local gym in <as:placeholder id="location">location</as:placeholder>, we have a huge range of classes including <as:placeholder id="classes">classes</as:placeholder> for you to enjoy. We're offering 50% off if you reactivate your subscription by the end of the month, just for you. Check out our website now!

print(f"Creating your script...")
script = audiostack.Content.Script.create(scriptText=text)

print(f"Generating speech...")
speech = audiostack.Speech.TTS.create(scriptItem=script, audience={"username" : "Peyton", "location" : "Brooklyn", "classes" : "pilates and yoga"}, voice="myra", voiceIntelligence= True)

print(f"Creating your mix...")
mix = audiostack.Production.Mix.create(

print(f"Downloading your customised ad...")"example_")



You just created your first piece of dynamically optimised creative content.

If you look at the code we just ran, in line 9 you'll see there are placeholder fields. These placeholders allow you to generate multiple different versions of the content very quickly, by adding custom content to line 18 - a bit like how a "mail merge" would work in word processing software.

The final result should sound like this:

What’s Next

Want to find out more about Dynamic Creative Optimisation? Check out our extended guide: