If you don't have the mobile app, this is how you can get started:
Do a POST
request on https://morisien.app/api/auth/register.php
with the following JSON
body:
{"firstname":"Your name", "lastname":"Your surname", "email":"your@email.com", "password":"y0urP@$$w0Rd", "passwordConfirm":"y0urP@$$w0Rd"}
Example with cURL
:
curl -X POST https://morisien.app/api/auth/register.php \
-H "Content-Type: application/json" \
-d '{"firstname":"Your name", "lastname":"Your surname", "email":"your@email.com", "password":"y0urP@$$w0Rd", "passwordConfirm":"y0urP@$$w0Rd"}'
You should receive the verifyCode
by email to be used to verify your account (see below).
Do a POST
request on https://morisien.app/api/auth/verify-account.php
with the following JSON
body:
{"email":"your@email.com", "verifyCode":"CheckYourInbox"}
The verifyCode
will be in the account confirmation email when you registered.
Example with cURL
:
curl -X POST https://morisien.app/api/auth/verify-account.php \
-H "Content-Type: application/json" \
-d '{"email":"your@email.com", "verifyCode":"CheckYourInbox"}'
Do a POST
request on https://morisien.app/api/auth/login.php
with the following JSON
body:
{"email":"your@email.com", "password":"y0urP@$$w0Rd"}
Example with cURL
:
curl -X POST https://morisien.app/api/auth/login.php \
-H "Content-Type: application/json" \
-d '{"email":"your@email.com", "password":"y0urP@$$w0Rd"}'
The API will return you a token
which authenticates you with the service. Please keep it safe.
You can use the token for inference (see below) as much as you want (fair use policy applies).
Note: You can only have one token at a time. Generating a new login token will invalidate the old one.
Supported languages: English, French, German, Morisien
Do a POST
request on https://morisien.app/api/inference/text.php
with the following JSON
body:
{"text":"This man has a red car", "from_lang":"English", "to_lang":"Morisien", "token":"your_login_token"}
Note: Make sure you use your actual token (see above)
Example with cURL
:
curl -X POST https://morisien.app/api/inference/text.php \
-H "Content-Type: application/json" \
-d '{"text":"This man has a red car", "from_lang":"English", "to_lang":"Morisien", "token":"your_login_token"}'
Below is the expected response from the inference: