Skip to main content

Tensorlake Account

You need to have a Tensorlake Cloud account to make API requests if you’re using the Python SDK, the tensorlake npm package, a generated TypeScript client, 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.
Create API key
Every tensorlake API key starts with tl_apiKey_*.

SDK and CLI authentication

Tensorlake’s user-facing clients use these credentials differently:
  • Python and TypeScript SDKs: use a project-scoped API key, passed directly to the client or through TENSORLAKE_API_KEY. The API key selects its project; do not configure separate organization or project IDs.
  • REST API calls: send the same API key as an Authorization: Bearer token.
  • tl CLI: use TENSORLAKE_API_KEY, or run tl login to obtain a Personal Access Token (PAT) and select an organization and project interactively.
tl login authenticates the CLI. It does not provide credentials to Python or TypeScript SDK code; set TENSORLAKE_API_KEY for SDK processes. Browser applications connecting directly to an authenticated sandbox port are a separate case. The sandbox proxy accepts the signed-in Tensorlake Cloud session cookie together with the organization and project selected by the browser application. See Browser session authentication.

Tensorlake Python SDK

The Tensorlake SDK leverages API keys for authentication. For example:
your_app.py

TypeScript

For sandbox and cloud/application APIs, use the official tensorlake npm package.
These examples assume Node.js 18+, Bun, or Deno so fetch is available globally. The npm package covers sandboxes plus cloud/application APIs. See Sandboxes to get started.

REST API

REST API requests need to include the API key in the header as a Bearer token. For example, to make a request to the Sandboxes API, you would use the following curl command:
For enterprise SSO, see Single Sign-On (SSO).

Frequently Asked Questions

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.
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.
API keys have the same permissions as a project member. They cannot have organization-level permissions and are limited to project-specific operations.
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.
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.
API keys do not have explicit expiration dates. Each API key will remain active until it is deleted.
This usually means your API key is invalid, was deleted, or is not properly included in the Authorization header as a Bearer token. Verify your key exists in the project you expect on the Tensorlake Dashboard, then verify format and header structure.
Use environment variables or secure credential management systems. Never hardcode API keys in your source code or commit them to version control.
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.
API keys inherit project member permissions.