Skip to main content

Log in to Layer

In order to work on a Layer project, you must first log in to Layer. However, you can access public entities as a guest user.

note

You must have a Google or GitHub account in order to have a Layer account.

Log in to Layer with a web browser

You can log in to Layer from a web browser. This does not require the Layer SDK to be installed.

Use this login method to view your projects, datasets, and other private assets.

  1. In a Chrome or Safari web browser, navigate to layer.ai.
  2. Click Login.
  3. Enter your Google or GitHub account information.

After you complete all necessary steps, Layer logs you in to your account with the web browser.

Log in with the SDK and a script

In your notebook or Python script use this method to use Layer features.

  import layer
layer.login()

The first time you log in with this method:

  1. Copy the link Layer provides and paste it into your web browser.
  2. Log in using your Google or GitHub account.
  3. Copy the code, paste it where prompted in the notebook, and then press Enter or Return.

Layer reuses your credentials on subsequent logins.

Log in with an API key

Once logged in with a web browser, create an API key in Layer Developer Settings. Copy the API key and use it to log in to Layer.

import layer
layer.login_with_api_key("YOUR_API_KEY")

Log in as guest

Guest users can access public projects and entities within those projects without logging in to Layer.

You can access Layer as a guest one by using a function to get a public entity without logging in. If Layer cannot find a login associated with your request, then it assumes you are a guest user and logs you in as one automatically.