# Body

The request body should be passed using the -d option in the cURL command. Replace \[data] with the actual JSON-formatted content you want to send for prediction. The structure and required fields depend on the specific model’s configuration. *(See the next section for details.)*

The v1 request body uses a structured format built from nested arrays of objects. Each object represents a feature (column) and contains two keys:

* "alias": the name of the input column as defined during model training
* "selectedValue": the value you are submitting for prediction

This format is often used when data is being prepared manually or when values are mapped from UI elements.

***

#### v1 Example - Binary Classification / Multiclass Classification / Regression)

```
{
  "data": {
    "predict_values": [
      [
        { "alias": "Lead Source", "selectedValue": "bing" },
        { "alias": "Lead Origin", "selectedValue": "API" },
        { "alias": "Converted", "selectedValue": "YES" }
      ],
      [
        { "alias": "Lead Source", "selectedValue": "Google" },
        { "alias": "Lead Origin", "selectedValue": "Landing Page Submission" },
        { "alias": "Converted", "selectedValue": "YES" }
      ],
      [
        { "alias": "Lead Source", "selectedValue": "Olark Chat" },
        { "alias": "Lead Origin", "selectedValue": "API" },
        { "alias": "Converted", "selectedValue": "YES" }
      ]
    ]
  }
}
```

***

#### v1 Example (Timeseries)

```
{
  "data": {
    "predict_values": {
      "startDate": "2023-04-17",
      "endDate": "2023-04-18",
      "sequenceID": "A"
    }
  }
}
```

For time series forecasting, the structure differs from classification and regression models.&#x20;

* startDate and endDate: define the prediction period
* sequenceID: identifies the specific time series to forecast (e.g., a product, store, or region)

JSON structure represents a data object with a key "data" mapping to an object called "predict\_values". The "predict\_values" object contains three key-value pairs. The required keys are "**startDate**", "**endDate**", and "**sequenceID**", and their corresponding values are "2025-04-17", "2025-04-18", and "A" respectively.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.graphite-note.com/graphite-note-documentation/rest-api/prediction-api/request-v1/body.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
