@page "/en/docs/quickstart" @model Nalu.Web.Pages.En.Docs.EnQuickstartModel @{ ViewData["LangPrefix"] = "/en"; ViewData["PtUrl"] = "/docs/quickstart"; ViewData["Title"] = "Quickstart — NaLU AI Docs"; ViewData["Description"] = "First NaLU AI call in under 2 minutes. cURL, JavaScript, Python and C#."; }
Docs / Quickstart

Quickstart

First call in under 2 minutes.

1. Get your API key

Create a free account → Dashboard → API Keys → Generate key.

Free plan includes 3,000 credits/month (no credit card required).

2. Your first call — validate_name

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
}

3. In JavaScript

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);
}

4. In Python

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"

5. validate_reply — context analysis

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
}
Next steps