Documentation
Datasets
View .mdOpenAPI

Create a dataset

POSThttps://weights.fyi/run/v1/datasetsscope: submit
text
POST https://weights.fyi/run/v1/datasets
Authorization: Bearer <token>                    scope: submit
Content-Type: application/json

{"name": "<your name for it>"[, "format": "laya-sft-chat/jsonl"][, "base_model": "fastino-glide-28b"][, "source_ref": {...}]}
Available since
2026-10-08, with fine-tuning. Implemented 2026-10-09: credit needed, storage reserved and limited. Zero-copy source_ref pointers and generative SFT/DPO/multi-head specialist formats added 2026-10-25 / 2026-11-02.
Answer time
synchronous: the dataset is made and described in the answer at once. With source_ref (zero-copy pointer to your bucket), the dataset is ready immediately in the 201 Created response; without source_ref, the file goes to the address in the answer with PUT /v1/datasets/{dataset_id}/content.

Registers a training dataset either as a zero-copy pointer (source_ref, recommended for large releases) or as a managed upload: with source_ref, zero bytes are uploaded to weights.fyi, the dataset is created in status ready immediately, and trainers stream <prefix>manifest.json + <prefix>dataset.jsonl directly from your bucket; without source_ref, the call makes an empty dataset in status uploading and returns upload.path (/run/v1/datasets/<dataset_id>/content) for PUT /v1/datasets/{dataset_id}/content, before training on it. Fine-tuning is switched on for this service. While it is not, the call answers 404 not_configured after checking your body.

A dataset costs nothing and is kept until you delete it; its rows never appear in a log, trace or answer. Since the merge of 2026-10-09 making an uploaded dataset needs available credit above zero, and reserves 440 MiB until its upload sets its real size (zero-copy source_ref datasets reserve 0 managed bytes), against 8 datasets and 2,048 MiB per account and 128 and 20,480 MiB for the service.

Request

NameWhereRequiredMeaning
AuthorizationheaderyesBearer and your token. The token needs the submit scope, and the call counts against the token's request rate.
Content-Typeheaderyesapplication/json. The body may be at most 65,536 bytes.
namebodyyesYour name for the dataset, any text that is not empty. It is shown back in every view of the dataset and is not used for anything else.
formatbodynolaya-page-role/jsonl (default, single-label label), laya-sft-chat/jsonl (alias laya-student-sft/v1, chat messages), laya-dpo-preference/jsonl (alias laya-student-dpo/v1, prompt/chosen/rejected), or laya-specialist-heads/jsonl (aliases laya-specialist/jsonl, laya-specialist/v1, text/targets).
base_modelbodynoTrainable base model ID or upstream Hugging Face alias (default laya-page-role-base; model is read the same way): laya-page-role-base (laya-page-role), qwen3-4b, qwen3-8b, qwen3.5-4b, qwen3.5-8b, gemma3-27b, fastino-glide-28b (fastino/GLiDE), knowline-4b-gen5.5 (PelaAI/KnowLine-4B-Gen5.5), knowline-35b-a3b-gen1.5 (PelaAI/KnowLine-35B-A3B-Gen1.5), elephant-1-9b (baselabs/elephant-1), mammoth-1-27b (baselabs/mammoth-1), onejev-1.6-4b (OmniJev/OneJev1.6-4B), onejev-1.6-0.8b (OmniJev/OneJev1.6-0.8B), gliclass-v4-edge (knowledgator/gliclass-v4-edge), amber-0.4b (MLukauskas/amber-0.4b).
source_refbodynoZero-copy pointer object: {"manifest_uri": "s3://...", "sha256": "<64-hex>", "row_count": <int>, "byte_size": <int>, "compression": "none", "train_rows": <int>, "validation_rows": <int>} (where compression is "none", "zstd", or "gzip"). When supplied, the dataset is created in status ready immediately with upload: null.

Return value

201 Created with the dataset and the upload instruction, and Location, /run/v1/datasets/<dataset_id>.

FieldMeaning
dataset_idThe dataset's identifier, ds_ followed by 24 hexadecimal characters. Every other call about this dataset takes it.
nameThe name you gave, with leading and trailing spaces removed.
formatThe file format the upload will be read as, laya-page-role/jsonl.
base_modelThe model this dataset trains, laya-page-role-base.
labelsThe labels a line may carry, in the base model's own order. A line with any other label is refused at upload.
statusuploading in this answer. It becomes ready when a file has been accepted, failed when an upload was refused, and deleted after a delete.
errorThe code of the last refused upload, or null. It is null in this answer.
rows, train_rows, validation_rowsHow many lines the file holds in all, and how many of them are in each split. They are null until a file has been accepted.
bytesThe size of the accepted file in bytes, or null until then.
sha256The SHA-256 of the accepted file, so you can check that what arrived is what you sent, or null until then.
created_atWhen the dataset was made.
ready_atWhen its file was accepted, or null until then.
jobsThe training jobs that have used this dataset, oldest first. It is empty in this answer.
upload.methodThe method to send the file with, PUT.
upload.pathThe path to send the file to, with the service's base path, /run/v1/datasets/<dataset_id>/content.
upload.content_typeThe content type to send, application/x-ndjson.
upload.max_bytesThe largest file the upload accepts, in bytes; today 440 MiB.
upload.rowOne sentence that names the fields each line of the file must hold.

