curl --request POST \
--url https://app.loice.ai/api/v1/name/parse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "SMITH, John"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'SMITH, John'})
};
fetch('https://app.loice.ai/api/v1/name/parse', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://app.loice.ai/api/v1/name/parse';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'SMITH, John'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://app.loice.ai/api/v1/name/parse"
payload = { "name": "SMITH, John" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"first": "John",
"last": "SMITH",
"given": "John",
"surname": "SMITH",
"nickname": null,
"source": "model",
"confidence": 0.998,
"bothOrders": false,
"charged": true,
"pointsCharged": 1,
"balance": {
"available": 99,
"reserved": 0,
"granted": 100
},
"replay": false
}
}{
"error": {
"code": "invalid_input",
"message": "The name cannot be split into a given name and a surname"
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded",
"retryAfterSeconds": 42
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}Parse a person's name
Splits one person’s full name into the given name and the surname, in any written order: Smith, John, PODSEKIN Igor, Ludwig van Beethoven. The platform cleans the name first (leading honorifics, credentials, pronouns and bracketed asides are dropped), then its name model decides which words are the surname; when the model is not confident or not available, the first word is the given name and the rest the surname (source: rule). given and surname keep every word (middle names, van); nickname is a nickname the input put in quotes. A name that does not split into two parts (one word, a surname withheld to an initial, only noise, or a script the parser does not split) is refused with 400 invalid_input and never billed. Nothing about the name is stored or logged. API key only; rate limited per workspace. For a list, use POST /api/v1/name/parse/batch.
Billing
- charged per answered name — whether the name model or the first-word/last-word rule decided the order — never on a refusal, an unsplittable name or a replay.
The current cost is shown in the app under Settings → Billing and in the live GET /api/v1/openapi.json. Calls that end in a system or provider error (HTTP 500) or are rate limited (HTTP 429) are not billed. The charged and pointsCharged fields of the response state what this call actually consumed.
curl --request POST \
--url https://app.loice.ai/api/v1/name/parse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "SMITH, John"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'SMITH, John'})
};
fetch('https://app.loice.ai/api/v1/name/parse', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://app.loice.ai/api/v1/name/parse';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'SMITH, John'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://app.loice.ai/api/v1/name/parse"
payload = { "name": "SMITH, John" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"first": "John",
"last": "SMITH",
"given": "John",
"surname": "SMITH",
"nickname": null,
"source": "model",
"confidence": 0.998,
"bothOrders": false,
"charged": true,
"pointsCharged": 1,
"balance": {
"available": 99,
"reserved": 0,
"granted": 100
},
"replay": false
}
}{
"error": {
"code": "invalid_input",
"message": "The name cannot be split into a given name and a surname"
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded",
"retryAfterSeconds": 42
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}Authorizations
Workspace API key (loice_sk_ + 48 hex characters), created under Settings → API Keys. Sent as Authorization: Bearer loice_sk_…. Invalid, missing, or expired keys are rejected with 401 before any billable work happens.
Headers
Optional, 1–255 printable ASCII characters, scoped to your workspace. Send the same key when you retry the same request: the original outcome is replayed (replay: true, charged: false, pointsCharged: 0) instead of running and charging again. The same key with a different request is refused with 409 idempotency_conflict, as is a key reused after its replay record expired (kept 30 days); a key whose first request is still running answers 409 idempotency_in_progress. Without a key, every request is a new lookup, billed at most once on its own.
1 - 255Body
The person's full name as you have it, in any order (Smith, John, PODSEKIN Igor, Ludwig van Beethoven). At least one non-blank character, at most 256 characters.
1 - 256as-written (default) returns the words as you sent them, cleaned of honorifics, credentials and asides. folded returns the key spelling: lower case, diacritics removed (José Núñez → jose / nunez).
as-written, folded Response
The name, split. first/last always equal given/surname. charged, pointsCharged and replay say what the call cost; a replay is never charged again.
Show child attributes
Show child attributes

