---
title: "Publish inference"
method: POST
path: "/inference-pipelines/{inferencePipelineId}/data-stream"
tags: ["Monitoring"]
---

# Publish inference

`POST /inference-pipelines/{inferencePipelineId}/data-stream`

Publish an inference data point to an inference pipeline.

## Path parameters

- `inferencePipelineId` string, uuid, required

## Request body

- object
  - `rows` object[], required — A list of inference data points with inputs and outputs
  - `config` union, required — Configuration for the data stream. Depends on your **Openlayer project task type**.
    - LLMData
      - `numOfTokenColumnName` string, nullable — Name of the column with the total number of tokens.
      - `contextColumnName` string — Name of the column with the context retrieved. Applies to RAG use cases. Providing the context enables RAG-specific metrics.
      - `costColumnName` string — Name of the column with the cost associated with each row.
      - `groundTruthColumnName` string — Name of the column with the ground truths.
      - `inferenceIdColumnName` string — Name of the column with the inference ids. This is useful if you want to update rows at a later point in time. If not provided, a unique id is generated by Openlayer.
      - `inputVariableNames` string[] — Array of input variable names. Each input variable should be a dataset column.
      - `latencyColumnName` string — Name of the column with the latencies.
      - `metadata` object — Object with metadata.
      - `outputColumnName` string, required — Name of the column with the model outputs.
      - `prompt` object[] — Prompt for the LLM.
        - `role` string — Role of the prompt.
        - `content` string — Content of the prompt.
      - `questionColumnName` string — Name of the column with the questions. Applies to RAG use cases. Providing the question enables RAG-specific metrics.
      - `timestampColumnName` string — Name of the column with the timestamps. Timestamps must be in UNIX sec format. If not provided, the upload timestamp is used.
      - `userIdColumnName` string, nullable — Name of the column with the user id.
      - `sessionIdColumnName` string, nullable — Name of the column with the session id.
    - TabularClassificationData
      - `categoricalFeatureNames` string[] — Array with the names of all categorical features in the dataset. E.g. ["Age", "Geography"].
      - `classNames` string[], required — List of class names indexed by label integer in the dataset. E.g. ["Retained", "Exited"] when 0, 1 are in your label column.
      - `featureNames` string[] — Array with all input feature names.
      - `inferenceIdColumnName` string — Name of the column with the inference ids. This is useful if you want to update rows at a later point in time. If not provided, a unique id is generated by Openlayer.
      - `labelColumnName` string — Name of the column with the labels. The data in this column must be **zero-indexed integers**, matching the list provided in `classNames`.
      - `latencyColumnName` string — Name of the column with the latencies.
      - `metadata` object — Object with metadata.
      - `predictionsColumnName` string — Name of the column with the model's predictions as **zero-indexed integers**.
      - `predictionScoresColumnName` string — Name of the column with the model's predictions as **lists of class probabilities**.
      - `timestampColumnName` string — Name of the column with the timestamps. Timestamps must be in UNIX sec format. If not provided, the upload timestamp is used.
    - TabularRegressionData
      - `categoricalFeatureNames` string[] — Array with the names of all categorical features in the dataset. E.g. ["Gender", "Geography"].
      - `featureNames` string[] — Array with all input feature names.
      - `inferenceIdColumnName` string — Name of the column with the inference ids. This is useful if you want to update rows at a later point in time. If not provided, a unique id is generated by Openlayer.
      - `latencyColumnName` string — Name of the column with the latencies.
      - `metadata` object — Object with metadata.
      - `predictionsColumnName` string — Name of the column with the model's predictions.
      - `targetColumnName` string — Name of the column with the targets (ground truth values).
      - `timestampColumnName` string — Name of the column with the timestamps. Timestamps must be in UNIX sec format. If not provided, the upload timestamp is used.
    - TextClassificationData
      - `classNames` string[], required — List of class names indexed by label integer in the dataset. E.g. ["Retained", "Exited"] when 0, 1 are in your label column.
      - `inferenceIdColumnName` string — Name of the column with the inference ids. This is useful if you want to update rows at a later point in time. If not provided, a unique id is generated by Openlayer.
      - `labelColumnName` string — Name of the column with the labels. The data in this column must be **zero-indexed integers**, matching the list provided in `classNames`.
      - `latencyColumnName` string — Name of the column with the latencies.
      - `metadata` object — Object with metadata.
      - `predictionsColumnName` string — Name of the column with the model's predictions as **zero-indexed integers**.
      - `predictionScoresColumnName` string — Name of the column with the model's predictions as **lists of class probabilities**.
      - `textColumnName` string — Name of the column with the text data.
      - `timestampColumnName` string — Name of the column with the timestamps. Timestamps must be in UNIX sec format. If not provided, the upload timestamp is used.

## Response `200`

Status OK.

- object
  - `success` true, required

## Other responses

- `500` — Unexpected error.

---

[API](https://skmtc.net/openlayer/apis/openlayer-api.md) · [All operations](https://skmtc.net/openlayer/apis/openlayer-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openlayer/openlayer-api/versions/d0e74f00c900/schema)
