---
title: "Get Predictions. Returns a 424 status code if the model is not a Sequence Classification model"
method: POST
path: "/predict"
tags: ["Text Embeddings Inference"]
---

# Get Predictions. Returns a 424 status code if the model is not a Sequence Classification model

`POST /predict`

Get Predictions. Returns a 424 status code if the model is not a Sequence Classification model

## Request body

- PredictRequest
  - `inputs` union, required — Model input. Can be either a single string, a pair of strings or a batch of mixed single and pairs of strings.
    - string — A single string
    - string[] — A pair of strings
    - union[] — A batch
      - union
        - string[] — A single string
        - string[] — A pair of strings
  - `raw_scores` boolean
  - `truncate` boolean

## Response `200`

Predictions

- union
  - Prediction[]
    - `label` string, required
    - `score` number, float, required
  - array[]
    - Prediction[]
      - `label` string, required
      - `score` number, float, required

## Other responses

- `413` — Batch size error
- `422` — Tokenization error
- `424` — Prediction Error
- `429` — Model is overloaded

## Changes

- **2023-11-16** `47ffd56eb6dd` — 3 breaking, 1 info
  - removed `subschema #1, subschema #2` from the `inputs` request property `oneOf` list
  - added `subschema #1, subschema #2` to the response body `oneOf` list for the response status `200`
  - the response's body type/format changed from `array`/`` to ``/`` for status `200`
  - added `subschema #1, subschema #2, subschema #3` to the `inputs` request property `oneOf` list
- **2023-11-15** `c4554b0fed8e` — 1 info
  - endpoint added
- **2023-10-13** `8c00768ef703` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/huggingface/apis/text-embeddings-inference/changes/predict/post.md)

---

[API](https://skmtc.dev/huggingface/apis/text-embeddings-inference.md) · [All operations](https://skmtc.dev/huggingface/apis/text-embeddings-inference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/huggingface/text-embeddings-inference/revisions/47ffd56eb6dd/schema)
