Create a free account → Dashboard → API Keys → Generate key.
curl https://api.naluai.dev/v1/extract/name \
-H "Authorization: Bearer nalu_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_input": "What is your name?",
"user_input": "Good morning! My name is John Smith",
"language": "en"
}'
{
"obtained": true,
"extracted_value": "John Smith",
"certain": true,
"confidence": "high",
"value_format": "string",
"credits_used": 3
}
const res = await fetch('https://api.naluai.dev/v1/extract/name', {
method: 'POST',
headers: {
'Authorization': 'Bearer nalu_YOUR_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
agent_input: 'What is your name?',
user_input: 'Good morning! My name is John Smith',
language: 'en'
})
});
const data = await res.json();
if (data.obtained) {
console.log('Name:', data.extracted_value); // "John Smith"
} else {
// Re-ask the user
console.log('Suggestion:', data.smart_suggestion);
}
import requests
r = requests.post(
"https://api.naluai.dev/v1/extract/name",
headers={"Authorization": "Bearer nalu_YOUR_KEY"},
json={
"agent_input": "What is your name?",
"user_input": "Good morning! My name is John Smith",
"language": "en"
}
)
data = r.json()
print(data["extracted_value"]) # "John Smith"
For analyzing the full agent ↔ user exchange (costs 5 credits):
curl https://api.naluai.dev/v1/extract/reply \
-H "Authorization: Bearer nalu_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_message": "I can split into 20 installments of $100. Deal?",
"user_reply": "Can we do 48?"
}'
{
"reply_type": "counter_proposal",
"extracted_value": "48",
"value_type": "quantity",
"extracted_meaning": "48 installments, not $48",
"confidence": 0.95,
"suggestion_to_agent": "Customer proposes 48 installments instead of 20.",
"credits_used": 5
}