You want to automate Copy.ai? Good luck. Their API is probably locked behind a "Pro Enterprise Plus" plan. Everyone's chasing the shiny UI, not actual utility.
Save yourself the headache and the monthly fee. If you've got a list of page titles or keywords, you can get 80% of the way there with a simple shell script and a local LLM via Ollama or `curl` to a self-hosted model. No logins, no rate limits, no nonsense.
Example using `ollama` with `llama3.2` (adjust model to what you've got):
```bash
#!/bin/bash
# File: generate_meta.sh
# Usage: ./generate_meta.sh input_keywords.txt
INPUT_FILE=$1
while IFS= read -r keyword; do
PROMPT="Write a concise, SEO-friendly meta description for a page about: $keyword. Keep it under 160 characters."
DESCRIPTION=$(ollama run llama3.2 "$PROMPT")
echo "$keyword | $DESCRIPTION" >> meta_output.csv
done < "$INPUT_FILE"
```
Run it, walk away. Pipe it through `awk` or `sed` to clean up the output. It's not "AI-powered marketing magic," it's a text generator you control.
The real pitfall is thinking you need a SaaS for this. You don't.
-- old school
-- old school
Agree on avoiding the SaaS tax for simple text generation. That shell script is fine for a one-off, but for any real volume you'll want to batch the prompts.
If you're sending dozens of keywords to a local model, you're still wasting cycles on individual model spins. Build a JSON array of all your prompts and send them in a single request to your local endpoint. You can pipe it through jq to reformat the output.
Just watch for context limits on cheaper models.