Skip to main content
POST
/
models
/
{model_id}
/
infer
Infer (File Upload)
curl --request POST \
  --url https://api.woodwide.ai/models/{model_id}/infer \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file=test.csv \
  --form output_type=json
{
  "job_id": "c3d4e5f6-0000-0000-0000-000000000001",
  "status": "succeeded",
  "latency_ms": 29567,
  "model_id": "b2c3d4e5-0000-0000-0000-000000000001",
  "model_version_id": "b2c3d4e5-0000-0000-0000-000000000002",
  "model_type": "prediction",
  "data": {
    "id": [
      0
    ],
    "prediction": [
      "competitor"
    ],
    "prediction_probs": [
      0.9999940395355225
    ]
  },
  "prediction_descriptions": {
    "competitor": {
      "summary": "Service Recovery and Support Volume",
      "description": "These active accounts are flagged for retention efforts due to elevated support volumes."
    }
  }
}
Uses the latest ready model version unless model_version_id is specified. Maximum file size is 30 MB. Set output_type to control the response format (json, csv, or parquet). For anomaly models, set anomaly_format to ids_only (default) or per_row. See Output Formats for output columns by model type.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

model_id
string<uuid>
required

Body

multipart/form-data
file
string
required

The file to upload. Maximum file size: 30 MB.

model_version_id
string<uuid>
output_type
enum<string>
default:csv

Supported inference output formats.

Available options:
json,
csv,
parquet
Example:

"json"

anomaly_format
enum<string>
default:ids_only

Controls anomaly detection output shape. 'ids_only' returns a list of anomalous row indices. 'per_row' returns id, is_anomaly, and anomaly_score for every input row. Ignored for non-anomaly model types.

Available options:
ids_only,
per_row

Response

Successful Response Output format depends on the output_type parameter (json, csv, or parquet). See Output Formats for output columns by model type.

When output_type is json, the response is a JSON object. When output_type is csv or parquet, the response is a file download.

job_id
string<uuid>

Unique ID for the inference job.

status
string

Job status (e.g. succeeded).

latency_ms
integer

Inference latency in milliseconds.

model_id
string<uuid>

ID of the model used.

model_version_id
string<uuid>

ID of the model version used.

model_type
string

Type of the model (e.g. prediction, clustering).

data
object

Inference results. Structure varies by model type.

prediction_descriptions
object

Human-readable descriptions keyed by prediction value (prediction models only).