---
title: "ML Prediction"
method: GET
path: "/v1/models/{name}/predict"
tags: ["AI"]
---

# ML Prediction

`GET /v1/models/{name}/predict`

Make a ML prediction using a specific model.

## Path parameters

- `name` string, required

## Response `200`

Prediction made successfully

- PredictResponse
  - `duration_ms` integer, required — The time taken to complete the prediction (in milliseconds)
  - `error_message` string, nullable — The error message if the request failed
  - `model_name` string, required — The name of the model used for the prediction
  - `model_version` string, nullable — The version of the model used
  - `prediction` number[], nullable — The prediction result, typically an array of floats
  - `status` 'Success' | 'BadRequest' | 'InternalError', required

## Other responses

- `400` — Invalid request to the model
- `500` — Internal server error occurred during prediction

## Changes

- **2025-03-18** `dd94571fef79` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/spiceai/apis/runtime/changes/v1/models/:name/predict/get.md)

---

[API](https://skmtc.dev/spiceai/apis/runtime.md) · [All operations](https://skmtc.dev/spiceai/apis/runtime/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/spiceai/runtime/revisions/dd94571fef79/schema)
