{
  "openapi": "3.1.0",
  "info": {
    "title": "Qualia API",
    "description": "Public API for the Qualia robotics data and VLA platform.\n\n**Base URL:** `https://junction-api.qualiastudios.dev`\n\nAll endpoints require authentication via the `X-API-Key` header. Create an API key in **Settings** in the [Qualia dashboard](https://junction.qualiastudios.dev).\n\n**OpenAPI document:** [https://junction-docs.qualiastudios.dev/api/reference/openapi.json](https://junction-docs.qualiastudios.dev/api/reference/openapi.json)",
    "version": "1.0.0"
  },
  "paths": {
    "/v1/credits": {
      "get": {
        "tags": [
          "Credits"
        ],
        "summary": "Get Credit Balance",
        "description": "Get your current credit balance.\n\nReturns the total available credits that can be used for finetune jobs.\nCredits are consumed when running finetune jobs based on instance hourly rates.\n\nNext to the total, the split the dashboard's billing page shows: starter\ncredits, prepaid bundles and each voucher, left and granted. The split\nis the account members' to read; it is null when it cannot be read.",
        "operationId": "get_credit_balance_v1_credits_get",
        "responses": {
          "200": {
            "description": "Credit balance retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditBalanceResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/datasets/list": {
      "get": {
        "tags": [
          "Datasets"
        ],
        "summary": "List User Datasets",
        "description": "List published QDS datasets for exactly one authorized account.\n\nThe legacy artifact/job catalog is deliberately not consulted. QDS's\ncanonical dataset UUID is the stable public identity; source format is a\npersisted ingest fact, never inferred from filenames or another service.",
        "operationId": "list_user_datasets_v1_datasets_list_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "dataset_type",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Filter by the persisted QDS source format",
              "nullable": true,
              "enum": [
                "lerobot_v2_1",
                "lerobot_v3",
                "mcap_ros2"
              ],
              "type": "string"
            },
            "description": "Filter by the persisted QDS source format"
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Scope to this account (the dashboard's active account). Membership is verified upstream; a non-member gets 403.",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Scope to this account (the dashboard's active account). Membership is verified upstream; a non-member gets 403."
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Search dataset path",
              "maxLength": 200,
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Search dataset path"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Pagination cursor",
              "maxLength": 2048,
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Pagination cursor"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "const": "name",
              "type": "string",
              "default": "name"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of user's datasets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedDatasetsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Invalid pagination parameters"
          }
        }
      }
    },
    "/v1/datasets/detail": {
      "get": {
        "tags": [
          "Datasets"
        ],
        "summary": "QDS catalog detail for one dataset",
        "description": "P6a catalog detail: real size + file count, episode/quality table\n(stored scores — 'not yet scored' is surfaced honestly), and version\nhistory (refs + commits). Sourced from QDS; 404 when the deployment's\ndata plane isn't QDS.",
        "operationId": "get_dataset_detail_v1_datasets_detail_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 300,
              "description": "Dataset path (org/name)"
            },
            "description": "Dataset path (org/name)"
          }
        ],
        "responses": {
          "200": {
            "description": "Catalog detail: facts, episodes, version history",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No QDS detail (backend not qds or repo unknown)"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/ingest-report": {
      "get": {
        "tags": [
          "Datasets"
        ],
        "summary": "Read one dataset's bounded structured ingest report",
        "description": "Read only ``meta/ingest_report.json`` under the server's 8 MiB cap.\n\nThis metadata endpoint has no caller-controlled file parameter; bulk\npayloads use direct object-storage capabilities. ``ref`` lets an uploader pin the read to\nthe commit its own publication created, since the branch tip may already\ncarry a concurrent re-upload's findings.",
        "operationId": "get_dataset_ingest_report_v1_datasets_ingest_report_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 300,
              "description": "Dataset path (org/name)"
            },
            "description": "Dataset path (org/name)"
          },
          {
            "name": "ref",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Branch / tag / commit (default main)",
              "maxLength": 120,
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Branch / tag / commit (default main)"
          }
        ],
        "responses": {
          "200": {
            "description": "Structured report or an explicit omission reason",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The canonical ingest report does not exist"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/upload/begin": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Begin a dataset upload",
        "description": "Get-or-create the customer's repo for ``name`` (under their own org) and\nreturn its handle PLUS its current file tree (prior versions) in one\nround-trip — the SDK uses the tree for the warm/edit fast paths. Idempotent.",
        "operationId": "upload_begin_v1_datasets_upload_begin_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadBeginBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/datasets/uploads": {
      "get": {
        "tags": [
          "Datasets"
        ],
        "summary": "In-flight uploads for the caller's account",
        "description": "One QDS-owned pending-band feed, including the SDK transfer heartbeat.\n\nThe tenant is either the caller's bound account or a membership-verified\ninteractive active-account override; no second service or client-side\nmerge participates in the result.",
        "operationId": "list_upload_operations_v1_datasets_uploads_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Scope to this account (the dashboard's active account). Membership is verified before QDS reads its upload state.",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Scope to this account (the dashboard's active account). Membership is verified before QDS reads its upload state."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadOperationsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/uploads/{repo_id}/dismiss": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Acknowledge a repo's failed or finished upload so the feed stops reporting it",
        "description": "Dismiss, not destroy: QDS records a per-repo watermark that suppresses\nthe repo's terminal entries (`failed` and `finalized`, and the quiet\n`staging` rows a failure falls back to) at or older than the entry the\ncaller saw. The failure record itself\nis kept — it is the only account of why the ingest failed — and no storage\nis reclaimed. A live upload cannot be dismissed: `preparing`/`publishing`\nare never suppressed, and `staging` only after the transfer has stopped\ntaking new manifests, so a click that races a running attempt returns the\nlive phase instead of hiding it.\n\nA sub-resource of the feed it edits, not of `/datasets/{dataset_id}`: a\nfailed upload has minted no dataset. POST rather than DELETE for the same\nreason — nothing is deleted, and it carries a body.",
        "operationId": "dismiss_upload_v1_datasets_uploads__repo_id__dismiss_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "repo_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DismissUploadBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/uploads/{repo_id}/cancel": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Cancel a repo's upload in progress",
        "description": "Cancel, not delete. The platform cannot stop the uploading\nprocess on someone's machine, so QDS ends the server's side of the upload:\nthe SDK's next transfer heartbeat is answered `cancelled` and it stops, a\nfresh publication under that transfer is refused (from an SDK too old to\nhear the answer too: it is stopped at its publication), and the\nupload attempt\nis ended as `user_cancelled` with no retry, so its server-side worker (a\nHugging Face import, or verification and preparation of any upload) stops\non its next heartbeat and nothing can publish it. A publication still\nlanding is stopped at its registry row; one that already landed is\nrefused with 409 (\"already published\"), as is a repo with nothing left to\ncancel. Staged bytes\nare reclaimed by the usual retention; the entry stays in the feed as a\ncancelled upload until dismissed.\n\nA sub-resource of the feed, like dismiss, and a POST: nothing is deleted.",
        "operationId": "cancel_upload_v1_datasets_uploads__repo_id__cancel_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "repo_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/upload/heartbeat": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Advisory in-flight upload heartbeat for the pending band",
        "description": "Makes the chunk-transfer phase visible in /datasets/uploads — the only\nupload phase no QDS artifact can see. Advisory: a miss costs a pending-band\nentry, never an upload, so the SDK calls this best-effort.\n\nThe answer says whether the user has cancelled the upload; a\nclient that reads `cancelled: true` stops. (This route answered 204 with\nno body before, and an SDK of that era never reads one.)",
        "operationId": "upload_heartbeat_v1_datasets_upload_heartbeat_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadHeartbeatBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadHeartbeatResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/datasets/upload/resolve": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Resolve the immutable repository identity for a Git filter",
        "description": "Resolve only the repo UUID; do not fetch a potentially huge tree/head.",
        "operationId": "upload_resolve_v1_datasets_upload_resolve_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadBeginBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/datasets/upload/chunks-exist": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Dedup probe for chunks",
        "description": "Tenant-scoped content-addressed dedup probe.",
        "operationId": "upload_chunks_exist_v1_datasets_upload_chunks_exist_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChunksExistBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/datasets/upload/prepare-object": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Presigned R2 PUT for one xorb",
        "description": "Deprecated: only SDKs before 0.6.9 call this, and it is removed at the\ndate in its `Sunset` header. Use `POST /v1/datasets/upload/prepare-batch`,\nwhich presigns every xorb of a file in one call, as the current SDK does.\n\nContent-addressed presigned PUT URL. The customer PUTs the xorb bytes\nstraight to R2 with this URL — bytes never touch the gateway.",
        "operationId": "upload_prepare_v1_datasets_upload_prepare_object_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrepareUploadBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "deprecated": true,
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/datasets/upload/prepare-batch": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Presigned R2 PUTs for N xorbs",
        "description": "Content-addressed batch presign — one round-trip for a whole file's xorbs\n(collapses the per-xorb presign cost that otherwise dominates dedup uploads).",
        "operationId": "upload_prepare_batch_v1_datasets_upload_prepare_batch_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrepareUploadBatchBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/datasets/upload/finalize-batch": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Verify and publish staged R2 uploads",
        "description": "Promote verified staging objects before a manifest may reference them.\n\nScope is derived exclusively from the authenticated account. A client can\npresent an opaque staging handle, but cannot finalize another tenant's\nstaging namespace or choose a publication scope.",
        "operationId": "upload_finalize_batch_v1_datasets_upload_finalize_batch_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinalizeUploadBatchBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/datasets/upload/publication": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Dispatch one durable Modal upload publication",
        "description": "Persist one complete tree and return immediately after worker dispatch.",
        "operationId": "upload_begin_publication_v1_datasets_upload_publication_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "x-qualia-upload-session",
            "in": "header",
            "required": false,
            "schema": {
              "description": "The transfer heartbeat's session_id this tree moved under. A fresh publication under a session the user cancelled is refused. A header rather than a body field, so a newer SDK still passes an older gateway's strict body.",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "The transfer heartbeat's session_id this tree moved under. A fresh publication under a session the user cancelled is refused. A header rather than a body field, so a newer SDK still passes an older gateway's strict body."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BeginUploadPublicationBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/upload/publication/status": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Poll one durable Modal upload publication",
        "description": "Return credential-free progress or the exact terminal receipts.",
        "operationId": "upload_get_publication_v1_datasets_upload_publication_status_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetUploadPublicationBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/datasets/upload/register-content-manifest": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Register one file's ManifestID from its terms",
        "description": "Mint a durable ManifestID for ONE already-staged file, with no\npublication and no visible ref move.\n\nThe git clean filter needs a manifest identity to write into an LFS\npointer at `git add` time, when no commit — and possibly no tree — exists\nyet. Unary and polling-free: QDS expands the terms against its own sealed\nblob directories, reruns the canonical chunker, and returns the same\nreceipt shape whole-tree staging mints. Replaying identical terms is\nidempotent.",
        "operationId": "upload_register_content_manifest_v1_datasets_upload_register_content_manifest_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterContentManifestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/datasets/upload/lookup": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "File-level content-hash dedup probe",
        "description": "If the exact bytes already exist in the caller's repo, the file is done\nin one round-trip (no chunk/probe/commit). Returns ``{file_id}`` (empty on\nmiss).",
        "operationId": "upload_lookup_v1_datasets_upload_lookup_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LookupBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/datasets/canonical": {
      "get": {
        "tags": [
          "Datasets"
        ],
        "summary": "Canonical robot interfaces for the account's datasets",
        "description": "Every dataset in the caller's account with its canonical robot interface: ``interface_hash`` (the role-based unionability key) and the\nlens-applied canonical channels for both streams.",
        "operationId": "get_canonical_datasets_v1_datasets_canonical_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100
            }
          },
          {
            "name": "page_token",
            "in": "query",
            "required": false,
            "schema": {
              "minLength": 2,
              "maxLength": 4162,
              "pattern": "^[0-9a-f]+$",
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Datasets with interface_hash + canonical channels",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "QDS data plane not enabled"
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/canonical/{dataset_id}": {
      "get": {
        "tags": [
          "Datasets"
        ],
        "summary": "Get one exact canonical source dataset",
        "operationId": "get_canonical_dataset_v1_datasets_canonical__dataset_id__get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "dataset_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Datasets"
        ],
        "summary": "Retire a source",
        "description": "Retire one source: it leaves the catalog, and its episodes leave the\nlake and every facet count.\n\nA TOMBSTONE, not a purge. Nothing is erased and no storage is reclaimed —\nphysical deletion is a separate step, and the schema agrees: pinned\nDatasetVersions resolve through this source's episode identities and must\nkeep resolving. `pinned_versions_retained` reports how many do.",
        "operationId": "delete_source_v1_datasets_canonical__dataset_id__delete",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "dataset_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "responses": {
          "200": {
            "description": "Retired (or already retired — the call is idempotent)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceRetireResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Unknown source, or outside the caller's account"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/defs/{def_id}": {
      "delete": {
        "tags": [
          "Datasets"
        ],
        "summary": "Retire a dataset",
        "description": "Retire one dataset definition: it leaves the shelf. Same tombstone\ncontract as retiring a source — its pinned versions stay resolvable by id,\nso a training run already holding one does not break. Sources are\nuntouched.",
        "operationId": "delete_dataset_def_v1_datasets_defs__def_id__delete",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "def_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "responses": {
          "200": {
            "description": "Retired (or already retired — the call is idempotent)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetDefRetireResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Unknown dataset, or outside the caller's account"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Datasets"
        ],
        "summary": "Get one saved dataset def",
        "operationId": "get_dataset_def_v1_datasets_defs__def_id__get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "def_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/explore": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Explore the episode lake: one page + totals + facet counts",
        "description": "The account's episode lake as ONE unit (one-lake IA): a page of\nepisodes across every source dataset, with metadata filters (task, tier,\nembodiment via ``interface_hash``, tags, review state, source datasets)\nplus filtered totals and standard facet counts — one broker call, one\nqds-api RPC, never a per-dataset fan-out.",
        "operationId": "explore_lake_v1_datasets_explore_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExploreLakeBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One internally consistent live-MVCC page, filtered totals, bounded self-excluding facets with full cardinalities, and independently checkable channel-predicate evidence",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExploreLakeResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "QDS data plane not enabled"
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/curation/analyses": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Start a durable bad-data analysis over immutable dataset versions",
        "description": "Enqueue/recover a durable idempotent analysis; source data is immutable.",
        "operationId": "start_dataset_curation_analysis_v1_datasets_curation_analyses_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartDatasetCurationAnalysisBody"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetCurationAnalysisModel"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/curation/analyses/{analysis_id}": {
      "get": {
        "tags": [
          "Datasets"
        ],
        "summary": "Get durable bad-data analysis progress and sealed evidence",
        "operationId": "get_dataset_curation_analysis_v1_datasets_curation_analyses__analysis_id__get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "analysis_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetCurationAnalysisModel"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/curation/suggestions": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "List a sealed page of explainable bad-data recommendations",
        "operationId": "list_dataset_curation_suggestions_v1_datasets_curation_suggestions_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListDatasetCurationSuggestionsBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetCurationSuggestionPageModel"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/curation/publications": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Start a durable curation publication without waiting",
        "operationId": "start_dataset_curation_publication_v1_datasets_curation_publications_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartDatasetCurationPublicationBody"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetCurationPublicationOperationModel"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/curation/publications/{idempotency_key}": {
      "get": {
        "tags": [
          "Datasets"
        ],
        "summary": "Poll one exact durable curation publication",
        "operationId": "get_dataset_curation_publication_v1_datasets_curation_publications__idempotency_key__get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "idempotency_key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetCurationPublicationOperationModel"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/episode-unsplit": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Delete an episode's children, undoing a split",
        "operationId": "unsplit_episode_v1_datasets_episode_unsplit_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EpisodeIdBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/episode-markers": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "The recorder markers inside one episode, timed from its first frame",
        "operationId": "episode_markers_v1_datasets_episode_markers_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EpisodeIdBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/episode-revisions": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "List an episode's revision chain (newest first)",
        "operationId": "list_episode_revisions_v1_datasets_episode_revisions_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EpisodeRevisionsBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/episode-revision": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Commit one warm/lightweight episode revision",
        "operationId": "create_episode_revision_v1_datasets_episode_revision_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEpisodeRevisionBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/import-hf": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Import an exact Hugging Face dataset commit server-side",
        "description": "Admit one pinned Hugging Face commit as an upload attempt.\n\nThe import is the same durable object as an SDK upload — one attempt row,\none worker, one publication — so this route does what the SDK's own begin\ndoes: resolve the destination repository, register the token the worker\nwill need, and call Begin. The idempotency key IS the operation id, so an\nidentical resubmission replays the same attempt instead of starting a\nsecond one, and once that attempt has finished it returns it as it ended.\n\nA new import is checked before anything runs: a name that already holds a\ndataset is refused (an import only ever creates a dataset, so it could\nonly fail at publication), and the same import already running under\nanother key — a second tab, a double press — is joined rather than\nstarted twice.",
        "operationId": "import_huggingface_dataset_v1_datasets_import_hf_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act within this account (the dashboard's active account).",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act within this account (the dashboard's active account)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HuggingFaceImportBody"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The name already holds a dataset (`dataset_name_taken`), another import into it is running (`dataset_name_importing`), or the idempotency key names another import (`idempotency_key_reused`)."
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Datasets"
        ],
        "summary": "List active and recent server-side Hugging Face imports",
        "operationId": "list_huggingface_imports_v1_datasets_import_hf_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act within this account (the dashboard's active account).",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act within this account (the dashboard's active account)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/import-hf/{import_id}": {
      "get": {
        "tags": [
          "Datasets"
        ],
        "summary": "Poll one server-side Hugging Face import",
        "description": "Project one import's upload attempt into the import vocabulary.\n\nA polling client sends only the id, and QDS addresses an attempt by\n(operation_id, repo_id, name), so the coordinates come from the custody row\nfirst. An id that is not one of ours belongs to an import admitted before\nthe cutover and is answered by the retiring registry until it drains.",
        "operationId": "get_huggingface_import_v1_datasets_import_hf__import_id__get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "import_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act within this account (the dashboard's active account).",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act within this account (the dashboard's active account)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/import-hf/{import_id}/cancel": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Cancel one server-side Hugging Face import",
        "description": "An import runs entirely server-side, so cancelling it really stops it: its upload attempt is ended `user_cancelled`, and the worker\nfetching from the Hub exits on its next heartbeat. The same verb as an SDK\nupload's cancel, addressed through the custody row that names the\nimport's repository. Refused with 409 once it has published.",
        "operationId": "cancel_huggingface_import_v1_datasets_import_hf__import_id__cancel_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "import_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act within this account (the dashboard's active account).",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act within this account (the dashboard's active account)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/defs": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Save a dataset def — a persisted query over the episode lake",
        "description": "A dataset is a saved query. Both modes land here — an exact\nselection (``query.episodes``, the pairs the user picked) and a dynamic\nview (the facets, resolved fresh at every pin). Pin the returned def to\nfreeze a reproducible version.",
        "operationId": "create_dataset_def_v1_datasets_defs_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DatasetDefBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unmodelled or oversized query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Datasets"
        ],
        "summary": "List saved dataset defs",
        "operationId": "list_dataset_defs_v1_datasets_defs_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100
            }
          },
          {
            "name": "page_token",
            "in": "query",
            "required": false,
            "schema": {
              "minLength": 2,
              "maxLength": 4162,
              "pattern": "^[0-9a-f]+$",
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/defs/by-source/{source_dataset_id}": {
      "get": {
        "tags": [
          "Datasets"
        ],
        "summary": "List saved dataset defs that consume one source",
        "operationId": "list_dataset_defs_by_source_v1_datasets_defs_by_source__source_dataset_id__get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "source_dataset_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100
            }
          },
          {
            "name": "page_token",
            "in": "query",
            "required": false,
            "schema": {
              "minLength": 2,
              "maxLength": 4162,
              "pattern": "^[0-9a-f]+$",
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/versions": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Pin a dataset version — freeze the def's query result",
        "description": "Resolves the def's query NOW: frozen episode membership + blake3\nmembership/norm-stats hashes + the source repos' commit ids. A training\nrun pointed at the returned version id is reproducible.\n\nMembership is whatever the query selects — quality never narrows it, so\na flagged episode the author picked is in the pin.",
        "operationId": "pin_dataset_version_v1_datasets_versions_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PinVersionBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No such dataset def",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Datasets"
        ],
        "summary": "List a def's pinned versions",
        "operationId": "list_dataset_versions_v1_datasets_versions_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "def_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Dataset def id"
            },
            "description": "Dataset def id"
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100
            }
          },
          {
            "name": "page_token",
            "in": "query",
            "required": false,
            "schema": {
              "minLength": 2,
              "maxLength": 4162,
              "pattern": "^[0-9a-f]+$",
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/versions/{version_id}/sources": {
      "get": {
        "tags": [
          "Datasets"
        ],
        "summary": "List immutable source publication anchors",
        "operationId": "list_dataset_version_sources_v1_datasets_versions__version_id__sources_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100
            }
          },
          {
            "name": "page_token",
            "in": "query",
            "required": false,
            "schema": {
              "minLength": 2,
              "maxLength": 4162,
              "pattern": "^[0-9a-f]+$",
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/versions/{version_id}": {
      "get": {
        "tags": [
          "Datasets"
        ],
        "summary": "Get one immutable dataset version",
        "operationId": "get_dataset_version_v1_datasets_versions__version_id__get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/versions/{version_id}/health": {
      "get": {
        "tags": [
          "Datasets"
        ],
        "summary": "Read or compute an immutable dataset-health report",
        "description": "Return the persisted report, or run the bounded synchronous fallback.",
        "operationId": "get_dataset_version_health_v1_datasets_versions__version_id__health_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetHealthReportResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/versions/{version_id}/training-features": {
      "get": {
        "tags": [
          "Datasets"
        ],
        "summary": "Get adapter-pinned camera features for an immutable dataset version",
        "operationId": "get_dataset_training_features_v1_datasets_versions__version_id__training_features_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Act on this account (active)",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Act on this account (active)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetTrainingFeaturesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/datasets/download/begin": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "List a dataset's files",
        "description": "Return one bounded page from an immutable paired Git snapshot.",
        "operationId": "download_begin_v1_datasets_download_begin_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DownloadBeginBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/datasets/download/presign-exact-batch": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Direct-storage plan for one immutable snapshot page",
        "description": "Authenticate exact commit-entry tuples, then mint shared-Xorb GETs.",
        "operationId": "download_presign_exact_batch_v1_datasets_download_presign_exact_batch_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DownloadExactBatchBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/datasets/download/presign-by-hash": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Presigned R2 GET plan by content hash (one round-trip)",
        "description": "Resolve a file by its BLAKE3 content hash within the caller's own\ndataset and return the presigned GET plan in ONE round-trip (the git\nsmudge fast path — no tree listing, no separate presign call). Read-only:\nnever creates an alias row. ``{found: false}`` on miss.",
        "operationId": "download_presign_by_hash_v1_datasets_download_presign_by_hash_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PresignByHashBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/datasets/download/presign": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Presigned R2 GET for a file",
        "description": "Deprecated: only SDKs before 0.6.9 call this, and it is removed at the\ndate in its `Sunset` header. Use\n`POST /v1/datasets/download/presign-exact-batch`, which plans a whole page\nof files of one immutable snapshot, as the current SDK does.\n\nPresigned GET plan for one file. The file_id MUST belong to the caller's\nown org — qds-api's tenant-scope gate 404s a foreign file_id, so a customer\ncan't presign another account's chunks by guessing one (no tree pre-fetch).",
        "operationId": "download_presign_v1_datasets_download_presign_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DownloadPresignBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "deprecated": true,
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/datasets/download/presign-batch": {
      "post": {
        "tags": [
          "Datasets"
        ],
        "summary": "Shared-Xorb R2 GET plan for a bounded file page",
        "description": "Presign each distinct Xorb once across an ownership-checked file page.",
        "operationId": "download_presign_batch_v1_datasets_download_presign_batch_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DownloadPresignBatchBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/events": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "One job's live log, telemetry and capacity-wait lines (SSE)",
        "description": "Follow one job's live lines. ``project_id``, when given, must be the\njob's project; a project-restricted API key must give it.",
        "operationId": "events_v1_events_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The job to follow"
            },
            "description": "The job to follow"
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Server-sent job events (live log, telemetry and capacity wait lines)",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{account_id}/events:export": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Download an organization's events record as JSON lines",
        "description": "Every event the organization's record holds, in record order: its\nworkspaces' (deleted ones included), as the Events API returns them, one\nper line. Events past the organization's\nretention window are not in the record and not in the download.\n\nThe download is the record as of the request. A download that breaks\npartway ends without its final chunk, never as a shorter file that looks\nwhole: retry it.",
        "operationId": "export_events_v1_accounts__account_id__events_export_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The organization's UUID, or `-` for the API key's own"
            },
            "description": "The organization's UUID, or `-` for the API key's own"
          },
          {
            "name": "start_time",
            "in": "query",
            "required": false,
            "schema": {
              "description": "RFC 3339; events created at or after it",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "RFC 3339; events created at or after it"
          },
          {
            "name": "end_time",
            "in": "query",
            "required": false,
            "schema": {
              "description": "RFC 3339; events created before it",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "RFC 3339; events created before it"
          }
        ],
        "responses": {
          "200": {
            "description": "One qualia.v1 Event as protojson per line, oldest first. Personal data: member events carry usernames and emails.",
            "content": {
              "application/jsonl": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Not an admin of the organization"
          },
          "422": {
            "description": "A malformed or empty time range"
          },
          "503": {
            "description": "The events record is unavailable"
          }
        }
      }
    },
    "/v1/members": {
      "get": {
        "tags": [
          "Members"
        ],
        "summary": "List Members",
        "description": "Everyone with access to the organization, or to one workspace with\n``project_id``: their role there and each path that gives it.\n\nNeeds ``members:read`` (and ``projects:read``, which reading any space\ntakes). ``can_manage_members`` says whether this caller may change people\nthere.",
        "operationId": "list_members_v1_members_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "A workspace of the organization; omit it for the organization itself. A workspace key names its own workspace.",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "A workspace of the organization; omit it for the organization itself. A workspace key names its own workspace."
          }
        ],
        "responses": {
          "200": {
            "description": "Everyone with access and their roles",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberList"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks members:read, or its creator's role does not allow it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not readable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/members/{user_id}": {
      "get": {
        "tags": [
          "Members"
        ],
        "summary": "Get Member",
        "description": "One person's role on every space of the organization the caller reads,\nwith where each comes from. Needs ``members:read`` and an organization\nkey: a workspace key never reads across the organization.",
        "operationId": "get_member_v1_members__user_id__get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The person's access across the organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Person"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks members:read, or its creator's role does not allow it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not readable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Members"
        ],
        "summary": "Set Member Role",
        "description": "Give a person a role on the organization, or on one workspace with\n``project_id``, or move them to another. Needs ``members:write``; the\ncreator needs ``spaces:members`` there and never grants above their own\nrole. An organization role is for its members (invite anyone else); a\nworkspace role raises a member above their organization role, or makes a\nguest.",
        "operationId": "set_member_role_v1_members__user_id__put",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "A workspace of the organization; omit it for the organization itself. A workspace key names its own workspace.",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "A workspace of the organization; omit it for the organization itself. A workspace key names its own workspace."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The change and the role they hold now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleChange"
                }
              }
            }
          },
          "400": {
            "description": "Refused by the role rules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks members:write, or its creator may not give or take this role here (nobody grants above their own role)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not readable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The organization's last owner stays",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Members"
        ],
        "summary": "Remove Member",
        "description": "Take a person's role on one workspace away (they keep what the\norganization gives them), or remove them from the organization. Needs\n``members:write``. A key never removes its own creator from the\norganization: leaving one takes a signed-in session.",
        "operationId": "remove_member_v1_members__user_id__delete",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "A workspace of the organization; omit it for the organization itself. A workspace key names its own workspace.",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "A workspace of the organization; omit it for the organization itself. A workspace key names its own workspace."
          },
          {
            "name": "keep",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "description": "Removing from the organization: the workspaces they stay a guest of, at the role they hold there"
            },
            "description": "Removing from the organization: the workspaces they stay a guest of, at the role they hold there"
          }
        ],
        "responses": {
          "200": {
            "description": "The change and what they keep",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleChange"
                }
              }
            }
          },
          "400": {
            "description": "Refused by the role rules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks members:write, or its creator may not give or take this role here (nobody grants above their own role)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not readable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The organization's last owner stays",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/invitations": {
      "get": {
        "tags": [
          "Members"
        ],
        "summary": "List Invitations",
        "description": "The pending invitations to one workspace, or with no ``project_id`` every\none in the organization, each naming its space. Needs ``members:read``,\nand a creator who manages people there.",
        "operationId": "list_invitations_v1_invitations_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "A workspace of the organization; omit it for the organization itself. A workspace key names its own workspace.",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "A workspace of the organization; omit it for the organization itself. A workspace key names its own workspace."
          }
        ],
        "responses": {
          "200": {
            "description": "The pending invitations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationList"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks members:read, or its creator's role does not allow it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not readable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Members"
        ],
        "summary": "Send Invitation",
        "description": "Invite someone by email to the organization, or to one workspace with\n``project_id``, at a role. Needs ``members:write``, and the authority to\ngive that role there (never above the creator's own). Someone already in\nthe organization is given a role with ``PUT /v1/members/{user_id}``\ninstead (400).",
        "operationId": "send_invitation_v1_invitations_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "A workspace of the organization; omit it for the organization itself. A workspace key names its own workspace.",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "A workspace of the organization; omit it for the organization itself. A workspace key names its own workspace."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvitationRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The invitation, sent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            }
          },
          "400": {
            "description": "Refused by the role rules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks members:write, or its creator may not give or take this role here (nobody grants above their own role)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not readable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The organization's last owner stays",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/invitations/{invitation_id}": {
      "delete": {
        "tags": [
          "Members"
        ],
        "summary": "Withdraw Invitation",
        "description": "Withdraw a pending invitation: one to a workspace with ``project_id``,\nor with none any in the organization. Needs ``members:write``.",
        "operationId": "withdraw_invitation_v1_invitations__invitation_id__delete",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "invitation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "A workspace of the organization; omit it for the organization itself. A workspace key names its own workspace.",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "description": "A workspace of the organization; omit it for the organization itself. A workspace key names its own workspace."
          }
        ],
        "responses": {
          "200": {
            "description": "The invitation, withdrawn",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationWithdrawn"
                }
              }
            }
          },
          "400": {
            "description": "Refused by the role rules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks members:write, or its creator may not give or take this role here (nobody grants above their own role)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not readable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The organization's last owner stays",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/integrations": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "List the organization's integration keys",
        "description": "The organization's Hugging Face tokens, newest first:\nprovider, name, the last four characters and whether it is the default.\nNever the key itself.\n\nNeeds `integrations:write` (a `*` key does not have it) and Contributor or\nabove on the organization.",
        "operationId": "list_integrations_v1_integrations_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationList"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing integrations:write, or a Viewer's key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found or access denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "Integrations"
        ],
        "summary": "Add an integration key",
        "description": "Add a Hugging Face token. The organization's first one becomes the\ndefault. The answer never holds the token.\n\nNeeds `integrations:write` and Contributor or above on the organization.",
        "operationId": "add_integration_v1_integrations_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "provider": {
                    "type": "string",
                    "const": "huggingface",
                    "description": "huggingface (a token new runs use)"
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 15,
                    "minLength": 1,
                    "description": "The token's name"
                  },
                  "secret": {
                    "type": "string",
                    "format": "password",
                    "description": "The token itself; it starts with \"hf_\"",
                    "writeOnly": true
                  }
                },
                "additionalProperties": false,
                "type": "object",
                "required": [
                  "provider",
                  "name",
                  "secret"
                ],
                "title": "IntegrationCreateRequest",
                "description": "Add an integration key. The secret is sent here once and never read\nback."
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Integration"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing integrations:write, or a Viewer's key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found or access denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "The body names a bad field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/integrations/{integration_id}": {
      "delete": {
        "tags": [
          "Integrations"
        ],
        "summary": "Remove an integration key",
        "description": "Remove an integration key. Workspaces that used a removed Hugging Face\ntoken move to the default; partner sends need a new key.\n\nNeeds `integrations:write` and Contributor or above on the organization.",
        "operationId": "remove_integration_v1_integrations__integration_id__delete",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "integration_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationDeleteResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing integrations:write, or a Viewer's key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found or access denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/integrations/{integration_id}/default": {
      "patch": {
        "tags": [
          "Integrations"
        ],
        "summary": "Make a Hugging Face token the default",
        "description": "Make a Hugging Face token the one new runs use. Workspaces on the old\ndefault move to it.\n\nNeeds `integrations:write` and Contributor or above on the organization.",
        "operationId": "set_default_integration_v1_integrations__integration_id__default_patch",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "integration_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Integration"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing integrations:write, or a Viewer's key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found or access denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Not a Hugging Face token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pipelines/templates": {
      "get": {
        "tags": [
          "Pipelines"
        ],
        "summary": "List Launchable Pipeline Templates",
        "description": "Templates the caller can launch, each with its launch-form contract.",
        "operationId": "list_pipeline_templates_v1_pipelines_templates_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/LaunchableTemplate"
                  },
                  "type": "array",
                  "title": "Response List Pipeline Templates V1 Pipelines Templates Get"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing capability on the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/field-types": {
      "get": {
        "tags": [
          "Pipelines"
        ],
        "summary": "List Field Types",
        "description": "The field-type registry: how each port type renders and resolves.",
        "operationId": "list_field_types_v1_field_types_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldTypesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing capability on the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/pipelines/resolve": {
      "post": {
        "tags": [
          "Pipelines"
        ],
        "summary": "Resolve Dynamic Field Defaults",
        "description": "Run a launch field's declared defaults resolver against the caller's\ncurrent input values. Which fields resolve, and from which sibling\ninputs, is published per template in its launch_fields.",
        "operationId": "resolve_field_v1_pipelines_resolve_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolveResponse"
                }
              }
            }
          },
          "400": {
            "description": "Field declares no resolver",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing capability on the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Template or field not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation error"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/runs": {
      "post": {
        "tags": [
          "Pipelines"
        ],
        "summary": "Launch Pipeline Run",
        "description": "Launch any launchable template with flat values for its exposed ports.\n\nA template billed per run reserves its whole bound before it starts and\nneeds ``max_cost``; ``POST /v1/runs/estimate`` gives the bound first.",
        "operationId": "submit_run_v1_runs_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunSubmitRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunSubmitResponse"
                }
              }
            }
          },
          "400": {
            "description": "Values violate the template contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "The account cannot cover the run's bound"
          },
          "403": {
            "description": "Missing capability on the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Stale quote, or an idempotency key reused"
          },
          "422": {
            "description": "Validation error, or the run's bound is over max_cost"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/runs/estimate": {
      "post": {
        "tags": [
          "Pipelines"
        ],
        "summary": "Estimate Pipeline Run",
        "description": "The most a run of a template billed per run may cost: what submit\nwould reserve, by the same computation, with its quote. It starts and\nreserves nothing; dataset fields are prepared as submit prepares them.",
        "operationId": "estimate_run_v1_runs_estimate_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunEstimateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunEstimateResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing capability on the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Not billed per run, or the run cannot be bounded"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/runs/{job_id}/maps/{op_run_id}/items": {
      "get": {
        "tags": [
          "Pipelines"
        ],
        "summary": "List Map Items",
        "description": "A map's items with their attempts and ops, by position; ``status``\nfilters, comma-separated (``failed,skipped`` lists what did not\ncomplete).",
        "operationId": "list_map_items_v1_runs__job_id__maps__op_run_id__items_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "op_run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MapItemsPage"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing capability on the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Run or map not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pipelines/catalog": {
      "get": {
        "tags": [
          "Pipelines"
        ],
        "summary": "List Pipeline Template Catalogue",
        "description": "The platform's public templates and the workspace's own, with their\ninputs and outputs, and ``pinnable`` for those a template may pin.",
        "operationId": "list_catalog_v1_pipelines_catalog_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CatalogTemplate"
                  },
                  "type": "array",
                  "title": "Response List Catalog V1 Pipelines Catalog Get"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing capability on the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/pipelines/templates:validate": {
      "post": {
        "tags": [
          "Pipelines"
        ],
        "summary": "Validate Pipeline Template",
        "description": "Everything apply checks, writing nothing: the file's shape, every pin,\nthe resolved graph's ports as a run would see them, and its outputs.",
        "operationId": "validate_template_v1_pipelines_templates_validate_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateSource"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateValidation"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing capability on the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/pipelines/templates:apply": {
      "post": {
        "tags": [
          "Pipelines"
        ],
        "summary": "Apply Pipeline Template",
        "description": "Apply the file as the workspace's template of its ``name``: created\nthe first time, the next immutable version when its graph or outputs\nchanged, its description updated in place when only that changed, and\n``changed: false`` when nothing did. Safe to retry.",
        "operationId": "apply_template_v1_pipelines_templates_apply_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateSource"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppliedTemplate"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing capability on the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The template is retired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "The file is not a valid template"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/pipelines/templates/{pipeline_template_id}/versions": {
      "get": {
        "tags": [
          "Pipelines"
        ],
        "summary": "List Pipeline Template Versions",
        "description": "Every version the template has had, oldest first.",
        "operationId": "list_versions_v1_pipelines_templates__pipeline_template_id__versions_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "pipeline_template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TemplateVersionEntry"
                  },
                  "title": "Response List Versions V1 Pipelines Templates  Pipeline Template Id  Versions Get"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing capability on the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Template not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pipelines/templates/{pipeline_template_id}/versions/{version}": {
      "get": {
        "tags": [
          "Pipelines"
        ],
        "summary": "Get Pipeline Template Version",
        "description": "One version of the template, as it was applied.",
        "operationId": "get_version_v1_pipelines_templates__pipeline_template_id__versions__version__get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "pipeline_template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateVersion"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing capability on the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Template or version not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pipelines/templates/{pipeline_template_id}:retire": {
      "post": {
        "tags": [
          "Pipelines"
        ],
        "summary": "Retire Pipeline Template",
        "description": "No new run starts from the template and no template pins it anew.\nRuns that started keep their snapshot; its history stays readable.",
        "operationId": "retire_template_v1_pipelines_templates__pipeline_template_id__retire_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "pipeline_template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetiredTemplate"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing capability on the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Template not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/whoami": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "Who Am I",
        "description": "The account and workspace this request acts in, the person it acts as\nand their role in that workspace, and the API key it used.\n\nWithout ``X-Qualia-Workspace`` the workspace is the key's own (for a\nsigned-in user, the account's default). Any valid key may ask; no scope is\nneeded. An SDK client with a key and no configured account uses this\n``account_id``.",
        "operationId": "whoami_v1_whoami_get",
        "responses": {
          "200": {
            "description": "The bound account, workspace and key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhoamiResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The named workspace is not readable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/v1/accounts/{account}/datasets/{dataset}/versions/{version}/partner-exports:preview": {
      "get": {
        "tags": [
          "Partner exports"
        ],
        "summary": "Preview a partner export: key, contract, counts and readiness",
        "operationId": "preview_partner_export_v1_accounts__account__datasets__dataset__versions__version__partner_exports_preview_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dataset",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "target",
            "in": "query",
            "required": true,
            "schema": {
              "enum": [
                "pi",
                "dreamlabs"
              ],
              "type": "string"
            }
          },
          {
            "name": "include_unsuccessful",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "cameras",
            "in": "query",
            "required": false,
            "schema": {
              "maxLength": 2000,
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerExportPreview"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing credentials"
          },
          "403": {
            "description": "Missing the dataset capability"
          },
          "404": {
            "description": "No such account, dataset, version or export"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{account}/datasets/{dataset}/versions/{version}/partner-exports": {
      "post": {
        "tags": [
          "Partner exports"
        ],
        "summary": "Send a dataset version to a partner with your own key",
        "operationId": "start_partner_export_v1_accounts__account__datasets__dataset__versions__version__partner_exports_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dataset",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartPartnerExportRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerExportResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing credentials"
          },
          "403": {
            "description": "Missing the dataset capability"
          },
          "404": {
            "description": "No such account, dataset, version or export"
          },
          "409": {
            "description": "partner_key_missing: connect your key first"
          },
          "422": {
            "description": "export_blocked: the findings that block it"
          }
        }
      },
      "get": {
        "tags": [
          "Partner exports"
        ],
        "summary": "List a version's partner exports, newest first",
        "operationId": "list_partner_exports_v1_accounts__account__datasets__dataset__versions__version__partner_exports_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dataset",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerExportList"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing credentials"
          },
          "403": {
            "description": "Missing the dataset capability"
          },
          "404": {
            "description": "No such account, dataset, version or export"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{account}/datasets/{dataset}/versions/{version}/partner-exports/{export_id}": {
      "get": {
        "tags": [
          "Partner exports"
        ],
        "summary": "Get one partner export",
        "operationId": "get_partner_export_v1_accounts__account__datasets__dataset__versions__version__partner_exports__export_id__get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dataset",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "export_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerExportResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing credentials"
          },
          "403": {
            "description": "Missing the dataset capability"
          },
          "404": {
            "description": "No such account, dataset, version or export"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{account}/datasets/{dataset}/versions/{version}/partner-exports/{export_id}/episodes": {
      "get": {
        "tags": [
          "Partner exports"
        ],
        "summary": "Page a partner export's per-episode results",
        "operationId": "list_partner_export_episodes_v1_accounts__account__datasets__dataset__versions__version__partner_exports__export_id__episodes_get",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dataset",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "export_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 50
            }
          },
          {
            "name": "page_token",
            "in": "query",
            "required": false,
            "schema": {
              "maxLength": 400,
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "nullable": true,
              "enum": [
                "pending",
                "skipped",
                "uploaded",
                "finalized",
                "failed"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerExportEpisodePage"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing credentials"
          },
          "403": {
            "description": "Missing the dataset capability"
          },
          "404": {
            "description": "No such account, dataset, version or export"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{account}/datasets/{dataset}/versions/{version}/partner-exports/{export_id}:resync": {
      "post": {
        "tags": [
          "Partner exports"
        ],
        "summary": "Re-send changed labels of a Pi export's finalized episodes",
        "operationId": "resync_partner_export_v1_accounts__account__datasets__dataset__versions__version__partner_exports__export_id__resync_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dataset",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "export_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerExportResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing credentials"
          },
          "403": {
            "description": "Missing the dataset capability"
          },
          "404": {
            "description": "No such account, dataset, version or export"
          },
          "409": {
            "description": "The export is running, or no labels changed"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{account}/datasets/{dataset}/versions/{version}/partner-exports/{export_id}:refresh": {
      "post": {
        "tags": [
          "Partner exports"
        ],
        "summary": "Read a Dream Labs export's processing status again",
        "description": "After the send stops polling (2 h), one dreamlabs_status run reads the\nstatus once and updates the export.",
        "operationId": "refresh_partner_export_v1_accounts__account__datasets__dataset__versions__version__partner_exports__export_id__refresh_post",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dataset",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "export_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerExportResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing credentials"
          },
          "403": {
            "description": "Missing the dataset capability"
          },
          "404": {
            "description": "No such account, dataset, version or export"
          },
          "409": {
            "description": "The export is running or not uploaded"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccessPath": {
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "viewer",
              "contributor",
              "admin",
              "owner"
            ]
          },
          "source": {
            "type": "string",
            "description": "direct, inherited (from the organization), membership or inherited_membership"
          },
          "grant_id": {
            "type": "string",
            "format": "uuid"
          },
          "granted_on": {
            "$ref": "#/components/schemas/SpaceRef",
            "description": "The space the grant sits on: this one or the organization"
          },
          "via": {
            "description": "The space whose membership carried the grant, if any",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceRef"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "role",
          "source",
          "grant_id",
          "granted_on"
        ],
        "title": "AccessPath",
        "description": "One reason a person holds a role on a space."
      },
      "AppliedTemplate": {
        "properties": {
          "pipeline_template_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          },
          "changed": {
            "type": "boolean",
            "description": "False when nothing was written; a new graph or outputs is a new version, a new description is written in place"
          },
          "launch_fields": {
            "items": {
              "$ref": "#/components/schemas/LaunchField"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "pipeline_template_id",
          "name",
          "version",
          "changed"
        ],
        "title": "AppliedTemplate"
      },
      "BeginUploadPublicationBody": {
        "properties": {
          "operation_id": {
            "type": "string",
            "format": "uuid"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "dataset",
              "content"
            ],
            "default": "dataset"
          },
          "source_format": {
            "nullable": true,
            "type": "string",
            "enum": [
              "lerobot_v2_1",
              "lerobot_v3",
              "mcap_ros2"
            ]
          },
          "expected": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ExpectedPublicationHead"
              }
            ]
          },
          "uploads": {
            "items": {
              "$ref": "#/components/schemas/StagedUploadBody"
            },
            "type": "array"
          },
          "manifests": {
            "items": {
              "$ref": "#/components/schemas/UploadVerificationManifestBody"
            },
            "type": "array"
          },
          "existing_entries": {
            "items": {
              "$ref": "#/components/schemas/ExistingUploadPublicationEntryBody"
            },
            "type": "array"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "operation_id",
          "repo_id",
          "name",
          "uploads",
          "manifests",
          "existing_entries"
        ],
        "title": "BeginUploadPublicationBody"
      },
      "CameraSlotsResponse": {
        "properties": {
          "camera_names": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "description": "Slot key (a camera_mappings key, e.g. cam_1) to the model's name for that camera (e.g. image_top)"
          },
          "model_specific": {
            "type": "boolean",
            "description": "True when the slots were read from this model; false when they are the VLA type's own"
          }
        },
        "type": "object",
        "required": [
          "camera_names",
          "model_specific"
        ],
        "title": "CameraSlotsResponse",
        "description": "The camera slots a finetune maps a dataset's cameras onto."
      },
      "CatalogTemplate": {
        "properties": {
          "pipeline_template_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "description": "The latest version; pin any up to it"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "owner": {
            "type": "string",
            "enum": [
              "system",
              "workspace"
            ]
          },
          "pinnable": {
            "type": "boolean",
            "description": "False for one that pins others itself: nesting is one level"
          },
          "inputs": {
            "items": {
              "$ref": "#/components/schemas/LaunchField"
            },
            "type": "array",
            "description": "What a node pinning it may expose or fix"
          },
          "outputs": {
            "items": {
              "$ref": "#/components/schemas/TemplateOutput"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "pipeline_template_id",
          "name",
          "version",
          "owner",
          "pinnable"
        ],
        "title": "CatalogTemplate",
        "description": "A template the workspace sees, and whether its templates may pin it."
      },
      "ChannelPredicateBody": {
        "properties": {
          "stream": {
            "type": "string",
            "enum": [
              "action",
              "state",
              "telemetry"
            ],
            "default": "action"
          },
          "channel": {
            "type": "string"
          },
          "agg": {
            "type": "string",
            "enum": [
              "max",
              "min",
              "mean",
              "std"
            ]
          },
          "op": {
            "type": "string",
            "enum": [
              "gt",
              "lt",
              "gte",
              "lte"
            ]
          },
          "value": {
            "type": "number"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "channel",
          "agg",
          "op",
          "value"
        ],
        "title": "ChannelPredicateBody"
      },
      "ChunksExistBody": {
        "properties": {
          "hashes": {
            "items": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            "type": "array"
          },
          "preferred_blob_ids": {
            "items": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            "type": "array"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "hashes",
          "preferred_blob_ids"
        ],
        "title": "ChunksExistBody"
      },
      "ComputeOverrides": {
        "properties": {
          "dev_session": {
            "description": "Name of an existing dev session VM (as registered via `qcore session start <name>`). When set, all ops in this pipeline run are dispatched to that VM via the Verda Instances driver, bypassing the prod Verda Containers path. The session must exist and be in status=running.",
            "type": [
              "string",
              "null"
            ]
          },
          "driver": {
            "description": "Name of a non-default compute backend to route every container op of this run to. Today only ``\"gcp\"`` is recognized — it pins dispatch to the ``GcpContainerDriver`` (Google Cloud Batch). Requires the pipeline-api deployment to have GCP credentials configured; ignored otherwise.",
            "const": "gcp",
            "type": [
              "string",
              "null"
            ]
          },
          "hints": {
            "description": "Run-level dispatch hints — forwarded verbatim to pipeline-api's ``ComputeHints`` model. Supported keys: ``drivers`` (ordered list of preferences), ``max_wait_seconds`` (capacity-wait window; on CapacityExhausted the run enters SCHEDULED and the scheduler retries every 30s until the deadline), and ``booking`` (whole-run VM pinning). Pipeline-api validates the shape; bad inputs are 400'd at submit time.",
            "examples": [
              {
                "max_wait_seconds": 3600
              }
            ],
            "nullable": true,
            "additionalProperties": true,
            "type": "object"
          },
          "op_hints": {
            "description": "Per-op dispatch hints, keyed by op_type — forwarded verbatim to pipeline-api, where each op resolves its effective ``ComputeHints`` as: per-op override (this) > run-level ``hints`` > template default. Use this to pick compute for the training op (``finetune_<vla_type>``) without overriding the cheap defaults of control-plane ops like credit reservation.",
            "examples": [
              {
                "finetune_act": {
                  "drivers": [
                    {
                      "driver": "verda_container",
                      "gpu": "L40S"
                    }
                  ]
                }
              }
            ],
            "nullable": true,
            "additionalProperties": true,
            "type": "object"
          }
        },
        "type": "object",
        "title": "ComputeOverrides",
        "description": "Per-run overrides for the pipeline's compute dispatch.\n\nTwo escape hatches today:\n\n- ``dev_session`` — naming a running dev session VM routes every op in\n  this pipeline run to a ``VerdaInstanceDriver`` targeting that VM\n  instead of the standard ``VerdaContainerDriver``.\n- ``driver`` — naming a backend (``\"gcp\"``) routes every container op\n  of this run to that backend's driver (e.g. ``GcpContainerDriver``,\n  dispatching to Google Cloud Batch) instead of the registry default.\n\nKept as its own model (rather than flat fields on the request) so\nfuture overrides (region, instance_type pinning, etc.) plug in here\nwithout growing the request surface. If both ``dev_session`` and\n``driver`` are supplied, ``dev_session`` wins (the dev VM path is\nmore specific — it pins to a concrete resolved VM)."
      },
      "CreateEpisodeRevisionBody": {
        "properties": {
          "episode_id": {
            "type": "string",
            "format": "uuid"
          },
          "operation_id": {
            "type": "string",
            "format": "uuid"
          },
          "note": {
            "type": "string",
            "default": ""
          },
          "expected_parent_rev": {
            "type": "integer",
            "default": 0
          },
          "trim_start_s": {
            "type": [
              "number",
              "null"
            ]
          },
          "trim_end_s": {
            "type": [
              "number",
              "null"
            ]
          },
          "clear_trim": {
            "type": "boolean",
            "default": false
          },
          "task": {
            "type": [
              "string",
              "null"
            ]
          },
          "subtasks": {
            "nullable": true,
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array"
          },
          "clear_subtasks": {
            "type": "boolean",
            "default": false
          },
          "tier": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "nullable": true,
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "add_tags": {
            "nullable": true,
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "remove_tags": {
            "nullable": true,
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "review_state": {
            "nullable": true,
            "type": "string",
            "enum": [
              "unreviewed",
              "auto_accepted",
              "human_audited",
              "rejected"
            ]
          }
        },
        "type": "object",
        "required": [
          "episode_id",
          "operation_id"
        ],
        "title": "CreateEpisodeRevisionBody"
      },
      "CreditBalanceResponse": {
        "properties": {
          "balance": {
            "type": "integer",
            "description": "Total available credits"
          },
          "grant_balance": {
            "description": "Starter credits left; null when the split is unreadable",
            "type": [
              "integer",
              "null"
            ]
          },
          "grant_original_balance": {
            "description": "Starter credits granted",
            "type": [
              "integer",
              "null"
            ]
          },
          "bundle_balance": {
            "description": "Prepaid credits left",
            "type": [
              "integer",
              "null"
            ]
          },
          "bundle_original_balance": {
            "description": "Prepaid credits bought",
            "type": [
              "integer",
              "null"
            ]
          },
          "bundle_last_top_up": {
            "description": "When prepaid credits were last bought, ISO 8601",
            "type": [
              "string",
              "null"
            ]
          },
          "vouchers": {
            "description": "Redeemed vouchers with credits left, soonest to expire first",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/CreditVoucher"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "balance"
        ],
        "title": "CreditBalanceResponse",
        "description": "Response containing user's credit balance."
      },
      "CreditReceipt": {
        "properties": {
          "reserved": {
            "type": "integer",
            "description": "Credits reserved when the job started"
          },
          "charged": {
            "type": "integer",
            "description": "Credits charged"
          },
          "refunded": {
            "type": "integer",
            "description": "Credits returned to your balance"
          },
          "reason": {
            "description": "Why the job was charged or refunded",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "reserved",
          "charged",
          "refunded"
        ],
        "title": "CreditReceipt",
        "description": "What a finished job was charged and refunded, and why."
      },
      "CreditVoucher": {
        "properties": {
          "label": {
            "description": "The voucher's label, if it has one",
            "type": [
              "string",
              "null"
            ]
          },
          "balance": {
            "type": "integer",
            "description": "Credits left on it"
          },
          "original_balance": {
            "type": "integer",
            "description": "Credits it granted"
          },
          "expires_at": {
            "description": "When it expires, ISO 8601",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "balance",
          "original_balance"
        ],
        "title": "CreditVoucher",
        "description": "One redeemed voucher that still has credits."
      },
      "DatasetCameraFeature": {
        "properties": {
          "key": {
            "type": "string"
          },
          "stream": {
            "type": "string"
          },
          "timebase_numerator": {
            "type": "integer"
          },
          "timebase_denominator": {
            "type": "integer"
          },
          "frame_timestamp_mapping": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "key",
          "stream",
          "timebase_numerator",
          "timebase_denominator",
          "frame_timestamp_mapping"
        ],
        "title": "DatasetCameraFeature"
      },
      "DatasetCurationAnalysisModel": {
        "properties": {
          "analysis_id": {
            "type": "string",
            "format": "uuid"
          },
          "base_version_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "maxItems": 32,
            "minItems": 1
          },
          "engine_revision": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "ready",
              "failed"
            ]
          },
          "phase": {
            "type": "string",
            "enum": [
              "pass1",
              "pass2",
              "ready",
              "failed"
            ]
          },
          "base_member_count": {
            "type": "integer",
            "maximum": 18446744073709552000,
            "exclusiveMinimum": 0
          },
          "processed_member_count": {
            "type": "integer",
            "maximum": 18446744073709552000,
            "minimum": 0
          },
          "recommended_exclusion_count": {
            "type": "integer",
            "maximum": 18446744073709552000,
            "minimum": 0
          },
          "threshold_digest": {
            "pattern": "^[0-9a-f]{64}$",
            "type": [
              "string",
              "null"
            ]
          },
          "evidence_digest": {
            "pattern": "^[0-9a-f]{64}$",
            "type": [
              "string",
              "null"
            ]
          },
          "recommendation_digest": {
            "pattern": "^[0-9a-f]{64}$",
            "type": [
              "string",
              "null"
            ]
          },
          "selection_digest": {
            "pattern": "^[0-9a-f]{64}$",
            "type": [
              "string",
              "null"
            ]
          },
          "audit_repo_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "expected": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/PublicationExpectedHeadModel"
              }
            ]
          },
          "failure_code": {
            "maxLength": 128,
            "minLength": 1,
            "type": [
              "string",
              "null"
            ]
          },
          "failure_detail": {
            "maxLength": 65536,
            "minLength": 1,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "analysis_id",
          "base_version_ids",
          "engine_revision",
          "status",
          "phase",
          "base_member_count",
          "processed_member_count",
          "recommended_exclusion_count"
        ],
        "title": "DatasetCurationAnalysisModel"
      },
      "DatasetCurationPublicationOperationModel": {
        "properties": {
          "idempotency_key": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "published",
              "retryable",
              "failed"
            ]
          },
          "receipt": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DatasetCurationReceiptModel"
              }
            ]
          },
          "failure_code": {
            "maxLength": 128,
            "minLength": 1,
            "type": [
              "string",
              "null"
            ]
          },
          "failure_detail": {
            "maxLength": 65536,
            "minLength": 1,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "idempotency_key",
          "state"
        ],
        "title": "DatasetCurationPublicationOperationModel"
      },
      "DatasetCurationReasonModel": {
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9_.-]{0,127}$"
          },
          "evidence": {
            "additionalProperties": true,
            "type": "object"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "evidence"
        ],
        "title": "DatasetCurationReasonModel"
      },
      "DatasetCurationReceiptModel": {
        "properties": {
          "idempotency_key": {
            "type": "string",
            "format": "uuid"
          },
          "definition_id": {
            "type": "string",
            "format": "uuid"
          },
          "version_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "included_episode_count": {
            "type": "integer",
            "maximum": 100000,
            "exclusiveMinimum": 0
          },
          "excluded_episode_count": {
            "type": "integer",
            "maximum": 100000,
            "minimum": 0
          },
          "evidence_digest": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "audit_repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "audit_path": {
            "type": "string",
            "maxLength": 4096,
            "minLength": 1
          },
          "audit_manifest_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "git_generation": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "git_commit_id": {
            "type": "string",
            "format": "uuid"
          },
          "git_hash_algorithm": {
            "type": "string",
            "enum": [
              "sha1",
              "sha256"
            ]
          },
          "git_oid": {
            "type": "string",
            "pattern": "^[0-9a-f]+$"
          },
          "git_snapshot_digest": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "dataset_snapshot_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "membership_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "norm_stats_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "idempotency_key",
          "definition_id",
          "version_id",
          "version",
          "included_episode_count",
          "excluded_episode_count",
          "evidence_digest",
          "audit_repo_id",
          "audit_path",
          "audit_manifest_id",
          "git_generation",
          "git_commit_id",
          "git_hash_algorithm",
          "git_oid",
          "git_snapshot_digest",
          "dataset_snapshot_id",
          "membership_hash",
          "norm_stats_hash"
        ],
        "title": "DatasetCurationReceiptModel"
      },
      "DatasetCurationSuggestionModel": {
        "properties": {
          "episode_revision_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "episode_id": {
            "type": "string",
            "format": "uuid"
          },
          "dataset_id": {
            "type": "string",
            "format": "uuid"
          },
          "episode_index": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0
          },
          "risk_score": {
            "type": "integer",
            "maximum": 100,
            "minimum": 0
          },
          "reasons": {
            "items": {
              "$ref": "#/components/schemas/DatasetCurationReasonModel"
            },
            "type": "array",
            "maxItems": 32,
            "minItems": 1
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "episode_revision_id",
          "episode_id",
          "dataset_id",
          "episode_index",
          "risk_score",
          "reasons"
        ],
        "title": "DatasetCurationSuggestionModel"
      },
      "DatasetCurationSuggestionPageModel": {
        "properties": {
          "analysis": {
            "$ref": "#/components/schemas/DatasetCurationAnalysisModel"
          },
          "suggestions": {
            "items": {
              "$ref": "#/components/schemas/DatasetCurationSuggestionModel"
            },
            "type": "array",
            "maxItems": 500
          },
          "next_page_token": {
            "maxLength": 512,
            "minLength": 2,
            "pattern": "^[0-9a-f]+$",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "analysis",
          "suggestions"
        ],
        "title": "DatasetCurationSuggestionPageModel"
      },
      "DatasetDefBody": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          },
          "description": {
            "type": "string",
            "maxLength": 4096,
            "default": ""
          },
          "query": {
            "$ref": "#/components/schemas/SavedQueryBody"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "DatasetDefBody",
        "description": "Save a query over the episode lake as a dataset definition."
      },
      "DatasetDefRetireResponse": {
        "properties": {
          "retired": {
            "type": "boolean",
            "description": "False when the dataset was already retired; the call is idempotent"
          },
          "name": {
            "type": "string",
            "description": "Name the dataset had at retirement"
          },
          "pinned_versions_retained": {
            "type": "integer",
            "minimum": 0,
            "description": "Pinned versions left resolvable by id, so running trainings survive"
          }
        },
        "type": "object",
        "required": [
          "retired",
          "name",
          "pinned_versions_retained"
        ],
        "title": "DatasetDefRetireResponse",
        "description": "Result of retiring a dataset definition."
      },
      "DatasetHealthDiagnosticsResponse": {
        "properties": {
          "action_autocorrelation": {
            "$ref": "#/components/schemas/DatasetHealthMetricResponse"
          },
          "state_action_alignment": {
            "$ref": "#/components/schemas/DatasetHealthMetricResponse"
          },
          "demonstrator_speed_variance": {
            "$ref": "#/components/schemas/DatasetHealthMetricResponse"
          },
          "cross_episode_action_variance": {
            "$ref": "#/components/schemas/DatasetHealthMetricResponse"
          },
          "episode_smoothness": {
            "$ref": "#/components/schemas/DatasetHealthMetricResponse"
          },
          "sensor_health": {
            "$ref": "#/components/schemas/DatasetHealthMetricResponse"
          },
          "episode_pose_outliers": {
            "$ref": "#/components/schemas/DatasetHealthMetricResponse"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "action_autocorrelation",
          "state_action_alignment",
          "demonstrator_speed_variance",
          "cross_episode_action_variance",
          "episode_smoothness",
          "sensor_health",
          "episode_pose_outliers"
        ],
        "title": "DatasetHealthDiagnosticsResponse"
      },
      "DatasetHealthEvidenceCompletenessResponse": {
        "properties": {
          "native_trajectory_metrics": {
            "$ref": "#/components/schemas/DatasetHealthNativeEvidenceResponse"
          },
          "visual_diversity": {
            "$ref": "#/components/schemas/DatasetHealthUnavailableEvidenceResponse"
          },
          "demo_quality": {
            "$ref": "#/components/schemas/DatasetHealthUnavailableEvidenceResponse"
          },
          "trajectory_diversity": {
            "$ref": "#/components/schemas/DatasetHealthUnavailableEvidenceResponse"
          },
          "episode_outliers": {
            "$ref": "#/components/schemas/DatasetHealthUnavailableEvidenceResponse"
          },
          "behavioral_coverage": {
            "$ref": "#/components/schemas/DatasetHealthUnavailableEvidenceResponse"
          },
          "mutable_quality_projection": {
            "$ref": "#/components/schemas/DatasetHealthUnreadEvidenceResponse"
          },
          "mutable_review_projection": {
            "$ref": "#/components/schemas/DatasetHealthUnreadEvidenceResponse"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "native_trajectory_metrics",
          "visual_diversity",
          "demo_quality",
          "trajectory_diversity",
          "episode_outliers",
          "behavioral_coverage",
          "mutable_quality_projection",
          "mutable_review_projection"
        ],
        "title": "DatasetHealthEvidenceCompletenessResponse"
      },
      "DatasetHealthFlaggedEpisodeResponse": {
        "properties": {
          "episode_revision_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "member_ordinal": {
            "type": "integer",
            "minimum": 0
          },
          "reasons": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 32,
            "minItems": 1
          },
          "severity": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "episode_revision_id",
          "member_ordinal",
          "reasons",
          "severity"
        ],
        "title": "DatasetHealthFlaggedEpisodeResponse"
      },
      "DatasetHealthMetricResponse": {
        "properties": {
          "score": {
            "type": "number",
            "maximum": 1,
            "minimum": 0
          },
          "details": {
            "$ref": "#/components/schemas/JsonValue"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "score",
          "details"
        ],
        "title": "DatasetHealthMetricResponse",
        "description": "One bounded native metric over exact immutable trajectory bytes."
      },
      "DatasetHealthNativeEvidenceResponse": {
        "properties": {
          "status": {
            "type": "string",
            "const": "sampled_exact_immutable"
          },
          "sample_policy": {
            "type": "string",
            "const": "balanced-member-ordinal/1"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "status",
          "sample_policy"
        ],
        "title": "DatasetHealthNativeEvidenceResponse"
      },
      "DatasetHealthNativeMetricsResponse": {
        "properties": {
          "motion_quality": {
            "$ref": "#/components/schemas/DatasetHealthMetricResponse"
          },
          "workspace_coverage": {
            "$ref": "#/components/schemas/DatasetHealthMetricResponse"
          },
          "data_integrity": {
            "$ref": "#/components/schemas/DatasetHealthMetricResponse"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "motion_quality",
          "workspace_coverage",
          "data_integrity"
        ],
        "title": "DatasetHealthNativeMetricsResponse"
      },
      "DatasetHealthRecommendationResponse": {
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "none",
              "review_episodes"
            ]
          },
          "target": {
            "nullable": true,
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "impact": {
            "type": "string",
            "maxLength": 4096,
            "minLength": 1
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "action",
          "target",
          "impact"
        ],
        "title": "DatasetHealthRecommendationResponse"
      },
      "DatasetHealthReportResponse": {
        "properties": {
          "contract": {
            "type": "string",
            "const": "qds.dataset-health.v1"
          },
          "engine_revision": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          },
          "dataset_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "dataset_snapshot_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "membership_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "norm_stats_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "member_count": {
            "type": "integer",
            "maximum": 100000,
            "minimum": 1
          },
          "sampling": {
            "$ref": "#/components/schemas/DatasetHealthSamplingResponse"
          },
          "evidence_digest": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "cache_identity": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "health_score": {
            "maximum": 100,
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "grade": {
            "nullable": true,
            "type": "string",
            "enum": [
              "A+",
              "A",
              "A-",
              "B+",
              "B",
              "B-",
              "C+",
              "C",
              "C-",
              "D",
              "F"
            ]
          },
          "summary": {
            "maxLength": 4096,
            "type": [
              "string",
              "null"
            ]
          },
          "metrics": {
            "$ref": "#/components/schemas/DatasetHealthNativeMetricsResponse"
          },
          "data_health": {
            "$ref": "#/components/schemas/DatasetHealthDiagnosticsResponse"
          },
          "flagged_episodes": {
            "items": {
              "$ref": "#/components/schemas/DatasetHealthFlaggedEpisodeResponse"
            },
            "type": "array",
            "maxItems": 120
          },
          "recommendations": {
            "items": {
              "$ref": "#/components/schemas/DatasetHealthRecommendationResponse"
            },
            "type": "array",
            "maxItems": 1,
            "minItems": 1
          },
          "evidence_completeness": {
            "$ref": "#/components/schemas/DatasetHealthEvidenceCompletenessResponse"
          },
          "report_digest": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "contract",
          "engine_revision",
          "dataset_version_id",
          "dataset_snapshot_id",
          "membership_hash",
          "norm_stats_hash",
          "member_count",
          "sampling",
          "evidence_digest",
          "cache_identity",
          "health_score",
          "grade",
          "summary",
          "metrics",
          "data_health",
          "flagged_episodes",
          "recommendations",
          "evidence_completeness",
          "report_digest"
        ],
        "title": "DatasetHealthReportResponse",
        "description": "Canonical bounded report for one exact published DatasetVersion."
      },
      "DatasetHealthSamplingResponse": {
        "properties": {
          "policy": {
            "type": "string",
            "const": "balanced-member-ordinal/1"
          },
          "maximum_members": {
            "type": "integer",
            "const": 120
          },
          "sampled_member_count": {
            "type": "integer",
            "maximum": 120,
            "minimum": 1
          },
          "sampled_rows": {
            "type": "integer",
            "maximum": 2000000,
            "minimum": 1
          },
          "sampled_ordinals": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "maxItems": 120,
            "minItems": 1
          },
          "sampled_episode_revision_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 120,
            "minItems": 1
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "policy",
          "maximum_members",
          "sampled_member_count",
          "sampled_rows",
          "sampled_ordinals",
          "sampled_episode_revision_ids"
        ],
        "title": "DatasetHealthSamplingResponse"
      },
      "DatasetHealthUnavailableEvidenceResponse": {
        "properties": {
          "status": {
            "type": "string",
            "const": "unavailable"
          },
          "reason": {
            "type": "string",
            "maxLength": 4096,
            "minLength": 1
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "status",
          "reason"
        ],
        "title": "DatasetHealthUnavailableEvidenceResponse"
      },
      "DatasetHealthUnreadEvidenceResponse": {
        "properties": {
          "status": {
            "type": "string",
            "const": "not_read"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "status"
        ],
        "title": "DatasetHealthUnreadEvidenceResponse"
      },
      "DatasetItem": {
        "properties": {
          "artifact_id": {
            "type": "string",
            "format": "uuid",
            "description": "Artifact ID"
          },
          "subtype": {
            "type": "string",
            "description": "Dataset subtype (lerobot_v2_1, lerobot_v3, mcap_ros2)"
          },
          "artifact_subtype": {
            "description": "Alias of subtype",
            "type": [
              "string",
              "null"
            ]
          },
          "path": {
            "type": "string",
            "description": "Dataset path (org/name)"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "jobs": {
            "items": {
              "$ref": "#/components/schemas/JobLink"
            },
            "type": "array"
          },
          "published_at": {
            "type": "string",
            "format": "date-time",
            "description": "Immutable timestamp of the first successful structured QDS publication"
          },
          "qds": {
            "description": "QDS catalog facts (P6a)",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DatasetQdsFacts"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "artifact_id",
          "subtype",
          "path",
          "published_at"
        ],
        "title": "DatasetItem"
      },
      "DatasetQdsFacts": {
        "properties": {
          "repo_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "size_bytes": {
            "description": "REAL logical bytes (file sizes sum)",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "file_count": {
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "dataset_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "episode_count": {
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "total_frames": {
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "quality_avg": {
            "description": "Mean of STORED episode quality scores",
            "type": [
              "number",
              "null"
            ]
          },
          "scored_episodes": {
            "description": "How many episodes have a stored score",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "ingest_verdict": {
            "description": "Upload verdict: published | degraded | underivable (no episode could be derived; the raw bytes are kept). Null = not recorded, read as published.",
            "type": [
              "string",
              "null"
            ]
          },
          "verdict_reason": {
            "description": "Why, as \"<finding code>: <message>\"; null when published",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "title": "DatasetQdsFacts",
        "description": "QDS-sourced catalog facts (P6a). Only present when the deployment's\ndata plane is QDS and the repo resolved; fields beyond size/file_count\nneed a structured dataset row. Absent means absent — never rendered\nas zero."
      },
      "DatasetTrainingFeaturesResponse": {
        "properties": {
          "dataset_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "training_adapter_revision_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "camera_features": {
            "items": {
              "$ref": "#/components/schemas/DatasetCameraFeature"
            },
            "type": "array"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "dataset_version_id",
          "training_adapter_revision_id",
          "camera_features"
        ],
        "title": "DatasetTrainingFeaturesResponse",
        "description": "Adapter-pinned camera schema for one immutable DatasetVersion."
      },
      "DismissUploadBody": {
        "properties": {
          "dismissed_through_unix": {
            "type": "integer",
            "minimum": 0,
            "default": 0
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "DismissUploadBody"
      },
      "DownloadBeginBody": {
        "properties": {
          "name": {
            "type": "string"
          },
          "commit_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "snapshot_digest": {
            "pattern": "^[0-9a-f]{64}$",
            "type": [
              "string",
              "null"
            ]
          },
          "after_path": {
            "maxLength": 4096,
            "minLength": 1,
            "type": [
              "string",
              "null"
            ]
          },
          "limit": {
            "type": "integer",
            "maximum": 4096,
            "minimum": 1,
            "default": 128
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "DownloadBeginBody"
      },
      "DownloadExactBatchBody": {
        "properties": {
          "name": {
            "type": "string"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "commit_id": {
            "type": "string",
            "format": "uuid"
          },
          "snapshot_digest": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "files": {
            "items": {
              "$ref": "#/components/schemas/ExactDownloadFileBody"
            },
            "type": "array",
            "maxItems": 4096,
            "minItems": 1
          },
          "ttl_seconds": {
            "type": "integer",
            "maximum": 3600,
            "minimum": 60,
            "default": 3600
          },
          "max_chunks": {
            "maximum": 4294967295,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "repo_id",
          "commit_id",
          "snapshot_digest",
          "files"
        ],
        "title": "DownloadExactBatchBody"
      },
      "DownloadPresignBatchBody": {
        "properties": {
          "name": {
            "type": "string"
          },
          "file_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "maxItems": 4096,
            "minItems": 1
          },
          "ttl_seconds": {
            "type": "integer",
            "maximum": 86400,
            "minimum": 60,
            "default": 3600
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "file_ids"
        ],
        "title": "DownloadPresignBatchBody"
      },
      "DownloadPresignBody": {
        "properties": {
          "name": {
            "type": "string"
          },
          "file_id": {
            "type": "string"
          },
          "ttl_seconds": {
            "type": "integer",
            "default": 300
          }
        },
        "type": "object",
        "required": [
          "name",
          "file_id"
        ],
        "title": "DownloadPresignBody"
      },
      "EffectiveRole": {
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "viewer",
              "contributor",
              "admin",
              "owner"
            ]
          },
          "inherited": {
            "type": "boolean"
          },
          "granted_on": {
            "$ref": "#/components/schemas/SpaceRef"
          }
        },
        "type": "object",
        "required": [
          "role",
          "inherited",
          "granted_on"
        ],
        "title": "EffectiveRole"
      },
      "EpisodeIdBody": {
        "properties": {
          "episode_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "type": "object",
        "required": [
          "episode_id"
        ],
        "title": "EpisodeIdBody"
      },
      "EpisodeRevisionsBody": {
        "properties": {
          "episode_id": {
            "type": "string",
            "format": "uuid"
          },
          "page_size": {
            "type": "integer",
            "maximum": 500,
            "minimum": 1,
            "default": 100
          },
          "page_token": {
            "maxLength": 4162,
            "minLength": 2,
            "pattern": "^[0-9a-f]+$",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "episode_id"
        ],
        "title": "EpisodeRevisionsBody"
      },
      "ErrorResponse": {
        "properties": {
          "detail": {
            "type": "string",
            "description": "Error message describing what went wrong"
          }
        },
        "type": "object",
        "required": [
          "detail"
        ],
        "title": "ErrorResponse",
        "description": "Standard error response."
      },
      "ExactDownloadFileBody": {
        "properties": {
          "path": {
            "type": "string",
            "maxLength": 4096,
            "minLength": 1
          },
          "manifest_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "logical_size": {
            "type": "integer",
            "minimum": 1
          },
          "chunk_count": {
            "type": "integer",
            "maximum": 4294967295,
            "minimum": 1
          },
          "artifact_encoding": {
            "type": "string",
            "enum": [
              "safetensors",
              "compressed_tensors",
              "gguf",
              "parquet",
              "video",
              "mcap",
              "npy",
              "npz",
              "generic"
            ]
          },
          "full_plaintext_digest": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "chunk_start": {
            "maximum": 4294967295,
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "byte_start": {
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "path",
          "manifest_id",
          "logical_size",
          "chunk_count",
          "artifact_encoding",
          "full_plaintext_digest"
        ],
        "title": "ExactDownloadFileBody"
      },
      "ExistingUploadPublicationEntryBody": {
        "properties": {
          "manifest_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "path": {
            "type": "string",
            "maxLength": 4096,
            "minLength": 1
          },
          "mode": {
            "type": "integer",
            "enum": [
              33188,
              33261
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "manifest_id",
          "path",
          "mode"
        ],
        "title": "ExistingUploadPublicationEntryBody"
      },
      "ExpectedPublicationHead": {
        "properties": {
          "generation": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "git_hash_algorithm": {
            "type": "string",
            "enum": [
              "sha1",
              "sha256"
            ]
          },
          "git_oid": {
            "type": "string",
            "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
          },
          "commit_id": {
            "type": "string",
            "format": "uuid"
          },
          "pack_digest": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "generation",
          "git_hash_algorithm",
          "git_oid",
          "commit_id",
          "pack_digest"
        ],
        "title": "ExpectedPublicationHead"
      },
      "ExploreLakeBody": {
        "properties": {
          "tasks": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 512
          },
          "tiers": {
            "items": {
              "type": "string",
              "enum": [
                "",
                "retrainable",
                "analyze_only"
              ]
            },
            "type": "array",
            "maxItems": 512
          },
          "interface_hashes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 512
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 512
          },
          "marker_signatures": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 512
          },
          "review_state": {
            "type": "string",
            "enum": [
              "",
              "unreviewed",
              "auto_accepted",
              "human_audited",
              "rejected"
            ],
            "default": ""
          },
          "dataset_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "maxItems": 4096
          },
          "episode_index": {
            "maximum": 2147483647,
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "lineage": {
            "type": "string",
            "enum": [
              "",
              "originals",
              "children"
            ],
            "default": ""
          },
          "parent_episode_index": {
            "maximum": 2147483647,
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "order_desc": {
            "type": "boolean",
            "default": false
          },
          "limit": {
            "type": "integer",
            "maximum": 200,
            "minimum": 1,
            "default": 50
          },
          "offset": {
            "type": "integer",
            "maximum": 4294967295,
            "minimum": 0,
            "default": 0
          },
          "search": {
            "type": "string",
            "default": ""
          },
          "numeric_predicates": {
            "items": {
              "$ref": "#/components/schemas/NumericPredicateBody"
            },
            "type": "array",
            "maxItems": 32
          },
          "channel_predicates": {
            "items": {
              "$ref": "#/components/schemas/ChannelPredicateBody"
            },
            "type": "array",
            "maxItems": 32
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ExploreLakeBody"
      },
      "ExploreLakeResponseModel": {
        "properties": {
          "episodes": {
            "items": {
              "$ref": "#/components/schemas/LakeEpisodeModel"
            },
            "type": "array",
            "maxItems": 200
          },
          "total": {
            "type": "integer",
            "maximum": 18446744073709552000,
            "minimum": 0
          },
          "total_frames": {
            "type": "integer",
            "maximum": 18446744073709552000,
            "minimum": 0
          },
          "total_duration_seconds": {
            "type": "number",
            "minimum": 0
          },
          "facets": {
            "$ref": "#/components/schemas/LakeFacetsModel"
          },
          "page_limit": {
            "type": "integer",
            "maximum": 200,
            "minimum": 1
          },
          "page_offset": {
            "type": "integer",
            "maximum": 4294967295,
            "minimum": 0
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "episodes",
          "total",
          "total_frames",
          "total_duration_seconds",
          "facets",
          "page_limit",
          "page_offset"
        ],
        "title": "ExploreLakeResponseModel"
      },
      "FieldTypeInfo": {
        "properties": {
          "type_name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "widget": {
            "type": "string"
          },
          "resolver": {
            "nullable": true,
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "type_name",
          "kind",
          "widget"
        ],
        "title": "FieldTypeInfo",
        "description": "A served field-type registry entry. Resolver refs of kind 'endpoint'\nalways live under /v1/ and must be called through the authed client;\nkind 'client' names a closed set of client-side search routines."
      },
      "FieldTypesResponse": {
        "properties": {
          "field_types": {
            "items": {
              "$ref": "#/components/schemas/FieldTypeInfo"
            },
            "type": "array"
          },
          "port_resolvers": {
            "items": {
              "$ref": "#/components/schemas/PortResolverInfo"
            },
            "type": "array",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "field_types"
        ],
        "title": "FieldTypesResponse"
      },
      "FinalizeUploadBatchBody": {
        "properties": {
          "uploads": {
            "items": {
              "$ref": "#/components/schemas/StagedUploadBody"
            },
            "type": "array",
            "minItems": 1
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "uploads"
        ],
        "title": "FinalizeUploadBatchBody"
      },
      "FinetuneCancelResponse": {
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid",
            "description": "Cancelled job ID"
          },
          "cancelled": {
            "type": "boolean",
            "description": "Whether cancellation was successful"
          },
          "message": {
            "description": "Status message",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "job_id",
          "cancelled"
        ],
        "title": "FinetuneCancelResponse",
        "description": "Response after cancelling a finetune job."
      },
      "FinetunePublicMetadata": {
        "properties": {
          "job_desc": {
            "maxLength": 1024,
            "type": [
              "string",
              "null"
            ]
          },
          "vla_type": {
            "nullable": true,
            "type": "string",
            "enum": [
              "act",
              "pi05",
              "smolvla",
              "sarm"
            ]
          },
          "job_type": {
            "nullable": true,
            "type": "string",
            "enum": [
              "vla",
              "reward",
              "vla_w_reward"
            ]
          },
          "model_name": {
            "maxLength": 193,
            "type": [
              "string",
              "null"
            ]
          },
          "dataset_version_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "base_model": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/PublicModelIdentity"
              }
            ]
          },
          "reward_model": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/PublicModelIdentity"
              }
            ]
          },
          "use_rabc": {
            "type": "boolean",
            "default": false
          },
          "training_hours": {
            "maximum": 168,
            "exclusiveMinimum": 0,
            "type": [
              "number",
              "null"
            ]
          },
          "batch_size": {
            "maximum": 512,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "instance_type": {
            "maxLength": 128,
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "maxLength": 128,
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "FinetunePublicMetadata",
        "description": "Fixed public projection of durable pipeline inputs.\n\nStorage locations, read capabilities, internal principals, compute\noverrides, and the raw run snapshot are deliberately not representable."
      },
      "FinetuneRequest": {
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "Project ID to associate the job with"
          },
          "model_id": {
            "description": "HuggingFace model ID to finetune. Required for pi05. Must NOT be provided for act.",
            "examples": [
              "lerobot/pi05_base",
              "myuser/my-finetuned-pi05"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "model_revision": {
            "description": "Exact Hugging Face commit SHA. The server supplies the reviewed pin for a built-in foundation-model alias; custom model IDs must always provide this value.",
            "pattern": "^[0-9a-f]{40}$",
            "type": [
              "string",
              "null"
            ]
          },
          "vla_type": {
            "$ref": "#/components/schemas/VLAType",
            "description": "VLA model type (determines camera slot configuration). smolvla and sarm were retired on 2026-10-14 and are refused.",
            "examples": [
              "act",
              "pi05"
            ]
          },
          "dataset_version_id": {
            "type": "string",
            "format": "uuid",
            "description": "Immutable QDS DatasetVersion ID. Training never accepts mutable repository names, branches, or external dataset identifiers."
          },
          "hours": {
            "type": "number",
            "maximum": 168,
            "exclusiveMinimum": 0,
            "description": "Training duration in hours"
          },
          "instance_type": {
            "description": "GPU instance type (from /v1/instances). If not specified, cheapest available is used.",
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "description": "Cloud region. If not specified, best available is selected.",
            "type": [
              "string",
              "null"
            ]
          },
          "batch_size": {
            "type": "integer",
            "maximum": 512,
            "minimum": 1,
            "description": "Training batch size",
            "default": 32
          },
          "name": {
            "description": "Job name/description. Defaults to 'SDK Job - {vla_type}'",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "model_name": {
            "description": "Output model name, independent of the job description.",
            "maxLength": 193,
            "type": [
              "string",
              "null"
            ]
          },
          "camera_mappings": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "description": "Camera mappings from model camera slots to dataset image keys.",
            "example": {
              "cam_1": "observation.images.top",
              "cam_2": "observation.images.wrist",
              "cam_3": "observation.images.front"
            }
          },
          "vla_hyper_spec": {
            "description": "Advanced hyperparameters for VLA models. Use GET /v1/finetune/hyperparams/defaults to get defaults.",
            "nullable": true,
            "additionalProperties": true,
            "type": "object"
          },
          "job_type": {
            "$ref": "#/components/schemas/JobType",
            "description": "Type of fine-tuning job. Only 'vla'; 'reward' and 'vla_w_reward' were retired on 2026-10-14 and are refused.",
            "default": "vla"
          },
          "compute_overrides": {
            "description": "Optional per-run compute dispatch overrides. Supports ``dev_session`` (pin to a named dev VM) and ``driver`` (pick a non-default backend like ``\"gcp\"``) — see ``ComputeOverrides``.",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ComputeOverrides"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "project_id",
          "vla_type",
          "dataset_version_id",
          "hours",
          "camera_mappings"
        ],
        "title": "FinetuneRequest",
        "description": "Request to start a finetune job."
      },
      "FinetuneResponse": {
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique job identifier"
          },
          "status": {
            "type": "string",
            "description": "Current job status"
          },
          "message": {
            "description": "Status message",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "job_id",
          "status"
        ],
        "title": "FinetuneResponse",
        "description": "Response after creating a finetune job."
      },
      "FinetuneStatusResponse": {
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique job identifier"
          },
          "audience": {
            "type": "string",
            "enum": [
              "internal",
              "public"
            ],
            "default": "internal"
          },
          "project_id": {
            "description": "Project associated with the training run",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "current_op": {
            "type": "string",
            "description": "Current op name (the op_type, or a terminal pseudo-state)"
          },
          "status": {
            "type": "string",
            "description": "Overall job status: queued, scheduled, running, completed, failed, cancelled"
          },
          "metadata": {
            "$ref": "#/components/schemas/FinetunePublicMetadata"
          },
          "ops": {
            "items": {
              "$ref": "#/components/schemas/Op"
            },
            "type": "array",
            "description": "Op history in chronological order"
          },
          "maps": {
            "items": {
              "$ref": "#/components/schemas/MapProgress"
            },
            "type": "array",
            "description": "Progress of each map node: the run's per-item fan-outs. A map is one row in ops; its items are paged separately."
          },
          "telemetry": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "description": "Training telemetry points (loss, gradient norm, learning rate, …) recorded so far, oldest first. Replayed from persisted events so a page load reconstructs the full series without the live SSE stream."
          },
          "failure_cause": {
            "description": "Who caused a failed job. `user`: something you set or authored (the dataset version, a parameter, a field of your pipeline, or your pipeline's wiring) made it fail; its usage is charged, up to the reservation. `platform`: anything else, including a failure with no recorded cause; its credits are refunded in full. None when the job did not fail.",
            "nullable": true,
            "type": "string",
            "enum": [
              "user",
              "platform"
            ]
          },
          "failure_subject": {
            "description": "What of yours caused a `user` failure: `dataset_version:<id>`, `parameter:<name>`, `config:<node>.<port>` or `pipeline_template:<id>`",
            "type": [
              "string",
              "null"
            ]
          },
          "failure_reason": {
            "description": "Why it failed, for a `user` failure",
            "type": [
              "string",
              "null"
            ]
          },
          "credits": {
            "description": "The job's credit settlement, once it has ended and settled",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CreditReceipt"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "job_id",
          "current_op",
          "status"
        ],
        "title": "FinetuneStatusResponse",
        "description": "Detailed status of a finetune job."
      },
      "GetUploadPublicationBody": {
        "properties": {
          "operation_id": {
            "type": "string",
            "format": "uuid"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "operation_id",
          "repo_id",
          "name"
        ],
        "title": "GetUploadPublicationBody"
      },
      "GrantSubject": {
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "username": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "user_id"
        ],
        "title": "GrantSubject"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "HuggingFaceImportBody": {
        "properties": {
          "idempotency_key": {
            "type": "string",
            "format": "uuid"
          },
          "repo_id": {
            "type": "string",
            "maxLength": 200,
            "minLength": 3,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*$"
          },
          "revision": {
            "type": "string",
            "pattern": "^[0-9a-f]{40}$"
          },
          "name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1
          },
          "source_format": {
            "type": "string",
            "enum": [
              "lerobot_v2_1",
              "lerobot_v3"
            ]
          },
          "hf_token": {
            "maxLength": 512,
            "minLength": 1,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "idempotency_key",
          "repo_id",
          "revision",
          "name",
          "source_format"
        ],
        "title": "HuggingFaceImportBody",
        "description": "Server-side import of one exact public Hugging Face dataset commit."
      },
      "HyperparamsDefaultsResponse": {
        "properties": {
          "data": {
            "additionalProperties": true,
            "type": "object",
            "description": "Default hyperparameters"
          },
          "message": {
            "type": "string",
            "description": "Status message"
          }
        },
        "type": "object",
        "required": [
          "data",
          "message"
        ],
        "title": "HyperparamsDefaultsResponse",
        "description": "Default hyperparameters for a VLA model type."
      },
      "HyperparamsValidationIssue": {
        "properties": {
          "field": {
            "type": "string",
            "description": "The field with the issue"
          },
          "message": {
            "type": "string",
            "description": "Description of the issue"
          }
        },
        "type": "object",
        "required": [
          "field",
          "message"
        ],
        "title": "HyperparamsValidationIssue",
        "description": "A single validation issue for hyperparameters."
      },
      "HyperparamsValidationResponse": {
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "Whether the hyperparameters are valid"
          },
          "issues": {
            "description": "Validation issues, if any",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/HyperparamsValidationIssue"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "valid"
        ],
        "title": "HyperparamsValidationResponse",
        "description": "Result of hyperparameters validation."
      },
      "Instance": {
        "properties": {
          "id": {
            "type": "string",
            "description": "Instance type ID (use this when creating finetune jobs)"
          },
          "name": {
            "type": "string",
            "description": "Instance flavor name"
          },
          "description": {
            "type": "string",
            "description": "Instance description"
          },
          "gpu_description": {
            "type": "string",
            "description": "Clean GPU description"
          },
          "credits_per_hour": {
            "type": "integer",
            "description": "Cost in credits per hour"
          },
          "driver": {
            "type": "string",
            "description": "Compute driver that serves this type (for compute hints)",
            "default": ""
          },
          "specs": {
            "$ref": "#/components/schemas/InstanceSpecs",
            "description": "Hardware specifications"
          },
          "regions": {
            "items": {
              "$ref": "#/components/schemas/InstanceRegion"
            },
            "type": "array",
            "description": "Available regions"
          },
          "region_count": {
            "type": "integer",
            "description": "Number of available regions",
            "default": 1
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "gpu_description",
          "credits_per_hour",
          "specs"
        ],
        "title": "Instance",
        "description": "A single GPU instance type."
      },
      "InstanceRegion": {
        "properties": {
          "name": {
            "type": "string",
            "description": "Region identifier"
          },
          "description": {
            "type": "string",
            "description": "Human-readable region name"
          }
        },
        "type": "object",
        "required": [
          "name",
          "description"
        ],
        "title": "InstanceRegion",
        "description": "A region where an instance is available."
      },
      "InstanceSpecs": {
        "properties": {
          "vcpus": {
            "type": "integer",
            "description": "Number of virtual CPUs"
          },
          "memory_gib": {
            "type": "integer",
            "description": "Memory in GiB"
          },
          "storage_gib": {
            "type": "integer",
            "description": "Storage in GiB (0 when unknown)",
            "default": 0
          },
          "gpu_count": {
            "type": "integer",
            "description": "Number of GPUs"
          },
          "gpu_type": {
            "type": "string",
            "description": "GPU model name"
          },
          "gpu_vram_gib": {
            "type": "integer",
            "description": "GPU VRAM per device in GiB (0 when unknown)",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "vcpus",
          "memory_gib",
          "gpu_count",
          "gpu_type"
        ],
        "title": "InstanceSpecs",
        "description": "Hardware specifications for an instance."
      },
      "InstancesListResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Instance"
            },
            "type": "array",
            "description": "List of available instances"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "InstancesListResponse",
        "description": "Response containing available GPU instances."
      },
      "Integration": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The integration key's ID"
          },
          "provider": {
            "type": "string",
            "const": "huggingface",
            "description": "The service the key is for"
          },
          "name": {
            "type": "string",
            "description": "The key's name"
          },
          "last4": {
            "description": "The key's last four characters; null for a key shorter than 12",
            "type": [
              "string",
              "null"
            ]
          },
          "is_default": {
            "type": "boolean",
            "description": "The Hugging Face token new runs use"
          },
          "created_by": {
            "type": "string",
            "format": "uuid",
            "description": "The person who added it"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was added"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it expires"
          }
        },
        "type": "object",
        "required": [
          "id",
          "provider",
          "name",
          "is_default",
          "created_by",
          "created_at",
          "expires_at"
        ],
        "title": "Integration",
        "description": "One integration key, without its value."
      },
      "IntegrationDeleteResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The removed key's ID"
          },
          "deleted": {
            "type": "boolean",
            "description": "Whether the key was removed"
          }
        },
        "type": "object",
        "required": [
          "id",
          "deleted"
        ],
        "title": "IntegrationDeleteResponse",
        "description": "Response for removing an integration key."
      },
      "IntegrationList": {
        "properties": {
          "integrations": {
            "items": {
              "$ref": "#/components/schemas/Integration"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "integrations"
        ],
        "title": "IntegrationList",
        "description": "The organization's integration keys, newest first."
      },
      "Invitation": {
        "properties": {
          "invitation_id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string"
          },
          "space_id": {
            "description": "The space it grants a role on",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "space_role": {
            "description": "The role it grants there",
            "nullable": true,
            "type": "string",
            "enum": [
              "viewer",
              "contributor",
              "admin",
              "owner"
            ]
          },
          "space_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "space_kind": {
            "nullable": true,
            "type": "string",
            "enum": [
              "organization",
              "workspace"
            ]
          },
          "invited_by": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "expires_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "invitation_id",
          "email"
        ],
        "title": "Invitation",
        "description": "A pending invitation."
      },
      "InvitationList": {
        "properties": {
          "invitations": {
            "items": {
              "$ref": "#/components/schemas/Invitation"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "invitations"
        ],
        "title": "InvitationList"
      },
      "InvitationRequest": {
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 320,
            "pattern": "^[^@\\s]+@[^@\\s]+$"
          },
          "role": {
            "type": "string",
            "enum": [
              "viewer",
              "contributor",
              "admin",
              "owner"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "email",
          "role"
        ],
        "title": "InvitationRequest",
        "description": "``POST /v1/invitations``: invite someone by email at a role (to the\nworkspace the query's ``project_id`` names, as a guest, else to the\norganization)."
      },
      "InvitationWithdrawn": {
        "properties": {
          "invitation_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "type": "object",
        "required": [
          "invitation_id"
        ],
        "title": "InvitationWithdrawn"
      },
      "Job": {
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid",
            "description": "Job ID"
          },
          "name": {
            "description": "Job name/description",
            "type": [
              "string",
              "null"
            ]
          },
          "model": {
            "description": "Model being fine-tuned",
            "type": [
              "string",
              "null"
            ]
          },
          "dataset": {
            "description": "Dataset used for training",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "Current job status",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp"
          }
        },
        "type": "object",
        "required": [
          "job_id",
          "created_at"
        ],
        "title": "Job",
        "description": "Job summary within a project"
      },
      "JobItem": {
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "audience": {
            "type": "string",
            "enum": [
              "internal",
              "public"
            ],
            "default": "internal"
          },
          "status": {
            "description": "Latest phase status",
            "type": [
              "string",
              "null"
            ]
          },
          "current_op": {
            "description": "Latest phase name",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "When the run or one of its steps last changed status",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "metadata": {
            "$ref": "#/components/schemas/FinetunePublicMetadata"
          },
          "finetuned_model_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "job_id",
          "project_id"
        ],
        "title": "JobItem"
      },
      "JobLink": {
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid"
          },
          "direction": {
            "type": "string",
            "description": "input or output"
          }
        },
        "type": "object",
        "required": [
          "job_id",
          "direction"
        ],
        "title": "JobLink"
      },
      "JobType": {
        "type": "string",
        "enum": [
          "vla"
        ],
        "title": "JobType",
        "description": "Fine-tuning job types a new finetune can use."
      },
      "JsonValue": {},
      "KeptWorkspace": {
        "properties": {
          "space_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "nullable": true,
            "type": "string",
            "enum": [
              "viewer",
              "contributor",
              "admin",
              "owner"
            ]
          }
        },
        "type": "object",
        "required": [
          "space_id"
        ],
        "title": "KeptWorkspace"
      },
      "LakeChannelPredicateEvidenceModel": {
        "properties": {
          "predicate_index": {
            "type": "integer",
            "maximum": 31,
            "minimum": 0
          },
          "stream": {
            "type": "string",
            "enum": [
              "action",
              "state",
              "telemetry"
            ]
          },
          "channel": {
            "type": "string",
            "maxLength": 512,
            "minLength": 1
          },
          "agg": {
            "type": "string",
            "enum": [
              "max",
              "min",
              "mean",
              "std"
            ]
          },
          "op": {
            "type": "string",
            "enum": [
              "gt",
              "lt",
              "gte",
              "lte"
            ]
          },
          "threshold": {
            "type": "number"
          },
          "observed_value": {
            "type": "number"
          },
          "native_channel": {
            "type": "string",
            "maxLength": 512,
            "minLength": 1
          },
          "native_index": {
            "type": "integer",
            "maximum": 4294967295,
            "minimum": 0
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "predicate_index",
          "stream",
          "channel",
          "agg",
          "op",
          "threshold",
          "observed_value",
          "native_channel",
          "native_index"
        ],
        "title": "LakeChannelPredicateEvidenceModel"
      },
      "LakeEpisodeModel": {
        "properties": {
          "episode_id": {
            "type": "string",
            "format": "uuid"
          },
          "dataset_id": {
            "type": "string",
            "format": "uuid"
          },
          "dataset_name": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$"
          },
          "episode_index": {
            "type": "integer",
            "maximum": 4294967295,
            "minimum": 0
          },
          "task": {
            "maxLength": 262144,
            "type": [
              "string",
              "null"
            ]
          },
          "tier": {
            "nullable": true,
            "type": "string",
            "enum": [
              "retrainable",
              "analyze_only"
            ]
          },
          "frame_count": {
            "type": "integer",
            "maximum": 18446744073709552000,
            "minimum": 0
          },
          "duration_seconds": {
            "type": "number",
            "minimum": 0
          },
          "quality_score": {
            "maximum": 1,
            "minimum": 0,
            "type": [
              "number",
              "null"
            ]
          },
          "thumb_url": {
            "maxLength": 16384,
            "minLength": 1,
            "type": [
              "string",
              "null"
            ]
          },
          "thumb_last_url": {
            "maxLength": 16384,
            "minLength": 1,
            "type": [
              "string",
              "null"
            ]
          },
          "interface_hash": {
            "maxLength": 128,
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 512
          },
          "review_state": {
            "type": "string",
            "enum": [
              "unreviewed",
              "auto_accepted",
              "human_audited",
              "rejected"
            ]
          },
          "metrics": {
            "nullable": true,
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "type": "object",
            "maxProperties": 128
          },
          "dataset_version_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "parent_episode_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "parent_episode_index": {
            "maximum": 2147483647,
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "member_ordinal": {
            "maximum": 9223372036854776000,
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "episode_revision_id": {
            "pattern": "^[0-9a-f]{64}$",
            "type": [
              "string",
              "null"
            ]
          },
          "channel_predicate_evidence": {
            "items": {
              "$ref": "#/components/schemas/LakeChannelPredicateEvidenceModel"
            },
            "type": "array",
            "maxItems": 32
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "episode_id",
          "dataset_id",
          "dataset_name",
          "episode_index",
          "frame_count",
          "duration_seconds",
          "review_state",
          "channel_predicate_evidence"
        ],
        "title": "LakeEpisodeModel"
      },
      "LakeFacetCountModel": {
        "properties": {
          "value": {
            "type": "string",
            "maxLength": 2048
          },
          "count": {
            "type": "integer",
            "maximum": 18446744073709552000,
            "exclusiveMinimum": 0
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "value",
          "count"
        ],
        "title": "LakeFacetCountModel"
      },
      "LakeFacetsModel": {
        "properties": {
          "by_task": {
            "items": {
              "$ref": "#/components/schemas/LakeFacetCountModel"
            },
            "type": "array",
            "maxItems": 512
          },
          "by_tier": {
            "items": {
              "$ref": "#/components/schemas/LakeFacetCountModel"
            },
            "type": "array",
            "maxItems": 512
          },
          "by_interface_hash": {
            "items": {
              "$ref": "#/components/schemas/LakeFacetCountModel"
            },
            "type": "array",
            "maxItems": 512
          },
          "by_marker_signature": {
            "items": {
              "$ref": "#/components/schemas/LakeFacetCountModel"
            },
            "type": "array",
            "maxItems": 512
          },
          "by_task_total_values": {
            "type": "integer",
            "maximum": 18446744073709552000,
            "minimum": 0
          },
          "by_tier_total_values": {
            "type": "integer",
            "maximum": 18446744073709552000,
            "minimum": 0
          },
          "by_interface_hash_total_values": {
            "type": "integer",
            "maximum": 18446744073709552000,
            "minimum": 0
          },
          "by_marker_signature_total_values": {
            "type": "integer",
            "maximum": 18446744073709552000,
            "minimum": 0,
            "default": 0
          },
          "marker_signature_unknown": {
            "type": "integer",
            "maximum": 18446744073709552000,
            "minimum": 0,
            "default": 0
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "by_task",
          "by_tier",
          "by_interface_hash",
          "by_task_total_values",
          "by_tier_total_values",
          "by_interface_hash_total_values"
        ],
        "title": "LakeFacetsModel"
      },
      "LaunchField": {
        "properties": {
          "name": {
            "type": "string"
          },
          "type_name": {
            "type": "string"
          },
          "schema": {
            "additionalProperties": true,
            "type": "object"
          },
          "required": {
            "type": "boolean"
          },
          "default": {
            "nullable": true
          },
          "resolve": {
            "nullable": true,
            "additionalProperties": true,
            "type": "object"
          },
          "ui": {
            "additionalProperties": true,
            "type": "object"
          }
        },
        "type": "object",
        "required": [
          "name",
          "type_name",
          "required"
        ],
        "title": "LaunchField",
        "description": "One launch-form field of a template: an exposed port with its JSON\nschema, derived required-ness, and display metadata."
      },
      "LaunchableTemplate": {
        "properties": {
          "pipeline_template_id": {
            "type": "string",
            "format": "uuid"
          },
          "audience": {
            "type": "string",
            "enum": [
              "internal",
              "public"
            ],
            "default": "internal"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "launch_fields": {
            "items": {
              "$ref": "#/components/schemas/LaunchField"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "pipeline_template_id",
          "name",
          "launch_fields"
        ],
        "title": "LaunchableTemplate"
      },
      "LeftOut": {
        "properties": {
          "episode_id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "episode_id",
          "reason"
        ],
        "title": "LeftOut"
      },
      "ListDatasetCurationSuggestionsBody": {
        "properties": {
          "analysis_id": {
            "type": "string",
            "format": "uuid"
          },
          "page_size": {
            "type": "integer",
            "maximum": 500,
            "minimum": 1,
            "default": 100
          },
          "page_token": {
            "maxLength": 512,
            "minLength": 2,
            "pattern": "^[0-9a-f]+$",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "analysis_id"
        ],
        "title": "ListDatasetCurationSuggestionsBody"
      },
      "LookupBody": {
        "properties": {
          "name": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "content_hash": {
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "name",
          "path",
          "content_hash"
        ],
        "title": "LookupBody"
      },
      "ManifestTermBody": {
        "properties": {
          "blob_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "offset_in_blob": {
            "type": "integer",
            "minimum": 0
          },
          "length": {
            "type": "integer",
            "minimum": 1
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "blob_id",
          "offset_in_blob",
          "length"
        ],
        "title": "ManifestTermBody",
        "description": "One contiguous run of chunks inside one blob, named as a byte range.\n\nThe blob seal proves ``offset_in_blob`` is a dense prefix sum of length over\nthe directory ordinal, so a range of ordinals is exactly one range of bytes\nand the two spellings carry the same fact."
      },
      "MapItem": {
        "properties": {
          "item_id": {
            "type": "string",
            "format": "uuid",
            "description": "This attempt's id"
          },
          "ordinal": {
            "type": "integer",
            "description": "Position among the map's instances"
          },
          "attempt": {
            "type": "integer",
            "description": "1, then 2 for its first retry, …"
          },
          "item_indexes": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "description": "Indexes into the map's list"
          },
          "item_key": {
            "description": "The item's own key",
            "type": [
              "string",
              "null"
            ]
          },
          "path": {
            "type": "string",
            "description": "Readable id, e.g. check_each/[17]#2"
          },
          "status": {
            "type": "string",
            "description": "pending, running, completed, failed, cancelled, skipped"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "retryable": {
            "type": "boolean",
            "default": false
          },
          "credits_claimed": {
            "description": "Its share of the run's credit budget",
            "type": [
              "integer",
              "null"
            ]
          },
          "credits_spent": {
            "description": "Credits its ops reported spending",
            "type": [
              "number",
              "null"
            ]
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "ops": {
            "items": {
              "$ref": "#/components/schemas/MapItemOp"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "item_id",
          "ordinal",
          "attempt",
          "item_indexes",
          "path",
          "status"
        ],
        "title": "MapItem",
        "description": "One item of a map, or one chunk of items, and one attempt at it."
      },
      "MapItemCounts": {
        "properties": {
          "total": {
            "type": "integer",
            "default": 0
          },
          "pending": {
            "type": "integer",
            "default": 0
          },
          "running": {
            "type": "integer",
            "default": 0
          },
          "completed": {
            "type": "integer",
            "default": 0
          },
          "failed": {
            "type": "integer",
            "default": 0
          },
          "cancelled": {
            "type": "integer",
            "default": 0
          },
          "skipped": {
            "type": "integer",
            "default": 0
          }
        },
        "type": "object",
        "title": "MapItemCounts",
        "description": "How a map's items ended so far, by the status of their latest attempt."
      },
      "MapItemOp": {
        "properties": {
          "op_run_id": {
            "type": "string",
            "format": "uuid"
          },
          "node_id": {
            "type": "string"
          },
          "op_type": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "op_run_id",
          "node_id",
          "op_type",
          "status"
        ],
        "title": "MapItemOp",
        "description": "One op an item's attempt ran."
      },
      "MapItemsPage": {
        "properties": {
          "counts": {
            "$ref": "#/components/schemas/MapItemCounts"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/MapItem"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "counts",
          "items"
        ],
        "title": "MapItemsPage"
      },
      "MapProgress": {
        "properties": {
          "op_run_id": {
            "type": "string",
            "format": "uuid",
            "description": "The map's own op run (its row in ops)"
          },
          "node_id": {
            "type": "string",
            "description": "The map node in the template"
          },
          "counts": {
            "$ref": "#/components/schemas/MapItemCounts"
          }
        },
        "type": "object",
        "required": [
          "op_run_id",
          "node_id",
          "counts"
        ],
        "title": "MapProgress",
        "description": "A map node's progress: the op (op_type ``map``) it runs as, and its\nitems by status. Its items are paged from\n``GET /v1/runs/{job_id}/maps/{op_run_id}/items``."
      },
      "Member": {
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "type": "string",
            "enum": [
              "viewer",
              "contributor",
              "admin",
              "owner"
            ],
            "description": "Their effective role here"
          },
          "paths": {
            "items": {
              "$ref": "#/components/schemas/AccessPath"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "role"
        ],
        "title": "Member",
        "description": "A person with access to the space, their role and where it comes from."
      },
      "MemberList": {
        "properties": {
          "space": {
            "$ref": "#/components/schemas/SpaceRef"
          },
          "people": {
            "items": {
              "$ref": "#/components/schemas/Member"
            },
            "type": "array"
          },
          "can_manage_members": {
            "type": "boolean",
            "description": "The caller may change people here: for a key, its creator's role holds spaces:members and the key holds members:write",
            "default": false
          },
          "can_create_children": {
            "type": "boolean",
            "description": "The caller may create, rename and delete workspaces",
            "default": false
          },
          "my_role": {
            "description": "The caller's role here: the most they may grant",
            "nullable": true,
            "type": "string",
            "enum": [
              "viewer",
              "contributor",
              "admin",
              "owner"
            ]
          }
        },
        "type": "object",
        "required": [
          "space",
          "people"
        ],
        "title": "MemberList",
        "description": "Everyone with access to the organization or one workspace."
      },
      "ModelItem": {
        "properties": {
          "artifact_id": {
            "type": "string",
            "format": "uuid",
            "description": "Artifact ID"
          },
          "subtype": {
            "type": "string",
            "description": "Model subtype (vla_model, reward_model)"
          },
          "path": {
            "type": "string",
            "description": "HuggingFace or local model path"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "jobs": {
            "items": {
              "$ref": "#/components/schemas/JobLink"
            },
            "type": "array"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object",
        "required": [
          "artifact_id",
          "subtype",
          "path",
          "created_at",
          "updated_at"
        ],
        "title": "ModelItem"
      },
      "NumericPredicateBody": {
        "properties": {
          "field": {
            "type": "string",
            "enum": [
              "duration_s",
              "frame_count",
              "quality_score",
              "speed_mean",
              "jerk_mean",
              "frozen_action_dims",
              "action_dims",
              "frozen_state_dims",
              "state_dims",
              "sync_skew_max_ms",
              "sync_skew_ratio",
              "sparc",
              "ldlj",
              "psd_hf_ratio",
              "speed_p10",
              "speed_p50",
              "speed_p90",
              "pause_fraction",
              "pause_count",
              "dt_jitter_ms",
              "dt_dropped_frames"
            ]
          },
          "op": {
            "type": "string",
            "enum": [
              "gt",
              "lt",
              "gte",
              "lte"
            ]
          },
          "value": {
            "type": "number"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "field",
          "op",
          "value"
        ],
        "title": "NumericPredicateBody"
      },
      "Op": {
        "properties": {
          "name": {
            "type": "string",
            "description": "Op name (the op_type)"
          },
          "op_run_id": {
            "description": "Identity of this op instance",
            "type": [
              "string",
              "null"
            ]
          },
          "node_id": {
            "description": "Template node for this instance",
            "type": [
              "string",
              "null"
            ]
          },
          "label": {
            "description": "Human display label from the op's template",
            "type": [
              "string",
              "null"
            ]
          },
          "started_message": {
            "description": "Template copy for the started event (clients reuse it for live SSE lines so fetch and stream read identically)",
            "type": [
              "string",
              "null"
            ]
          },
          "completed_message": {
            "description": "Template copy for the completed event",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "description": "Op status: pending, queued, in_progress, completed, failed"
          },
          "started_at": {
            "description": "When the op started",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "completed_at": {
            "description": "When the op completed",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/OpEvent"
            },
            "type": "array",
            "description": "Events in this phase"
          },
          "error": {
            "description": "Error message if phase failed",
            "type": [
              "string",
              "null"
            ]
          },
          "failure_cause": {
            "description": "Who caused this op's failure: `user` (something you set or authored) or `platform` (ours). None when it did not fail.",
            "nullable": true,
            "type": "string",
            "enum": [
              "user",
              "platform"
            ]
          },
          "failure_subject": {
            "description": "What of yours caused it, when `user`",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "name",
          "status"
        ],
        "title": "Op",
        "description": "One pipeline op as rendered in the execution timeline (1:1 with op_runs);\n``name`` is the op_type, ``label`` its template display name. Two nodes\nmay run the same op_type; ``op_run_id`` identifies each instance."
      },
      "OpEvent": {
        "properties": {
          "status": {
            "description": "Event status: started, completed, failed",
            "type": [
              "string",
              "null"
            ]
          },
          "message": {
            "description": "Event message",
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "description": "Error details if failed",
            "type": [
              "string",
              "null"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Event timestamp"
          },
          "retry_attempt": {
            "type": "integer",
            "description": "Retry attempt number",
            "default": 0
          },
          "data": {
            "description": "Additional event data",
            "nullable": true,
            "additionalProperties": true,
            "type": "object"
          }
        },
        "type": "object",
        "required": [
          "status",
          "timestamp"
        ],
        "title": "OpEvent",
        "description": "A single event within a phase."
      },
      "PageInfo": {
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Whether more items exist after this page"
          },
          "end_cursor": {
            "description": "Cursor for the next page",
            "type": [
              "string",
              "null"
            ]
          },
          "total_count": {
            "description": "Total matching items",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "has_next"
        ],
        "title": "PageInfo"
      },
      "PaginatedDatasetsResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/DatasetItem"
            },
            "type": "array"
          },
          "page_info": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "type": "object",
        "required": [
          "page_info"
        ],
        "title": "PaginatedDatasetsResponse"
      },
      "PaginatedJobsResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/JobItem"
            },
            "type": "array"
          },
          "page_info": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "type": "object",
        "required": [
          "page_info"
        ],
        "title": "PaginatedJobsResponse"
      },
      "PaginatedModelsResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ModelItem"
            },
            "type": "array"
          },
          "page_info": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "type": "object",
        "required": [
          "page_info"
        ],
        "title": "PaginatedModelsResponse"
      },
      "PaginatedProjectsResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ProjectItem"
            },
            "type": "array"
          },
          "page_info": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "type": "object",
        "required": [
          "page_info"
        ],
        "title": "PaginatedProjectsResponse"
      },
      "PartnerExportCounts": {
        "properties": {
          "selected": {
            "type": "integer",
            "default": 0
          },
          "finalized": {
            "type": "integer",
            "default": 0
          },
          "skipped": {
            "type": "integer",
            "default": 0
          },
          "failed": {
            "type": "integer",
            "default": 0
          },
          "pending": {
            "type": "integer",
            "default": 0
          }
        },
        "type": "object",
        "title": "PartnerExportCounts"
      },
      "PartnerExportEpisode": {
        "properties": {
          "episode_id": {
            "type": "string"
          },
          "partner_episode_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": "string"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "finalized_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "episode_id",
          "state"
        ],
        "title": "PartnerExportEpisode"
      },
      "PartnerExportEpisodePage": {
        "properties": {
          "episodes": {
            "items": {
              "$ref": "#/components/schemas/PartnerExportEpisode"
            },
            "type": "array"
          },
          "next_page_token": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "episodes"
        ],
        "title": "PartnerExportEpisodePage"
      },
      "PartnerExportList": {
        "properties": {
          "exports": {
            "items": {
              "$ref": "#/components/schemas/PartnerExportResponse"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "exports"
        ],
        "title": "PartnerExportList"
      },
      "PartnerExportPreview": {
        "properties": {
          "target": {
            "type": "string",
            "enum": [
              "pi",
              "dreamlabs"
            ]
          },
          "key": {
            "$ref": "#/components/schemas/PartnerKeyStatus"
          },
          "contract": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/PreviewContract"
              }
            ]
          },
          "embodiment": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/PreviewEmbodiment"
              }
            ]
          },
          "counts": {
            "$ref": "#/components/schemas/PreviewCounts"
          },
          "left_out": {
            "items": {
              "$ref": "#/components/schemas/LeftOut"
            },
            "type": "array"
          },
          "findings": {
            "items": {
              "$ref": "#/components/schemas/PreviewFinding"
            },
            "type": "array"
          },
          "blocked": {
            "type": "boolean"
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": [
          "target",
          "key",
          "counts",
          "left_out",
          "findings",
          "blocked",
          "truncated"
        ],
        "title": "PartnerExportPreview"
      },
      "PartnerExportResponse": {
        "properties": {
          "id": {
            "type": "string"
          },
          "target": {
            "type": "string",
            "enum": [
              "pi",
              "dreamlabs"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "processing",
              "succeeded",
              "failed"
            ]
          },
          "partner_status": {
            "nullable": true,
            "type": "string",
            "enum": [
              "ready_to_process",
              "processing",
              "processed",
              "failed"
            ]
          },
          "partner_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "embodiment_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "send_status": {
            "nullable": true,
            "type": "string",
            "enum": [
              "processing",
              "succeeded",
              "failed"
            ]
          },
          "last_resync_error": {
            "type": [
              "string",
              "null"
            ]
          },
          "counts": {
            "$ref": "#/components/schemas/PartnerExportCounts"
          },
          "labels_changed": {
            "type": "integer",
            "default": 0
          },
          "run_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "target",
          "status",
          "counts"
        ],
        "title": "PartnerExportResponse"
      },
      "PartnerKeyStatus": {
        "properties": {
          "connected": {
            "type": "boolean"
          },
          "masked": {
            "type": [
              "string",
              "null"
            ]
          },
          "secret_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "connected"
        ],
        "title": "PartnerKeyStatus"
      },
      "Person": {
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "username": {
            "type": [
              "string",
              "null"
            ]
          },
          "member": {
            "type": "boolean",
            "description": "A member of the organization; false for a guest",
            "default": false
          },
          "spaces": {
            "items": {
              "$ref": "#/components/schemas/PersonSpace"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "spaces"
        ],
        "title": "Person",
        "description": "One person's access across the organization: every space the caller reads."
      },
      "PersonSpace": {
        "properties": {
          "space_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "organization",
              "workspace"
            ]
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "icon": {
            "description": "A workspace's icon; null for none",
            "type": [
              "string",
              "null"
            ]
          },
          "parent_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "description": "Their effective role here",
            "nullable": true,
            "type": "string",
            "enum": [
              "viewer",
              "contributor",
              "admin",
              "owner"
            ]
          },
          "source": {
            "description": "organization or workspace",
            "type": [
              "string",
              "null"
            ]
          },
          "direct": {
            "description": "The role granted on this space itself, if any",
            "nullable": true,
            "type": "string",
            "enum": [
              "viewer",
              "contributor",
              "admin",
              "owner"
            ]
          },
          "paths": {
            "items": {
              "$ref": "#/components/schemas/AccessPath"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "space_id",
          "kind",
          "name"
        ],
        "title": "PersonSpace",
        "description": "One space of a person's access across the organization."
      },
      "PinVersionBody": {
        "properties": {
          "def_id": {
            "type": "string",
            "format": "uuid"
          },
          "note": {
            "type": "string",
            "maxLength": 4096,
            "default": ""
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "def_id"
        ],
        "title": "PinVersionBody",
        "description": "Freeze a definition's current result as its next immutable version.\n\nThere is deliberately no quality filter here. A pin freezes what the\nquery selects, so it can never quietly drop episodes the author picked;\ndropping flagged work is curation's job, which mints its own version\nfrom a sealed analysis. Closed to extras, so a client still sending the\nretired ``exclude_flagged`` is refused rather than silently pinning\neverything under a name that promises otherwise."
      },
      "PortResolverInfo": {
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "PortResolverInfo"
      },
      "PrepareUploadBatchBody": {
        "properties": {
          "blobs": {
            "items": {
              "$ref": "#/components/schemas/PrepareUploadObjectBody"
            },
            "type": "array",
            "minItems": 1
          },
          "ttl_seconds": {
            "type": "integer",
            "maximum": 3600,
            "minimum": 60,
            "default": 300
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "blobs"
        ],
        "title": "PrepareUploadBatchBody"
      },
      "PrepareUploadBody": {
        "properties": {
          "blob_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "envelope_sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "content_length": {
            "type": "integer",
            "minimum": 1
          },
          "ttl_seconds": {
            "type": "integer",
            "maximum": 3600,
            "minimum": 60,
            "default": 300
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "blob_id",
          "envelope_sha256",
          "content_length"
        ],
        "title": "PrepareUploadBody"
      },
      "PrepareUploadObjectBody": {
        "properties": {
          "blob_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "envelope_sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "content_length": {
            "type": "integer",
            "minimum": 1
          },
          "resume_staging_id": {
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "blob_id",
          "envelope_sha256",
          "content_length"
        ],
        "title": "PrepareUploadObjectBody"
      },
      "PresignByHashBody": {
        "properties": {
          "name": {
            "type": "string"
          },
          "content_hash": {
            "type": "string"
          },
          "path": {
            "type": "string",
            "default": ""
          },
          "ttl_seconds": {
            "type": "integer",
            "default": 300
          }
        },
        "type": "object",
        "required": [
          "name",
          "content_hash"
        ],
        "title": "PresignByHashBody"
      },
      "PreviewContract": {
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "topics": {
            "items": {
              "$ref": "#/components/schemas/PreviewTopic"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "name",
          "description",
          "topics"
        ],
        "title": "PreviewContract"
      },
      "PreviewCounts": {
        "properties": {
          "total": {
            "type": "integer"
          },
          "selected": {
            "type": "integer"
          },
          "success": {
            "type": "integer"
          },
          "failure": {
            "type": "integer"
          },
          "partial": {
            "type": "integer"
          },
          "unlabelled": {
            "type": "integer"
          },
          "rejected": {
            "type": "integer"
          }
        },
        "type": "object",
        "required": [
          "total",
          "selected",
          "success",
          "failure",
          "partial",
          "unlabelled",
          "rejected"
        ],
        "title": "PreviewCounts"
      },
      "PreviewEmbodiment": {
        "properties": {
          "name": {
            "type": "string"
          },
          "config": {
            "additionalProperties": true,
            "type": "object"
          }
        },
        "type": "object",
        "required": [
          "name",
          "config"
        ],
        "title": "PreviewEmbodiment"
      },
      "PreviewFinding": {
        "properties": {
          "level": {
            "type": "string",
            "enum": [
              "blocker",
              "warning"
            ]
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "episode_ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "level",
          "code",
          "message"
        ],
        "title": "PreviewFinding"
      },
      "PreviewTopic": {
        "properties": {
          "topic": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "schema_name": {
            "type": "string"
          },
          "shape": {
            "nullable": true,
            "items": {
              "type": "integer"
            },
            "type": "array"
          },
          "dtype": {
            "type": [
              "string",
              "null"
            ]
          },
          "expected_frequency_hz": {
            "type": "number"
          },
          "frequency_tolerance": {
            "type": "number"
          }
        },
        "type": "object",
        "required": [
          "topic",
          "role",
          "schema_name",
          "expected_frequency_hz",
          "frequency_tolerance"
        ],
        "title": "PreviewTopic"
      },
      "Project": {
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "Project ID"
          },
          "name": {
            "type": "string",
            "description": "Project name"
          },
          "description": {
            "description": "Project description",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp"
          },
          "jobs": {
            "items": {
              "$ref": "#/components/schemas/Job"
            },
            "type": "array",
            "description": "Jobs in this project"
          }
        },
        "type": "object",
        "required": [
          "project_id",
          "name",
          "created_at"
        ],
        "title": "Project",
        "description": "Project summary for list response"
      },
      "ProjectCreateRequest": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "description": "Project name"
          },
          "description": {
            "description": "Project description",
            "maxLength": 1000,
            "type": [
              "string",
              "null"
            ]
          },
          "account_id": {
            "description": "Account to create the project in (the dashboard's active account). Falls back to the caller's personal account; platform verifies membership.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ProjectCreateRequest",
        "description": "Request to create a new project"
      },
      "ProjectCreateResponse": {
        "properties": {
          "created": {
            "type": "boolean",
            "description": "Whether the project was created"
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the created project"
          }
        },
        "type": "object",
        "required": [
          "created",
          "project_id"
        ],
        "title": "ProjectCreateResponse",
        "description": "Response for project creation"
      },
      "ProjectDeleteResponse": {
        "properties": {
          "deleted": {
            "type": "boolean",
            "description": "Whether the project was deleted"
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the deleted project"
          }
        },
        "type": "object",
        "required": [
          "deleted",
          "project_id"
        ],
        "title": "ProjectDeleteResponse",
        "description": "Response for project deletion"
      },
      "ProjectItem": {
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "is_default": {
            "type": "boolean",
            "description": "The organization's default workspace; it cannot be deleted",
            "default": false
          },
          "icon": {
            "description": "Its icon, a name from the dashboard's set; null for none",
            "type": [
              "string",
              "null"
            ]
          },
          "my_role": {
            "description": "The caller's role there (for an API key, its creator's; the key's scopes cap what it may do with it); null when it could not be read",
            "nullable": true,
            "type": "string",
            "enum": [
              "viewer",
              "contributor",
              "admin",
              "owner"
            ]
          }
        },
        "type": "object",
        "required": [
          "project_id",
          "name",
          "created_at",
          "updated_at"
        ],
        "title": "ProjectItem",
        "description": "A workspace (a project), as the dashboard's workspace pages show it."
      },
      "ProjectUpdateRequest": {
        "properties": {
          "name": {
            "description": "The new name",
            "maxLength": 255,
            "minLength": 1,
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "The new description; null clears it",
            "maxLength": 1000,
            "type": [
              "string",
              "null"
            ]
          },
          "icon": {
            "description": "An icon name from the dashboard's set; null for none",
            "pattern": "^[a-z][a-z0-9-]{0,39}$",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ProjectUpdateRequest",
        "description": "What ``PATCH /v1/projects/{project_id}`` changes: only the fields sent."
      },
      "ProjectsListResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Project"
            },
            "type": "array",
            "description": "List of projects"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "ProjectsListResponse",
        "description": "Response containing list of projects"
      },
      "PublicModelIdentity": {
        "properties": {
          "hub_id": {
            "type": "string",
            "maxLength": 193,
            "minLength": 3
          },
          "revision": {
            "type": "string",
            "pattern": "^[0-9a-f]{40}$"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "hub_id",
          "revision"
        ],
        "title": "PublicModelIdentity",
        "description": "Immutable external model identity safe to return to clients."
      },
      "PublicationExpectedHeadModel": {
        "properties": {
          "generation": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "git_hash_algorithm": {
            "type": "string",
            "enum": [
              "sha1",
              "sha256"
            ]
          },
          "git_oid": {
            "type": "string",
            "pattern": "^[0-9a-f]+$"
          },
          "commit_id": {
            "type": "string",
            "format": "uuid"
          },
          "pack_digest": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "generation",
          "git_hash_algorithm",
          "git_oid",
          "commit_id",
          "pack_digest"
        ],
        "title": "PublicationExpectedHeadModel",
        "description": "Exact paired Git/lakehouse head used as a mutation fence."
      },
      "RedeemVoucherRequest": {
        "properties": {
          "code": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "description": "The voucher code to redeem"
          }
        },
        "type": "object",
        "required": [
          "code"
        ],
        "title": "RedeemVoucherRequest",
        "description": "A voucher code, as the billing page takes it."
      },
      "RegisterContentManifestBody": {
        "properties": {
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "file_format": {
            "type": "string",
            "default": "generic"
          },
          "terms": {
            "items": {
              "$ref": "#/components/schemas/ManifestTermBody"
            },
            "type": "array",
            "minItems": 1
          },
          "expected_raw_blake3": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "expected_raw_sha256": {
            "type": "string",
            "pattern": "^(?:|[0-9a-f]{64})$",
            "default": ""
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "repo_id",
          "name",
          "terms",
          "expected_raw_blake3"
        ],
        "title": "RegisterContentManifestBody",
        "description": "One file's terms, registered as a durable ManifestID (git-filter clean).\n\nDeliberately NOT a publication: `git add` needs a manifest identity to\nwrite into its LFS pointer long before a commit exists, and paying for a\nwhole-tree operation per staged file is what the v4 filter did wrong."
      },
      "ResolveRequest": {
        "properties": {
          "pipeline_template_id": {
            "type": "string",
            "format": "uuid"
          },
          "field": {
            "type": "string"
          },
          "values": {
            "additionalProperties": true,
            "type": "object"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "pipeline_template_id",
          "field"
        ],
        "title": "ResolveRequest"
      },
      "ResolveResponse": {
        "properties": {
          "field": {
            "type": "string"
          },
          "default": {
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "field"
        ],
        "title": "ResolveResponse"
      },
      "RetiredTemplate": {
        "properties": {
          "pipeline_template_id": {
            "type": "string",
            "format": "uuid"
          },
          "retired": {
            "type": "boolean",
            "const": true,
            "default": true
          }
        },
        "type": "object",
        "required": [
          "pipeline_template_id"
        ],
        "title": "RetiredTemplate"
      },
      "RoleChange": {
        "properties": {
          "space_id": {
            "type": "string",
            "format": "uuid",
            "description": "The space the role is on"
          },
          "kind": {
            "type": "string",
            "enum": [
              "organization",
              "workspace"
            ]
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "root_id": {
            "description": "Its organization",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "parent_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "user": {
            "$ref": "#/components/schemas/GrantSubject"
          },
          "role": {
            "description": "The role granted here now; null once removed",
            "nullable": true,
            "type": "string",
            "enum": [
              "viewer",
              "contributor",
              "admin",
              "owner"
            ]
          },
          "from": {
            "description": "The role granted here before",
            "nullable": true,
            "type": "string",
            "enum": [
              "viewer",
              "contributor",
              "admin",
              "owner"
            ]
          },
          "changed": {
            "type": "boolean",
            "description": "False when the role was already that"
          },
          "effective": {
            "description": "The role they hold here now, inherited or not; null when they hold none",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/EffectiveRole"
              }
            ]
          },
          "kept": {
            "description": "Removed from the organization: the workspaces they stay a guest of",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/KeptWorkspace"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "space_id",
          "kind",
          "name",
          "user",
          "changed"
        ],
        "title": "RoleChange",
        "description": "What setting or removing a role did."
      },
      "RoleRequest": {
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "viewer",
              "contributor",
              "admin",
              "owner"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "role"
        ],
        "title": "RoleRequest",
        "description": "``PUT /v1/members/{user_id}``: give a person a role (on the workspace\nthe query's ``project_id`` names, else on the organization)."
      },
      "RunEstimateRequest": {
        "properties": {
          "pipeline_template_id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "values": {
            "additionalProperties": true,
            "type": "object"
          },
          "name": {
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "max_cost": {
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "sample_cap": {
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "pipeline_template_id",
          "project_id"
        ],
        "title": "RunEstimateRequest"
      },
      "RunEstimateResponse": {
        "properties": {
          "credits": {
            "type": "integer"
          },
          "max_cost": {
            "type": [
              "integer",
              "null"
            ]
          },
          "sample_cap": {
            "type": [
              "integer",
              "null"
            ]
          },
          "fits": {
            "type": "boolean"
          },
          "pricing_revision": {
            "type": "string"
          },
          "quote_digest": {
            "type": "string"
          },
          "nodes": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object"
          }
        },
        "type": "object",
        "required": [
          "credits",
          "fits",
          "pricing_revision",
          "quote_digest"
        ],
        "title": "RunEstimateResponse",
        "description": "The most a run may cost, reserved in full at submit; usage is charged\nand the rest refunded when it ends. Never the final charge."
      },
      "RunSubmitRequest": {
        "properties": {
          "pipeline_template_id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "values": {
            "additionalProperties": true,
            "type": "object"
          },
          "name": {
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "max_cost": {
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "sample_cap": {
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "idempotency_key": {
            "maxLength": 200,
            "minLength": 1,
            "type": [
              "string",
              "null"
            ]
          },
          "quote_digest": {
            "pattern": "^[0-9a-f]{64}$",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "pipeline_template_id",
          "project_id"
        ],
        "title": "RunSubmitRequest"
      },
      "RunSubmitResponse": {
        "properties": {
          "job_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "audience": {
            "nullable": true,
            "type": "string",
            "enum": [
              "internal",
              "public"
            ]
          }
        },
        "type": "object",
        "required": [
          "job_id",
          "status",
          "message"
        ],
        "title": "RunSubmitResponse"
      },
      "SavedQueryBody": {
        "properties": {
          "dataset_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "maxItems": 4096
          },
          "task": {
            "type": [
              "string",
              "null"
            ]
          },
          "tier": {
            "nullable": true,
            "type": "string",
            "enum": [
              "",
              "retrainable",
              "analyze_only"
            ]
          },
          "min_duration_s": {
            "type": [
              "number",
              "null"
            ]
          },
          "max_duration_s": {
            "type": [
              "number",
              "null"
            ]
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 512
          },
          "review_state": {
            "nullable": true,
            "type": "string",
            "enum": [
              "",
              "unreviewed",
              "auto_accepted",
              "human_audited",
              "rejected"
            ]
          },
          "search": {
            "type": [
              "string",
              "null"
            ]
          },
          "numeric_predicates": {
            "items": {
              "$ref": "#/components/schemas/NumericPredicateBody"
            },
            "type": "array",
            "maxItems": 32
          },
          "predicates": {
            "items": {
              "$ref": "#/components/schemas/ChannelPredicateBody"
            },
            "type": "array",
            "maxItems": 32
          },
          "episodes": {
            "items": {
              "$ref": "#/components/schemas/SavedQueryEpisodeBody"
            },
            "type": "array",
            "maxItems": 10000
          },
          "query_text": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "SavedQueryBody",
        "description": "A dataset IS this query.\n\nClosed and fully typed on purpose. The query travels to QDS as opaque\nJSON, so this model is the only place its shape is checked — an\nunmodelled key would be stored or dropped in silence and the definition\nwould then resolve to a different set of episodes than the one the user\nbuilt. Predicates reuse the explore bodies so a definition can only hold\na filter the resolver can actually evaluate.\n\nQuality is not expressible here: no status/flag facet exists, because\nselection is intent. Every episode a user picked belongs to the dataset,\nflagged ones included."
      },
      "SavedQueryEpisodeBody": {
        "properties": {
          "dataset_id": {
            "type": "string",
            "format": "uuid"
          },
          "episode_index": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "dataset_id",
          "episode_index"
        ],
        "title": "SavedQueryEpisodeBody",
        "description": "One hand-picked member, keyed the way the server keys membership:\n(source dataset, episode index) — not an episode-row uuid."
      },
      "SourceRetireResponse": {
        "properties": {
          "retired": {
            "type": "boolean",
            "description": "False when the source was already retired; the call is idempotent"
          },
          "dataset_name": {
            "type": "string",
            "description": "Name the source had at retirement"
          },
          "episodes_hidden": {
            "type": "integer",
            "minimum": 0,
            "description": "Episodes that left the lake with it"
          },
          "dataset_defs_retired": {
            "type": "integer",
            "minimum": 0,
            "description": "Source-bound dataset definitions retired alongside it"
          },
          "pinned_versions_retained": {
            "type": "integer",
            "minimum": 0,
            "description": "Pinned DatasetVersions that still resolve through this source. Retirement is a tombstone, so these keep working and no bytes are freed."
          }
        },
        "type": "object",
        "required": [
          "retired",
          "dataset_name",
          "episodes_hidden",
          "dataset_defs_retired",
          "pinned_versions_retained"
        ],
        "title": "SourceRetireResponse",
        "description": "Result of retiring a source."
      },
      "SpaceRef": {
        "properties": {
          "space_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "organization",
              "workspace"
            ]
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "icon": {
            "description": "A workspace's icon; null for none",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "space_id",
          "kind",
          "name"
        ],
        "title": "SpaceRef",
        "description": "Enough of a space to name it."
      },
      "StagedUploadBody": {
        "properties": {
          "staging_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
          },
          "blob_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "content_length": {
            "type": "integer",
            "minimum": 1
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "staging_id",
          "blob_id",
          "content_length"
        ],
        "title": "StagedUploadBody"
      },
      "StartDatasetCurationAnalysisBody": {
        "properties": {
          "idempotency_key": {
            "type": "string",
            "format": "uuid"
          },
          "base_version_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "maxItems": 32,
            "minItems": 1
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "idempotency_key",
          "base_version_ids"
        ],
        "title": "StartDatasetCurationAnalysisBody"
      },
      "StartDatasetCurationPublicationBody": {
        "properties": {
          "idempotency_key": {
            "type": "string",
            "format": "uuid"
          },
          "analysis_id": {
            "type": "string",
            "format": "uuid"
          },
          "selection_digest": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "audit_repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "expected": {
            "$ref": "#/components/schemas/PublicationExpectedHeadModel"
          },
          "definition_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string",
            "pattern": "^(?:[A-Za-z0-9][A-Za-z0-9._-]{0,127})?$",
            "default": ""
          },
          "description": {
            "type": "string",
            "maxLength": 4096,
            "default": ""
          },
          "note": {
            "type": "string",
            "maxLength": 4096,
            "default": ""
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "idempotency_key",
          "analysis_id",
          "selection_digest",
          "audit_repo_id",
          "expected"
        ],
        "title": "StartDatasetCurationPublicationBody",
        "description": "Cold publication launch; the response is always a durable operation."
      },
      "StartPartnerExportRequest": {
        "properties": {
          "target": {
            "type": "string",
            "enum": [
              "pi",
              "dreamlabs"
            ]
          },
          "include_unsuccessful": {
            "type": "boolean",
            "default": false
          },
          "cameras": {
            "nullable": true,
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 16,
            "minItems": 1
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "target"
        ],
        "title": "StartPartnerExportRequest"
      },
      "TemplateOutput": {
        "properties": {
          "name": {
            "type": "string"
          },
          "from": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "description": "{node, port}"
          }
        },
        "type": "object",
        "required": [
          "name",
          "from"
        ],
        "title": "TemplateOutput",
        "description": "A port a run of the template answers with, read from one node."
      },
      "TemplateSource": {
        "properties": {
          "source": {
            "type": "string",
            "maxLength": 65536,
            "description": "The TOML file: name, description, nodes, edges, outputs"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "source"
        ],
        "title": "TemplateSource",
        "description": "A template file, as it is kept in the workspace's repository."
      },
      "TemplateValidation": {
        "properties": {
          "valid": {
            "type": "boolean"
          },
          "errors": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "launch_fields": {
            "items": {
              "$ref": "#/components/schemas/LaunchField"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "valid"
        ],
        "title": "TemplateValidation"
      },
      "TemplateVersion": {
        "properties": {
          "pipeline_template_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          },
          "description": {
            "description": "The template's current description; a version holds its graph and outputs",
            "type": [
              "string",
              "null"
            ]
          },
          "graph": {
            "additionalProperties": true,
            "type": "object"
          },
          "outputs": {
            "items": {
              "$ref": "#/components/schemas/TemplateOutput"
            },
            "type": "array"
          },
          "retired": {
            "type": "boolean"
          }
        },
        "type": "object",
        "required": [
          "pipeline_template_id",
          "name",
          "version",
          "graph",
          "retired"
        ],
        "title": "TemplateVersion",
        "description": "One immutable version of a template, its graph as it was then."
      },
      "TemplateVersionEntry": {
        "properties": {
          "version": {
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "version"
        ],
        "title": "TemplateVersionEntry"
      },
      "TransferDecision": {
        "properties": {
          "allowed": {
            "type": "boolean"
          },
          "reason": {
            "description": "Why it is refused; the code clients key on",
            "nullable": true,
            "type": "string",
            "enum": [
              "source_read",
              "take_out_workspace",
              "take_out_org",
              "take_out_private",
              "target_add",
              "move_across_orgs",
              "move_same_workspace",
              "key_restricted",
              "key_one_org"
            ]
          },
          "message": {
            "description": "The refusal in plain words",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "allowed"
        ],
        "title": "TransferDecision",
        "description": "Whether one kind of transfer is allowed, and why not."
      },
      "TransferSource": {
        "properties": {
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspace_name": {
            "type": "string"
          },
          "org_id": {
            "type": "string",
            "format": "uuid"
          },
          "org_name": {
            "type": "string"
          },
          "my_role": {
            "description": "The caller's role there",
            "nullable": true,
            "type": "string",
            "enum": [
              "viewer",
              "contributor",
              "admin",
              "owner"
            ]
          }
        },
        "type": "object",
        "required": [
          "workspace_id",
          "workspace_name",
          "org_id",
          "org_name"
        ],
        "title": "TransferSource",
        "description": "The workspace the dataset is in."
      },
      "TransferTarget": {
        "properties": {
          "org_id": {
            "type": "string",
            "format": "uuid"
          },
          "org_name": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspace_name": {
            "type": "string"
          },
          "is_private": {
            "type": "boolean"
          },
          "is_source": {
            "type": "boolean",
            "description": "The source itself: a copy duplicates, a move is refused"
          },
          "my_role": {
            "description": "The caller's role there; a personal key's in another organization is its creator's",
            "nullable": true,
            "type": "string",
            "enum": [
              "viewer",
              "contributor",
              "admin",
              "owner"
            ]
          },
          "copy": {
            "$ref": "#/components/schemas/TransferDecision"
          },
          "move": {
            "$ref": "#/components/schemas/TransferDecision"
          }
        },
        "type": "object",
        "required": [
          "org_id",
          "org_name",
          "workspace_id",
          "workspace_name",
          "is_private",
          "is_source",
          "copy",
          "move"
        ],
        "title": "TransferTarget",
        "description": "One workspace the caller can read, with what they may do there."
      },
      "TransferTargetsResponse": {
        "properties": {
          "source": {
            "$ref": "#/components/schemas/TransferSource"
          },
          "targets": {
            "items": {
              "$ref": "#/components/schemas/TransferTarget"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "source",
          "targets"
        ],
        "title": "TransferTargetsResponse",
        "description": "Every workspace the caller could copy or move a dataset of the source\nto: the source's organization first, then by organization and workspace\nname."
      },
      "UploadBeginBody": {
        "properties": {
          "name": {
            "type": "string"
          },
          "merge_target": {
            "type": [
              "string",
              "null"
            ]
          },
          "merge_intent_action_needed": {
            "maxLength": 2048,
            "type": [
              "string",
              "null"
            ]
          },
          "source_format": {
            "type": [
              "string",
              "null"
            ]
          },
          "upload_protocol": {
            "type": "integer",
            "default": 1
          },
          "ingest_toml": {
            "maxLength": 65536,
            "minLength": 1,
            "type": [
              "string",
              "null"
            ]
          },
          "rig": {
            "maxLength": 256,
            "minLength": 1,
            "type": [
              "string",
              "null"
            ]
          },
          "transfer_session_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "UploadBeginBody"
      },
      "UploadHeartbeatBody": {
        "properties": {
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "session_id": {
            "type": "string",
            "format": "uuid"
          },
          "sequence": {
            "type": "integer",
            "minimum": 1
          },
          "total_files": {
            "type": "integer",
            "minimum": 0,
            "default": 0
          },
          "total_bytes": {
            "type": "integer",
            "minimum": 0,
            "default": 0
          },
          "transferred_bytes": {
            "type": "integer",
            "minimum": 0,
            "default": 0
          },
          "uploaded_bytes": {
            "type": "integer",
            "minimum": 0,
            "default": 0
          },
          "staged_files": {
            "type": "integer",
            "minimum": 0,
            "default": 0
          },
          "done": {
            "type": "boolean",
            "default": false
          },
          "failed": {
            "type": "boolean",
            "default": false
          },
          "failure_reason": {
            "type": "string",
            "maxLength": 500,
            "default": ""
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "repo_id",
          "session_id",
          "sequence"
        ],
        "title": "UploadHeartbeatBody"
      },
      "UploadHeartbeatResponse": {
        "properties": {
          "cancelled": {
            "type": "boolean",
            "default": false
          }
        },
        "type": "object",
        "title": "UploadHeartbeatResponse"
      },
      "UploadOperationModel": {
        "properties": {
          "repo_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "phase": {
            "type": "string"
          },
          "staging_manifests": {
            "type": "integer"
          },
          "staged_bytes": {
            "type": "integer"
          },
          "logical_bytes": {
            "type": "integer"
          },
          "updated_at_unix": {
            "type": "integer"
          },
          "transferred_bytes": {
            "type": [
              "integer",
              "null"
            ]
          },
          "uploaded_bytes": {
            "type": [
              "integer",
              "null"
            ]
          },
          "total_files": {
            "type": [
              "integer",
              "null"
            ]
          },
          "staged_files": {
            "type": [
              "integer",
              "null"
            ]
          },
          "message": {
            "type": "string",
            "default": ""
          },
          "progress": {
            "nullable": true,
            "additionalProperties": true,
            "type": "object"
          },
          "phase_history": {
            "nullable": true,
            "additionalProperties": true,
            "type": "object"
          },
          "ingest_report": {
            "nullable": true,
            "additionalProperties": true,
            "type": "object"
          },
          "failure_retryable": {
            "type": "boolean",
            "default": false
          },
          "dataset_id": {
            "type": "string",
            "default": ""
          },
          "dataset_version_id": {
            "type": "string",
            "default": ""
          },
          "generation": {
            "type": "integer",
            "default": 0
          },
          "episode_count": {
            "type": "integer",
            "default": 0
          },
          "total_frames": {
            "type": "integer",
            "default": 0
          },
          "terminal_cause": {
            "type": "string",
            "default": ""
          },
          "ingest_verdict": {
            "type": "string",
            "default": ""
          },
          "verdict_reason": {
            "type": "string",
            "default": ""
          },
          "cancellable": {
            "type": "boolean",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "repo_id",
          "name",
          "phase",
          "staging_manifests",
          "staged_bytes",
          "logical_bytes",
          "updated_at_unix"
        ],
        "title": "UploadOperationModel"
      },
      "UploadOperationsResponse": {
        "properties": {
          "uploads": {
            "items": {
              "$ref": "#/components/schemas/UploadOperationModel"
            },
            "type": "array"
          }
        },
        "type": "object",
        "required": [
          "uploads"
        ],
        "title": "UploadOperationsResponse"
      },
      "UploadVerificationManifestBody": {
        "properties": {
          "file_format": {
            "type": "string",
            "default": "generic"
          },
          "terms": {
            "items": {
              "$ref": "#/components/schemas/ManifestTermBody"
            },
            "type": "array",
            "minItems": 1
          },
          "expected_raw_blake3": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "expected_raw_sha256": {
            "type": "string",
            "pattern": "^(?:|[0-9a-f]{64})$",
            "default": ""
          },
          "path": {
            "type": "string",
            "maxLength": 4096,
            "minLength": 1
          },
          "mode": {
            "type": "integer",
            "enum": [
              33188,
              33261
            ]
          },
          "expected_manifest_id": {
            "type": "string",
            "pattern": "^(?:|[0-9a-f]{64})$",
            "default": ""
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "terms",
          "expected_raw_blake3",
          "path",
          "mode"
        ],
        "title": "UploadVerificationManifestBody"
      },
      "VLAType": {
        "type": "string",
        "enum": [
          "act",
          "pi05"
        ],
        "title": "VLAType",
        "description": "VLA model types a new finetune can use."
      },
      "VLATypeInfo": {
        "properties": {
          "id": {
            "type": "string",
            "description": "VLA type ID (use this as vla_type when creating finetune jobs)"
          },
          "name": {
            "type": "string",
            "description": "Display name"
          },
          "description": {
            "type": "string",
            "description": "Model description"
          },
          "base_model_id": {
            "description": "Default HuggingFace model ID for this VLA type. None for models that don't support custom base models (act).",
            "type": [
              "string",
              "null"
            ]
          },
          "base_model_revision": {
            "description": "Reviewed immutable commit used for the built-in base-model alias. None for models trained from scratch.",
            "pattern": "^[0-9a-f]{40}$",
            "type": [
              "string",
              "null"
            ]
          },
          "camera_slots": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "description": "Camera slot names that must be mapped when creating a finetune job"
          },
          "supports_custom_model": {
            "type": "boolean",
            "description": "Whether this VLA type supports passing a custom model_id. If false, model_id must not be provided.",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "camera_slots"
        ],
        "title": "VLATypeInfo",
        "description": "Information about an available VLA model type"
      },
      "VLATypesListResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/VLATypeInfo"
            },
            "type": "array",
            "description": "List of available VLA model types"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "VLATypesListResponse",
        "description": "Response containing available VLA model types."
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "type": [
                "string",
                "integer"
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {},
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "VoucherRedemptionResponse": {
        "properties": {
          "credits_granted": {
            "type": "integer",
            "description": "Credits the voucher added"
          },
          "account_id": {
            "type": "string",
            "description": "The organization they were added to"
          }
        },
        "type": "object",
        "required": [
          "credits_granted",
          "account_id"
        ],
        "title": "VoucherRedemptionResponse",
        "description": "A redeemed voucher."
      },
      "WhoamiKey": {
        "properties": {
          "name": {
            "description": "The key's name",
            "type": [
              "string",
              "null"
            ]
          },
          "key_prefix": {
            "description": "The key's first 12 characters, as the dashboard lists it",
            "type": [
              "string",
              "null"
            ]
          },
          "scope": {
            "type": "string",
            "enum": [
              "organization",
              "workspace",
              "restricted"
            ],
            "description": "organization: every workspace of the account its creator can reach; workspace: only the workspace that owns it; restricted: a custom workspace or repository allowlist"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "description": "Granted permissions"
          },
          "allowed_project_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "description": "Workspaces the key is restricted to; empty means no restriction"
          },
          "expires_at": {
            "description": "Expiry, ISO 8601",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object",
        "required": [
          "scope"
        ],
        "title": "WhoamiKey",
        "description": "The API key the request authenticated with."
      },
      "WhoamiResponse": {
        "properties": {
          "account_id": {
            "description": "The bound account",
            "type": [
              "string",
              "null"
            ]
          },
          "account_name": {
            "description": "The account's name",
            "type": [
              "string",
              "null"
            ]
          },
          "account_type": {
            "description": "personal or organization (the platform's account type)",
            "type": [
              "string",
              "null"
            ]
          },
          "workspace_id": {
            "description": "The bound workspace",
            "type": [
              "string",
              "null"
            ]
          },
          "workspace_name": {
            "description": "The workspace's name",
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "description": "The person it acts as: for an API key, its creator",
            "type": [
              "string",
              "null"
            ]
          },
          "username": {
            "description": "That person's username",
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "description": "That person's role in the bound workspace (an API key's scopes cap what it may do with it); null when it could not be read",
            "nullable": true,
            "type": "string",
            "enum": [
              "viewer",
              "contributor",
              "admin",
              "owner"
            ]
          },
          "principal": {
            "type": "string",
            "enum": [
              "api_key",
              "user"
            ]
          },
          "key": {
            "description": "The API key, or null for a signed-in user",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/WhoamiKey"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "account_id",
          "workspace_id",
          "principal"
        ],
        "title": "WhoamiResponse",
        "description": "The caller, as this request was bound."
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "description": "An API key (`qla_…`). Create one in **Settings** in the Qualia dashboard.",
        "in": "header",
        "name": "X-API-Key"
      },
      "Bearer": {
        "type": "http",
        "description": "The same API key as `Authorization: Bearer qla_…`. The dashboard sends its session token this way.",
        "scheme": "bearer"
      }
    }
  },
  "servers": [
    {
      "url": "https://junction-api.qualiastudios.dev"
    }
  ]
}
