Claude API E-Commerce Product Description Generator
If you're running an online store with hundreds or thousands of SKUs, writing unique, SEO-friendly product descriptions by hand is a bottleneck. The Claude API can generate consistent, on-brand product copy at scale from structured input like product name, specs, materials, and target audience — turning a task that takes a copywriter days into a batch job that runs in minutes.
This article walks through how to actually build this: the prompt structure that produces usable descriptions (not generic marketing fluff), how to handle bulk generation without hammering rate limits, and how to keep output consistent across thousands of products so your catalog doesn't read like it was written by ten different people.
Why product descriptions are a good fit for Claude
Product description generation is a constrained, repeatable task — exactly where LLMs perform well:
- Structured input, structured output. You feed in attributes (title, category, material, dimensions, price tier), and get back a description. No open-ended creativity required.
- High volume, low variance per item. The same prompt template works across an entire category, which makes batching straightforward.
- Clear quality signals. You can check length, keyword inclusion, and tone against a rubric programmatically, which makes it easy to catch bad outputs before they hit your store.
The main risks are genericness (descriptions that could apply to any product) and inconsistency (tone drifting between categories). Both are solved with prompt design, not a bigger model.
Designing the prompt
Don't ask Claude to "write a product description" with no constraints — you'll get filler adjectives and no differentiation. Instead, give it a tight brief and an explicit output format.
{
"model": "claude-sonnet-4-5",
"max_tokens": 300,
"messages": [
{
"role": "user",
"content": "Write a product description for an e-commerce listing.\n\nProduct: Merino Wool Crew Socks\nMaterial: 80% merino wool, 20% nylon\nFeatures: moisture-wicking, reinforced heel, odor-resistant\nTarget customer: outdoor hikers, 25-45\nBrand tone: confident, no-nonsense, slightly technical\nLength: 60-90 words\nFormat: one paragraph, no headers, no exclamation marks\nSEO keywords to include naturally: merino wool socks, hiking socks\n\nDo not use generic phrases like 'perfect for any occasion' or 'elevate your style'. Be specific about the material benefits."
}
]
}
A few things that consistently improve output quality:
- Ban generic phrases explicitly. Claude will default to marketing clichés unless you tell it not to. A short blocklist in the prompt ("don't use X, Y, Z") works well.
- Set a strict word count range. Descriptions that are too long read like filler; too short and they skip the differentiators.
- Give it the target customer, not just the product. "Outdoor hikers, 25-45" produces meaningfully different copy than "budget shoppers."
- Ask for SEO keywords to appear naturally, not as a bolted-on sentence. Claude handles this well when you frame it as a constraint rather than a requirement to stuff keywords in.
Batch generation at scale
For a catalog with thousands of SKUs, you want a pipeline that reads a product feed (CSV, database export, or your store's admin API), builds a prompt per item, sends requests, and writes results back.
import fs from "fs";
import csv from "csv-parser";
const products = [];
fs.createReadStream("products.csv")
.pipe(csv())
.on("data", (row) => products.push(row))
.on("end", async () => {
for (const product of products) {
const description = await generateDescription(product);
appendToOutput(product.sku, description);
await new Promise((r) => setTimeout(r, 300)); // simple pacing
}
});
async function generateDescription(product) {
const res = await fetch("https://api.subtoapi.app/v1/messages", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.SUBTOAPI_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "claude-sonnet-4-5",
max_tokens: 300,
messages: [{ role: "user", content: buildPrompt(product) }]
})
});
const data = await res.json();
return data.content[0].text;
}
A few practical notes for bulk runs:
- Pace your requests. Even with generous limits, bursting thousands of requests at once increases retry overhead. A small delay or a concurrency cap of 5–10 parallel requests is usually enough to keep throughput high without triggering backoff.
- Log everything. Save the raw model output alongside the input attributes so you can re-run only the items that failed quality checks, instead of regenerating the whole catalog.
- Validate before publishing. A simple post-processing step — word count check, banned-phrase check, duplicate-detection against other descriptions — catches most issues before a human ever needs to look at the output.
- Track cost and usage per run. When you're generating copy for thousands of SKUs, knowing token usage per request matters for budgeting. SubToAPI's dashboard shows usage metadata per request, which is useful for estimating cost before scaling a batch job to your full catalog, and streaming responses are supported for cases where you want to preview output in a review UI as it's generated — see /docs/streaming.
Keeping tone consistent across categories
If your store sells socks and surfboards, a single prompt template won't produce consistent-sounding copy. Build a small set of per-category prompt templates (or a shared system prompt plus a category-specific brief) rather than one generic prompt for everything.
{
"system": "You write product descriptions for an outdoor gear brand called Trailhead. Tone: confident, specific, no hype words. Always mention one durability detail and one use-case detail.",
"messages": [
{ "role": "user", "content": "Product: Merino Wool Crew Socks..." }
]
}
Putting brand voice in a system prompt and keeping the per-product details in the user message separates "how we sound" from "what this product is" — which makes it much easier to update tone later without rewriting every product prompt.
If you're setting this up as an internal tool rather than a one-off script, routing requests through an HTTP API with your team's existing Claude access means marketers and store managers can trigger regenerations without touching code. SubToAPI turns your Claude access into application API keys your team can use from any internal tool — see /docs/quickstart for setup, and /pricing for plan details if multiple people need access.
Questions
Does Claude-generated product copy count as duplicate content for SEO? No, as long as each description is genuinely unique per product. The risk is genericness, not duplication — if your prompts produce near-identical phrasing across SKUs, search engines may treat the copy as low-value even if it's technically unique text.
How much does it cost to generate descriptions for a large catalog? Cost scales with input/output tokens per request. A typical 80-word description with a detailed prompt runs a few hundred tokens total; check current model pricing and multiply by your SKU count, then add a buffer for regenerations after quality review.
Can I use this for variant-heavy products like clothing with many sizes and colors? Yes — generate one base description per product, then use a shorter follow-up prompt to adapt just the variant-specific details (color, fit notes) rather than regenerating the full description for every variant combination.