---
title: "Train Model Controller"
method: POST
path: "/modeling/propensity/train_model"
tags: ["modeling"]
---

# Train Model Controller

`POST /modeling/propensity/train_model`

## Request body

- TrainModelPayload
  - `model_id` integer, required — The ID of the model to use for training
  - `ignore_columns` string[], nullable — The columns to ignore

## Response `200`

Successful Response

- SrcAsyncJobServiceBuildConcreteAsyncJobRecordClassLocalsConcreteAsyncJobRecord12
  - `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` PropensityModelMetadataRecord
    - `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.
    - `datasource_id` string, required — The ID of the datasource.
    - `preview_async_id` integer, required — The ID of the preview async.
    - `lapse_args` object, nullable — The arguments for the lapse analysis.
    - `churn_args` object, nullable — The arguments for the churn analysis.
    - `training_set_size` integer, nullable — The size of the training set.
    - `event_set_size` integer, nullable — The size of the event set.
    - `prediction_adjustment_factor` integer, nullable — The prediction adjustment factor.
    - `target_encodings` object, nullable — The target encodings.
    - `preview_quality_text` string, nullable — The preview quality text.
    - `approach_text` string, nullable — The approach text.
    - `feature_importances` object, nullable — The feature importances.
    - `ignore_columns` unknown[], nullable — The training columns to ignore.
      - unknown
    - `training_async_id` integer, nullable — The ID of the training async.
    - `shap_values` object, nullable — The SHAP values from the test set.
    - `performance_metrics` object, nullable — The performance metrics.
    - `model_path` string, nullable — The path to the model.
    - `feature_columns` string[], nullable — The columns to use as features.
    - `hyperparams` object, nullable — The hyperparams.
    - `model_text_summary` string, nullable — The text summary of the model.
    - `training_duration` number, nullable — The duration of the training in seconds.
    - `model_results` unknown[], nullable — The results of the model.
      - unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/akkio/apis/fastapi.md) · [All operations](https://skmtc.net/akkio/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/akkio/fastapi/revisions/6662a407c637/schema)