Errors

StatusCodeWhen it happensWhat to do
400invalid_json, invalid_bodyThe body is not a JSON object, or it has no name; expected shows the shape.Send {"name": "..."}.
400unsupported_formatThe format is not one the service reads; supported lists the one it does.Leave format out, or send laya-page-role/jsonl.
400model_not_availableThe base model is not one you can train; trainable lists the one you can.Leave it out, or send laya-page-role-base.
401unauthorized, invalid_token, token_revoked, token_expiredNo token, or one that does not work (any more).Use a valid token.
403scope_required, account_suspendedThe token lacks submit, or the account is suspended.Use a token with submit.
404not_configuredFine-tuning is not switched on for this service (feature is training).Nothing to fix on your side; see Fine-tune a model.
413body_too_largeThe body is larger than the limit in limit_bytes.The body only names the dataset; the file goes with the upload.
429rate_limitedThe token sends work faster than its request rate.Wait the Retry-After seconds and send again.
402no_creditYour available credit is zero or less (merged 2026-10-09).Add credit.
429dataset_count_limit, dataset_storage_limitYour account or the service holds as many datasets, or as much stored and reserved, as it may; limit or limit_bytes gives the limit (merged 2026-10-09).Delete datasets you no longer need, failed ones first.

Examples

sh
curl -s https://weights.fyi/run/v1/datasets \
  -H "Authorization: Bearer $WEIGHTS_API_KEY" -H "Content-Type: application/json" \
  -d '{
    "name": "scavenge-teacher-2026-11-02-r1-sft",
    "format": "laya-student-sft/v1",
    "base_model": "fastino-glide-28b",
    "source_ref": {
      "manifest_uri": "s3://zyxioxyz-leadgen-artifacts/tenants/12/standing-pipes/distillation-finetune/datasets/scavenge-teacher/2026-11-02-r1/sft/manifest.json",
      "sha256": "57f9bfa243e5158181b1a5996157c5d056421c5bda1f4b19454bf6071c307a63",
      "row_count": 69556,
      "byte_size": 605187366,
      "compression": "none",
      "train_rows": 58996,
      "validation_rows": 5201
    }
  }'
json
{
  "dataset_id": "ds_8126a1ce5538c9eb358c6aa9",
  "name": "scavenge-teacher-2026-11-02-r1-sft",
  "format": "laya-sft-chat/jsonl",
  "base_model": "fastino-glide-28b",
  "status": "ready",
  "rows": 69556,
  "train_rows": 58996,
  "validation_rows": 5201,
  "bytes": 605187366,
  "sha256": "57f9bfa243e5158181b1a5996157c5d056421c5bda1f4b19454bf6071c307a63",
  "source_ref": {
    "manifest_uri": "s3://zyxioxyz-leadgen-artifacts/tenants/12/standing-pipes/distillation-finetune/datasets/scavenge-teacher/2026-11-02-r1/sft/manifest.json",
    "sha256": "57f9bfa243e5158181b1a5996157c5d056421c5bda1f4b19454bf6071c307a63",
    "row_count": 69556,
    "byte_size": 605187366,
    "compression": "none",
    "train_rows": 58996,
    "validation_rows": 5201
  },
  "upload": null
}

Patterns

Two-step managed upload (uploading -> PUT .../content)

sh
curl -s -i https://weights.fyi/run/v1/datasets \
  -H "Authorization: Bearer $WEIGHTS_API_KEY" -H "Content-Type: application/json" \
  -d '{"name": "my labelled pages", "format": "laya-page-role/jsonl"}'
text
HTTP/1.1 201 Created
Content-Type: application/json
Location: /run/v1/datasets/ds_12be8b8818ceaf13696e7ff9

{
  "dataset_id": "ds_12be8b8818ceaf13696e7ff9",
  "name": "my labelled pages",
  "format": "laya-page-role/jsonl",
  "base_model": "laya-page-role-base",
  "labels": ["detail", "listing", "landing", "not_vacancy", "unresolved"],
  "status": "uploading",
  "error": null,
  "rows": null,
  "train_rows": null,
  "validation_rows": null,
  "bytes": null,
  "sha256": null,
  "created_at": "2026-10-09T08:28:09.826Z",
  "ready_at": null,
  "jobs": [],
  "upload": {
    "method": "PUT",
    "path": "/run/v1/datasets/ds_12be8b8818ceaf13696e7ff9/content",
    "content_type": "application/x-ndjson",
    "max_bytes": 461373440,
    "row": "one JSON object per line: id, split (train or validation), group_id, label (one of the model's labels), provenance, weight, state (the page text), optional state_sha256"
  }
}

History

  • 2026-10-08: live with fine-tuning: one format for one base model.
  • 2026-10-09 (merged): credit needed; the largest size reserved; limits per account and for the service.

See also

GET /v1/datasets/{dataset_id}, Fine-tune a model.