Authentication

There are three methods you can use to authenticate with the Plasticity developer APIs with your API Key.

If you don't already have an API Key to use, you can generate one here.

HTTP Authorization Header

You can add a bearer Authorization HTTP header to authenticate with the API. This is the preferred and recommended method of authenticating with the API.

Request Header Format

HeaderValue
AuthorizationBearer YOUR_API_KEY

API Key Parameter

You can pass your API Key as a GET parameter (a URL query variable) or as a parameter in the JSON request body with the key variable.

Request URL Format

1https://api.plasticity.ai/.../.../?key=YOUR_API_KEY&param1=value1&param2=value2

Request Body Format

1{
2  "key": "YOUR_API_KEY",
3  "param1": "value1",
4  "param2": "value2",
5  "param3": "value3"
6}

Session

The final method of authenticating with an API, which you should not use when actually building an application, is with your Plasticity login session.

That is, when you are logged into your Plasticity developer account in a web browser, accessing API endpoints like the following will work without any authentication:

https://api.plasticity.ai/cortex/structured/?query=How%20tall%20is%20Michael%20Jordan?&pretty=true

We use the cookies to detect your account and keep you logged in. This method of authenticating with API endpoint is merely provided as a convience for quick prototyping with the APIs in your browser and should not be used as a method of authentication in a real application.