Tensorlake Account

You need to have a Tensorlake Cloud account to make API requests if you’re using the Python SDK or directly calling the REST API. You can create an account on cloud.tensorlake.ai.

API keys

API keys are project-specific credentials that allow programmatic access to resources within a project. Each API key exists solely within the context of its project and has the same permissions as a project member.

API keys cannot have organization-level permissions.

Creating API keys

  1. Go to the Tensorlake Dashboard
  2. Select the project to make API calls against.
  3. Create an API key.

Every tensorlake API key starts with tl_apiKey_*.

Tensorlake Python SDK

The Tensorlake SDK leverages API keys fo authentication.

For example:

your_app.py
from tensorlake.documentai import DocumentAI, ParsingOptions

API_KEY="tl__apiKey_xxxx"
doc_ai = DocumentAI(api_key=API_KEY)
file_id = doc_ai.upload(path="/path/to/file.pdf")
job_id = doc_ai.parse(file_id, options=ParsingOptions())

REST API

REST API requests needs to include the API key in the header as a Bearer Token.

For example, to make a request to the Document File Management API, you would use the following curl command:

curl --request POST \
  --url https://api.tensorlake.ai/documents/v1/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'labels={}'

Frequently Asked Questions