{"openapi":"3.0.0","paths":{"/api/v1/counters/processed-rows-total":{"get":{"description":"Public endpoint; no authentication required. Cheap read for polling. total_rows is the cached combined OBBT Lance row count (obbt_processed + obbt_unprocessed in Global_counters, updated by scheduled job).","operationId":"CountersController_getProcessedRowsTotal","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessedRowsTotalResponseDto"}}}}},"summary":"Cached combined OBBT table row count (Global_counters)","tags":["counters"]}},"/api/v1/datasets/upload/initiate":{"post":{"operationId":"DatasetController_initiateUpload","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateResponseDto"}}}}},"summary":"Initiate a dataset upload","tags":["Dataset"]}},"/api/v1/datasets/upload/complete":{"post":{"operationId":"DatasetController_completeUpload","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteUploadDto"}}}},"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteUploadResponseDto"}}}}},"summary":"Complete a dataset upload and trigger processing","tags":["Dataset"]}},"/api/v1/datasets/upload/initiate-batch":{"post":{"description":"Initiate a batch upload. A batch must be homogeneous: either all document formats (pdf, docx, pptx, xlsx, html, zip) or all tabular formats (csv, json, jsonl, parquet). Mixed batches are rejected. TXT files are permissive and may be included in either kind of batch (or alone, in which case the dataset is tabular); their contents are converted during complete-batch.","operationId":"DatasetController_initiateBatchUpload","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateBatchDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateBatchResponseDto"}}}}},"summary":"Initiate a batch upload","tags":["Dataset"]}},"/api/v1/datasets/upload/complete-batch":{"post":{"description":"Any TXT files in the batch are converted to csv/jsonl. Batches that still contain documents (pdf/docx/pptx/xlsx/html, or unpacked zip contents) move to awaiting_preprocessing and wait for an explicit launch-preprocessing call. Batches with only tabular formats (csv/json/jsonl/parquet, plus any converted-from-TXT files) move directly to column extraction.","operationId":"DatasetController_completeBatchUpload","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteBatchDto"}}}},"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteBatchResponseDto"}}}}},"summary":"Complete a batch upload and trigger processing","tags":["Dataset"]}},"/api/v1/datasets":{"post":{"description":"Unified ingest endpoint. Discriminated by source.type: \"file\" returns upload instructions for a presigned S3 PUT, \"huggingface\" and \"kaggle\" start an async import.","operationId":"DatasetController_createDatasetPublic","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDatasetDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDatasetResponseDto"}}}}},"summary":"Create a dataset from file upload, HuggingFace, or Kaggle","tags":["Dataset"]},"get":{"operationId":"DatasetController_getDatasets","parameters":[{"name":"limit","required":false,"in":"query","description":"Number of results (max 100, default 20). Used with cursor pagination.","schema":{"type":"number"}},{"name":"cursor","required":false,"in":"query","description":"Cursor from the previous response next_cursor field.","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by status: pending | running | succeeded | failed","schema":{"type":"string"}},{"name":"q","required":false,"in":"query","description":"Search by dataset name (case-insensitive contains).","schema":{"type":"string"}},{"name":"created_after","required":false,"in":"query","description":"ISO 8601 datetime — datasets created after this time.","schema":{"type":"string"}},{"name":"created_before","required":false,"in":"query","description":"ISO 8601 datetime — datasets created before this time.","schema":{"type":"string"}},{"name":"sort","required":false,"in":"query","description":"Sort field: created_at | updated_at | name (default: created_at).","schema":{"type":"string"}},{"name":"sort_direction","required":false,"in":"query","description":"Sort direction: asc | desc (default: desc).","schema":{"type":"string"}},{"name":"created_by_user_id","required":false,"in":"query","description":"Filter datasets by creator. The user must belong to the same team as the caller.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorListResponseDto"}}}}},"summary":"List datasets","tags":["Dataset"]}},"/api/v1/datasets/{dataset_id}/upload/complete":{"post":{"description":"File uploads only. Call after uploading bytes to the presigned URL from POST /datasets. Verifies the file exists in S3, then triggers the preprocessing pipeline.","operationId":"DatasetController_completeUploadById","parameters":[{"name":"dataset_id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteUploadByIdDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteUploadByIdResponseDto"}}}}},"summary":"Complete a file upload and trigger processing","tags":["Dataset"]}},"/api/v1/datasets/{dataset_id}/status":{"get":{"operationId":"DatasetController_getDatasetStatus","parameters":[{"name":"dataset_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDatasetStatusResponseDto"}}}}},"summary":"Get the processing status of a dataset","tags":["Dataset"]}},"/api/v1/datasets/{dataset_id}/evaluation":{"get":{"operationId":"DatasetController_getDatasetEvaluation","parameters":[{"name":"dataset_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetEvaluationResponseDto"}}}}},"summary":"Get evaluation results for a dataset","tags":["Dataset"]}},"/api/v1/datasets/{dataset_id}":{"get":{"operationId":"DatasetController_getDataset","parameters":[{"name":"dataset_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDatasetDto"}}}}},"summary":"Get a dataset by ID","tags":["Dataset"]},"delete":{"description":"Soft-deletes a dataset and its associated resources. Cannot delete a dataset while the pipeline is running.","operationId":"DatasetController_deleteDataset","parameters":[{"name":"dataset_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"404":{"description":"Dataset not found"},"409":{"description":"Dataset is currently launching — wait until it finishes"}},"summary":"Delete a dataset","tags":["Dataset"]}},"/api/v1/datasets/{dataset_id}/finetune/best-launch-config":{"get":{"description":"Returns the persisted launch snapshot for the winning AutoScientist job (terminal experiment with `best_finetune_job_id`) or the newest succeeded legacy one-shot when no experiment exists. Aligns with finetune confirm payload plus `original_model_name` and persisted `trained_model_name` (output label / suffix). Call this when the UI needs defaults instead of embedding config on GET /datasets/:id or list.","operationId":"DatasetController_getDatasetBestFinetuneLaunchConfig","parameters":[{"name":"dataset_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BestFinetuneLaunchConfigResponseDto"}}}}},"summary":"Best fine-tune launch config for re-launch parity","tags":["Dataset"]}},"/api/v1/datasets/{dataset_id}/export-links":{"get":{"operationId":"DatasetController_getDatasetExportLinks","parameters":[{"name":"dataset_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetExportLinksResponseDto"}}}}},"summary":"Poll saved URLs for successful dataset exports (Hugging Face, Kaggle, Google Sheets)","tags":["Dataset"]}},"/api/v1/datasets/{dataset_id}/run":{"post":{"description":"Validates column mapping and recipe configuration, reserves credits, and starts the augmentation pipeline. Set estimate=true to validate and get a cost quote without starting a run. When the mapped image column is also in context_columns, output rows are billed at 10 credits per 100 rows (1–100 rows cost 10 credits; see multimodalPricingApplied and creditMultiplier on the response).","operationId":"DatasetController_runPipeline","parameters":[{"name":"dataset_id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLaunchDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLaunchResponseDto"}}}},"400":{"description":"Validation failed: column_mapping shape error, or language_expansion validation failure (shape mismatch, unknown ISO 639-1 code, or unsupported country/language pair)."},"402":{"description":"Insufficient credits"},"409":{"description":"Conflict — dataset is already launching, still importing, or row_count not yet available. Poll GET /datasets/{dataset_id}/status until row_count is populated."}},"summary":"Start an augmentation run (or estimate cost)","tags":["Dataset"]}},"/api/v1/datasets/{dataset_id}/download":{"get":{"description":"Streams the processed rows in the requested file format. Works on datasets with status `ready` (full output) and also on datasets with status `failed` — in the failed case the stream contains only the rows that were successfully processed before the run aborted, which is useful for recovering partial output from interrupted jobs. Returns 422 only when no run has ever started on this dataset.\n\n**Image columns (JSON / JSONL):** Rows may include `original_image` only when the mapped image column is also in `configured_column_mapping.context`. Read `image_column_formats` from `GET /datasets/{dataset_id}` and look up the active image column to determine encoding: `embedded_bytes` → `{ bytes, path: null }` with base64 bytes; `url` or `file_reference` → presigned HTTPS URL string. When images are not surfaced, `original_image` is omitted and internal `s3://` URIs are never returned. See schema `ProcessedDatasetExportOriginalImageFieldDto`. In CSV and Parquet, embedded bytes appear as a JSON string in the cell.","operationId":"DatasetController_export","parameters":[{"name":"dataset_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"fileFormat","required":false,"in":"query","description":"Output file format. Defaults to `csv` if omitted.","schema":{"enum":["csv","json","jsonl","parquet","pdf","docx","pptx","xlsx","html","zip","txt"],"type":"string"}}],"responses":{"200":{"description":"File download stream. For failed runs, contains partial results (rows processed before failure). For `fileFormat=json` or `jsonl`, each record may include `original_image` per `ProcessedDatasetExportOriginalImageFieldDto` when an image column is mapped and in context.","content":{"text/csv":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"string","format":"binary"}},"application/jsonl":{"schema":{"type":"string","format":"binary"},"examples":{"row_with_url_image":{"summary":"JSONL line (url / file_reference format)","description":"Illustrative single line when the active image column format is `url` or `file_reference`.","value":"{\"enhanced_prompt\":\"...\",\"original_image\":\"https://example-bucket.s3.amazonaws.com/image.jpg?X-Amz-Signature=...\"}\n"},"row_with_embedded_image":{"summary":"JSONL line (embedded_bytes format)","description":"Illustrative single line when the active image column format is `embedded_bytes`.","value":"{\"enhanced_prompt\":\"...\",\"original_image\":{\"bytes\":\"<base64>\",\"path\":null}}\n"}}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"422":{"description":"No run has started on this dataset yet. Launch a run via POST /datasets/{dataset_id}/run first."}},"summary":"Download the processed dataset","tags":["Dataset"]}},"/api/v1/datasets/{dataset_id}/publish":{"post":{"description":"Publishes the processed dataset to Hugging Face or Kaggle. Currently returns 501 — not yet implemented.","operationId":"DatasetController_publishDataset","parameters":[{"name":"dataset_id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishRequestDto"}}}},"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishAcceptedResponseDto"}}}},"501":{"description":"Publishing is not yet available"}},"summary":"Publish a dataset to an external platform","tags":["Dataset"]}},"/api/v1/autoscientist":{"post":{"description":"Starts an iterative AutoScientist loop on a dataset you own. The loop runs up to max_iterations training cycles, stopping early when target_win_rate is achieved. Omitted parameters are resolved to platform defaults for the selected model and returned in the response. Poll GET /autoscientist/{experiment_id} for status, then GET /autoscientist/{experiment_id}/download once it succeeds.","operationId":"AutoScientistPublicController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateAutoScientistRunDto"}}}},"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAutoScientistRunDto"}}}},"400":{"description":"Invalid request — dataset has too few training rows, or an unsupported configuration was supplied."},"402":{"description":"Insufficient credits to start this run."},"403":{"description":"Fine-tuning is not available on your current plan. Upgrade to unlock this feature."},"404":{"description":"Dataset not found or not owned by caller."},"429":{"description":"Too many training jobs in flight. Wait for an existing run to complete before starting another."},"503":{"description":"AutoScientist is currently unavailable."}},"summary":"Create an AutoScientist run","tags":["autoscientist"]},"get":{"operationId":"AutoScientistPublicController_list","parameters":[{"name":"limit","required":false,"in":"query","description":"Page size (max 100, default 20).","schema":{"type":"number"}},{"name":"cursor","required":false,"in":"query","description":"next_cursor from a previous page.","schema":{"type":"string"}},{"name":"dataset_id","required":false,"in":"query","description":"Only runs for this dataset.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAutoScientistRunListDto"}}}}},"summary":"List AutoScientist runs","tags":["autoscientist"]}},"/api/v1/autoscientist/recommend-hyperparams":{"post":{"description":"Returns the hyperparameters AutoScientist derives for a model and the dataset's effective training size (rows plus planned augmentation). Nothing is launched. Omit `model` to size against the model POST /autoscientist would select for this dataset; the resolved id is returned with the values. POST /autoscientist applies the same values when `hyperparams` is omitted.","operationId":"AutoScientistPublicController_recommendHyperparams","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRecommendHyperparamsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRecommendHyperparamsResponseDto"}}}},"404":{"description":"Dataset not found or not owned by caller."},"422":{"description":"Dataset is not ready, or the model id is unsupported."},"503":{"description":"AutoScientist is currently unavailable."}},"summary":"Recommend hyperparameters","tags":["autoscientist"]}},"/api/v1/autoscientist/{experiment_id}":{"get":{"operationId":"AutoScientistPublicController_retrieve","parameters":[{"name":"experiment_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAutoScientistRunDto"}}}},"404":{"description":"Run not found or not owned by caller."}},"summary":"Retrieve an AutoScientist run","tags":["autoscientist"]}},"/api/v1/autoscientist/{experiment_id}/cancel":{"post":{"operationId":"AutoScientistPublicController_cancel","parameters":[{"name":"experiment_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAutoScientistRunDto"}}}},"404":{"description":"Run not found or not owned by caller."}},"summary":"Cancel an AutoScientist run","tags":["autoscientist"]}},"/api/v1/autoscientist/{experiment_id}/download":{"get":{"operationId":"AutoScientistPublicController_download","parameters":[{"name":"experiment_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Streams the best iteration checkpoint as application/gzip.","content":{"application/gzip":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Run not found or not owned by caller."},"422":{"description":"Run has not completed successfully or the best model is not ready for download."}},"summary":"Download the best trained model artifact","tags":["autoscientist"]}},"/api/v1/training-models":{"get":{"description":"Returns the set of base models that can be used as the `model` field when creating a training job.","operationId":"FinetuneModelsPublicController_list","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicTrainingModelListDto"}}}}},"summary":"List available base models for training","tags":["training-models"]}}},"info":{"title":"Adaption API","description":"Public API for the Adaption dataset augmentation platform","version":"0.4.19","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"Bearer","description":"API key or JWT — pass as: Bearer <token>","type":"http"}},"schemas":{"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"ProcessedRowsTotalResponseDto":{"type":"object","properties":{"total_rows":{"type":"string","description":"Combined OBBT Lance table row count (obbt_processed + obbt_unprocessed) from Global_counters (string for large values); refreshed by cron.","example":"125000"}},"required":["total_rows"]},"InitiateDto":{"type":"object","properties":{"name":{"type":"string","description":"Human-readable name for the dataset","example":"my-training-data"},"file_format":{"type":"string","enum":["csv","json","jsonl","parquet","pdf","docx","pptx","xlsx","html","zip","txt"],"description":"Format of the file being uploaded","example":"csv"}},"required":["name","file_format"]},"InitiateResponseDto":{"type":"object","properties":{"upload_url":{"type":"string","description":"Pre-signed S3 URL — upload the file directly to this URL via HTTP PUT","example":"https://s3.amazonaws.com/bucket/key?X-Amz-Signature=..."}},"required":["upload_url"]},"CompleteUploadDto":{"type":"object","properties":{"s3_key":{"type":"string","description":"S3 object key returned in the pre-signed URL response from /upload/initiate","example":"uploads/550e8400-e29b-41d4-a716-446655440000/my-training-data.csv"},"name":{"type":"string","description":"Human-readable name for the dataset","example":"my-training-data"},"file_format":{"type":"string","enum":["csv","json","jsonl","parquet","pdf","docx","pptx","xlsx","html","zip","txt"],"description":"Format of the uploaded file","example":"csv"},"file_size_bytes":{"type":"number","description":"Size of the uploaded file in bytes","example":1048576,"minimum":0,"maximum":2147483648}},"required":["s3_key","name","file_format","file_size_bytes"]},"CompleteUploadResponseDto":{"type":"object","properties":{"dataset_id":{"type":"string","description":"ID of the newly created dataset","example":"550e8400-e29b-41d4-a716-446655440000"}},"required":["dataset_id"]},"InitiateBatchFileDto":{"type":"object","properties":{"file_name":{"type":"string","description":"Original file name","example":"report.pdf"},"file_format":{"type":"string","enum":["csv","json","jsonl","parquet","pdf","docx","pptx","xlsx","html","zip","txt"],"description":"Format of the file","example":"pdf"},"file_size_bytes":{"type":"number","description":"File size in bytes","example":1048576}},"required":["file_name","file_format","file_size_bytes"]},"InitiateBatchDto":{"type":"object","properties":{"name":{"type":"string","description":"Human-readable name for the dataset","example":"my-document-dataset"},"files":{"description":"List of files to upload. A single batch must be homogeneous: either all document formats (pdf, docx, pptx, xlsx, html, zip) or all tabular formats (csv, json, jsonl, parquet). Mixing the two is rejected because the two pipelines use different credit models and preprocessing stages. TXT files are permissive: they may be included in either kind of batch (or alone, producing a tabular dataset). complete-batch converts TXT contents to csv/jsonl and merges them into the resulting dataset.","type":"array","items":{"$ref":"#/components/schemas/InitiateBatchFileDto"}}},"required":["name","files"]},"InitiateBatchUploadDto":{"type":"object","properties":{"file_name":{"type":"string","description":"Original file name"},"upload_url":{"type":"string","description":"Presigned S3 upload URL"},"s3_key":{"type":"string","description":"S3 key for the uploaded file"}},"required":["file_name","upload_url","s3_key"]},"InitiateBatchResponseDto":{"type":"object","properties":{"dataset_id":{"type":"string","description":"Dataset ID"},"uploads":{"type":"array","items":{"$ref":"#/components/schemas/InitiateBatchUploadDto"}}},"required":["dataset_id","uploads"]},"CompleteBatchFileDto":{"type":"object","properties":{"s3_key":{"type":"string","description":"S3 key returned from initiate-batch"},"file_name":{"type":"string","description":"Original file name"},"file_format":{"type":"string","enum":["csv","json","jsonl","parquet","pdf","docx","pptx","xlsx","html","zip","txt"],"description":"File format"},"file_size_bytes":{"type":"number","description":"File size in bytes"}},"required":["s3_key","file_name","file_format","file_size_bytes"]},"CompleteBatchDto":{"type":"object","properties":{"dataset_id":{"type":"string","description":"Dataset ID from initiate-batch"},"files":{"type":"array","items":{"$ref":"#/components/schemas/CompleteBatchFileDto"}}},"required":["dataset_id","files"]},"CompleteBatchResponseDto":{"type":"object","properties":{"dataset_id":{"type":"string","description":"Dataset ID"},"status":{"type":"string","description":"Current dataset status"}},"required":["dataset_id","status"]},"PassthroughColumnMappingDto":{"type":"object","properties":{"prompt":{"type":"string","description":"Name of the raw column holding the prompt / input text","example":"question"},"completion":{"type":"string","description":"Name of the raw column holding the completion / target text","example":"answer"}},"required":["prompt","completion"]},"FileSourceDto":{"type":"object","properties":{"type":{"type":"string","enum":["file"],"description":"Source type"},"name":{"type":"string","description":"Human-readable name for the dataset","example":"my-training-data"},"file_format":{"type":"string","enum":["csv","json","jsonl","parquet","pdf","docx","pptx","xlsx","html","zip","txt"],"description":"Format of the file being uploaded","example":"csv"},"processing_mode":{"type":"string","enum":["adapt","raw"],"description":"How the upload is ingested. `adapt` (default) runs it through the adaptation pipeline. `raw` materializes the file straight to a trainable dataset with no augmentation, and requires a tabular file_format plus a column_mapping. Either can then be fine-tuned or run through AutoScientist.","example":"raw"},"column_mapping":{"description":"Required when processing_mode is `raw`: which columns to canonicalize as prompt and completion. Ignored when the dataset is adapted.","allOf":[{"$ref":"#/components/schemas/PassthroughColumnMappingDto"}]}},"required":["type","name","file_format"]},"HuggingfaceSourceDto":{"type":"object","properties":{"type":{"type":"string","enum":["huggingface"],"description":"Source type"},"url":{"type":"string","description":"HuggingFace dataset repository URL","example":"https://huggingface.co/datasets/owner/name"},"files":{"description":"File paths to download from the repository","example":["train.csv"],"type":"array","items":{"type":"string"}}},"required":["type","url","files"]},"KaggleSourceDto":{"type":"object","properties":{"type":{"type":"string","enum":["kaggle"],"description":"Source type"},"url":{"type":"string","description":"Kaggle dataset URL","example":"https://www.kaggle.com/datasets/owner/name"},"files":{"description":"File paths to download from the dataset","example":["data.csv"],"type":"array","items":{"type":"string"}}},"required":["type","url","files"]},"CreateDatasetDto":{"type":"object","properties":{"source":{"description":"Dataset source configuration. Discriminated by `type`: file, huggingface, or kaggle.","oneOf":[{"$ref":"#/components/schemas/FileSourceDto"},{"$ref":"#/components/schemas/HuggingfaceSourceDto"},{"$ref":"#/components/schemas/KaggleSourceDto"}]}},"required":["source"]},"UploadInstructionsDto":{"type":"object","properties":{"url":{"type":"string","description":"Pre-signed URL for uploading the file","example":"https://s3.amazonaws.com/bucket/key?X-Amz-Signature=..."},"method":{"type":"string","description":"HTTP method to use","example":"PUT"},"s3_key":{"type":"string","description":"S3 object key — pass this back in the complete request if needed for verification"}},"required":["url","method","s3_key"]},"CreateDatasetResponseDto":{"type":"object","properties":{"dataset_id":{"type":"string","description":"ID of the newly created dataset"},"status":{"type":"string","description":"Current dataset status"},"upload_instructions":{"description":"Upload instructions for file sources. PUT your file to the provided URL.","allOf":[{"$ref":"#/components/schemas/UploadInstructionsDto"}]}},"required":["dataset_id","status"]},"CompleteUploadByIdDto":{"type":"object","properties":{"file_size_bytes":{"type":"number","description":"Size of the uploaded file in bytes (for verification)","example":1048576,"minimum":0,"maximum":2147483648},"sha256":{"type":"string","description":"SHA-256 hex digest of the uploaded file (for integrity verification)","example":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"}},"required":["file_size_bytes"]},"CompleteUploadByIdResponseDto":{"type":"object","properties":{"dataset_id":{"type":"string","description":"ID of the dataset","example":"550e8400-e29b-41d4-a716-446655440000"},"status":{"type":"string","description":"Current status of the dataset after completing upload","example":"processing"}},"required":["dataset_id","status"]},"PublicDatasetProgressDto":{"type":"object","properties":{"percent":{"type":"integer","nullable":true,"description":"Progress percentage (0-100)"},"processed_rows":{"type":"integer","nullable":true,"description":"Number of rows processed so far"},"total_rows":{"type":"integer","nullable":true,"description":"Total rows to process (samples_to_process or row_count)"}},"required":["percent","processed_rows","total_rows"]},"PublicDatasetErrorDataDto":{"type":"object","properties":{"message":{"type":"string","nullable":true,"description":"Error message"},"code":{"type":"string","nullable":true,"description":"Stable error code when the failure was structured (e.g. E0100)"},"level":{"type":"string","enum":["error","warning"],"nullable":true,"description":"Severity when known"}},"required":["message","code","level"]},"PublicDatasetStatusResponseDto":{"type":"object","properties":{"dataset_id":{"type":"string","description":"Dataset ID"},"status":{"type":"string","enum":["pending","running","awaiting_input","succeeded","failed"],"description":"Current processing status. `awaiting_input` means the dataset is uploaded but waiting for you to start adaptation via datasets.run(column_mapping=...) — it will not progress on its own."},"row_count":{"type":"integer","nullable":true,"description":"Number of rows in the dataset"},"progress":{"nullable":true,"description":"Processing progress. Null when no run is active.","allOf":[{"$ref":"#/components/schemas/PublicDatasetProgressDto"}]},"error_data":{"nullable":true,"description":"Error details if the dataset failed. Null otherwise.","allOf":[{"$ref":"#/components/schemas/PublicDatasetErrorDataDto"}]}},"required":["dataset_id","status","row_count","progress","error_data"]},"EvaluationQualityDto":{"type":"object","properties":{"grade_before":{"type":"string","nullable":true,"description":"Letter grade (A-E) before augmentation","example":"C"},"grade_after":{"type":"string","nullable":true,"description":"Letter grade (A-E) after augmentation","example":"A"},"score_before":{"type":"number","nullable":true,"description":"Quality score (0-10) before augmentation","example":6.2},"score_after":{"type":"number","nullable":true,"description":"Quality score (0-10) after augmentation","example":8.5},"percentile_after":{"type":"number","nullable":true,"description":"Percentile rank (0-100) after augmentation","example":92.3},"improvement_percent":{"type":"number","nullable":true,"description":"Relative quality improvement as a percentage","example":37.1}},"required":["grade_before","grade_after","score_before","score_after","percentile_after","improvement_percent"]},"DatasetEvaluationResponseDto":{"type":"object","properties":{"dataset_id":{"type":"string","description":"Dataset ID"},"status":{"type":"string","nullable":true,"description":"Evaluation pipeline status: pending | running | succeeded | failed | skipped","example":"succeeded"},"quality":{"nullable":true,"description":"Structured quality metrics. Null until evaluation completes.","allOf":[{"$ref":"#/components/schemas/EvaluationQualityDto"}]},"raw_results":{"type":"object","additionalProperties":true,"nullable":true,"description":"Raw evaluation results payload for advanced use. Null until evaluation completes."}},"required":["dataset_id","status","quality","raw_results"]},"PublicDatasetColumnMappingDto":{"type":"object","properties":{"prompt":{"type":"string","nullable":true},"completion":{"type":"string","nullable":true},"chat":{"type":"string","nullable":true},"context":{"type":"array","items":{"type":"string"}},"image":{"type":"string","nullable":true}},"required":["prompt","completion","chat","context","image"]},"PublicDatasetEvaluationSummaryDto":{"type":"object","properties":{"grade_before":{"type":"string","nullable":true,"description":"Letter grade (A-E) before augmentation"},"grade_after":{"type":"string","nullable":true,"description":"Letter grade (A-E) after augmentation"},"score_before":{"type":"number","nullable":true,"description":"Quality score before augmentation"},"score_after":{"type":"number","nullable":true,"description":"Quality score after augmentation"},"improvement_percent":{"type":"number","nullable":true,"description":"Relative improvement percentage"}},"required":["grade_before","grade_after","score_before","score_after","improvement_percent"]},"PublicDatasetDto":{"type":"object","properties":{"dataset_id":{"type":"string","description":"Unique dataset identifier"},"name":{"type":"string","nullable":true,"description":"Human-readable name for the dataset"},"status":{"type":"string","enum":["pending","running","succeeded","failed"],"description":"Lifecycle status: pending, running, succeeded, or failed"},"created_at":{"type":"string","format":"date-time","description":"Timestamp when the dataset was created"},"created_by_user_id":{"type":"string","format":"uuid","nullable":true,"description":"User who created the dataset"},"updated_at":{"type":"string","format":"date-time","description":"Timestamp of the last update"},"row_count":{"type":"integer","nullable":true,"description":"Total number of rows in the dataset"},"configured_column_mapping":{"nullable":true,"description":"User-configured column mapping. Null if not yet configured.","allOf":[{"$ref":"#/components/schemas/PublicDatasetColumnMappingDto"}]},"evaluation_summary":{"nullable":true,"description":"Compact evaluation summary. Null if evaluation has not completed.","allOf":[{"$ref":"#/components/schemas/PublicDatasetEvaluationSummaryDto"}]},"run_id":{"type":"string","nullable":true,"description":"ID of the currently active run"},"progress":{"nullable":true,"description":"Processing progress. Null when no run is active.","allOf":[{"$ref":"#/components/schemas/PublicDatasetProgressDto"}]},"error_data":{"nullable":true,"description":"Error details if the dataset failed. Null otherwise.","allOf":[{"$ref":"#/components/schemas/PublicDatasetErrorDataDto"}]},"image_column_formats":{"type":"object","additionalProperties":{"enum":["embedded_bytes","url","file_reference"]},"nullable":true,"description":"Per-column export encoding for detected image columns (column name → format). Use with `GET /datasets/{dataset_id}/download`: look up the active image column (mapped image column that is also in `configured_column_mapping.context`) to determine how each row's `original_image` is encoded. Null or empty when no image columns were detected."}},"required":["dataset_id","name","status","created_at","created_by_user_id","updated_at","row_count","configured_column_mapping","evaluation_summary","run_id","progress","error_data","image_column_formats"]},"DatasetBestJobConfigDto":{"type":"object","properties":{"finetune_job_id":{"type":"string","format":"uuid","description":"Fine-tune job whose config is shown (experiment best or legacy)."},"training_experiment_id":{"type":"object","format":"uuid","nullable":true,"description":"Training experiment when this snapshot is the AutoScientist best job; null for legacy one-shot."},"original_model_name":{"type":"string","nullable":true,"description":"Base model id sent to the provider at launch (FinetuneJob.model)."},"trained_model_name":{"type":"string","nullable":true,"description":"Fine-tune output label / suffix (e.g. Together `suffix`): from persisted `FinetuneJob.trained_model_name` when set; otherwise recomputed from the current dataset name (legacy rows). Recomputed value can differ if the dataset was renamed after submit. Null only when unset and the dataset row is unavailable."},"training_method":{"type":"string","nullable":true,"enum":["sft","dpo"]},"training_type":{"type":"string","nullable":true,"enum":["lora","full"]},"data_format":{"type":"string","nullable":true,"enum":["chat","instruction","preference"]},"hyperparams":{"type":"object","nullable":true,"additionalProperties":true,"description":"Hyperparameter blob persisted at launch (Together-facing)."}},"required":["finetune_job_id","training_experiment_id","original_model_name","trained_model_name","training_method","training_type","data_format","hyperparams"]},"BestFinetuneLaunchConfigResponseDto":{"type":"object","properties":{"best_job_config":{"nullable":true,"description":"Launch-parity snapshot for the experiment best job (terminal experiment with `best_finetune_job_id`) or, when no experiment exists, the newest succeeded legacy one-shot (`training_experiment_id` null). Null while an experiment is non-terminal, when no best job was chosen yet, or when no qualifying job exists.","allOf":[{"$ref":"#/components/schemas/DatasetBestJobConfigDto"}]}},"required":["best_job_config"]},"DatasetSummaryDto":{"type":"object","properties":{"dataset_id":{"type":"string","description":"Dataset ID","example":"550e8400-e29b-41d4-a716-446655440000"},"name":{"type":"string","nullable":true,"description":"Dataset name","example":"My training data"},"status":{"type":"string","description":"Dataset status","enum":["pending","running","awaiting_input","succeeded","failed"],"example":"pending"},"updated_at":{"format":"date-time","type":"string","description":"Last updated timestamp"},"created_at":{"format":"date-time","type":"string","description":"Timestamp when the dataset was created"},"row_count":{"type":"integer","nullable":true,"description":"Total number of rows","example":1000},"description":{"type":"string","nullable":true,"description":"Auto-generated description of the dataset contents"}},"required":["dataset_id","status","updated_at","created_at"]},"CursorListResponseDto":{"type":"object","properties":{"datasets":{"description":"Page of datasets","type":"array","items":{"$ref":"#/components/schemas/DatasetSummaryDto"}},"next_cursor":{"type":"string","nullable":true,"description":"Cursor for the next page. Null when no more results.","example":"550e8400-e29b-41d4-a716-446655440000"}},"required":["datasets"]},"DatasetExportLinksResponseDto":{"type":"object","properties":{"huggingface":{"type":"object","nullable":true,"description":"URL of the dataset on Hugging Face, if a successful export exists"},"kaggle":{"type":"object","nullable":true,"description":"URL of the dataset on Kaggle, if a successful export exists"},"google_sheets":{"type":"object","nullable":true,"description":"URL of the Google Spreadsheet, if a successful export exists"}}},"PublicColumnMappingDto":{"type":"object","properties":{"prompt":{"type":"string","description":"Column to use as the prompt/instruction field. Trigger for prompt mode (with optional `completion` and `context`); cannot be combined with `chat` or `universal_prompt`.","example":"instruction"},"completion":{"type":"string","description":"Column to use as the completion/response field. Optional in prompt mode and universal-prompt mode; not allowed in chat mode.","example":"response"},"chat":{"type":"string","description":"Column containing chat/conversation data. Chat mode is exclusive — when `chat` is set, all other column-mapping fields must be omitted.","example":"messages"},"context":{"description":"Columns to include as context. Optional in prompt mode; required (at least one entry) in universal-prompt mode; not allowed in chat mode.","example":["context"],"type":"array","items":{"type":"string"}},"universal_prompt":{"type":"string","description":"Dataset-wide instruction folded into every row alongside the context columns. Use when there is no per-row prompt column but rows share a common task framing. Requires at least one entry in `context`.","example":"Reframe the following passage as a clear, factual question."},"image":{"type":"string","description":"Column containing per-row images (URLs, file paths, or encoded bytes) to fold into the augmentation as multimodal context. Allowed in any mode (prompt, universal-prompt, or chat) as long as text framing is also present — it cannot be the only mapping. The column is automatically added to `context` if omitted. Note: opting a dataset into multimodal context disqualifies it from finetuning.","example":"image_column"}}},"RecipeOptionsDto":{"type":"object","properties":{"prompt_rephrase":{"type":"boolean","description":"Rephrase prompts for variety and clarity","example":true},"deduplication":{"type":"boolean","description":"Remove near-duplicate rows","example":true},"reasoning_traces":{"type":"boolean","description":"Add reasoning traces (chain-of-thought) to completions","example":false}}},"PublicRecipeSpecDto":{"type":"object","properties":{"version":{"type":"string","description":"Recipe schema version. Allows recipe options to evolve across releases.","example":"2026-04","default":"2026-04"},"recipes":{"description":"Augmentation recipe toggles. Omitted recipes use backend defaults.","allOf":[{"$ref":"#/components/schemas/RecipeOptionsDto"}]}}},"PublicJobSpecDto":{"type":"object","properties":{"max_rows":{"type":"number","description":"Maximum number of rows to process in this run","minimum":1},"idempotency_key":{"type":"string","description":"Client-generated idempotency key for safe retries. If a launch with the same key already exists, the original response is returned."}}},"PublicBrandControlsDto":{"type":"object","properties":{"length":{"type":"string","description":"Target response length. Controls verbosity of generated completions.","enum":["minimal","concise","detailed","extensive"],"example":"concise"},"safety_categories":{"description":"Content safety categories to enforce. Completions violating any listed category are filtered from the output.","example":["harassment","hate"],"type":"array","items":{"type":"string"}},"hallucination_mitigation":{"type":"boolean","description":"Enable web-search grounding to reduce hallucinations in generated completions.","example":true},"blueprint":{"type":"string","description":"Freeform brand/style instructions injected as a system prompt for every generated completion. Use this to enforce tone, language, persona, or any guideline that does not fit the structured length/safety/grounding controls.","example":"All generated text must be written exclusively in Brazilian Portuguese (pt-BR)."}}},"PublicCountryLanguagePairDto":{"type":"object","properties":{"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code.","example":"ES"},"language":{"type":"string","description":"ISO 639-1 language code.","example":"ca"}},"required":["country","language"]},"PublicLanguageExpansionSpecDto":{"type":"object","properties":{"type":{"type":"string","description":"Expansion mode. `translate` produces one new row variant per target language; `localize` produces one new row variant per country/language pair.","enum":["translate","localize"],"example":"translate"},"languages":{"description":"Target ISO 639-1 language codes (required when type=translate, forbidden when type=localize). Validated against the supported language list at request time; unknown values return 400 with a sample of supported codes.","example":["es","fr"],"type":"array","items":{"type":"string"}},"pairs":{"description":"Country/language pairs (required when type=localize, forbidden when type=translate). Each pair is validated against the supported country/language pair list at request time.","type":"array","items":{"$ref":"#/components/schemas/PublicCountryLanguagePairDto"}},"sample_rate":{"type":"number","description":"Fraction (0.01–1) of input rows that are expanded per target. Output rows ≈ input × (1 + sample_rate × target_count). Required. Credits are billed on the expanded output row count.","minimum":0.01,"maximum":1,"example":0.25}},"required":["type","sample_rate"]},"PublicLaunchDto":{"type":"object","properties":{"column_mapping":{"description":"Column role assignments for augmentation. Required for real runs, optional for estimate-only requests.","allOf":[{"$ref":"#/components/schemas/PublicColumnMappingDto"}]},"recipe_specification":{"description":"Augmentation recipe configuration. Omitted recipes use backend defaults.","allOf":[{"$ref":"#/components/schemas/PublicRecipeSpecDto"}]},"job_specification":{"description":"Job execution parameters","allOf":[{"$ref":"#/components/schemas/PublicJobSpecDto"}]},"brand_controls":{"description":"Brand and quality controls for generated completions. Covers response length, content safety categories, web-search grounding, and a freeform blueprint system prompt.","allOf":[{"$ref":"#/components/schemas/PublicBrandControlsDto"}]},"training_type":{"type":"string","description":"How to adapt the dataset. `instruction_dataset` (default) produces enhanced prompt/completion pairs for SFT; `preference_pairs` generates chosen/rejected pairs for DPO. Source columns are the same in both cases — `column_mapping.prompt` (and optionally `completion`) — the chosen/rejected fields are produced by the augmentation pipeline.","enum":["instruction_dataset","preference_pairs"],"example":"instruction_dataset"},"estimate":{"type":"boolean","description":"When true, validates the request and returns the estimated credit cost without starting a run.","default":false},"language_expansion":{"description":"Translation/localization expansion. When set, the pipeline produces additional rows in the requested languages or country/language variants. Output row count ≈ input × (1 + sample_rate × target_count); credits are billed on output rows.\n\nThree-state field:\n- **omitted** — leaves any prior expansion config on the dataset unchanged (no-op). A wizard-saved expansion is preserved across SDK-driven /run calls that do not pass `language_expansion`.\n- **`language_expansion: null`** — explicitly clears any prior expansion config on this dataset (overrides wizard state).\n- **object** — overwrites the prior expansion config with the given spec.","nullable":true,"allOf":[{"$ref":"#/components/schemas/PublicLanguageExpansionSpecDto"}]}}},"PublicLaunchResponseDto":{"type":"object","properties":{"run_id":{"type":"string","description":"Unique identifier for this pipeline run. Null for estimate-only requests.","example":"dataset-550e8400-e29b-41d4-a716-446655440000-1712234567890","nullable":true},"estimatedMinutes":{"type":"number","description":"Estimated processing time in minutes"},"estimatedCreditsConsumed":{"type":"number","description":"Estimated number of credits that will be consumed by this run"},"estimate":{"type":"boolean","description":"Whether this was an estimate-only request (no run started)"},"multimodalPricingApplied":{"type":"boolean","description":"True when an image column is mapped and also listed in context_columns; each output row is billed at a higher rate."},"creditMultiplier":{"type":"number","description":"10 credits per 100 output rows when multimodalPricingApplied is true. Omitted for text-only pricing."}},"required":["estimatedMinutes","estimatedCreditsConsumed","estimate","multimodalPricingApplied"]},"OriginalImageEmbeddedDto":{"type":"object","properties":{"bytes":{"type":"string","description":"Base64-encoded image bytes (JPEG or PNG)."},"path":{"type":"null","nullable":true,"description":"Always null (Hugging Face `datasets` convention).","example":null}},"required":["bytes","path"]},"ProcessedDatasetExportOriginalImageFieldDto":{"type":"object","properties":{"original_image":{"description":"Mapped source image for this row. Encoding depends on the active image column entry in `image_column_formats` on the dataset: `embedded_bytes` uses the object shape; `url` and `file_reference` use a presigned HTTPS URL string. Null when the row has no image. Omitted when no image column is mapped or the image column is not included in `context`.","oneOf":[{"type":"string","format":"uri","description":"Presigned HTTPS URL (expires; typically one hour) when format is `url` or `file_reference`."},{"$ref":"#/components/schemas/OriginalImageEmbeddedDto"},{"type":"null"}],"nullable":true}}},"PublishRequestDto":{"type":"object","properties":{"target":{"type":"string","enum":["huggingface","kaggle"],"description":"Destination platform for publishing the dataset","example":"huggingface"},"target_spec":{"type":"object","description":"Target-specific configuration (e.g. repo name for HuggingFace, slug for Kaggle)","example":{"repo_name":"my-augmented-dataset","private":true},"additionalProperties":true}},"required":["target"]},"PublishAcceptedResponseDto":{"type":"object","properties":{"publish_id":{"type":"string","description":"Unique identifier for the publish job","example":"550e8400-e29b-41d4-a716-446655440000"},"status":{"type":"string","description":"Status of the publish job","example":"queued"},"message":{"type":"string","description":"Additional information about the publish request"}},"required":["publish_id","status"]},"PublicTrainingColumnMappingDto":{"type":"object","properties":{"prompt":{"type":"string","description":"Source column holding the prompt/instruction text."},"completion":{"type":"string","description":"Source column holding the target completion/response. Used for supervised (sft) training."},"reasoning_trace":{"type":"string","description":"Optional source column holding a reasoning trace to train on."}}},"PublicAutoScientistHyperparamsDto":{"type":"object","properties":{"n_epochs":{"type":"number","minimum":1,"maximum":20,"example":1},"batch_size":{"description":"Either the literal 'max' or an integer of 1 or more. No fixed upper bound: the ceiling depends on the model and hardware, and a larger value is rejected at launch. Defaults to 'max'.","example":"max","oneOf":[{"type":"string","enum":["max"]},{"type":"integer","minimum":1}]},"learning_rate":{"type":"number","minimum":1.0E-8,"maximum":0.01,"example":5.0E-5},"lora_r":{"type":"number","minimum":1,"maximum":64,"example":8},"lora_alpha":{"type":"number","description":"Must be 1× or 2× lora_r. Only checked when you supply lora_r in the same request; otherwise it is validated against the platform default."},"lora_dropout":{"type":"number","minimum":0,"maximum":1,"example":0},"lora_trainable_modules":{"type":"string","description":"'all-linear' or comma-separated module list (e.g. 'q_proj,v_proj').","example":"q_proj,v_proj"},"lr_scheduler_type":{"type":"string","enum":["linear","cosine","constant"]},"min_lr_ratio":{"type":"number","minimum":0,"maximum":1,"example":0.1},"scheduler_num_cycles":{"type":"number","minimum":0,"maximum":4,"example":0.5,"description":"Number of cosine decay cycles across training. Defaults to 0.5, a single half-cycle decay from the peak learning rate down to the floor."},"warmup_ratio":{"type":"number","minimum":0,"maximum":1,"example":0.03},"max_grad_norm":{"type":"number","minimum":0,"example":2},"weight_decay":{"type":"number","minimum":0,"example":0},"train_on_inputs":{"type":"boolean","description":"Whether training loss is computed over the prompt tokens as well as the completion. `true` trains on the full sequence, `false` trains only on the completion. Omit to let the platform decide per example, which is the default.","example":false},"training_type":{"type":"string","enum":["lora","full"],"description":"Training strategy override. AutoScientist optimizes this by default; set it only when strictly necessary."}}},"PublicCreateAutoScientistRunDto":{"type":"object","properties":{"dataset_id":{"type":"string","description":"The dataset to train on. Must be a dataset you own that has finished processing."},"model":{"type":"string","description":"Base model id from GET /training-models. By default, AutoScientist selects a suitable model. The resolved model is returned in the response `model` field."},"data_format":{"type":"string","enum":["chat","instruction"],"default":"chat","description":"How training rows are interpreted. Defaults to `chat` when omitted."},"column_mapping":{"description":"Which dataset columns feed training. When omitted, AutoScientist infers the mapping from the dataset. Required columns depend on the data format.","allOf":[{"$ref":"#/components/schemas/PublicTrainingColumnMappingDto"}]},"hyperparams":{"description":"Hyperparameter overrides. Not advised. AutoScientist derives these values from the resolved model and the effective dataset size; any field supplied here replaces the derived value for that field. Call POST /autoscientist/recommend-hyperparams to inspect the derived values without launching a run.","allOf":[{"$ref":"#/components/schemas/PublicAutoScientistHyperparamsDto"}]},"augmentation_domain_rows":{"type":"number","description":"Number of synthetic domain-targeted rows to generate and append to the dataset before training. These are additional to your own rows, not a resampling of them, and count toward the effective training size used to derive hyperparameters. Defaults to 0 (no augmentation).","default":0},"augmentation_general_rows":{"type":"number","description":"Number of synthetic general-diversity rows to generate and append to the dataset before training. These are additional to your own rows, not a resampling of them, and count toward the effective training size used to derive hyperparameters. Defaults to 0 (no augmentation).","default":0},"idempotency_key":{"type":"string","description":"Client-generated key for safe retries. Scoped to `dataset_id`: while a run started with this key is still in progress, repeating the request returns that run instead of starting a second one. Once the run reaches a terminal state (succeeded, failed or cancelled) the key no longer matches and the same request starts a new run."},"voucher":{"type":"string","description":"Optional discount voucher code."},"max_iterations":{"type":"number","description":"Maximum number of iterations to run. Defaults to the resolved model configuration (currently 3). The resolved value is returned in the response `max_iterations` field.","minimum":1,"maximum":5},"target_win_rate":{"type":"number","description":"Target win rate for the AutoScientist loop (between 0 exclusive and 1 inclusive). Defaults to 0.7 for small models and 0.8 for larger models. The resolved value is returned in the response `target_win_rate` field.","minimum":0,"maximum":1,"exclusiveMinimum":true,"exclusiveMaximum":false}},"required":["dataset_id"]},"PublicAutoScientistRunDto":{"type":"object","properties":{"id":{"type":"string","description":"AutoScientist run id."},"dataset_id":{"type":"object","nullable":true,"description":"Public id of the dataset the run trained on."},"model":{"type":"object","nullable":true,"description":"Resolved base model id used, including an automatically selected model."},"status":{"type":"string","enum":["pending","running","succeeded","failed","cancelled"]},"created_at":{"format":"date-time","type":"string"},"completed_at":{"type":"object","nullable":true},"iterations_completed":{"type":"number","description":"Number of completed iterations."},"max_iterations":{"type":"number","description":"Resolved maximum number of iterations, including the model-specific default."},"target_win_rate":{"type":"number","description":"Resolved target win rate for the AutoScientist loop, including the model-specific default."},"best_win_rate":{"type":"object","nullable":true,"description":"Best win rate achieved so far."},"best_hyperparams":{"nullable":true,"description":"Hyperparameters that produced the best iteration so far, and the ones the downloadable artifact was trained with. Null until an iteration completes.","allOf":[{"$ref":"#/components/schemas/PublicAutoScientistHyperparamsDto"}]},"download_available":{"type":"boolean","description":"True when the best trained artifact can be downloaded."},"error":{"type":"object","nullable":true,"description":"Reserved; not populated for autoscientist runs in this version."}},"required":["id","dataset_id","model","status","created_at","completed_at","iterations_completed","max_iterations","target_win_rate","best_hyperparams","download_available"]},"PublicRecommendHyperparamsDto":{"type":"object","properties":{"dataset_id":{"type":"string","description":"The dataset the hyperparameters are sized for. Must be a dataset you own that has finished processing."},"model":{"type":"string","description":"Base model id from GET /training-models to tune for. Omit to size the recommendation against the model POST /autoscientist selects for this dataset; the resolved id is returned in the response `model` field. That pick reads the columns already selected for the dataset, so a create request supplying `column_mapping.reasoning_trace` can resolve a different model. Pass the returned `model` back on create to pin it."},"augmentation_domain_rows":{"type":"number","description":"Number of synthetic domain-targeted rows you plan to generate. These are additional to your own rows and count toward the effective training size, so the recommendation matches what you will launch. Defaults to 0 (no augmentation).","default":0},"augmentation_general_rows":{"type":"number","description":"Number of synthetic general-diversity rows you plan to generate. These are additional to your own rows and count toward the effective training size. Defaults to 0 (no augmentation).","default":0}},"required":["dataset_id"]},"PublicRecommendHyperparamsResponseDto":{"type":"object","properties":{"model":{"type":"string","description":"Resolved base model id the recommendation is sized for: the value you sent, or the automatically selected model when `model` was omitted. Pass it back as `model` on POST /autoscientist to launch against the same model."},"hyperparams":{"description":"Hyperparameters derived for the resolved model and effective dataset size. POST /autoscientist applies the same values when `hyperparams` is omitted. Overriding is not advised.","allOf":[{"$ref":"#/components/schemas/PublicAutoScientistHyperparamsDto"}]}},"required":["model","hyperparams"]},"PublicAutoScientistRunListDto":{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/PublicAutoScientistRunDto"}},"next_cursor":{"type":"string","nullable":true,"description":"Cursor for the next page; null when no more results."}},"required":["runs"]},"PublicTrainingModelDto":{"type":"object","properties":{"id":{"type":"string","description":"Identifier to pass as `model` when creating a job."},"display_name":{"type":"string","description":"Human-readable model name."},"model_size":{"type":"object","description":"Parameter count label (e.g. \"8B\", \"70B\")."},"context_length":{"type":"object","description":"Maximum context window in tokens."},"methods":{"description":"Training methods supported (e.g. [\"sft\", \"dpo\"]).","type":"array","items":{"type":"string"}},"training_types":{"description":"Training types supported (e.g. [\"lora\", \"full\"]).","type":"array","items":{"type":"string"}}},"required":["id","display_name","methods","training_types"]},"PublicTrainingModelListDto":{"type":"object","properties":{"models":{"type":"array","items":{"$ref":"#/components/schemas/PublicTrainingModelDto"}}},"required":["models"]}}},"security":[{"bearer":[]}]}