Generating unique and creative ad copies is pretty simple. Just instruct the prompt with product to promote and the target audience. For example:
Product to promote: 'Pink Geometric Bag'
Audience: Young women
If you are using TextCortex python library, you can generate blog articles with 3 lines of code:
from textcortex import TextCortex
hemingwai = TextCortex(api_key='YOUR_API_KEY')
ads = hemingwai.generate_ads(prompt='Pink Geometric Bag', parameters='Young Women',
source_language='en', character_count=200, creativity=0.7, n_gen=2)
for row in ads:
print(row)
Here is how the post request looks like using TextCortex JS library:
const { TextCortex } = require("textcortex-hemingwai-js");
let hemingwai = new TextCortex(YOUR_API_KEY);
hemingwai
.generateAds({
prompt: "Pink Geometric Bag",
parameters: "Young Women",
source_language: "en",
character_count: 200,
creativity: 0.7,
n_gen: 2,
})
.then((res) => {
console.log("res: ", res);
})
.catch((err) => {
console.log("err", err);
});
Text generation variables:
As you can see, there are some parameters that you can use to fine-tune the generated content. Here is the list of those parameters and what they do:
- prompt: Prompting is a way to instruct the Enterprise API to start writing on a specific subject
- parameters: Used for setting the tone of the generated copy text. It can be basically anything but please keep it plausible.
- blog_categories: This defines which type of content needs to be generated.
- creativity: Floating number between 0-1. 0 being the lowest creativity and 1 being the highest. Default is 0.7
- character_length: Integer which defines the maximum amount of characters that can be produced.
- source_language: Language code of the source language of the written prompt. for example 'en' for English and 'de' for German. We support 72 languages. If you don't know the language code you can also use 'auto' for this field our system will recognize the language of the instructed prompt and follow through with it in its generation.