logo
hero

API Docs

We provide public API's to interact with the models. AI Panjab uses API keys for authentication. Please contact us to get your API key with a personalized plan.

Digit Recognition

POST https://api.aipanjab.com/v1/models/digit-recognition

Predict digit from the input image

Request body

file
file
Required
The image file object in one of these formats: png or jpeg. The maxmium file size is 15kb
top-k
number
Optional
Default to 3 (min=1, max=5)
The number of predictions

Returns

A list of predictions
Example request
curl --request POST \ --url https://api.aipanjab.com/v1/models/digit-recognition \ --header "Authorization: Bearer $AIPANJAB_API_KEY" \ --header "Content-Type: multipart/form-data" \ --form file=@/path/to/file/digit.png
Example response
{ "predictions": [ { "label": "੨", "score": 0.9928627836 }, ... ]}

Alphabet Recognition

POST https://api.aipanjab.com/v1/models/alphabet-recognition

Predict alphabet from the input image

Request body

file
file
Required
The image file object in one of these formats: png or jpeg. The maxmium file size is 15kb
top-k
number
Optional
Default to 3 (min=1, max=5)
The number of predictions

Returns

A list of predictions
Example request
curl --request POST \ --url https://api.aipanjab.com/v1/models/alphabet-recognition \ --header "Authorization: Bearer $AIPANJAB_API_KEY" \ --header "Content-Type: multipart/form-data" \ --form file=@/path/to/file/alphabet.png
Example response
{ "predictions": [ { "label": "ਸ", "score": 0.9824657626 }, ... ]}

Speech Recognition

POST https://api.aipanjab.com/v1/models/speech-recognition

Transcribe and translate speech from the input audio file

Request body

file
file
Required
The audio file object in one of these formats: mp3 or wav. The maxmium file size is 2mb
lang
string
Optional
Default to pa (options=pa, en)
The language code of speech in audio file
with-translation
boolean
Optional
Default to false
Translate Panjabi speech to English or vice versa
with-timestamps
boolean
Optional
Default to false
The timestamps of transcription and translation

Returns

A transcription, translation and timestamps
Example request
curl --request POST \ --url https://api.aipanjab.com/v1/models/speech-recognition \ --header "Authorization: Bearer $AIPANJAB_API_KEY" \ --header "Content-Type: multipart/form-data" \ --form file=@/path/to/file/audio.mp3
Example response
{ "transcription": "ਏਆਈ ਪੰਜਾਬ ਉੱਤੇ ਤੁਹਾਡਾ ਸਵਾਗਤ ਹੈ...",
// if with-translation param set to true
"translation": "Welcome to AI Punjab...",
// if with-timestamps param set to true
"timestamps": [ { "start": 0.304, "end": 5.904, "transcription": "ਏਆਈ ਪੰਜਾਬ ਉੱਤੇ ਤੁਹਾਡਾ ਸਵਾਗਤ ਹੈ...", "translation": "Welcome to AI Punjab...", }, ... ]}