Add files (.md, .txt, .html, .pdf, .docx) to a dataset, one item each; send a large folder in several requests
const url = 'https://api.supposing.app/v1/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/files';const form = new FormData();form.append('files', 'example');form.append('redact', 'false');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.supposing.app/v1/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/files \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form files=example \ --form redact=falseThe files are read as POST /v1/datasets/upload reads them. Files past the plan’s documents per dataset are listed in skipped, so a folder sent in batches fills the dataset up to the limit and says what is left.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Any unique string, e.g. a UUID. Retrying with the same key returns the first response instead of creating a second one. Keys last 24 hours.
Any unique string, e.g. a UUID. Retrying with the same key returns the first response instead of creating a second one. Keys last 24 hours.
Request Bodyrequired
Section titled “Request Bodyrequired”object
As for upload.
Responses
Section titled “Responses”Successful Response
object
Runs on this dataset, its one-off (ephemeral) runs included.
Where it was made: web, api, cli or mcp (the Supposing-Source header).
For an imported spreadsheet: which columns the judge reads and which are kept only for people.
object
What the judge reads, in order; with more than one, each is under a ‘##
Kept for people, never shown to the judge.
object
The document’s first heading, else its file name without the extension.
Items this request added (n_items is the dataset’s total).
Files that were not added, and why.
object
Files added with a caveat, as ‘name: what’, e.g. ‘notes.txt: not UTF-8; read as Windows-1252’.
Items whose texts are the same (identical) or nearly so (near). A warning: nothing is merged or dropped.
Example
{ "source": "web", "duplicates": [ { "kind": "identical" } ]}Client error. Branch on code; show message and hint.
The body of every non-2xx response.
object
Stable machine-readable code, e.g. dataset_not_found.
Per-field problems, for invalid_request.
object
Dotted path to the field, e.g. ranking.rubric.
For plan_limit_* codes: the limit, usage and upgrade.
Which plan limit a plan_limit_* error hit, and the way up.
object
Datasets, items_per_dataset, chars_per_dataset or runs_per_month.
The workspace’s plan: free (Pay as you go) or subscription.
Current usage; for items_per_dataset and chars_per_dataset, the size the dataset would have.
Example generated
{ "code": "example", "message": "example", "hint": "example", "details": [ { "field": "example", "message": "example" } ], "limit": { "name": "example", "plan": "example", "limit": 1, "used": 1, "upgrade_url": "example" }}Server error.
The body of every non-2xx response.
object
Stable machine-readable code, e.g. dataset_not_found.
Per-field problems, for invalid_request.
object
Dotted path to the field, e.g. ranking.rubric.
For plan_limit_* codes: the limit, usage and upgrade.
Which plan limit a plan_limit_* error hit, and the way up.
object
Datasets, items_per_dataset, chars_per_dataset or runs_per_month.
The workspace’s plan: free (Pay as you go) or subscription.
Current usage; for items_per_dataset and chars_per_dataset, the size the dataset would have.
Example generated
{ "code": "example", "message": "example", "hint": "example", "details": [ { "field": "example", "message": "example" } ], "limit": { "name": "example", "plan": "example", "limit": 1, "used": 1, "upgrade_url": "example" }}