Authentication
Learn how to make API requests to the Tensorlake APIs
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
- Go to the Tensorlake Dashboard
- Select the project to make API calls against.
- Create an API key.
tl_apiKey_*
.Tensorlake Python SDK
The Tensorlake SDK leverages API keys fo authentication.
For example:
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:
Frequently Asked Questions
What if I forgot my API key or need to regenerate it?
What if I forgot my API key or need to regenerate it?
You can regenerate your API key from the Tensorlake Dashboard. Go to your project settings, find the API keys section, and create a new key. Remember to update your applications with the new key.
Can I use the same API key across multiple projects?
Can I use the same API key across multiple projects?
No, API keys are project-specific. Each API key only works within the context of the project where it was created. You’ll need separate API keys for each project.
What permissions do API keys have by default?
What permissions do API keys have by default?
API keys have the same permissions as a project member. They cannot have organization-level permissions and are limited to project-specific operations.
How do I rotate my API keys for security?
How do I rotate my API keys for security?
Create a new API key first, update your applications to use the new key, then delete the old key from the dashboard. This ensures no downtime during rotation.
What should I do if my API key is compromised?
What should I do if my API key is compromised?
Immediately delete the compromised API key from the Tensorlake Dashboard and generate a new one. Update all applications using the old key as soon as possible.
Can I set expiration dates for API keys?
Can I set expiration dates for API keys?
API keys do not have explicit expiration dates. Each API key will remain active until it is deleted.
Why does my API request return a 401 Unauthorized error?
Why does my API request return a 401 Unauthorized error?
How do I securely store API keys in my application?
How do I securely store API keys in my application?
Use environment variables or secure credential management systems. Never hardcode API keys in your source code or commit them to version control.
What's the difference between API keys and user authentication?
What's the difference between API keys and user authentication?
API keys are for programmatic access and machine-to-machine communication, while user authentication is for interactive dashboard access. API keys don’t expire with user sessions.
Can I limit which endpoints an API key can access?
Can I limit which endpoints an API key can access?
API keys inherit project member permissions.