Tensorlake Account

You need to have a Tensorlake Cloud account to make API requests. You can create an account on cloud.tensorlake.ai.

Using the Tensorlake 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())
data = doc_ai.get_job(job_id=job_id)

For additional quickstarts, cookbooks, and tutorials, visit our examples hub.

Making API Requests

Every API request 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={}'