Model chooser / Write copy and long-form content / Recurring
Personalised outbound, weekly posts and product descriptions need a consistent voice at a cost that does not grow faster than the output. Sonnet 5 writes close to Opus quality at a medium cost tier, and caching makes the brand guide nearly free to reuse.
Why Claude Sonnet 5
How to use it
Claude API, TypeScript
Edit the parts in capitals, then run it.
import Anthropic from "@anthropic-ai/sdk";
import { readFileSync } from "node:fs";
const client = new Anthropic();
const brandGuide = readFileSync("BRAND_GUIDE.md", "utf8");
export async function draftEmail(lead: { name: string; company: string; trigger: string }) {
const res = await client.messages.create({
model: "claude-sonnet-5",
max_tokens: 4000,
output_config: {
effort: "low",
format: {
type: "json_schema",
schema: {
type: "object",
properties: { subject: { type: "string" }, body: { type: "string" } },
required: ["subject", "body"],
additionalProperties: false,
},
},
},
system: [{ type: "text", text: brandGuide, cache_control: { type: "ephemeral" } }],
messages: [{ role: "user", content: `Write a first-touch email to ${lead.name} at ${lead.company}. Reason to write: ${lead.trigger}.` }],
});
const text = res.content.find((b) => b.type === "text");
return JSON.parse(text && text.type === "text" ? text.text : "{}");
}
Alternatives that also work
Pick it when volume is very high and short-form, such as thousands of product descriptions. It sits in the low cost tier and ranks level with Opus 5 on LMArena.
Pick it when your stack is already on OpenAI. OpenAI positions Terra as the balance of intelligence and cost.
Pick it when customer data cannot go to a third-party API. Apache 2.0, one GPU, and 79.5 on IFBench for following instructions.
Watch out for
Sources
Checked . Models change monthly; we re-check this page when they do.
Wiring it into a workflow that runs every week, with evals, fallbacks and a cost you can predict, is the work. Fifteen minutes, no deck.