Docs / API Reference

API Reference

Base URL: https://api.naluai.dev/v1

Authentication

All requests require a Bearer token in the Authorization header:

Authorization: Bearer nalu_YOUR_API_KEY

Standard endpoints β€” 3 credits

POST /v1/extract/name

Full name extraction

POST /v1/extract/email

Email extraction and typo correction

POST /v1/extract/postal-code

International postal code

POST /v1/extract/yes-no

Yes/No detection in any language

POST /v1/extract/birthdate

Date of birth in any format

POST /v1/extract/handoff

Intent to speak with human agent

POST /v1/extract/cancel-intent

Service cancellation intent

POST /v1/extract/company-name

Company name extraction

POST /v1/extract/cpf

Brazilian CPF validation (mod 11)

POST /v1/extract/cep

Brazilian ZIP code + enriched address

POST /v1/extract/phone-br

Brazilian phone with area code

POST /v1/extract/cnpj

Brazilian CNPJ validation (mod 11)

POST /v1/extract/plate-br

Brazilian vehicle plate (Mercosul or legacy)

validate_reply β€” 5 credits

POST /v1/extract/reply Premium

Full conversational context analysis. Detects reply type, extracts value and provides suggestion to agent.

Request body

Field Type Required Description
agent_inputstringYes*Agent question/message (*not for reply)
user_inputstringYes*User response (*not for reply)
agent_messagestringreply onlyAgent message for validate_reply
user_replystringreply onlyUser reply for validate_reply
languagestringNoBCP-47 tag (default: pt-BR)
agent_contextstringNoAgent objective description (improves accuracy)

Response fields

Field Type Description
obtainedbooltrue = data extracted successfully
extracted_valuestring?Normalized and validated value
certainbooltrue = no ambiguity
confidencestringhigh / medium / low
smart_suggestionstring?Suggested re-ask when obtained=false
credits_usedintCredits consumed by this call
reply_typestring?validate_reply only: confirmation / rejection / counter_proposal / handoff / cancel / other
suggestion_to_agentstring?validate_reply only: contextual suggestion for the agent

HTTP status codes

Status Meaning
200Success
400Invalid request (missing required field)
401Invalid or missing API key
402Insufficient credits
429Rate limit exceeded
500Internal server error

β†’ Detailed error reference