Skip to main content
POST
/
datasets
/
{dataset_id}
cURL
curl -X POST https://api.opper.ai/v2/datasets/123e4567-e89b-12d3-a456-426614174000 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${OPPER_API_KEY}" \
  -d '{
    "input": "What is the capital of France?",
    "output": "The capital of France is Paris.",
    "expected": "Paris is the capital and largest city of France.",
    "comment": "Basic geography question with enhanced expected output"
  }'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "input": "<string>",
  "output": "<string>",
  "expected": "This `was` the output to the dataset entry",
  "comment": "This is an example of how one can edit the output"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

dataset_id
string<uuid>
required

The id of the dataset

Body

application/json
input
any
required

The input to the dataset entry

Example:
{ "x": 4, "y": 5 }
output
any
required

The output to the dataset entry

Example:
{ "sum": 9 }
expected
any | null

The expected output to the dataset entry, this is an optionally edited version of the output

Example:

"Thiswasthe output to the dataset entry"

comment
string | null

The comment to the dataset entry

Example:

"This is an example of how one can edit the output"

Response

Successful Response

id
string<uuid>
required

The id of the dataset entry

input
string
required

The input to the dataset entry

Example:

"Given this input, what is the output?"

output
string
required

The output to the dataset entry

Example:

"This is the output to the dataset entry"

expected
string | null

The expected output to the dataset entry, this is an optionally edited version of the output

Example:

"Thiswasthe output to the dataset entry"

comment
string | null

The comment to the dataset entry

Example:

"This is an example of how one can edit the output"