curl --request POST \
  --url https://api.openlayer.com/v1/inference-pipelines/{id}/data-stream \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "rows": [
    {
      "user_query": "what is the meaning of life?",
      "output": "42",
      "tokens": 7,
      "cost": 0.02,
      "timestamp": 1620000000
    }
  ],
  "config": {
    "prompt": [
      {
        "role": "user",
        "content": "{{ user_query }}"
      }
    ],
    "inputVariableNames": [
      "user_query"
    ],
    "outputColumnName": "output",
    "timestampColumnName": "timestamp",
    "costColumnName": "cost",
    "numOfTokenColumnName": "tokens"
  }
}'
{
  "success": true
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your workspace API key. See Find your API key for more informa

Path Parameters

id
string
required

The inference pipeline id (a UUID).

Body

application/json
rows
object[]
required

A list of entries that represent rows of a csv file

config
object
required

Configuration for the data stream. Depends on your Openlayer project task type.

Response

200 - application/json
success
boolean
required