← Blog

Claude API E-Commerce Product Descriptions Generator

2026-10-04 · 5 min read · SubToAPI Team

Why Use the Claude API for Product Descriptions

If you're searching for a Claude API e-commerce product descriptions generator, you're probably staring down a catalog with hundreds or thousands of SKUs that need unique, SEO-friendly copy — and no copywriting budget to match. Claude is well suited to this because it can take structured product data (name, specs, category, materials, size chart) and turn it into natural, on-brand descriptions at scale, while still letting you control tone, length, and formatting through prompts.

This article walks through the actual build: how to structure prompts for consistent output, how to batch-process a product feed, how to avoid generic-sounding copy, and how to wire it into a pipeline you can run on a schedule. The code examples use the Claude API directly, with a note on how SubToAPI simplifies the key management and usage tracking side of running this in production.

What the Generator Needs to Do

A product description generator isn't just "send title, get paragraph back." For e-commerce it needs to:

Claude handles all of these if you give it the right system prompt and structured input per call.

Designing the Prompt

The single biggest factor in output quality is how you structure the input. Don't just dump a product name — pass a JSON object with every known attribute, and instruct Claude to only use what's given.

System prompt:
You are an e-commerce copywriter. Write product descriptions using ONLY the
attributes provided in the input JSON. Do not invent specs, materials, or
claims not present in the data. If a key detail is missing, write around it
naturally instead of guessing. Tone: confident, concise, no clichés like
"perfect for any occasion" or "elevate your style." Output format:
- A 2-3 sentence short description (for listing pages)
- A 4-6 sentence long description (for product pages)
- 3 bullet points of key features

Then the per-product user message is just the data:

{
  "name": "Merino Wool Crew Socks",
  "category": "Men's Socks",
  "material": "80% merino wool, 20% nylon",
  "features": ["moisture-wicking", "reinforced heel", "machine washable"],
  "sizes": ["S", "M", "L"],
  "colors": ["charcoal", "navy", "forest green"]
}

This separation — strict system instructions, clean structured data — is what keeps output from drifting into generic marketing fluff after the 200th product.

Calling the API

Here's a minimal example using the Claude API directly:

curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-4-5",
    "max_tokens": 400,
    "system": "You are an e-commerce copywriter...",
    "messages": [
      {"role": "user", "content": "{\"name\":\"Merino Wool Crew Socks\",...}"}
    ]
  }'

If you'd rather expose this as an internal HTTP endpoint for your catalog tool or a non-technical teammate, routing the same request through SubToAPI gives you an API key scoped to this use case, usage metadata per call, and no separate Anthropic billing setup:

curl https://api.subtoapi.app/v1/messages \
  -H "Authorization: Bearer $SUBTOAPI_KEY" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-4-5",
    "max_tokens": 400,
    "system": "You are an e-commerce copywriter...",
    "messages": [
      {"role": "user", "content": "{\"name\":\"Merino Wool Crew Socks\",...}"}
    ]
  }'

The request shape is the same as the Claude API, so moving between them is mostly a matter of swapping the base URL and key. See the messages documentation for the full parameter list.

Batch Processing a Catalog

For a real catalog you'll loop over a product feed (CSV, database export, or Shopify/WooCommerce API) and call the generator for each item. Keep three things in mind:

  1. Rate limiting — add a small delay or concurrency cap between calls rather than firing thousands at once.
  2. Validation — check the response for required fields (short description, long description, bullets) before writing it back to your catalog.
  3. Retry logic — occasional malformed JSON output should trigger a retry with the same input, not a silent skip.
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: 400,
      system: SYSTEM_PROMPT,
      messages: [{ role: "user", content: JSON.stringify(product) }]
    })
  });
  const data = await res.json();
  return data.content[0].text;
}

for (const product of catalog) {
  const description = await generateDescription(product);
  await saveToCatalog(product.id, description);
  await new Promise(r => setTimeout(r, 300)); // simple throttle
}

For large catalogs you'll want this running as a scheduled job rather than a manual script — regenerating descriptions whenever specs change or a new product line is added.

Keeping Output On-Brand and Varied

Three practical techniques that noticeably improve output quality:

Variants Without Contradiction

For products with color/size variants, generate one base description and a short variant-specific addendum rather than regenerating the whole thing per variant — it's faster and keeps messaging consistent across the product family.

Where SubToAPI Fits

If you're already using Claude for this and want a dashboard view of how many descriptions you're generating, per-team API keys for your content and dev teams, and streaming support for long-form descriptions, SubToAPI wraps the Claude API in a standard HTTPS interface with those features built in. Plans start at Solo (€9) for individual projects, with Team (€19/seat) and Scale (€49/seat) tiers for larger catalogs and multiple team members. There's a free trial at signup, and the quickstart guide covers getting your first key working in a few minutes. Check pricing for the full breakdown.

Questions

Does Claude invent specs if data is missing? It can if the prompt doesn't explicitly forbid it. Always instruct Claude to use only provided attributes and write around gaps — this single rule prevents most hallucinated claims.

How many products can I process per run? There's no hard limit from Claude itself, but you should throttle requests and batch in manageable chunks (a few hundred at a time) to handle retries and validation cleanly.

Can I generate descriptions in multiple languages? Yes — add the target language as a field in the input JSON and instruct Claude to write natively in that language rather than translating, which produces more natural copy.

Turn your Claude access into an HTTPS API

SubToAPI gives you application API keys, streaming, tool use and usage insights on top of your existing Claude access — set up in minutes.

Start free  Read the quickstart →