For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inBook a demo
DocsReferenceChangelog
DocsReferenceChangelog
  • Introduction
    • SDKs
    • Errors
  • Humanloop API
      • POSTCreate
      • GETList
      • GETGet
      • DELDelete
      • PATCHUpdate
      • GETDatapoints
      • POSTCreate Datapoint
LogoLogo
Sign inBook a demo
Humanloop APIDatasets

Create Datapoint

POST
https://api.humanloop.com/v4/datasets/:dataset_id/datapoints
POST
/v4/datasets/:dataset_id/datapoints
$curl -X POST https://api.humanloop.com/v4/datasets/dataset_id/datapoints \
> -H "X-API-KEY: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "log_ids": [
> "log_ids"
> ]
>}'
1[
2 {
3 "id": "id",
4 "dataset_id": "dataset_id",
5 "inputs": {
6 "key": "value"
7 },
8 "messages": [
9 {
10 "role": "user"
11 }
12 ],
13 "target": {
14 "key": "value"
15 }
16 }
17]
Create a new datapoint for a dataset. Here in the v4 API, this has the following behaviour: * Retrieve the current latest version of the dataset. * Construct a new version of the dataset with the new testcases added. * Store that latest version as a committed version with an autogenerated commit message and return the new datapoints
Was this page helpful?
Previous

Get

Next
Built with

Create a new datapoint for a dataset.

Here in the v4 API, this has the following behaviour:

  • Retrieve the current latest version of the dataset.
  • Construct a new version of the dataset with the new testcases added.
  • Store that latest version as a committed version with an autogenerated commit message and return the new datapoints

Authentication

X-API-KEYstring
API Key authentication via header

Path parameters

dataset_idstringRequired

String ID of dataset. Starts with evts_.

Request

This endpoint expects an object or a list of objects.
objectRequired
OR
objectRequired
OR
list of objectsRequired

Response

Successful Response
idstring
dataset_idstring
inputsmap from strings to strings
messageslist of objects
targetmap from strings to strings or integers or doubles or booleans or lists of any or maps from strings to any

Errors

422
Datasets Create Datapoint Request Unprocessable Entity Error