Alright, so I got roped into this content marketing thing. Needed 50 blog title variants for a new SaaS feature. Manual? No chance.
My weapon of choice: Anyword's API. Wired it into a quick Python script to hammer their endpoint, iterate over different tones, and dump the results.
Here's the core of the chaos:
```python
import requests
import json
api_key = "YOUR_KEY"
url = "https://api.anyword.com/v1/generate"
payload = {
"prompt": "Blog titles about our new Kubernetes cost optimization feature",
"settings": {
"brandTone": "authoritative",
"length": "medium"
},
"numVariants": 10
}
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
tones = ["authoritative", "conversational", "provocative", "enthusiastic"]
all_titles = []
for tone in tones:
payload["settings"]["brandTone"] = tone
response = requests.post(url, json=payload, headers=headers)
if response.status_code == 200:
all_titles.extend([item['text'] for item in response.json().get('data', [])])
else:
print(f"Failed for {tone}: {response.text}")
print(f"Total titles generated: {len(all_titles)}")
# Deduplicate, throw into a file, done.
```
Ran it with four different brand tones. Got my 50+ titles in under five minutes, including the script runtime. The trick is looping the tones and smashing the `numVariants` param. Some outputs are garbage, but you get enough solid hits to move on.
It's like a canary deployment for content ideas. Generate a ton, kill the weak ones, deploy the survivors.
Script's decent, but you're just hammering one API. Where's the chaos? Should've thrown in a random fail injection to see which tones crap out first.
Also, why stop at four tones? There's no "panic-induced" or "sales-drunk" setting? Wasted opportunity.