Add or replace dataset entries
Writes up to 5,000 OpenAI chat rows in one transaction. Send a JSON array, or the same rows as NDJSON (one row per line) with Content-Type: application/x-ndjson. Any invalid row rejects the request and is reported by its index; NDJSON line N is index N - 1. mode=append rejects a row_id that already exists (409 entry_exists); mode=upsert replaces it, keeping the stored group_id, split, metadata, and provenance for any of those the row omits. New entries default to train and their own group. A write that would place one group in more than one split returns 409 group_split_conflict. Writing moves the dataset to a new revision and marks completed relabels and evaluations stale.
Authorizations
A wandb API key or wandb JWT. Browser sessions are exchanged by the Model Distillation web app backend; job capabilities are internal only.
Headers
Accessible personal or team entity. Omit to use the authenticated user's default entity.
Query Parameters
append rejects rows whose row_id already exists; upsert replaces them.
append, upsert Validate and report the change, then roll it back.
Body
1 - 5000 elements2 - 1000 elementsStable identity within the dataset. Upserts match on it. Defaults to a digest of the messages and request fields.
1 - 512Rows that must share a split, such as the turns of one conversation. Defaults to row_id.
1 - 512train, or val to hold the row out of training for evaluation. New rows default to train.
train, val 128Filterable attributes, such as the user or customer segment.
Where the row came from, such as the source system and trace id.
Response
Entries were written, or would be for a dry run.
Rows that became new entries.
Existing entries the rows replaced.
The dataset revision after the write; unchanged by a dry run.
Groups spanning more than one split. A real write with conflicts is rejected.