Names format
Exactnames_formatDeterministic and authoritative — the canonical answer for this input.
Format a full name from components. Accepts optional `first`, `middle`, `last`, `prefix`, `suffix`. Returns a single consistently-formatted string. Processing multiple inputs? Use `names_format_batch` to do up to 1000 in one call.
Parameters
firststringoptionalmiddlestringoptionallaststringoptionalprefixstringoptionalsuffixstringoptionalCall it
curl -X POST https://api.snipget.ai/v1/names/format \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"prefix":"Dr.","first":"John","middle":"A.","last":"Smith","suffix":"Jr."}'The Batch tab sends up to 1000 inputs in one call via /v1/names/format/batch.
Example response
{
"formatted": "Dr. John A. Smith Jr."
}FAQ
What is this for?
You have a name split into separate columns, like first, middle, last, prefix, and suffix, and you want one clean display name. This joins them in the right order and skips any field you leave blank, so there are no awkward double spaces.
Is the result predictable?
Yes. It is deterministic. The same set of fields always produces the same formatted string, so it is safe for display names, labels, and exports.
Which fields can I send?
Any of prefix, first, middle, last, and suffix. They are all optional. Send only the ones you have, and the output uses just those in a sensible order.
Does it fix the capitalization of the pieces?
No. It assembles the name as given. If your pieces are messy, like all caps, run the name cleaner on each field first, then format.
What if I send all blank fields?
A row with SOME components still formats normally. Sending no usable components at all (every field blank or absent) is a request mistake: the call is rejected with an INVALID_INPUT error and not billed; in a batch only that item errors and the rest still format.