AmberPen Get started

Custom dictionaries

Give AmberPen the vocabulary that is correct for your product and your users. Custom dictionaries help the correction pass preserve uncommon terms, brand names, and intentional casing instead of “correcting” them.

Add vocabulary to a request

Pass dictionary and properNouns as arrays of strings. They work with regular, incremental, and streaming requests.

import { createAmberPenClient } from "@amber-pen/sdk";

const amberPen = createAmberPenClient({ apiKey });

const result = await amberPen.proofread({
	text: "FinSight sends every webhook to the AcmeCloud workspace.",
	dictionary: ["webhook"],
	properNouns: ["FinSight", "AcmeCloud"],
});

dictionary

Use dictionary for product terminology, technical language, abbreviations, and other words that are valid in your context. Enter each term with the spelling you want AmberPen to preserve.

properNouns

Use properNouns for people, companies, products, and places. Preserve the intended capitalization in each entry—for example, AmberPen rather than amberpen.

Use the HTTP API

The same fields are available when you call the API without the SDK:

curl https://api.amberpen.dev/proofread \
	-H "authorization: Bearer $AMBER_PEN_API_KEY" \
	-H "content-type: application/json" \
	-d '{
		"text": "FinSight sends every webhook to the AcmeCloud workspace.",
		"dictionary": ["webhook"],
		"properNouns": ["FinSight", "AcmeCloud"]
	}'

Build dictionaries for each user or product

Vocabulary is request-scoped. Store the relevant terms in your application, then include them on every proofreading request that needs them. This makes it easy to combine organization-wide terminology with names or preferences belonging to one user.

const result = await amberPen.proofread({
	text,
	dictionary: organization.dictionary,
	properNouns: user.preferredNames,
	textId: document.id,
});

Best practices

  • Send only vocabulary relevant to the text being proofread.
  • Use the exact spelling and capitalization you want to preserve.
  • Put general vocabulary in dictionary and names in properNouns.
  • Send both arrays again on later requests that use the same textId; incremental proofreading does not turn request vocabulary into a stored dictionary.

These fields guide correction rather than defining replacement rules. If you need to force a specific substitution, apply that rule in your application before or after proofreading.