Skip to main content
POST
/
api
/
v1
/
datasets
/
{id}
/
datapoints
Add datapoints to a dataset
curl --request POST \
  --url https://app.dimred.com/api/v1/datasets/{id}/datapoints \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '[
  {
    "input_data": "{\"text\": \"Hello world\"}",
    "expected_output": "{\"response\": \"Hi there!\"}",
    "data_metadata": {
      "source": "manual"
    }
  }
]'
{
  "added_count": 1
}

Authorizations

x-api-key
string
header
required

API key for authentication. Obtain from your DimRed dashboard. The organization context is automatically derived from the API key.

Path Parameters

id
string
required

Dataset identifier

Body

application/json · object[]
input_data
string
required

Input data as JSON string

expected_output
string | null

Expected output as JSON string

output_data
string | null

Actual output data

data_metadata
object | null

Additional metadata for the datapoint

Response

Datapoints added successfully

added_count
integer

Number of datapoints added