---
title: "Predict Controller"
method: POST
path: "/modeling/propensity/predict"
tags: ["modeling"]
---

# Predict Controller

`POST /modeling/propensity/predict`

## Request

- Base URL: `https://api.akkio.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.akkio.com/modeling/propensity/predict`
- Auth: none declared

## Request body

- PredictPayload
  - `model_id` integer, required: The ID of the model to use for prediction
  - `time_in_days` integer, required: The time in days to predict
  - `prediction_sql` string, nullable: The SQL to use for prediction.
  - `audience_id` string, nullable: The ID of the audience to use for prediction. If set will override prediction_sql.

## Response `200`

Successful Response

- SrcAsyncJobServiceBuildConcreteAsyncJobRecordClassLocalsConcreteAsyncJobRecord13
  - `id` integer, nullable: ID of this object.
  - `created_at` string, date-time, nullable: datetime object representing when this object was created.
  - `updated_at` string, date-time, nullable: datetime object representing when this object was updated.
  - `deleted_at` string, date-time, nullable: datetime object representing when this object was deleted.
  - `status` 'RUNNING' | 'COMPLETED' | 'FAILED'
  - `endpoint` string: Endpoint spawning async job
  - `request` union: request sent to endpoint
    - object
    - unknown[]
      - unknown
  - `sync_response` union: sync response
    - object
    - unknown[]
      - unknown
  - `error` string, nullable: error message
  - `response` PropensityPredictionMetadataRecord
    - `id` integer, nullable: ID of this object.
    - `created_at` string, date-time, nullable: datetime object representing when this object was created.
    - `updated_at` string, date-time, nullable: datetime object representing when this object was updated.
    - `deleted_at` string, date-time, nullable: datetime object representing when this object was deleted.
    - `async_job_id` integer, required: The ID of the async job.
    - `model_id` integer, required: The ID of the model.
    - `prediction_timeframe` integer, required: The time frame of the prediction in days.
    - `prediction_sql` string, required: The SQL query for the prediction set.
    - `prediction_set_name` string, nullable, required: The name of the prediction set.
    - `prediction_set_size` integer, nullable: The size of the prediction set.
    - `prediction_id` integer, nullable: The ID of the prediction.
    - `shap_values` object, nullable: The SHAP values.
    - `prediction_samples` unknown[], nullable: The prediction samples.
      - unknown
    - `audience_id` string, nullable: The ID of the audience for which the prediction was made.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/akkio/apis/akkio-api.md) - [All operations](https://skmtc.dev/akkio/apis/akkio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/akkio/apis/akkio-api/revisions/c477deff6271?raw)
