# CSA Prediction Engine

The CSA Prediction Engine API offers three main prediction endpoints: **PSR** for standard partial sample regression predictions, **MAXFIT** for better accuracy, and **GRID** for the highest optimization and precision.

* [<mark style="color:red;">**GRID**</mark>](https://docs.csanalytics.io/prediction-engine/grid) identifies the optimal combination of observations and predictive variables for each prediction task.<br>
* [<mark style="color:red;">**MAXFIT**</mark>](https://docs.csanalytics.io/prediction-engine/maxfit) optimizes prediction accuracy by finding the combination of model parameters that yield \
  the best (adjusted) fit.<br>
* [<mark style="color:red;">**PSR**</mark>](https://docs.csanalytics.io/prediction-engine/psr) calculates the partial sample regression model.&#x20;

## Base URL

The base address of the CSA Prediction Engine API is:&#x20;

```http
https://api.csanalytics.io/v2/prediction_engine/
```

## **Authentication**

All requests to the CSA Prediction Engine API require authentication. The following describes the required tokens and api keys needed to use CSA's Prediction Engine API.

These IDs are provided by your CSA account manager.

<table><thead><tr><th width="219">Variable</th><th width="202">Where</th><th>Description</th></tr></thead><tbody><tr><td>API_KEY</td><td>"x-api-key" (Header)</td><td>User organization's API Key</td></tr><tr><td>ACCESS_ID</td><td>"access_id" (Body)</td><td>Individual user's access ID</td></tr></tbody></table>

## Requests

Data resources are accessed via standard HTTP requests in UTF-8 format to an API endpoint. The CSA Prediction Engine uses the following HTTP verbs:

| Method | Action                      |
| ------ | --------------------------- |
| GET    | Retrieves resources or data |
| POST   | Sends data or actions       |

## Responses

The CSA Prediction Engine uses the following response status codes, as defined in the [RFC 2616](https://www.ietf.org/rfc/rfc2616.txt) and [RFC 6585](https://www.ietf.org/rfc/rfc6585.txt).

All responses contain a JSON object. Properties for these responses are described for each relevant endpoint method.

## HTTPS, SSL, and TLS

The CSA Prediction Engine requires HTTPS, SSL, and TLS v1.2 or above. Stay safe and secure.
