Skip to main content
POST
Add or replace dataset entries

Authorizations

Authorization
string
header
required

A wandb API key or wandb JWT. Browser sessions are exchanged by the Model Distillation web app backend; job capabilities are internal only.

Headers

Wandb-Entity
string

Accessible personal or team entity. Omit to use the authenticated user's default entity.

Path Parameters

alias
string
required
Pattern: ^[a-z0-9-]{1,64}$
datasetId
string<uuid>
required

Query Parameters

mode
enum<string>
default:append

append rejects rows whose row_id already exists; upsert replaces them.

Available options:
append,
upsert
dry_run
boolean
default:false

Validate and report the change, then roll it back.

Body

Required array length: 1 - 5000 elements
messages
object[]
required
Required array length: 2 - 1000 elements
row_id
string

Stable identity within the dataset. Upserts match on it. Defaults to a digest of the messages and request fields.

Required string length: 1 - 512
group_id
string

Rows that must share a split, such as the turns of one conversation. Defaults to row_id.

Required string length: 1 - 512
split
enum<string>

train, or val to hold the row out of training for evaluation. New rows default to train.

Available options:
train,
val
tools
object[]
Maximum array length: 128
tool_choice
any
response_format
any
metadata
object

Filterable attributes, such as the user or customer segment.

provenance
object

Where the row came from, such as the source system and trace id.

Response

Entries were written, or would be for a dry run.

dry_run
boolean
required
created
integer
required

Rows that became new entries.

updated
integer
required

Existing entries the rows replaced.

revision
integer
required

The dataset revision after the write; unchanged by a dry run.

entry_counts
object
required
group_conflicts
string[]
required

Groups spanning more than one split. A real write with conflicts is rejected.

Last modified on October 7, 2026