Skip to content

Authentication

Information Circle

Your API tokens carry many privileges, so be sure to keep them secure! Do not share your API tokens in publicly accessible areas such as GitHub, client-side code, and so forth.

The Lettria API uses API tokens to authenticate requests. You can view and manage your projects API tokens in the Lettria App.

Authentication to the API is performed via HTTPS Basic Auth. Provide your API token as the Authorization header value.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

API Key

To obtain an API key, create an account in the Lettria dashboard. Create a project, and inside the project, you'll find API Keys in the left navigation. You can create multiple API keys in each project.

Sample API Call

Here is an example call the the parse endpoint using curl:

curl -X POST \
  -H "Authorization: LettriaProKey <apikey>" \
  -F "file=@md.jpg;filename=md.jpg" \
  https://api.lettria.com/parse

In the Authorization header, you can see the LettriaProKey and where to place your API key.

In the file attribute, include the file and the filename. The @ points to a path on the local machine.

Next steps