Getting Started with LocaleNLP API
Authenticate, make your first request, and understand response formats in under 10 minutes. Working code samples in Python, JavaScript, and cURL.
Introduction
LocaleNLP provides a suite of APIs for natural language processing optimized for African and Arabic languages. Our APIs enable speech recognition, text-to-speech, translation, and named entity recognition in 50+ language variants.
This guide walks through authentication, making your first API call, and choosing a client library. All endpoints are REST-based with JSON request/response.
Authentication
All requests require an API key sent as a Bearer token. Keys are scoped per project and rotatable from the dashboard.
- 01.Sign up or log in to the LocaleNLP Developer Portal
- 02.Navigate to Settings → API Keys
- 03.Click Create new key and assign a project scope
- 04.Copy and store securely — shown only once
Authorization: Bearer YOUR_API_KEY
First API Call — Language Detection
Let's detect the language of a Swahili text sample. Returns the top-3 candidates with confidence scores.
curl -X POST https://api.localenlp.com/v1/text/detect-language \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"text": "Habari gani? Jina langu ni LocaleNLP."}'
{ "language": "sw", "language_name": "Swahili", "confidence": 0.98, "latency_ms": 3 }
Client Libraries
Official SDK clients are available in four languages. Install once, import, and make requests without managing headers manually.
Next Steps
Support is one message away.
Our engineers respond to API questions within one business day. No automated first-response.
Contact support →