What You Need to Call the API

Before you can access the Einstein Platform Services APIs, you first create an account and download your key. Then you use your key to generate an OAuth token. You can use your key to access both the Einstein Vision and Einstein Language APIs.

  1. If you don't already have a Salesforce org, you can sign up for a free Developer Edition. If you're a Salesforce customer, you can skip this step.

  2. From a browser, navigate to the sign up page.

  3. Click Sign Up Using Salesforce.


You can call Einstein Vision and Language services from any Salesforce org, including scratch orgs or sandbox orgs. However, when you sign up, you must use an org that's one of the standard editions. You can't use a scratch org or sandbox org to sign up.

  1. On the Salesforce login page, type your username and password, and click Log In. If you’re already logged in to Salesforce, you won’t see this page and you can skip to Step 4.


  1. Click Allow so the page can access basic information, such as your email address, and perform requests.


  1. On the activation page, click Download Key to save the key locally. The key file is named einstein_platform.pem. If you can't download it, cut and paste your key from the browser into a text file and save it as einstein_platform.pem.

Make a note of where you save the key file because you'll need it to authenticate when you call the API.

  1. Check your email for a link to verify your new account. You must verify your account to successfully call the API.

When you sign up using Salesforce, if you see an error that the org doesn't allow access to the connected app, this means that the org you signed up with has login restrictions. See the Troubleshooting Page to resolve the issue.

Each API call must contain a valid OAuth token in the request header. To generate a token, you create a JWT payload, sign the payload with your private key, and then call the API to get the token.

To get a token without code, see Set Up Authorization. If you're generating a token in code, the sequence of steps is the same, but the details will vary depending on the programming language.

By default, the Einstein Platform Services APIs use TLS (Transport Layer Security) version 1.1 and require secure connections (HTTPS) for all communication.