{
  "$defs": {
    "ArtifactLink": {
      "description": "A short-lived, generation-pinned signed GET URL for one artifact (HTTP Range works).",
      "examples": [
        {
          "content_type": "application/zip",
          "crc32c": "4waSgw==",
          "expires_at": "2026-10-15T09:45:00Z",
          "generation": 7,
          "name": "bundle.zarr.zip",
          "size": 2097152,
          "url": "http://127.0.0.1:4443/download/storage/v1/b/mapi-local-bundles/o/t%2Fdefault%2Fmodels%2Fmdl_01%2F1%2Fbundle.zarr.zip?generation=7&X-Goog-Signature=\u2026"
        }
      ],
      "properties": {
        "content_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Content Type"
        },
        "crc32c": {
          "description": "CRC32C as GCS reports it: base64 of the big-endian 4-byte checksum",
          "examples": [
            "4waSgw=="
          ],
          "pattern": "^[A-Za-z0-9+/]{6}==$",
          "title": "Crc32C",
          "type": "string"
        },
        "expires_at": {
          "format": "date-time",
          "title": "Expires At",
          "type": "string"
        },
        "generation": {
          "minimum": 1,
          "title": "Generation",
          "type": "integer"
        },
        "method": {
          "const": "GET",
          "default": "GET",
          "title": "Method",
          "type": "string"
        },
        "name": {
          "maxLength": 1024,
          "title": "Name",
          "type": "string"
        },
        "size": {
          "minimum": 0,
          "title": "Size",
          "type": "integer"
        },
        "url": {
          "title": "Url",
          "type": "string"
        }
      },
      "required": [
        "name",
        "url",
        "expires_at",
        "size",
        "crc32c",
        "generation"
      ],
      "title": "ArtifactLink",
      "type": "object"
    },
    "ChainProgress": {
      "additionalProperties": false,
      "description": "Per-chain sampler progress (Expert run view).",
      "properties": {
        "chain": {
          "minimum": 0,
          "title": "Chain",
          "type": "integer"
        },
        "divergences": {
          "default": 0,
          "minimum": 0,
          "title": "Divergences",
          "type": "integer"
        },
        "draws_done": {
          "minimum": 0,
          "title": "Draws Done",
          "type": "integer"
        },
        "draws_total": {
          "minimum": 0,
          "title": "Draws Total",
          "type": "integer"
        },
        "num_steps": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Leapfrog steps of the latest draw (v0.11)",
          "title": "Num Steps"
        },
        "step_size": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Current step size (v0.11)",
          "title": "Step Size"
        },
        "tuning": {
          "default": false,
          "title": "Tuning",
          "type": "boolean"
        }
      },
      "required": [
        "chain",
        "draws_done",
        "draws_total"
      ],
      "title": "ChainProgress",
      "type": "object"
    },
    "ErrorCode": {
      "description": "Stable error codes. See :data:`ERROR_INFO` for HTTP status and titles.",
      "enum": [
        "SCHEMA_INVALID",
        "SPEC_PARSE_ERROR",
        "PAYLOAD_TOO_LARGE",
        "UNSUPPORTED_API_VERSION",
        "REF_UNRESOLVED",
        "SETTINGS_INVALID",
        "BINDING_INVALID",
        "SPLIT_INVALID",
        "LEAKAGE_RISK",
        "DIM_POLICY_LOOSENED",
        "SCHEMA_DYNAMIC",
        "SIDE_TABLE_COVERAGE",
        "PLOT_UNSAFE",
        "UNSEEN_LEVELS",
        "COORD_NOT_ALLOWED",
        "HORIZON_EXCEEDS_FIT",
        "MISSING_FUTURE_COVARIATE",
        "NON_CONTIGUOUS_EXTENSION",
        "CAPABILITY_UNSUPPORTED",
        "RECURSIVE_UNSUPPORTED",
        "MODE_NOT_SUPPORTED",
        "QUOTA_EXCEEDED",
        "RATE_LIMITED",
        "UNAUTHENTICATED",
        "FORBIDDEN",
        "NOT_FOUND",
        "CONFLICT",
        "IDEMPOTENCY_CONFLICT",
        "PRECONDITION_FAILED",
        "USER_CODE_ERROR",
        "RESOURCE_EXHAUSTED",
        "INFRA_ERROR",
        "INTEGRITY_FAILURE",
        "TIMEOUT",
        "SANDBOX_VIOLATION",
        "CANCELLED",
        "INTERNAL_ERROR",
        "GUIDED_ANSWERS_INVALID",
        "BUSINESS_PRIORS_INVALID",
        "CALIBRATION_UNSUPPORTED",
        "IMPORT_UNSUPPORTED",
        "SCENARIO_OUT_OF_RANGE",
        "PROMOTION_BLOCKED",
        "OVERRIDE_REQUIRED",
        "WEBHOOK_URL_BLOCKED",
        "WEBHOOK_SIGNATURE_INVALID",
        "EMBED_NOT_ALLOWED",
        "LINK_EXPIRED",
        "EMAIL_NOT_ALLOWED",
        "TERMS_NOT_ACCEPTED",
        "EMAIL_NOT_VERIFIED",
        "IDENTITY_VERIFICATION_REQUIRED",
        "ABOUT_INCOMPLETE",
        "CHOOSER_ANSWER_INVALID",
        "WORKFLOW_INVALID",
        "EXPRESSION_INVALID",
        "EXPRESSION_ERROR",
        "NODE_UNKNOWN",
        "SCHEDULE_INVALID",
        "WORKFLOW_NOT_RUNNABLE",
        "POLICY_INVALID",
        "VALIDATION_TRANSITION_INVALID",
        "SELF_APPROVAL_FORBIDDEN",
        "NOT_VALIDATED",
        "EXPLORE_INVALID",
        "OPTIMIZE_INFEASIBLE",
        "ACTUALS_NOT_SUPPORTED",
        "ACTUALS_INVALID",
        "NOT_READY",
        "INGEST_UNSAFE_FILE"
      ],
      "title": "ErrorCode",
      "type": "string"
    },
    "ExplorerIndex": {
      "additionalProperties": true,
      "description": "``ui/explore/index.json``: what an explore run produced (and why a section is\nmissing).",
      "examples": [
        {
          "ref": "dataset://growth/weekly_sales@v4",
          "sections": [
            {
              "section": "stationarity",
              "view": "ui/explore/stationarity.json"
            },
            {
              "message_plain": "Less than two seasons of data.",
              "reason": "insufficient_data",
              "section": "stl",
              "status": "skipped",
              "view": "ui/explore/stl.json"
            }
          ],
          "target": "dataset"
        },
        {
          "order": [
            "overview",
            "structure",
            "images",
            "quality",
            "distributions",
            "timeseries",
            "missingness"
          ],
          "ref": "dataset://seismology/oklahoma_quakes@v1",
          "sections": [
            {
              "section": "overview",
              "view": "ui/explore/overview.json"
            },
            {
              "section": "structure",
              "view": "ui/explore/structure.json"
            },
            {
              "section": "images",
              "view": "ui/explore/images.json"
            },
            {
              "message_plain": "Not available: the data has no polygons.",
              "reason": "not_applicable",
              "section": "map",
              "status": "skipped",
              "view": "ui/explore/map.json"
            }
          ],
          "shapes": [
            "image",
            "timeseries"
          ],
          "target": "dataset"
        }
      ],
      "properties": {
        "format": {
          "const": "mapi.explorer-index/v1",
          "default": "mapi.explorer-index/v1",
          "title": "Format",
          "type": "string"
        },
        "node": {
          "anyOf": [
            {
              "pattern": "^/(?:[A-Za-z_][A-Za-z0-9_.\\-]{0,63}(?:/[A-Za-z_][A-Za-z0-9_.\\-]{0,63}){0,7})?$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "M4: the node of a tree dataset explored (absent for a flat dataset)",
          "title": "Node"
        },
        "order": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "maxItems": 32,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Data Explorer: the sections in order of relevance for this data",
          "title": "Order"
        },
        "ref": {
          "description": "dataset://\u2026 or model://\u2026",
          "maxLength": 512,
          "title": "Ref",
          "type": "string"
        },
        "sections": {
          "items": {
            "$ref": "#/$defs/ExplorerSectionRef"
          },
          "maxItems": 32,
          "title": "Sections",
          "type": "array"
        },
        "shapes": {
          "anyOf": [
            {
              "items": {
                "enum": [
                  "timeseries",
                  "sequence",
                  "image",
                  "vector_field",
                  "areal_map",
                  "points",
                  "network",
                  "tree",
                  "circular",
                  "profile",
                  "table"
                ],
                "type": "string"
              },
              "maxItems": 64,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Data Explorer: the detected data shapes, best first",
          "title": "Shapes"
        },
        "target": {
          "enum": [
            "dataset",
            "model"
          ],
          "title": "Target",
          "type": "string"
        }
      },
      "required": [
        "target",
        "ref"
      ],
      "title": "ExplorerIndex",
      "type": "object"
    },
    "ExplorerSectionRef": {
      "additionalProperties": true,
      "properties": {
        "message_plain": {
          "anyOf": [
            {
              "maxLength": 500,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Message Plain"
        },
        "reason": {
          "anyOf": [
            {
              "enum": [
                "not_applicable",
                "insufficient_data",
                "needs_option"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Why a skipped section was skipped (absent in indexes written before the scientific sections: readers then list every section)",
          "title": "Reason"
        },
        "section": {
          "maxLength": 32,
          "title": "Section",
          "type": "string"
        },
        "status": {
          "default": "ok",
          "enum": [
            "ok",
            "skipped",
            "error"
          ],
          "title": "Status",
          "type": "string"
        },
        "view": {
          "description": "ui/explore/<section>.json",
          "maxLength": 256,
          "title": "View",
          "type": "string"
        }
      },
      "required": [
        "section",
        "view"
      ],
      "title": "ExplorerSectionRef",
      "type": "object"
    },
    "FailureClass": {
      "description": "Why a run ended ``FAILED``; each maps to one stable :class:`ErrorCode`.",
      "enum": [
        "user",
        "resource_exhausted",
        "infra",
        "integrity",
        "timeout",
        "sandbox"
      ],
      "title": "FailureClass",
      "type": "string"
    },
    "Issue": {
      "additionalProperties": false,
      "description": "One problem found while validating a document, located by a JSON pointer.",
      "properties": {
        "code": {
          "$ref": "#/$defs/ErrorCode"
        },
        "context": {
          "additionalProperties": {
            "$ref": "#/$defs/JsonValue"
          },
          "title": "Context",
          "type": "object"
        },
        "message": {
          "description": "Trusted, platform-authored text",
          "maxLength": 2000,
          "title": "Message",
          "type": "string"
        },
        "pointer": {
          "default": "",
          "description": "RFC 6901 JSON pointer into the submitted document",
          "title": "Pointer",
          "type": "string"
        },
        "severity": {
          "$ref": "#/$defs/Severity",
          "default": "error"
        },
        "suggested_action": {
          "anyOf": [
            {
              "maxLength": 2000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Suggested Action"
        },
        "untrusted_text": {
          "anyOf": [
            {
              "maxLength": 8000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "User/plugin-originated text; render as text only",
          "title": "Untrusted Text"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "title": "Issue",
      "type": "object"
    },
    "JsonValue": {},
    "Problem": {
      "additionalProperties": false,
      "description": "RFC 7807 problem document with mapi extensions (``code``, ``errors``, ``untrusted_text``).",
      "properties": {
        "code": {
          "$ref": "#/$defs/ErrorCode"
        },
        "detail": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Detail"
        },
        "errors": {
          "items": {
            "$ref": "#/$defs/Issue"
          },
          "title": "Errors",
          "type": "array"
        },
        "instance": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Instance"
        },
        "status": {
          "maximum": 599,
          "minimum": 100,
          "title": "Status",
          "type": "integer"
        },
        "title": {
          "title": "Title",
          "type": "string"
        },
        "trace_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Trace Id"
        },
        "type": {
          "default": "about:blank",
          "title": "Type",
          "type": "string"
        },
        "untrusted_text": {
          "anyOf": [
            {
              "maxLength": 65536,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Untrusted Text"
        }
      },
      "required": [
        "title",
        "status",
        "code"
      ],
      "title": "Problem",
      "type": "object"
    },
    "ProgressSnapshot": {
      "description": "Latest coalesced progress (one upserted row per run).",
      "examples": [
        {
          "chains": [
            {
              "chain": 0,
              "divergences": 0,
              "draws_done": 400,
              "draws_total": 1000
            },
            {
              "chain": 1,
              "divergences": 1,
              "draws_done": 380,
              "draws_total": 1000
            }
          ],
          "eta_seconds": 95,
          "fraction": 0.4,
          "message": "drawing samples",
          "phase": "sample",
          "seq": 42,
          "updated_at": "2026-10-15T09:30:00Z"
        }
      ],
      "properties": {
        "chains": {
          "items": {
            "$ref": "#/$defs/ChainProgress"
          },
          "title": "Chains",
          "type": "array"
        },
        "eta_seconds": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Eta Seconds"
        },
        "fraction": {
          "anyOf": [
            {
              "maximum": 1,
              "minimum": 0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Fraction"
        },
        "message": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Message"
        },
        "phase": {
          "$ref": "#/$defs/RunnerPhase"
        },
        "seq": {
          "minimum": 0,
          "title": "Seq",
          "type": "integer"
        },
        "updated_at": {
          "format": "date-time",
          "title": "Updated At",
          "type": "string"
        }
      },
      "required": [
        "seq",
        "phase",
        "updated_at"
      ],
      "title": "ProgressSnapshot",
      "type": "object"
    },
    "ResourceClass": {
      "description": "Executor resource class. Ordered: ``S < M < L < XL < GPU``.\n\n``GPU`` is the last (highest-rank) member on purpose: a quota whose\n``max_resource_class`` is below it refuses it, and :meth:`next_up` never offers it.",
      "enum": [
        "S",
        "M",
        "L",
        "XL",
        "GPU"
      ],
      "title": "ResourceClass",
      "type": "string"
    },
    "Run": {
      "description": "A unit of work and its lifecycle (see the state machine in ``mapi_spec.run``).",
      "examples": [
        {
          "attempt": 1,
          "cost": {
            "estimated": true
          },
          "created_at": "2026-10-15T09:30:00Z",
          "executor": "local-process",
          "id": "run_01jaf3q2x8m9v7k5h4g3f2e1d0",
          "kind": "fit",
          "name": "weekly sales, adstock 4",
          "progress": {
            "chains": [
              {
                "chain": 0,
                "divergences": 0,
                "draws_done": 400,
                "draws_total": 1000
              },
              {
                "chain": 1,
                "divergences": 1,
                "draws_done": 380,
                "draws_total": 1000
              }
            ],
            "eta_seconds": 95,
            "fraction": 0.4,
            "message": "drawing samples",
            "phase": "sample",
            "seq": 42,
            "updated_at": "2026-10-15T09:30:00Z"
          },
          "project_id": "default",
          "queued_at": "2026-10-15T09:30:00Z",
          "resource_class": "M",
          "spec_hash": "sha256:3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f",
          "spec_id": "spc_01jaf3b1c2d3e4f5g6h7j8k9m0",
          "spec_revision": 2,
          "started_at": "2026-10-15T09:30:05Z",
          "state": "running",
          "tags": {
            "stage": "candidate",
            "team": "growth"
          },
          "tenant_id": "default",
          "timeout": "45m",
          "updated_at": "2026-10-15T09:31:00Z"
        },
        {
          "attempt": 1,
          "created_at": "2026-10-15T09:30:00Z",
          "failure_class": "resource_exhausted",
          "finished_at": "2026-10-15T09:40:00Z",
          "id": "run_01jaf3q2x8m9v7k5h4g3f2e1d0",
          "kind": "fit",
          "problem": {
            "code": "RESOURCE_EXHAUSTED",
            "detail": "the worker was killed (exit 137); retry at class L",
            "status": 507,
            "title": "Run exhausted its resources",
            "type": "urn:mapi:error:RESOURCE_EXHAUSTED"
          },
          "project_id": "default",
          "resource_class": "M",
          "state": "failed",
          "tenant_id": "default",
          "timeout": "45m",
          "updated_at": "2026-10-15T09:40:00Z"
        }
      ],
      "properties": {
        "attempt": {
          "minimum": 1,
          "title": "Attempt",
          "type": "integer"
        },
        "columns": {
          "anyOf": [
            {
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Values of the requested `column` refs (list_runs only), keyed by RunRef.text()",
          "title": "Columns"
        },
        "cost": {
          "$ref": "#/$defs/RunCost"
        },
        "created_at": {
          "format": "date-time",
          "title": "Created At",
          "type": "string"
        },
        "dataset_id": {
          "anyOf": [
            {
              "examples": [
                "run_01jaf3q2x8m9v7k5h4g3f2e1d0"
              ],
              "pattern": "^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Dataset Id"
        },
        "executor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Executor"
        },
        "experiment_id": {
          "anyOf": [
            {
              "examples": [
                "run_01jaf3q2x8m9v7k5h4g3f2e1d0"
              ],
              "pattern": "^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Experiment of the run (v0.14)",
          "title": "Experiment Id"
        },
        "failure_class": {
          "anyOf": [
            {
              "$ref": "#/$defs/FailureClass"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "finished_at": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Finished At"
        },
        "id": {
          "examples": [
            "run_01jaf3q2x8m9v7k5h4g3f2e1d0"
          ],
          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$",
          "title": "Id",
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/RunKind"
        },
        "labels": {
          "additionalProperties": {
            "type": "string"
          },
          "title": "Labels",
          "type": "object"
        },
        "model_version_id": {
          "anyOf": [
            {
              "examples": [
                "run_01jaf3q2x8m9v7k5h4g3f2e1d0"
              ],
              "pattern": "^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Model Version Id"
        },
        "name": {
          "anyOf": [
            {
              "maxLength": 200,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Display name (v0.11)",
          "title": "Name"
        },
        "note": {
          "anyOf": [
            {
              "maxLength": 20000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Free-text note (untrusted text, v0.11)",
          "title": "Note"
        },
        "output_model_version_id": {
          "anyOf": [
            {
              "examples": [
                "run_01jaf3q2x8m9v7k5h4g3f2e1d0"
              ],
              "pattern": "^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The model version a successful fit produced",
          "title": "Output Model Version Id"
        },
        "parent_run_id": {
          "anyOf": [
            {
              "examples": [
                "run_01jaf3q2x8m9v7k5h4g3f2e1d0"
              ],
              "pattern": "^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Parent Run Id"
        },
        "problem": {
          "anyOf": [
            {
              "$ref": "#/$defs/Problem"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "progress": {
          "anyOf": [
            {
              "$ref": "#/$defs/ProgressSnapshot"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "project_id": {
          "pattern": "^[a-z0-9](?:[a-z0-9_-]{0,62}[a-z0-9])?$",
          "title": "Project Id",
          "type": "string"
        },
        "queued_at": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Queued At"
        },
        "resource_class": {
          "$ref": "#/$defs/ResourceClass"
        },
        "retry_of": {
          "anyOf": [
            {
              "examples": [
                "run_01jaf3q2x8m9v7k5h4g3f2e1d0"
              ],
              "pattern": "^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Retry Of"
        },
        "spec_hash": {
          "anyOf": [
            {
              "pattern": "^sha256:[0-9a-f]{64}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Spec Hash"
        },
        "spec_id": {
          "anyOf": [
            {
              "examples": [
                "run_01jaf3q2x8m9v7k5h4g3f2e1d0"
              ],
              "pattern": "^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Spec Id"
        },
        "spec_revision": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Spec Revision"
        },
        "started_at": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Started At"
        },
        "state": {
          "$ref": "#/$defs/RunState"
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Mutable run tags (v0.11; labels stay create-only)",
          "title": "Tags",
          "type": "object"
        },
        "tenant_id": {
          "pattern": "^[a-z0-9](?:[a-z0-9_-]{0,62}[a-z0-9])?$",
          "title": "Tenant Id",
          "type": "string"
        },
        "timeout": {
          "description": "Duration such as '45m', '1h30m' or '90s'.",
          "examples": [
            "45m",
            "1h30m"
          ],
          "pattern": "^(?=.)(\\d+h)?(\\d+m)?(\\d+s)?$",
          "title": "Timeout",
          "type": "string"
        },
        "updated_at": {
          "format": "date-time",
          "title": "Updated At",
          "type": "string"
        }
      },
      "required": [
        "id",
        "tenant_id",
        "project_id",
        "kind",
        "state",
        "attempt",
        "resource_class",
        "timeout",
        "created_at",
        "updated_at"
      ],
      "title": "Run",
      "type": "object"
    },
    "RunCost": {
      "description": "Cost of a run (all attempts). ``estimated`` is true until an ``actual`` ledger entry\nexists; ``usd`` is kept for v0.2 clients and is set only when the currency is USD.",
      "examples": [
        {
          "estimated": true,
          "gib_seconds": null,
          "usd": null,
          "vcpu_seconds": null
        },
        {
          "amount_micros": 31200,
          "attempts_billed": 1,
          "currency": "USD",
          "estimate_micros": 30000,
          "estimated": false,
          "gib_seconds": 4800,
          "price_version": "cloudrun-list-2026-10",
          "usd": 0.0312,
          "vcpu_seconds": 1200
        }
      ],
      "properties": {
        "amount_micros": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Amount Micros"
        },
        "attempts_billed": {
          "default": 0,
          "minimum": 0,
          "title": "Attempts Billed",
          "type": "integer"
        },
        "currency": {
          "anyOf": [
            {
              "pattern": "^[A-Z]{3}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Currency"
        },
        "estimate_micros": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Pre-run estimate",
          "title": "Estimate Micros"
        },
        "estimated": {
          "default": true,
          "title": "Estimated",
          "type": "boolean"
        },
        "gib_seconds": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Gib Seconds"
        },
        "price_version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Price Version"
        },
        "usd": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Usd"
        },
        "vcpu_seconds": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Vcpu Seconds"
        }
      },
      "title": "RunCost",
      "type": "object"
    },
    "RunKind": {
      "description": "What a run does. ``validate`` is the explicit sandboxed dry-run of a spec.\n\n``sweep``, ``backtest``, ``sbc`` and ``campaign`` are fan-out *parents* (plan \u00a76.2,\nM4): they own child runs and never execute on an executor themselves.",
      "enum": [
        "ingest",
        "describe",
        "validate",
        "fit",
        "score",
        "evaluate",
        "derive",
        "render",
        "optimize",
        "sweep",
        "backtest",
        "sbc",
        "campaign",
        "translate_priors",
        "workflow",
        "workflow_node",
        "explore",
        "governance",
        "inspect"
      ],
      "title": "RunKind",
      "type": "string"
    },
    "RunState": {
      "description": "Lifecycle of a run (plan \u00a78.3). Terminal states never change again, except that a\n``PARTIAL`` run can be resumed (``RESUME`` \u2192 ``QUEUED`` with a new attempt).",
      "enum": [
        "created",
        "rejected",
        "queued",
        "dispatching",
        "provisioning",
        "running",
        "stalled",
        "finalizing",
        "succeeded",
        "partial",
        "failed",
        "cancelling",
        "cancelled"
      ],
      "title": "RunState",
      "type": "string"
    },
    "RunnerPhase": {
      "description": "Coarse phase reported by the runner (drives progress text in the UI).",
      "enum": [
        "bootstrap",
        "load_inputs",
        "validate",
        "preprocess",
        "fit",
        "sample",
        "score",
        "evaluate",
        "derive",
        "plots",
        "upload",
        "done"
      ],
      "title": "RunnerPhase",
      "type": "string"
    },
    "Severity": {
      "description": "How bad an :class:`Issue` is. Only ``error`` blocks submission.",
      "enum": [
        "info",
        "warning",
        "error"
      ],
      "title": "Severity",
      "type": "string"
    }
  },
  "$id": "https://schemas.mapi.dev/v1/api-Exploration.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "``POST \u2026/explore`` (``202``) and ``GET /v1/explorations/{run_id}``: the ``explore``\nrun and, once done, its index and signed links to every section view.",
  "examples": [
    {
      "done": true,
      "index": {
        "ref": "dataset://growth/weekly_sales@v4",
        "sections": [
          {
            "section": "stationarity",
            "view": "ui/explore/stationarity.json"
          }
        ],
        "target": "dataset"
      },
      "ref": "dataset://growth/weekly_sales@v4",
      "run": {
        "attempt": 1,
        "cost": {
          "estimated": true
        },
        "created_at": "2026-10-15T09:30:00Z",
        "executor": "local-process",
        "id": "run_01jaf3q2x8m9v7k5h4g3f2e1d0",
        "kind": "explore",
        "name": "weekly sales, adstock 4",
        "progress": null,
        "project_id": "default",
        "queued_at": "2026-10-15T09:30:00Z",
        "resource_class": "M",
        "spec_hash": "sha256:3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f",
        "spec_id": "spc_01jaf3b1c2d3e4f5g6h7j8k9m0",
        "spec_revision": 2,
        "started_at": "2026-10-15T09:30:05Z",
        "state": "succeeded",
        "tags": {
          "stage": "candidate",
          "team": "growth"
        },
        "tenant_id": "default",
        "timeout": "45m",
        "updated_at": "2026-10-15T09:31:00Z"
      },
      "target": "dataset",
      "views": [
        {
          "content_type": "application/zip",
          "crc32c": "4waSgw==",
          "expires_at": "2026-10-15T09:45:00Z",
          "generation": 7,
          "name": "ui/explore/stationarity.json",
          "size": 2097152,
          "url": "http://127.0.0.1:4443/download/storage/v1/b/mapi-local-bundles/o/t%2Fdefault%2Fmodels%2Fmdl_01%2F1%2Fbundle.zarr.zip?generation=7&X-Goog-Signature=\u2026"
        }
      ]
    }
  ],
  "properties": {
    "done": {
      "title": "Done",
      "type": "boolean"
    },
    "index": {
      "anyOf": [
        {
          "$ref": "#/$defs/ExplorerIndex"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "ref": {
      "maxLength": 512,
      "title": "Ref",
      "type": "string"
    },
    "run": {
      "$ref": "#/$defs/Run"
    },
    "target": {
      "enum": [
        "dataset",
        "model"
      ],
      "title": "Target",
      "type": "string"
    },
    "views": {
      "items": {
        "$ref": "#/$defs/ArtifactLink"
      },
      "title": "Views",
      "type": "array"
    }
  },
  "required": [
    "run",
    "done",
    "target",
    "ref"
  ],
  "title": "Exploration",
  "type": "object",
  "x-mapi-contract-version": "0.2"
}
