{
  "openapi": "3.1.0",
  "info": {
    "title": "predictAI Core API",
    "description": "Public REST API of the predictAI platform: inference against deployed models, PredictFM foundation-model management, the model marketplace and data-ingestion webhooks.\n\nAll endpoints are prefixed with `/v1`. Authenticate with `Authorization: Bearer <pa_live_... token>` and scope requests to a workspace with the `X-Workspace-Id` header.",
    "version": "1.4.83"
  },
  "tags": [
    {
      "name": "Account"
    },
    {
      "name": "BYOM",
      "description": "Bring your own model: upload a pre-trained model, validate it with a live forward pass, register it for deployment, and download the original artifact at any time."
    },
    {
      "name": "Billing"
    },
    {
      "name": "Deployments"
    },
    {
      "name": "Foundation",
      "description": "Foundation models: browse the available pretrained models (PredictFM, Chronos, Moirai, ...) and their fine-tuned adapters. Identity is family + slug for every model."
    },
    {
      "name": "Goals"
    },
    {
      "name": "Inference",
      "description": "Run predictions against deployed models, pipelines and goals, and inspect inference history and usage."
    },
    {
      "name": "Ingestion"
    },
    {
      "name": "Ingestion Webhooks",
      "description": "Inbound data-ingestion webhooks. Authenticated with a per-source HMAC-SHA256 signature over the raw request body (no bearer token)."
    },
    {
      "name": "Models"
    },
    {
      "name": "Notifications"
    },
    {
      "name": "Organizations"
    },
    {
      "name": "Pipelines"
    },
    {
      "name": "Platform",
      "description": "Service metadata: health, version and the public cell directory used for multi-region routing."
    },
    {
      "name": "Segments"
    },
    {
      "name": "Signals"
    },
    {
      "name": "Trainings"
    },
    {
      "name": "Utilities"
    },
    {
      "name": "Workspaces"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "Health check endpoint - returns 200 if the service is running",
        "operationId": "get_health",
        "description": "",
        "tags": [
          "Platform"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse.839bd04"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/ready": {
      "get": {
        "summary": "Readiness check endpoint - returns 200 if the service is ready to serve requests",
        "operationId": "get_ready",
        "description": "",
        "tags": [
          "Platform"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/version": {
      "get": {
        "summary": "Version endpoint - returns current API and service version information",
        "operationId": "get_version",
        "description": "",
        "tags": [
          "Platform"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionResponse.839bd04"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/user/me": {
      "get": {
        "summary": "get_user <GET>",
        "operationId": "get_user_me",
        "description": "",
        "tags": [
          "Account"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/user/update-profile": {
      "post": {
        "summary": "Update user profile (requires authentication)",
        "operationId": "post_user_update_profile",
        "description": "",
        "tags": [
          "Account"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/user/api-tokens": {
      "post": {
        "summary": "Create a new API token for programmatic access",
        "operationId": "post_user_api_tokens",
        "description": "",
        "tags": [
          "Account"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List all API tokens for the authenticated user (without revealing actual tokens)",
        "operationId": "get_user_api_tokens",
        "description": "",
        "tags": [
          "Account"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/user/api-tokens/{token_id}": {
      "patch": {
        "summary": "Edit an API token's name and/or scopes (the secret is unchanged)",
        "operationId": "patch_user_api_tokens_by_token_id",
        "description": "",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "token_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Revoke a specific API token",
        "operationId": "delete_user_api_tokens_by_token_id",
        "description": "",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "token_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/user/api-tokens/{token_id}/regenerate": {
      "post": {
        "summary": "Regenerate an API token (revoke old, create new)",
        "operationId": "post_user_api_tokens_by_token_id_regenerate",
        "description": "",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "token_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/signal/overview": {
      "get": {
        "summary": "Purpose-built payload for the workspace overview chart.",
        "operationId": "get_signal_overview",
        "description": "Unlike /list (which returns per-signal rows and forces the FE to draw a line per key), this endpoint resolves a hierarchical VIEW so the chart stays readable at any scale:\n\n  * small workspaces        -> per-signal series (chart unchanged)   * many signals            -> namespace group envelopes (median + band)   * ?group=<id>             -> drill into a group (subgroups or members)   * ?pins=k1,k2             -> explicit keys as individual series   * events                  -> same event stream rows /list interleaves\n\nSee ``app.signals.overview`` for the grouping policy and thresholds.",
        "tags": [
          "Signals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/signal/units": {
      "get": {
        "summary": "All persisted signal units for the workspace.",
        "operationId": "get_signal_units",
        "description": "Returns ``{\"units\": {key: {\"unit\", \"origin\"}}}`` \u2014 the FE resolves entity fan-out (``base__entity``) client-side the same way display names do, and the list rows already arrive annotated.",
        "tags": [
          "Signals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/signal/units/assign": {
      "post": {
        "summary": "Set (or clear) the measurement unit for one or more signal keys.",
        "operationId": "post_signal_units_assign",
        "description": "Body: ``{\"keys\": [\"k1\", \"k2\"], \"unit\": \"$/MWh\"}`` \u2014 empty/absent ``unit`` clears the assignment (the key reverts to LLM-inferred or none). User assignments always win over the LLM pass.",
        "tags": [
          "Signals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/signal/groups": {
      "get": {
        "summary": "Resolved grouping for every signal key in the workspace.",
        "operationId": "get_signal_groups",
        "description": "Returns::\n\n    {       \"groups\": [{\"name\", \"count\", \"origins\": {\"user\": 2, ...}}],       \"assignments\": {key: {\"group\", \"origin\"}},   # persisted overrides     }\n\nBacks the list page's Group filter and the bulk \"Add to group\" dialog (existing names as autocomplete options).",
        "tags": [
          "Signals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/signal/groups/assign": {
      "post": {
        "summary": "Assign one or more signal keys to a group (bulk action from the list).",
        "operationId": "post_signal_groups_assign",
        "description": "Body: ``{\"keys\": [\"k1\", \"k2\"], \"group\": \"Store ops\"}``. User assignments are the top resolver layer, so they win over any automatic grouping.",
        "tags": [
          "Signals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/signal/groups/unassign": {
      "post": {
        "summary": "Remove explicit group assignments (keys revert to automatic grouping).",
        "operationId": "post_signal_groups_unassign",
        "description": "Body: ``{\"keys\": [\"k1\", \"k2\"]}``.",
        "tags": [
          "Signals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/signal/delete": {
      "post": {
        "summary": "Bulk delete: ``{\"keys\": [...], \"event_streams\": [...], \"force\": bool}``.",
        "operationId": "post_signal_delete",
        "description": "Same marketplace safety net as the single-key DELETE route, aggregated across the batch: if ANY key has a draft/published listing and ``force`` is not set, the whole batch is rejected with 409 + the listing summary (the FE shows one \"Delist & Delete\" confirm for the batch). Subscribed marketplace aliases are never deletable \u2014 they're skipped and reported.\n\n``event_streams`` lets one batch mix signals (ClickHouse) and event streams (Mongo): streams are deleted via the events store, with the same read-only guard as the per-stream DELETE route (``mkt-evt:`` subscribed streams are skipped and reported).",
        "tags": [
          "Signals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/signal/display-names": {
      "get": {
        "summary": "Full {key: display_name} map for the workspace, so any surface can resolve friendly names without re-fetching the signal list.",
        "operationId": "get_signal_display_names",
        "description": "",
        "tags": [
          "Signals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/signal/display-name": {
      "post": {
        "summary": "Set or clear (empty name) the user-facing display name for one signal key. The underlying key is untouched - segments, trainings and stored data keep referencing the raw key.",
        "operationId": "post_signal_display_name",
        "description": "",
        "tags": [
          "Signals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/signal/correlation": {
      "get": {
        "summary": "fnc_signal_correlation <GET>",
        "operationId": "get_signal_correlation",
        "description": "",
        "tags": [
          "Signals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/signal/relevance": {
      "get": {
        "summary": "fnc_signal_relevance <GET>",
        "operationId": "get_signal_relevance",
        "description": "",
        "tags": [
          "Signals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/signal/push": {
      "post": {
        "summary": "add_signal <POST>",
        "operationId": "post_signal_push",
        "description": "",
        "tags": [
          "Signals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/signal/has-data": {
      "get": {
        "summary": "Cheap probe: does this workspace have any signal data?",
        "operationId": "get_signal_has_data",
        "description": "Used by the file-upload UI to conditionally show the \"Replace existing data\" checkbox - we don't want to clutter the upload flow for brand-new workspaces with empty datasets. Reads from ``signals_1d`` (rollup) so it's <10ms even for billion-row workspaces.\n\nResponse:     {\"has_data\": bool, \"signal_count\": int}",
        "tags": [
          "Signals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/signal/causality": {
      "get": {
        "summary": "Enhanced Granger Causality Analysis Endpoint ==========================================",
        "operationId": "get_signal_causality",
        "description": "This endpoint performs comprehensive Granger causality analysis on time-series signal data to identify causal relationships between variables. It provides advanced statistical insights including causality strength, optimal lag identification, and temporal stability analysis.\n\nWHAT IT DOES: ------------- \u2022 Analyzes causal relationships between time-series variables using enhanced Granger causality tests \u2022 Identifies which variables influence (cause) others and the strength of these relationships \u2022 Determines optimal time lags for causal effects \u2022 Evaluates stability of causal relationships across different time windows \u2022 Builds causality networks with adjacency matrices and strength scores \u2022 Provides comprehensive statistical significance testing\n\nENDPOINT: GET /api/signal/causality\n\nAUTHENTICATION: --------------- \u2022 Requires valid authentication token \u2022 Workspace-specific access (X-Workspace-Id header required)\n\nQUERY PARAMETERS: ---------------- \u2022 windows (optional, default=5): Number of time windows for analysis (1-20)   - More windows = better stability analysis but slower processing\n\n\u2022 signal_count (optional, default=50): Number of data points per window (10-1000)   - Higher count = more statistical power but requires more data\n\n\u2022 max_lag (optional, auto-calculated): Maximum lag to test for causality (1-15)   - If not specified, automatically calculated based on data characteristics   - Higher lags detect longer-term causal effects\n\n\u2022 significance_level (optional, default=0.05): P-value threshold for significance (0.0-1.0)   - Lower values = stricter significance criteria   - Common values: 0.01 (very strict), 0.05 (standard), 0.10 (lenient)\n\nUSAGE EXAMPLES: --------------- # Basic analysis with default parameters GET /api/signal/causality\n\n# Custom analysis with specific parameters GET /api/signal/causality?windows=10&signal_count=100&significance_level=0.01\n\n# Quick analysis with fewer windows GET /api/signal/causality?windows=3&signal_count=30&max_lag=5\n\nOUTPUT FORMAT: -------------- {     \"causality_results\": {         \"granger_results\": {             \"Variable1 -> Variable2\": {                 \"cause\": \"Variable1\",                 \"effect\": \"Variable2\",                  \"status\": \"success\",                 \"p_values\": [0.0123, 0.0456, 0.0789],  // P-values for each lag                 \"f_statistics\": [12.34, 8.92, 5.67],   // F-statistics for each lag                 \"optimal_lag\": 1,                       // Best lag for this relationship                 \"min_p_value\": 0.0123,                  // Lowest p-value found                 \"is_significant\": true,                 // Whether relationship is significant                 \"strength\": 0.9877,                     // Causality strength (0-1 scale)                 \"significance_level\": 0.05             }         },         \"causality_network\": {             \"nodes\": [\"Variable1\", \"Variable2\", \"Variable3\"],  // All variables             \"edges\": [                                          // Significant relationships                 {                     \"from\": \"Variable1\",                     \"to\": \"Variable2\",                     \"strength\": 0.9877,                     \"p_value\": 0.0123,                     \"optimal_lag\": 1                 }             ],             \"adjacency_matrix\": {                               // Network structure                 \"Variable1\": {\"Variable1\": 0, \"Variable2\": 1, \"Variable3\": 0},                 \"Variable2\": {\"Variable1\": 0, \"Variable2\": 0, \"Variable3\": 1}             },             \"causality_scores\": {                               // Strength matrix                 \"Variable1\": {\"Variable1\": 0.0, \"Variable2\": 0.9877, \"Variable3\": 0.0}             },             \"network_stats\": {                 \"total_variables\": 5,                 \"significant_relationships\": 8,                 \"network_density\": 0.4,                        // How connected the network is                 \"avg_causality_strength\": 0.6432             }         },         \"significant_relationships\": [                          // Ranked by strength             {                 \"cause\": \"Variable1\",                 \"effect\": \"Variable2\",                  \"strength\": 0.9877,                 \"p_value\": 0.0123,                 \"optimal_lag\": 1,                 \"f_statistic\": 12.34,                 \"relationship_type\": \"very_strong\"             // very_strong, strong, moderate, weak, very_weak             }         ],         \"lag_analysis\": {             \"lag_distribution\": {1: 5, 2: 3, 3: 2},           // How many relationships at each lag             \"avg_optimal_lag\": 1.8,                            // Average optimal lag across relationships             \"lag_effectiveness\": {                              // Effectiveness by lag                 1: {\"count\": 5, \"avg_strength\": 0.8234},                 2: {\"count\": 3, \"avg_strength\": 0.6789}             }         },         \"window_stability\": {                                   // Stability across time windows             \"stability_scores\": {                 \"Variable1 -> Variable2\": {                     \"stability_score\": 0.8923,                 // Higher = more stable                     \"mean_strength\": 0.8456,                     \"std_strength\": 0.0234,                     \"windows_significant\": 4                    // How many windows showed significance                 }             },             \"consistent_relationships\": [                       // Stable across time                 {                     \"relationship\": \"Variable1 -> Variable2\",                     \"stability_score\": 0.8923,                     \"mean_strength\": 0.8456                 }             ],             \"variable_relationships\": [                         // Inconsistent across time                 {                     \"relationship\": \"Variable3 -> Variable4\",                      \"stability_score\": 0.2341,                     \"mean_strength\": 0.3456                 }             ],             \"window_count\": 5         },         \"correlation_matrix\": {                                 // Standard correlation matrix             \"Variable1\": {\"Variable1\": 1.0, \"Variable2\": 0.789, \"Variable3\": 0.234}         },         \"metadata\": {             \"max_lag_tested\": 5,             \"significance_level\": 0.05,             \"number_of_variables\": 5,             \"total_observations\": 255,             \"windows_analyzed\": 5         }     } }\n\nERROR RESPONSES: ---------------- 400 Bad Request: \u2022 Invalid parameters (out of range values) \u2022 Missing workspace ID\n\n500 Internal Server Error:  \u2022 Analysis computation failures \u2022 Data processing errors\n\n200 OK with error field: \u2022 Insufficient data for analysis \u2022 No significant relationships found\n\nINTERPRETING RESULTS: -------------------- 1. CAUSALITY STRENGTH (0-1 scale):    \u2022 0.8-1.0: Very strong causal relationship    \u2022 0.6-0.8: Strong causal relationship      \u2022 0.4-0.6: Moderate causal relationship    \u2022 0.2-0.4: Weak causal relationship    \u2022 0.0-0.2: Very weak causal relationship\n\n2. OPTIMAL LAG:    \u2022 Indicates how many time periods it takes for cause to affect effect    \u2022 Lag=1: Immediate effect (next time period)    \u2022 Lag=3: Effect appears 3 time periods later\n\n3. STABILITY SCORE:    \u2022 Higher scores indicate relationships that persist across time    \u2022 Useful for identifying reliable vs. spurious causality\n\n4. NETWORK DENSITY:    \u2022 0.0: No causal relationships    \u2022 1.0: Every variable causes every other variable    \u2022 0.3-0.7: Typical range for real-world systems\n\nAPPLICATIONS: ------------- \u2022 Financial markets: Identify which assets drive others \u2022 IoT sensors: Understand system cause-and-effect chains   \u2022 Business metrics: Find leading indicators for KPIs \u2022 Scientific data: Discover causal mechanisms in experiments \u2022 Predictive modeling: Identify which variables to monitor for early warnings\n\nTECHNICAL NOTES: ---------------- \u2022 Uses F-test instead of chi-squared for better small-sample robustness \u2022 Automatically handles missing data with configurable normalization strategies \u2022 Optimizes lag selection based on degrees of freedom and data characteristics \u2022 Provides both individual relationship analysis and network-level insights \u2022 Windowing approach helps distinguish stable from transient relationships",
        "tags": [
          "Signals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/event/streams": {
      "get": {
        "summary": "List the workspace's event streams (distinct ``key``s) with a small summary each, so callers can select an existing stream to push to.",
        "operationId": "get_event_streams",
        "description": "",
        "tags": [
          "Signals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/event/record": {
      "post": {
        "summary": "fnc_event_record <POST>",
        "operationId": "post_event_record",
        "description": "",
        "tags": [
          "Signals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/event/streams/{stream}": {
      "delete": {
        "summary": "Delete an entire event stream (all events under ``stream``) for the workspace. Subscribed marketplace event streams (``mkt-evt:`` aliases) are read-only and cannot be deleted here.",
        "operationId": "delete_event_streams_by_stream",
        "description": "",
        "tags": [
          "Signals"
        ],
        "parameters": [
          {
            "name": "stream",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "path"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/event/{event_id}": {
      "get": {
        "summary": "fnc_event_get <GET>",
        "operationId": "get_event_by_event_id",
        "description": "",
        "tags": [
          "Signals"
        ],
        "parameters": [
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/models/recommended": {
      "get": {
        "summary": "Return the workspace's single analysis-recommended blueprint (the one the analysis worker auto-creates with ``recommended: true``), if any.",
        "operationId": "get_models_recommended",
        "description": "Scoped by ``workspace_id`` only (NOT by owner) so any member who can access the workspace sees the recommendation - the auto-created blueprint is owned by the workspace owner, but the recommendation is a workspace-level artifact.",
        "tags": [
          "Models"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/models/public": {
      "get": {
        "summary": "Retrieve public blueprints with pagination, filtering and sorting --- tags:   - Blueprint parameters:   - name: page     in: query     type: integer     default: 1     description: Page number   - name: limit     in: query     type: integer     default: 10     description: Number of records per page (max 100)   - name: framework     in: query     type: string     description: Filter by framework (e.g., TensorFlow, PyTorch)   - name: training_environment     in: query     type: string     description: Filter by training environment (e.g., cloud, local)   - name: categories     in: query     type: array     items:       type: string     description: Filter by categories (can specify multiple values)   - name: tags     in: query     type: array     items:       type: string     description: Filter by tags (can specify multiple values)   - name: owner     in: query     type: string     description: Filter by owner UID   - name: search     in: query     type: string     description: Search by blueprint name   - name: sort_by     in: query     type: string     enum: [name, created_at, rating, in_use_by]     description: Field to sort by   - name: sort_order     in: query     type: string     enum: [asc, desc]     default: desc     description: Sort order (ascending or descending) responses:   200:     description: List of public blueprints   400:     description: Bad request parameters",
        "operationId": "get_models_public",
        "description": "Example:   GET /models/public?page=2&limit=20&framework=TensorFlow&training_environment=cloud&categories=weather&categories=temperature&tags=sensor&owner=949e4f25-3790-4aaa-8e94-bffcc1fcd6cd&search=LSTM&sort_by=rating&sort_order=desc\n\n  This example:   - Retrieves page 2 with 20 items per page   - Filters for TensorFlow models   - Filters for cloud training environment   - Filters for blueprints in both \"weather\" and \"temperature\" categories   - Filters for blueprints with \"sensor\" tag   - Filters for a specific owner   - Searches for blueprints with \"LSTM\" in the name   - Sorts by rating in descending order",
        "tags": [
          "Models"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/models/deploy-foundation": {
      "post": {
        "summary": "Deploy a foundation model DIRECTLY for zero-shot inference.",
        "operationId": "post_models_deploy_foundation",
        "description": "Used by the \"Deploy\" button on the public-models detail page when the row is a foundation model (kind=foundation_backbone). Skips the create-blueprint -> train -> promote funnel entirely: foundation models are already pretrained, so we just need a deployment record that the InferenceManager can route on.\n\nRequest body (one of):     {       \"blueprint_uid\": \"pfm__predictfm-f-v0.1\",   # or extfm__...       \"horizon\":       128,                        # optional default     }\n\nOr explicitly by the unified identity:     {       \"family\": \"chronos_bolt\",       # or \"predictfm\"       \"slug\":   \"chronos-bolt-tiny\",  # or \"predictfm-f-v0.1\"       ...     }\n\nResponse:     201 { promotion_id, status }     400 / 404 / 409 with { error: ... }",
        "tags": [
          "Models"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/models/{blueprint_uid}": {
      "get": {
        "summary": "Retrieve detailed information for a specific blueprint by its UID --- tags:   - Blueprint parameters:   - name: blueprint_uid     in: path     type: string     required: true     description: Unique identifier of the blueprint responses:   200:     description: Detailed blueprint information   404:     description: Blueprint not found   400:     description: Bad request",
        "operationId": "get_models_by_blueprint_uid",
        "description": "Example:   GET /models/c1c4d85a-42d9-476a-a6f1-fa8b22e29671\n\n  This example:   - Retrieves complete details of the blueprint with UID c1c4d85a-42d9-476a-a6f1-fa8b22e29671   - Returns full blueprint object with owner details",
        "tags": [
          "Models"
        ],
        "parameters": [
          {
            "name": "blueprint_uid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/training/{training_id}": {
      "get": {
        "summary": "Get detailed information about a specific training job.",
        "operationId": "get_training_by_training_id",
        "description": "Path Parameters: - training_id: The unique identifier of the training job\n\nReturns: - JSON with complete training details including model info, blueprint, report data",
        "tags": [
          "Trainings"
        ],
        "parameters": [
          {
            "name": "training_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/training/{training_id}/download": {
      "get": {
        "summary": "Download the trained model artifact for a training run.",
        "operationId": "get_training_by_training_id_download",
        "description": "Works for every non-foundation training:\n\n  * custom trainings   -> the serialized artifact the framework     serializer wrote to the models bucket (ONNX / TorchScript /     XGBoost JSON as a single file; TF SavedModel zipped on demand)   * BYOM trainings     -> the original uploaded model file\n\nFoundation trainings (PredictFM / external backbones) are not exportable: the backbone weights aren't the user's artifact, only the pipeline output is.\n\nReturns a time-limited (1 hour) presigned URL:\n\n    {\"download_url\", \"filename\", \"format\", \"expires_in_seconds\"}",
        "tags": [
          "Trainings"
        ],
        "parameters": [
          {
            "name": "training_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/segment/{segment_id}": {
      "put": {
        "summary": "Edit an existing segment.",
        "operationId": "put_segment_by_segment_id",
        "description": "Path parameter: - segment_id: ID of the segment to edit\n\nOptional fields in request body (any field that needs to be updated): - name: Segment name - description: Segment description - purpose: Segment purpose - features: List of feature fields from signals - labels: List of label fields from signals - interval: Time interval in seconds - tolerance: Tolerance in seconds - tail_seconds: Historical data window in seconds - live: Boolean indicating if segment is live - strategy: Data strategy (e.g., 'approximated')\n\nNormalization Strategies (optional): - normalization_strategy: Object defining the global normalization strategy   {     \"primary_strategy\": \"nearest_value\",  // Main strategy to try first     \"fallback_strategies\": [              // Ordered list of fallback strategies       \"previous_value\",        \"db_previous\"     ],     \"tolerance\": 60,                      // Time window in seconds     \"additional_params\": {                // Optional extra parameters       \"nearest_tolerance\": 120     }   }\n\n- segment_strategies: Object mapping feature field names to specific normalization strategies   {     \"temperature\": {                     // Feature field name (must be in features list)       \"primary_strategy\": \"linear_interpolation\",       \"fallback_strategies\": [\"nearest_value\", \"mean\"],       \"tolerance\": 120     },     \"count\": {       \"primary_strategy\": \"previous_value\",       \"fallback_strategies\": [\"zero\"]     }   }\n\n- To remove a strategy, set it to null: \"normalization_strategy\": null\n\n- engineered_features: Array of engineered feature configurations (optional)   [     {       \"technique\": \"lag_7\",                    // Required: Feature engineering technique       \"techniqueName\": \"Lag 7\",               // Required: Human-readable technique name       \"sourceField\": \"daily_sales\",           // Required: Source field (must exist in features/labels)       \"sourceFieldType\": \"number\",            // Optional: Data type of source field       \"name\": \"daily_sales_lag_7\",            // Required: Generated feature name       \"category\": \"Lag Features\",             // Required: Feature category       \"isRecommended\": true                   // Optional: Whether this feature is recommended     }   ]\n\n- To remove engineered features, set it to null: \"engineered_features\": null\n\nAvailable strategies: - nearest_value: Uses the nearest value within tolerance window - previous_value: Uses the most recent previous value - db_previous: Out of Range Previous - Queries the database for the previous value - db_nearest: Out of Range Nearest - Queries the database for the nearest value - forward_value: Uses the next available value - zero: Replaces missing values with zero - mean: Replaces missing values with mean - median: Replaces missing values with median - linear_interpolation: Uses linear interpolation between points - none: Leaves missing values as None/NaN\n\nReturns: - 200: Segment updated successfully - 400: Missing segment ID or invalid data - 403: User not authorized to edit segment or plan limits exceeded - 404: Segment not found - 422: Features or labels don't exist in workspace",
        "tags": [
          "Segments"
        ],
        "parameters": [
          {
            "name": "segment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete a segment.",
        "operationId": "delete_segment_by_segment_id",
        "description": "Path parameter: - segment_id: ID of the segment to delete\n\nReturns: - 200: Segment deleted successfully - 400: Missing segment ID - 403: User not authorized to delete segment - 404: Segment not found - 409: Segment is in use by one or more models",
        "tags": [
          "Segments"
        ],
        "parameters": [
          {
            "name": "segment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Get detailed information about a specific segment.",
        "operationId": "get_segment_by_segment_id",
        "description": "Path parameter: - segment_id: ID of the segment to retrieve\n\nReturns: - 200: Segment details returned successfully - 400: Missing segment ID or workspace ID - 403: User not authorized to access this segment - 404: Segment not found",
        "tags": [
          "Segments"
        ],
        "parameters": [
          {
            "name": "segment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/segment/normalization-templates": {
      "get": {
        "summary": "Get pre-configured templates for common normalization strategies and workspace-specific suggestions based on analysis of actual signal data.",
        "operationId": "get_segment_normalization_templates",
        "description": "Returns: - 200: List of templates for different data types, scenarios, and data-driven suggestions - 400: Missing workspace ID - 500: Error analyzing workspace data",
        "tags": [
          "Segments"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/segment/preview": {
      "post": {
        "summary": "Get segment data either by segment ID or by providing segment configuration. Returns a dataframe with actual values, sorted ascending with pagination.",
        "operationId": "post_segment_preview",
        "description": "Request body: - segment_id: ID of the segment to use (optional if segment configuration is provided) - config: Complete segment configuration object (optional if segment_id is provided)   {     \"name\": \"Segment Name\",     \"description\": \"Description\",     \"purpose\": \"Purpose\",     \"features\": [\"feature1\", \"feature2\"],     \"labels\": [\"label1\"],     \"interval\": 86400,     \"tolerance\": 43200,     \"tail_seconds\": 315 36000,     \"strategy\": \"approximated\",     \"live\": false,     \"normalization_strategy\": {       \"primary_strategy\": \"linear_interpolation\",       \"fallback_strategies\": [\"nearest_value\", \"previous_value\"],       \"tolerance\": 43200     },     \"workspace_id\": \"workspace-id-here\"   } - page: Page number for pagination (default: 1) - page_size: Number of data points per page (default: 100, max: 500)\n\nReturns: - 200: Segment data in a structured format with pagination info - 400: Missing required parameters or invalid data - 403: User not authorized to access the segment - 404: Segment not found - 500: Server error processing the request",
        "tags": [
          "Segments"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspace/available-regions": {
      "get": {
        "summary": "List the regions selectable for a new workspace + the recommended default.",
        "operationId": "get_workspace_available_regions",
        "description": "GET /v1/workspace/available-regions -> {      \"regions\": [{id, region, subdomain, countries}, ...],  # public only      \"default_region\": \"<cell-id>\"   # preselected in the advanced setting    }\n\nDrives the \"advanced setting\" region picker at workspace creation. Only public regions are listed; the default is derived from the owner's stored country / home_region (org when org-owned, else user). When there's only one real region this lets the FE hide the picker entirely.",
        "tags": [
          "Workspaces"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspace/{workspace_id}": {
      "get": {
        "summary": "func_get_workspace <GET>",
        "operationId": "get_workspace_by_workspace_id",
        "description": "",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "func_edit_workspace <PUT>",
        "operationId": "put_workspace_by_workspace_id",
        "description": "",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "func_delete_workspace <DELETE>",
        "operationId": "delete_workspace_by_workspace_id",
        "description": "",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspace/{workspace_id}/members": {
      "get": {
        "summary": "list_workspace_members <GET>",
        "operationId": "get_workspace_by_workspace_id_members",
        "description": "",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "add_workspace_member <POST>",
        "operationId": "post_workspace_by_workspace_id_members",
        "description": "",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspace/{workspace_id}/members/{user_id}": {
      "delete": {
        "summary": "remove_workspace_member <DELETE>",
        "operationId": "delete_workspace_by_workspace_id_members_by_user_id",
        "description": "",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          },
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/utilities/suggest-name": {
      "get": {
        "summary": "Generate a creative name with optional prefix and postfix.",
        "operationId": "get_utilities_suggest_name",
        "description": "Query Parameters: - prefix (optional): Text before the name (e.g., \"Model\", \"Workspace\") - postfix (optional): Text after the name (e.g., \"v2\", \"beta\")\n\nReturns: - 200: Generated name in format: \"prefix adjective noun postfix\"",
        "tags": [
          "Utilities"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/utilities/suggest-names": {
      "get": {
        "summary": "Generate multiple name suggestions at once.",
        "operationId": "get_utilities_suggest_names",
        "description": "Query Parameters: - prefix (optional): Text before each name - postfix (optional): Text after each name - count (optional): Number of suggestions to generate (default: 5, max: 20)\n\nReturns: - 200: List of generated names",
        "tags": [
          "Utilities"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pipelines/{model_id}": {
      "get": {
        "summary": "func_get_model <GET>",
        "operationId": "get_pipelines_by_model_id",
        "description": "",
        "tags": [
          "Pipelines"
        ],
        "parameters": [
          {
            "name": "model_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "func_edit_model <PUT>",
        "operationId": "put_pipelines_by_model_id",
        "description": "",
        "tags": [
          "Pipelines"
        ],
        "parameters": [
          {
            "name": "model_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "func_delete_model <DELETE>",
        "operationId": "delete_pipelines_by_model_id",
        "description": "",
        "tags": [
          "Pipelines"
        ],
        "parameters": [
          {
            "name": "model_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pipelines/{model_id}/train": {
      "post": {
        "summary": "Manually request a training run for a pipeline.",
        "operationId": "post_pipelines_by_model_id_train",
        "description": "Sets ``manual_train_requested=true`` on the model row. The orchestrator's training-dispatch timer polls every 0.5s and dispatches any model that either matches its schedule (``is_time_to_fetch``) OR has the manual flag set, then clears the flag on successful claim. Going through the orchestrator (instead of producing to Kafka here) keeps a single source of truth for dispatch logic - claim races, foundation-vs-custom routing, and the ``current_training_run`` bump all stay in one place.\n\nConstraints:   * Pipeline must belong to the calling user / their organization   * Pipeline must be active (``active=true``); a paused pipeline     is excluded from the manager's poll, so the manual flag would     never fire. Tell the user to enable first.   * Pipeline must NOT already be in_training. We could let the     flag queue up (the manager would dispatch as soon as the     current run finishes) but the UX is clearer if we 409 and     let the user wait for the in-flight run to finish first.   * Foundation pipelines that charge upfront must have enough     credits to cover the run. Without a pre-flight check, the     worker silently writes ``last_status: \"failed\"`` with the     \"Insufficient credits...\" message and the user gets no     immediate feedback (just a queued job that quietly never     runs). 402 here gives the FE an actionable error to render.",
        "tags": [
          "Pipelines"
        ],
        "parameters": [
          {
            "name": "model_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pipelines/{model_id}/promotion-decision": {
      "post": {
        "summary": "Resolve a pipeline's pending manual-promotion decision.",
        "operationId": "post_pipelines_by_model_id_promotion_decision",
        "description": "Body: ``{\"action\": \"promote\" | \"dismiss\"}``.\n\n  * ``promote`` - deploy the pending training and (per the     pipeline's promotion policy) retire the previously serving     version.   * ``dismiss`` - keep the current version; the prompt is cleared     and the same training is never re-proposed.\n\nThe pending decision is created by the automation sweep when a completed training beats the serving version and the pipeline's promotion policy is ``manual``.",
        "tags": [
          "Pipelines"
        ],
        "parameters": [
          {
            "name": "model_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/inference/deployments/{deployment_id}/infer": {
      "post": {
        "summary": "Run raw inference against a specific deployment.",
        "operationId": "post_inference_deployments_by_deployment_id_infer",
        "description": "Industry-standard request/response format compatible with OpenAI, HuggingFace Inference API, TensorFlow Serving and Triton clients. Pinned to a concrete deployment uid \u2014 use the pipeline/goal alias endpoints for URLs that survive promotions.",
        "tags": [
          "Inference"
        ],
        "parameters": [
          {
            "name": "deployment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Deployment uid (minted at promotion time)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InferenceResponse.6e6e26b"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InferenceRequest.6e6e26b"
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/inference/pipelines/{pipeline_id}/infer": {
      "post": {
        "summary": "Run raw inference via a stable pipeline alias.",
        "operationId": "post_inference_pipelines_by_pipeline_id_infer",
        "description": "Resolves the pipeline's current deployment and serves through it, so the URL survives promotions. The response's ``deployment_id`` reports which concrete deployment actually served the request.",
        "tags": [
          "Inference"
        ],
        "parameters": [
          {
            "name": "pipeline_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Pipeline uid; resolved to its current deployment per request."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InferenceResponse.6e6e26b"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InferenceRequest.6e6e26b"
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/inference/pipelines/{pipeline_id}/infer-segment": {
      "post": {
        "summary": "Run segment-based inference via a stable pipeline alias.",
        "operationId": "post_inference_pipelines_by_pipeline_id_infer_segment",
        "description": "",
        "tags": [
          "Inference"
        ],
        "parameters": [
          {
            "name": "pipeline_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Pipeline uid; resolved to its current deployment per request."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SegmentInferenceResponse.6e6e26b"
                }
              }
            }
          },
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AsyncInferenceAccepted.6e6e26b"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SegmentInferenceRequest.6e6e26b"
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/inference/goals/{goal_id}/infer": {
      "post": {
        "summary": "Run raw inference via a stable goal alias.",
        "operationId": "post_inference_goals_by_goal_id_infer",
        "description": "Resolves goal -> current champion model -> current deployment, so the URL survives both champion swaps and promotions.",
        "tags": [
          "Inference"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Goal id; resolved to its champion model's current deployment."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InferenceResponse.6e6e26b"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InferenceRequest.6e6e26b"
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/inference/goals/{goal_id}/infer-segment": {
      "post": {
        "summary": "Run segment-based inference via a stable goal alias.",
        "operationId": "post_inference_goals_by_goal_id_infer_segment",
        "description": "",
        "tags": [
          "Inference"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Goal id; resolved to its champion model's current deployment."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SegmentInferenceResponse.6e6e26b"
                }
              }
            }
          },
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AsyncInferenceAccepted.6e6e26b"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SegmentInferenceRequest.6e6e26b"
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/inference/{inference_id}": {
      "get": {
        "summary": "Fetch a single inference record (full payload, no trimming) + pre-resolved deployment label + pre-resolved segment label + historical context series for the forecast chart.",
        "operationId": "get_inference_by_inference_id",
        "description": "Why we inline the history: the detail page chart needs the segment's recent values rendered to the LEFT of the cutover line so the user can see the trend the model was extrapolating from. Doing this on the FE used to require a separate ``POST /v1/segment/preview`` round-trip per page load, which caused a visible flash where the chart rendered with predictions only, then re-rendered once the history arrived. Embedding the series here gives the FE everything in one request.\n\nThe ``history`` map is keyed by label name (matches ``segment_metadata.labels_used``) and capped at ``max(256, horizon * 3)`` most-recent rows per label - enough lead-in to judge the model's extrapolation without bloating the payload for a 5-year segment.\n\nAccess control: inference must belong to the workspace on the ``X-Workspace-Id`` header. We don't 404-stratify across workspaces to avoid an existence-oracle - cross-workspace lookups return the same \"not found\" response as truly missing rows.",
        "tags": [
          "Inference"
        ],
        "parameters": [
          {
            "name": "inference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Inference uid returned by an infer call or the list endpoint."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetInferenceResponse.6e6e26b"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/inference/deployments/{deployment_id}/usage": {
      "get": {
        "summary": "Get comprehensive deployment usage analytics and metrics.",
        "operationId": "get_inference_deployments_by_deployment_id_usage",
        "description": "GET /v1/inference/deployments/{deployment_id}/usage\n\nQuery Parameters: - period: 24h|7d|30d|all (default: 24h) - bin_size: hour|day|week (default: auto-selected based on period)\n\nResponse: Comprehensive usage analytics with time-series data",
        "tags": [
          "Inference"
        ],
        "parameters": [
          {
            "name": "deployment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Deployment uid (minted at promotion time)."
          },
          {
            "name": "period",
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": "24h",
              "description": "Analytics window: 24h, 7d, 30d or all.",
              "title": "Period"
            },
            "required": false,
            "description": "Analytics window: 24h, 7d, 30d or all."
          },
          {
            "name": "bin_size",
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Time-series bin: hour, day or week (auto if omitted).",
              "title": "Bin Size"
            },
            "required": false,
            "description": "Time-series bin: hour, day or week (auto if omitted)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageResponse.6e6e26b"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/inference/deployments/{deployment_id}/infer-segment": {
      "post": {
        "summary": "Run segment-based inference: the platform prepares model input from the deployment's live segment data automatically.",
        "operationId": "post_inference_deployments_by_deployment_id_infer_segment",
        "description": "For foundation-direct deployments pass ``segment_id`` (plus optional horizon/samples/quantile_levels); cold model servers return 202 and complete asynchronously (WS event ``inference.completed``).",
        "tags": [
          "Inference"
        ],
        "parameters": [
          {
            "name": "deployment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Deployment uid (minted at promotion time)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SegmentInferenceResponse.6e6e26b"
                }
              }
            }
          },
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AsyncInferenceAccepted.6e6e26b"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SegmentInferenceRequest.6e6e26b"
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/deployments/{promotion_id}": {
      "get": {
        "summary": "Get detailed information about a specific deployment.",
        "operationId": "get_deployments_by_promotion_id",
        "description": "",
        "tags": [
          "Deployments"
        ],
        "parameters": [
          {
            "name": "promotion_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete a specific deployment.",
        "operationId": "delete_deployments_by_promotion_id",
        "description": "",
        "tags": [
          "Deployments"
        ],
        "parameters": [
          {
            "name": "promotion_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deployments/health": {
      "get": {
        "summary": "Health check endpoint for the deployments API.",
        "operationId": "get_deployments_health",
        "description": "",
        "tags": [
          "Deployments"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deployments/pipelines/{pipeline_id}/unpromote": {
      "post": {
        "summary": "Remove a model from active serving.",
        "operationId": "post_deployments_pipelines_by_pipeline_id_unpromote",
        "description": "Body parameters: - training_id: Specific training to unpromote (optional)",
        "tags": [
          "Deployments"
        ],
        "parameters": [
          {
            "name": "pipeline_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deployments/{promotion_id}/retry": {
      "post": {
        "summary": "Retry a failed promotion in place.",
        "operationId": "post_deployments_by_promotion_id_retry",
        "description": "Re-runs the same background deployment flow on the EXISTING promotion record (same uid, same training). The user's URL stays valid and the audit trail isn't fragmented across multiple promotion rows.\n\nOnly retryable when the promotion is in ``failed`` status - the implementation rejects retries on healthy / in-flight deployments to avoid racing with the original deployment thread.",
        "tags": [
          "Deployments"
        ],
        "parameters": [
          {
            "name": "promotion_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deployments/pipelines/{pipeline_id}/status": {
      "get": {
        "summary": "Get current promotion status for a model.",
        "operationId": "get_deployments_pipelines_by_pipeline_id_status",
        "description": "",
        "tags": [
          "Deployments"
        ],
        "parameters": [
          {
            "name": "pipeline_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deployments/serving": {
      "get": {
        "summary": "List all deployed models with optional filtering.",
        "operationId": "get_deployments_serving",
        "description": "Query parameters: - workspace_id: Filter by workspace - deployment_type: Filter by type (\"shared\" or \"dedicated\") - status: Filter by status (\"deploying\", \"deployed\", \"failed\") - page: Page number (default: 1) - limit: Items per page (default: 20)",
        "tags": [
          "Deployments"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deployments/shared/status": {
      "get": {
        "summary": "Get status of shared ModelMesh deployments.",
        "operationId": "get_deployments_shared_status",
        "description": "",
        "tags": [
          "Deployments"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deployments/dedicated/status": {
      "get": {
        "summary": "Get status of dedicated KServe deployments.",
        "operationId": "get_deployments_dedicated_status",
        "description": "",
        "tags": [
          "Deployments"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deployments/dedicated/{deployment_id}/scale": {
      "post": {
        "summary": "Scale a dedicated deployment.",
        "operationId": "post_deployments_dedicated_by_deployment_id_scale",
        "description": "Body parameters: - replicas: Number of replicas",
        "tags": [
          "Deployments"
        ],
        "parameters": [
          {
            "name": "deployment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deployments/cleanup": {
      "post": {
        "summary": "Clean up idle or failed deployments. Requires admin privileges.",
        "operationId": "post_deployments_cleanup",
        "description": "Body parameters: - type: Cleanup type ('shared', 'dedicated', or 'all')",
        "tags": [
          "Deployments"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/organization/mine": {
      "get": {
        "summary": "List the current user's organizations + capabilities.",
        "operationId": "get_organization_mine",
        "description": "GET /v1/organization/mine -> { organizations: [...], can_invite_members: bool }\n\nDrives the FE gating: only users in a Team+ org may invite members or see the Organization settings tab.",
        "tags": [
          "Organizations"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/organization/{organization_id}": {
      "get": {
        "summary": "Get organization details",
        "operationId": "get_organization_by_organization_id",
        "description": "GET /v1/organization/<organization_id>",
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update organization details",
        "operationId": "put_organization_by_organization_id",
        "description": "PUT /v1/organization/<organization_id> Body: {     \"name\": \"New Name\",     \"address\": {...},     \"billing_address\": {...} }",
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/organization/{organization_id}/invite": {
      "post": {
        "summary": "Invite a user to join the organization",
        "operationId": "post_organization_by_organization_id_invite",
        "description": "POST /v1/organization/<organization_id>/invite Body: {     \"email\": \"user@example.com\",     \"role\": \"member\"  # admin, billing, member, viewer }",
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/organization/{organization_id}/members": {
      "get": {
        "summary": "Get all organization members",
        "operationId": "get_organization_by_organization_id_members",
        "description": "GET /v1/organization/<organization_id>/members",
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/organization/{organization_id}/members/{member_user_id}/role": {
      "put": {
        "summary": "Update a member's role",
        "operationId": "put_organization_by_organization_id_members_by_member_user_id_role",
        "description": "PUT /v1/organization/<organization_id>/members/<member_user_id>/role Body: {     \"role\": \"admin\" }",
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          },
          {
            "name": "member_user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/organization/{organization_id}/members/{member_user_id}": {
      "delete": {
        "summary": "Remove a member from the organization",
        "operationId": "delete_organization_by_organization_id_members_by_member_user_id",
        "description": "DELETE /v1/organization/<organization_id>/members/<member_user_id>",
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          },
          {
            "name": "member_user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/organization/{organization_id}/invitations": {
      "get": {
        "summary": "Get all invitations for an organization",
        "operationId": "get_organization_by_organization_id_invitations",
        "description": "GET /v1/organization/<organization_id>/invitations?status=pending",
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/organization/invitations/{invitation_id}/accept": {
      "post": {
        "summary": "Accept an organization invitation",
        "operationId": "post_organization_invitations_by_invitation_id_accept",
        "description": "POST /v1/organization/invitations/<invitation_id>/accept",
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "invitation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/organization/invitations/{invitation_id}/decline": {
      "post": {
        "summary": "Decline an organization invitation",
        "operationId": "post_organization_invitations_by_invitation_id_decline",
        "description": "POST /v1/organization/invitations/<invitation_id>/decline",
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "invitation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/organization/verify-invitation": {
      "get": {
        "summary": "Verify an invitation token (used for email links)",
        "operationId": "get_organization_verify_invitation",
        "description": "GET /v1/organization/verify-invitation?token=xxx",
        "tags": [
          "Organizations"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/balance": {
      "get": {
        "summary": "get_balance <GET>",
        "operationId": "get_billing_balance",
        "description": "",
        "tags": [
          "Billing"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/estimate": {
      "post": {
        "summary": "Preview the credit cost of an operation.",
        "operationId": "post_billing_estimate",
        "description": "Body: {operation: \"adapter_training.specialize\", units: 1}\n\nReturns: {operation, units, cost_credits, cost_per_unit, breakdown[]}",
        "tags": [
          "Billing"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/rates": {
      "get": {
        "summary": "The complete, resolved rate card for the active owner.",
        "operationId": "get_billing_rates",
        "description": "Powers the transparent \"Rate card\" section of the billing UI: every billable operation with the system default AND the price this owner actually pays (after plan-tier / org / user overrides), plus the owner's included monthly allowances and the PAYG policy for their tier.\n\nReturns:   {     rates: [{operation, base, effective}],     included_monthly: {meter: allowance},     credit_value_usd: float,     overage_allowed: bool,     overage_floor_credits: float,     free_monthly_drip_credits: float,     plan_tier: str,   }",
        "tags": [
          "Billing"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/usage": {
      "get": {
        "summary": "get_usage <GET>",
        "operationId": "get_billing_usage",
        "description": "",
        "tags": [
          "Billing"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/notifications/{notification_id}/read": {
      "post": {
        "summary": "mark_read <POST>",
        "operationId": "post_notifications_by_notification_id_read",
        "description": "",
        "tags": [
          "Notifications"
        ],
        "parameters": [
          {
            "name": "notification_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/notifications/mark-all-read": {
      "post": {
        "summary": "mark_all_read <POST>",
        "operationId": "post_notifications_mark_all_read",
        "description": "",
        "tags": [
          "Notifications"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/notifications/preferences/catalog": {
      "get": {
        "summary": "Public catalog used by the Settings page to render the notifications tab. Hides events with ``user_can_override: false`` so users never see toggles they can't act on (security alerts, transactional).",
        "operationId": "get_notifications_preferences_catalog",
        "description": "``requires_setup`` channels only actually deliver once the user has configured at least one endpoint (see ``/channels``); the FE greys them out until then.",
        "tags": [
          "Notifications"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/notifications/preferences": {
      "get": {
        "summary": "get_preferences <GET>",
        "operationId": "get_notifications_preferences",
        "description": "",
        "tags": [
          "Notifications"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "update_preferences <PUT>",
        "operationId": "put_notifications_preferences",
        "description": "",
        "tags": [
          "Notifications"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/notifications/channels": {
      "get": {
        "summary": "list_channels <GET>",
        "operationId": "get_notifications_channels",
        "description": "",
        "tags": [
          "Notifications"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "create_channel <POST>",
        "operationId": "post_notifications_channels",
        "description": "",
        "tags": [
          "Notifications"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/notifications/channels/{channel_id}": {
      "put": {
        "summary": "update_channel <PUT>",
        "operationId": "put_notifications_channels_by_channel_id",
        "description": "",
        "tags": [
          "Notifications"
        ],
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "delete_channel <DELETE>",
        "operationId": "delete_notifications_channels_by_channel_id",
        "description": "",
        "tags": [
          "Notifications"
        ],
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/notifications/channels/{channel_id}/test": {
      "post": {
        "summary": "Synchronously push a canned test message through the endpoint so the user gets immediate feedback in Settings.",
        "operationId": "post_notifications_channels_by_channel_id_test",
        "description": "",
        "tags": [
          "Notifications"
        ],
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/notifications/stream": {
      "get": {
        "summary": "Server-Sent Events stream.",
        "operationId": "get_notifications_stream",
        "description": "The notifications worker publishes one JSON payload per fresh notification on Redis channel ``notifications:user:<uid>``. We subscribe to that channel for the calling user and push each payload as an SSE ``notification`` event.\n\nWire format:     event: notification\\n     data: <json>\\n\\n\n\nA keepalive comment is sent every 25s so intermediate proxies don't drop the long-lived connection. We also guard against Redis flapping by looping until the client disconnects.\n\nAuth note --------- Browsers' ``EventSource`` API does NOT support custom headers, so we can't rely on the standard ``Authorization: Bearer <token>`` header here. The FE saga falls back to passing the JWT as the ``?access_token=<token>`` query parameter; we accept either form. The header path is still checked first so server-to-server consumers (e.g. a CLI debug tool) can use the bearer-header form.",
        "tags": [
          "Notifications"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/models/foundation": {
      "get": {
        "summary": "List every available foundation model, across all families.",
        "operationId": "get_models_foundation",
        "description": "Query params:     family: filter by family ('predictfm', 'chronos_bolt', ...)     task: filter by task ('forecast', 'embed', ...)     include_deprecated: 'true' to include deprecated rows",
        "tags": [
          "Foundation"
        ],
        "parameters": [
          {
            "name": "family",
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Filter by family, e.g. 'predictfm' or 'chronos_bolt'.",
              "title": "Family"
            },
            "required": false,
            "description": "Filter by family, e.g. 'predictfm' or 'chronos_bolt'."
          },
          {
            "name": "task",
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Filter by task ('forecast', 'embed', ...).",
              "title": "Task"
            },
            "required": false,
            "description": "Filter by task ('forecast', 'embed', ...)."
          },
          {
            "name": "include_deprecated",
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "'true' to include deprecated rows.",
              "title": "Include Deprecated"
            },
            "required": false,
            "description": "'true' to include deprecated rows."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListFoundationModelsResponse.27c3464"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/models/foundation/{family}/{slug}": {
      "get": {
        "summary": "Get one foundation model's metadata.",
        "operationId": "get_models_foundation_by_family_by_slug",
        "description": "",
        "tags": [
          "Foundation"
        ],
        "parameters": [
          {
            "name": "family",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Family, e.g. 'predictfm' or 'chronos_bolt'."
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Model slug within the family, e.g. 'predictfm-f-v0.1' or 'chronos-bolt-base'."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FoundationModelDetailResponse.27c3464"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/models/foundation/adapters": {
      "get": {
        "summary": "List fine-tuned adapters across every family.",
        "operationId": "get_models_foundation_adapters",
        "description": "Query params:     family, slug   - filter by the foundation model the adapter targets     task           - filter by task     owner          - filter by adapter owner     visibility     - 'public' (default), 'private', 'all'",
        "tags": [
          "Foundation"
        ],
        "parameters": [
          {
            "name": "family",
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Filter by the foundation model's family.",
              "title": "Family"
            },
            "required": false,
            "description": "Filter by the foundation model's family."
          },
          {
            "name": "slug",
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Filter by the foundation model's slug.",
              "title": "Slug"
            },
            "required": false,
            "description": "Filter by the foundation model's slug."
          },
          {
            "name": "task",
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Filter by task.",
              "title": "Task"
            },
            "required": false,
            "description": "Filter by task."
          },
          {
            "name": "owner",
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Filter by adapter owner.",
              "title": "Owner"
            },
            "required": false,
            "description": "Filter by adapter owner."
          },
          {
            "name": "visibility",
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "'public' (default), 'private', or 'all' (public + your own).",
              "title": "Visibility"
            },
            "required": false,
            "description": "'public' (default), 'private', or 'all' (public + your own)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListAdaptersResponse.27c3464"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/models/foundation/adapters/{adapter_id}": {
      "get": {
        "summary": "Get a single adapter's metadata (public, or owned by the caller).",
        "operationId": "get_models_foundation_adapters_by_adapter_id",
        "description": "",
        "tags": [
          "Foundation"
        ],
        "parameters": [
          {
            "name": "adapter_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Adapter id, e.g. 'adp_...'."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdapterDetailResponse.27c3464"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/models/byom/upload": {
      "post": {
        "summary": "Multipart file upload of a pre-trained model.",
        "operationId": "post_models_byom_upload",
        "description": "Stages the file locally (staging), then uploads to ``s3://{byom_bucket}/{org_id}/{model_id}/v1/model.{ext}``. Returns a ``model_id`` the caller uses to invoke ``/models/byom/validate`` and ``/models/byom/register``.",
        "tags": [
          "BYOM"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ByomUploadResponse.8a9eeb4"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsResponse.8a9eeb4"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/models/byom/validate": {
      "post": {
        "summary": "Auto-detect framework + infer signature + run dynamic validation.",
        "operationId": "post_models_byom_validate",
        "description": "",
        "tags": [
          "BYOM"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ByomValidateResponse.8a9eeb4"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsResponse.8a9eeb4"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ByomValidateRequest.8a9eeb4"
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/models/byom/register": {
      "post": {
        "summary": "Register a validated BYOM model as a blueprint (+ optional pipeline).",
        "operationId": "post_models_byom_register",
        "description": "When ``segment_id`` is supplied, the model signature is checked against the segment's feature/label layout BEFORE anything is written - a mismatch returns 422 with the expected vs. actual shapes so the user can fix the segment binding (or re-export the model) instead of hitting an inference-time failure later.",
        "tags": [
          "BYOM"
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ByomRegisterResponse.8a9eeb4"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ByomRegisterRequest.8a9eeb4"
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/models/byom/{blueprint_id}/download": {
      "get": {
        "summary": "Download the original artifact of a registered BYOM model.",
        "operationId": "get_models_byom_by_blueprint_id_download",
        "description": "Returns a time-limited (1 hour) presigned URL for the exact file that was uploaded - the model always stays exportable.",
        "tags": [
          "BYOM"
        ],
        "parameters": [
          {
            "name": "blueprint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Id of a registered BYOM model (kind 'byom')."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ByomDownloadResponse.8a9eeb4"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/sources/test-connection": {
      "post": {
        "summary": "Test a connection configuration without creating a data source. This is a dry-run test that validates the connection parameters.",
        "operationId": "post_ingestion_sources_test_connection",
        "description": "Body: Same as create endpoint but only tests the connection",
        "tags": [
          "Ingestion"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/sources/{source_id}/test": {
      "post": {
        "summary": "Test connection to a data source. Resource scoping enforced.",
        "operationId": "post_ingestion_sources_by_source_id_test",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/sources/{source_id}/schema": {
      "get": {
        "summary": "Get schema/structure of a data source. Resource scoping enforced.",
        "operationId": "get_ingestion_sources_by_source_id_schema",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/sources/{source_id}": {
      "put": {
        "summary": "Update a data source configuration. Resource scoping enforced.",
        "operationId": "put_ingestion_sources_by_source_id",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete a data source (and its jobs). Resource scoping enforced.",
        "operationId": "delete_ingestion_sources_by_source_id",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Get detailed information about a data source including statistics",
        "operationId": "get_ingestion_sources_by_source_id",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/sources/{source_id}/proxy": {
      "get": {
        "summary": "Proxy endpoint for REST API calls.",
        "operationId": "get_ingestion_sources_by_source_id_proxy",
        "description": "Makes API calls through configured REST data sources, handling: - Authentication - CORS bypass - Response caching (future) - Rate limiting (future)\n\nQuery params and body are forwarded to the target API.\n\nReturns:     200: API response data     400: Bad request / API error     404: Source not found     500: Server error",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Proxy endpoint for REST API calls.",
        "operationId": "post_ingestion_sources_by_source_id_proxy",
        "description": "Makes API calls through configured REST data sources, handling: - Authentication - CORS bypass - Response caching (future) - Rate limiting (future)\n\nQuery params and body are forwarded to the target API.\n\nReturns:     200: API response data     400: Bad request / API error     404: Source not found     500: Server error",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/sources/upload": {
      "post": {
        "summary": "Direct File Upload Endpoint",
        "operationId": "post_ingestion_sources_upload",
        "description": "Upload a file (CSV, Excel, JSON, Parquet) for immediate import. This is the UNIFIED endpoint for all file uploads.\n\nRequest:     - file: File blob (multipart/form-data)     - columnTypes: JSON schema defining column mappings\n\nResponse (202 Accepted):     {         \"status\": \"queued\",         \"execution_id\": \"uuid\",         \"message\": \"File uploaded successfully. Processing in background.\",         \"poll_url\": \"/v1/ingestion/executions/{execution_id}\"     }\n\nPoll /v1/ingestion/executions/{execution_id} to track progress.",
        "tags": [
          "Ingestion"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/jobs/{job_id}/trigger": {
      "post": {
        "summary": "Manually trigger a job execution. Resource scoping enforced by decorator.",
        "operationId": "post_ingestion_jobs_by_job_id_trigger",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/jobs/{job_id}": {
      "put": {
        "summary": "Update a job configuration. Resource scoping enforced by decorator.",
        "operationId": "put_ingestion_jobs_by_job_id",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete an ingestion job. Resource scoping enforced by decorator.",
        "operationId": "delete_ingestion_jobs_by_job_id",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/jobs/{job_id}/preview-schedule": {
      "get": {
        "summary": "Preview next N run times for a job. Resource scoping enforced.",
        "operationId": "get_ingestion_jobs_by_job_id_preview_schedule",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/executions/{execution_id}": {
      "get": {
        "summary": "Get execution details by ID. Resource scoping enforced by decorator.",
        "operationId": "get_ingestion_executions_by_execution_id",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "execution_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/executions/{execution_id}/cancel": {
      "post": {
        "summary": "Request cancellation of a running execution. Workspace scope enforced.",
        "operationId": "post_ingestion_executions_by_execution_id_cancel",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "execution_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/executions/stats": {
      "get": {
        "summary": "Get aggregated execution statistics for a workspace",
        "operationId": "get_ingestion_executions_stats",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/executions/{execution_id}/retry": {
      "post": {
        "summary": "Retry a failed execution. Workspace scope enforced by decorator.",
        "operationId": "post_ingestion_executions_by_execution_id_retry",
        "description": "Two retry paths, depending on whether the failed execution came from a real connector-driven job or a one-off file upload:\n\n* **Connector job** (``job_id`` exists in ``ingestion_jobs``):   route through ``trigger_job_manual`` so the orchestrator does   its normal source-lookup + execution creation + Kafka publish.   This re-reads the live ``data_sources`` / ``ingestion_jobs``   docs, so any config edits the user made between the failure   and the retry are picked up.\n\n* **Adhoc file upload** (``job_id == 'adhoc-file-upload'`` and   no matching row in ``ingestion_jobs``): there's no live job to   look up. The original ``ingestion_executions`` row carries the   entire upload context as ``source_config_snapshot`` +   ``job_config_snapshot`` (the file path on S3, the file_schema,   the parse options). We re-create an execution row with those   snapshots copied verbatim and publish a slim   ``{execution_id: ...}`` Kafka message to the ``ingestion_jobs``   topic - exactly the same wire format the original upload used.   The worker hydrates from the new row, downloads the SAME S3   file, and re-runs ingest.",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "execution_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/connect/inspect": {
      "post": {
        "summary": "Body (any one of):     { \"connection_string\": \"postgresql://user:pass@host:5432/db\" }     { \"connector_type\": \"bigquery\", \"config\": {...}, \"service_account_json\": \"...\" }",
        "operationId": "post_ingestion_connect_inspect",
        "description": "Returns:     {       \"connector_type\": \"...\", \"label\": \"...\",       \"test\": {\"success\": true},       \"tables\": [ <auto-mapped table>, ... ],       \"parse\": {...}      # how the string was understood (confidence, reasons)     }",
        "tags": [
          "Ingestion"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/connect/inspect-source/{source_id}": {
      "get": {
        "summary": "Introspect an *already-connected* source (by id) and return auto-mapped tables - powers the \"Add sync\" flow without re-asking for credentials.",
        "operationId": "get_ingestion_connect_inspect_source_by_source_id",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Introspect an *already-connected* source (by id) and return auto-mapped tables - powers the \"Add sync\" flow without re-asking for credentials.",
        "operationId": "post_ingestion_connect_inspect_source_by_source_id",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/connect/add-jobs/{source_id}": {
      "post": {
        "summary": "Create one ready-to-run sync job per selected table on an existing source.",
        "operationId": "post_ingestion_connect_add_jobs_by_source_id",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/connect/create": {
      "post": {
        "summary": "Body:     {       \"connection_string\"|\"connector_type\"+\"config\": ...,       \"name\": \"optional source name\",       \"import_historical\": true,       \"tables\": [         {           \"table_name\": \"trades\",           \"frequency\": \"15m\",           \"field_mappings\": [...],          # from inspect (or omit to re-derive)           \"timestamp_column\": \"ts\",           \"entity_column\": \"symbol\",           \"watermark_column\": \"ts\",           \"watermark_type\": \"datetime\"         }       ]     }",
        "operationId": "post_ingestion_connect_create",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/connect/create-event": {
      "post": {
        "summary": "Create a live-event source: webhook (push) or REST API (poll).",
        "operationId": "post_ingestion_connect_create_event",
        "description": "Body:     {       \"mode\": \"push\" | \"poll\",       \"connector_type\": \"webhook\" | \"rest\",       \"name\": \"X mentions\",       \"connection_string\": \"https://api.x.com/2/tweets/search/recent\",  # poll       \"credentials\": {\"auth_type\": \"bearer\", \"token\": \"...\"},           # poll       \"frequency\": \"15m\",                                               # poll       \"event_config\": {         \"stream\": \"x_mentions\",         \"array_path\": \"data\",     # poll: path to the list in the response         \"text_path\": \"text\",      # required         \"occurred_at_path\": \"created_at\",  # when it happened (occurred_at)         \"id_path\": \"id\",         \"params\": {...},          # poll: base query params         \"pagination\": {...},      # poll: optional         \"incremental_param\": \"since_id\"  # poll: param to carry the watermark       }     }",
        "tags": [
          "Ingestion"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/connect/upload": {
      "post": {
        "summary": "Multipart form:     file:        the file blob (csv / parquet / xlsx / xls / json)     columnTypes: (optional) explicit schema. When omitted we auto-detect                  the format and infer a type for every column server-side.     deleteExisting / skipDuplicates: (optional) same as the classic upload.",
        "operationId": "post_ingestion_connect_upload",
        "description": "Returns 202 with an execution_id to poll - identical contract to the existing upload endpoint, so the polling UI is unchanged.",
        "tags": [
          "Ingestion"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/connect/inspect-file": {
      "post": {
        "summary": "Stage an uploaded file to S3 and return its auto-detected columns so the user can customize the mapping before importing (does NOT import).",
        "operationId": "post_ingestion_connect_inspect_file",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/connect/import-file": {
      "post": {
        "summary": "Import a previously-staged file (from inspect-file) using the user's custom field mapping.",
        "operationId": "post_ingestion_connect_import_file",
        "description": "Body: { file_path, file_format, filename, field_mappings: [...], options }",
        "tags": [
          "Ingestion"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/connect/datasets/stage": {
      "post": {
        "summary": "Stage ONE file of a multi-file dataset upload (does NOT import or plan).",
        "operationId": "post_ingestion_connect_datasets_stage",
        "description": "The FE calls this once per selected file, then sends the returned descriptors to /datasets/inspect as JSON. One-file-per-request keeps every call inside the same body-size envelope as the single-file upload - a 9-file dataset in one multipart request trips the ingress' client body limit with a 413 long before Flask sees it.\n\nMultipart form: file. Returns the planner's per-file descriptor.",
        "tags": [
          "Ingestion"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/connect/datasets/inspect": {
      "post": {
        "summary": "Build the AI-planned dataset ingestion plan for review (does NOT import).",
        "operationId": "post_ingestion_connect_datasets_inspect",
        "description": "Two input modes:   * JSON { files: [descriptors from /datasets/stage] } - the standard     path: files were staged one request at a time.   * multipart form with repeated ``files`` - kept for small datasets /     API callers; subject to the request body-size limit.\n\nReturns { dataset_id, plan }.",
        "tags": [
          "Ingestion"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/connect/datasets/import": {
      "post": {
        "summary": "Execute a reviewed dataset plan: one ingestion job per non-skipped file, all sharing the dataset_id.",
        "operationId": "post_ingestion_connect_datasets_import",
        "description": "Body: { dataset_id, plan }  (plan may carry the user's review edits)",
        "tags": [
          "Ingestion"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/connect/datasets/{dataset_id}": {
      "get": {
        "summary": "Batch status for a dataset upload: per-file execution progress plus an aggregate status the FE can poll on one URL.",
        "operationId": "get_ingestion_connect_datasets_by_dataset_id",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "dataset_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/webhooks/{source_id}/{kind}": {
      "post": {
        "summary": "Receive an inbound webhook delivery.",
        "operationId": "post_ingestion_webhooks_by_source_id_by_kind",
        "description": "NOT bearer-authenticated: the caller is an external provider. Deliveries are verified with an HMAC-SHA256 signature over the raw request body (headers ``X-Signature``, ``X-Hub-Signature-256`` or ``X-Webhook-Signature``, value optionally prefixed ``sha256=``), using the per-source signing secret generated at source-create time. Routes:\n\n  * ``/webhooks/{source_id}/events``  (default) -> scored events   * ``/webhooks/{source_id}/signal``            -> signal time-series",
        "tags": [
          "Ingestion Webhooks"
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Webhook data-source id (created via the ingestion sources API/UI)."
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Delivery kind: 'events' (default) routes to scored events, 'signal' to signal time-series."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookAcceptedResponse.839bd04"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookDelivery.839bd04"
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/ingestion/webhooks/{source_id}": {
      "post": {
        "summary": "Receive an inbound webhook delivery.",
        "operationId": "post_ingestion_webhooks_by_source_id",
        "description": "NOT bearer-authenticated: the caller is an external provider. Deliveries are verified with an HMAC-SHA256 signature over the raw request body (headers ``X-Signature``, ``X-Hub-Signature-256`` or ``X-Webhook-Signature``, value optionally prefixed ``sha256=``), using the per-source signing secret generated at source-create time. Routes:\n\n  * ``/webhooks/{source_id}/events``  (default) -> scored events   * ``/webhooks/{source_id}/signal``            -> signal time-series",
        "tags": [
          "Ingestion Webhooks"
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Webhook data-source id (created via the ingestion sources API/UI)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookAcceptedResponse.839bd04"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse.839bd04"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookDelivery.839bd04"
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/ingestion/oauth/providers": {
      "get": {
        "summary": "Secret-free provider directory: {id, label, kind, configured}.",
        "operationId": "get_ingestion_oauth_providers",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/oauth/{provider}/start": {
      "post": {
        "summary": "start <POST>",
        "operationId": "post_ingestion_oauth_by_provider_start",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/oauth/{provider}/callback": {
      "get": {
        "summary": "callback <GET>",
        "operationId": "get_ingestion_oauth_by_provider_callback",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/price": {
      "get": {
        "summary": "Cost preview for the create wizard: run cost (bucketed), tournament cost, current balance, and the goal quota.",
        "operationId": "get_goals_price",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/profile-preview": {
      "get": {
        "summary": "Synchronous Step-1 profile for the create wizard: the user picks a target and immediately sees what the autopilot detected (cadence, liveness, cycles, max lag) BEFORE committing. Target-only, seconds. Free: it's the cheap path of a run the user is about to pay for.",
        "operationId": "get_goals_profile_preview",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}": {
      "get": {
        "summary": "get_goal <GET>",
        "operationId": "get_goals_by_goal_id",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Rename, live on/off, retrain policy, option tweaks.",
        "operationId": "patch_goals_by_goal_id",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "delete_goal <DELETE>",
        "operationId": "delete_goals_by_goal_id",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/model-lineup": {
      "get": {
        "summary": "The model lineup for the goal-creation picker (Advanced \u2192 Models). Optional ?goal_type= flags which models apply to that intent.",
        "operationId": "get_goals_model_lineup",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/activity": {
      "get": {
        "summary": "The goal's lifecycle chain (Discover \u2192 Auto-fit \u2192 Deploy \u2192 Live) for the Activity tab. Read-only aggregation; polled while work is in flight.",
        "operationId": "get_goals_by_goal_id_activity",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/run": {
      "post": {
        "summary": "Enqueue a re-run (new run_id) for an existing goal.",
        "operationId": "post_goals_by_goal_id_run",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/serve": {
      "post": {
        "summary": "Produce one forecast now with the current champion \u2014 the manual serving-policy action (also handy as a 'refresh forecast' for any policy; the serve itself is idempotent per data window).",
        "operationId": "post_goals_by_goal_id_serve",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/train": {
      "post": {
        "summary": "Launch the deterministic preset Tournament for this goal. One credit charge upfront (``discovery.tournament``); PredictFM entries additionally charge their standard Flow A/B meters inside the training pipeline.",
        "operationId": "post_goals_by_goal_id_train",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/tournament": {
      "get": {
        "summary": "The latest tournament (leaderboard) for this goal \u2014 the UI polls this while a tournament runs.",
        "operationId": "get_goals_by_goal_id_tournament",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/tournament/cancel": {
      "post": {
        "summary": "Stop the in-flight fitting run for this goal. Cooperative: flags the latest queued/running tournament; the orchestrator + fitting workers finalize it as ``cancelled`` (and cancel any in-flight entry) at their next checkpoint. No champion is selected \u2014 a stop means abort.",
        "operationId": "post_goals_by_goal_id_tournament_cancel",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/tournament/entries/{preset_id}/cancel": {
      "post": {
        "summary": "Cancel ONE fitting entry (e.g. a stuck foundation Flow-B adapter that is blocking the rest of the leaderboard). A pending entry is dropped immediately; a running entry is signalled and aborts at its next checkpoint. The remaining entries keep fitting and the champion is still selected from whatever scored \u2014 so the deploy step is no longer held hostage by a single slow entry.",
        "operationId": "post_goals_by_goal_id_tournament_entries_by_preset_id_cancel",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          },
          {
            "name": "preset_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/tournament/training/cancel": {
      "post": {
        "summary": "Cancel the champion's full-history serving-training (the \"Training best model\u2026\" step that runs after the leaderboard). Sets the standard ``cancellation_requested`` contract on the trainings doc; the training / foundation worker honours it (queued jobs abort immediately, in-flight jobs at the next checkpoint). The board then surfaces a cancelled state with a re-fit CTA.",
        "operationId": "post_goals_by_goal_id_tournament_training_cancel",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/tournament/champion": {
      "post": {
        "summary": "Choose which scored model to deploy (instead of only the auto-selected best). Body: ``{\"preset_id\": \"<entry id>\"}``.",
        "operationId": "post_goals_by_goal_id_tournament_champion",
        "description": "Materializes the chosen leaderboard entry through the SAME pipeline the auto-selected champion uses (classical \u2192 blueprint + serving training; foundation Flow-B \u2192 GPU adapter training; zero-shot \u2192 ready immediately) and re-points the tournament's champion at it. The board's existing \"training \u2192 Deploy\" lifecycle then drives the rest; the actual deploy still goes through the standard promotion gate.",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/publish-segment": {
      "post": {
        "summary": "Step 9b \"Create segment\": copy the goal's compiled segment to a normal, user-owned, editable segment (``origin: 'discovery_published'``, counts toward plan quota). Idempotent \u2014 while the published copy exists, re-publishing returns it.",
        "operationId": "post_goals_by_goal_id_publish_segment",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/runs/{run_id}": {
      "get": {
        "summary": "The stage/progress doc the RunFunnel UI polls every 2 s.",
        "operationId": "get_goals_runs_by_run_id",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/graph": {
      "get": {
        "summary": "Nodes + edges for the graph view (the drawer fetches full edges).",
        "operationId": "get_goals_by_goal_id_graph",
        "description": "Returns the FULL workspace universe \u2014 every signal and event stream \u2014 with ``related`` flags. The canvas renders the whole constellation and lights up only the nodes with validated relationships; the rest sit dimmed at the periphery, showing how much was screened and rejected.\n\nCandidate edges (funnel work-in-progress that never cleared S5) ride along with ``related: false`` sources and a low ``score`` so the strength knob in the UI can reveal weaker relationships on demand.",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/edges/{edge_id}": {
      "get": {
        "summary": "Full edge including fold table, SHAP shape, rolling history.",
        "operationId": "get_goals_edges_by_edge_id",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "edge_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/paths": {
      "get": {
        "summary": "Validated multi-hop chains (Phase C; empty list until then).",
        "operationId": "get_goals_by_goal_id_paths",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/forecast": {
      "get": {
        "summary": "Forecast Studio read (plan Step 14): the promoted champion's latest multi-horizon forecast + the nightly-aggregated track record (accuracy in the intent's own metric, interval coverage). No new inference paths \u2014 assembled from stored artifacts only.",
        "operationId": "get_goals_by_goal_id_forecast",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/forecast/rerun": {
      "post": {
        "summary": "Manually re-run the champion's inference on the latest serving window.",
        "operationId": "post_goals_by_goal_id_forecast_rerun",
        "description": "Unlike the GET read (which only serves on-demand when no forecast exists yet), this forces a fresh inference even if the stream hasn't advanced \u2014 the user explicitly asked to re-forecast on the newest data. Returns the freshly-served forecast so the studio can update in place.",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/drivers-now": {
      "get": {
        "summary": "\"Why this forecast\" \u2014 the validated graph projected as current pressure: each driver's latest value, its move over its validated lag, direction of effect, freshness. Deterministic template over stored edge evidence (no LLM).",
        "operationId": "get_goals_by_goal_id_drivers_now",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/timeline": {
      "get": {
        "summary": "The autopilot's accountability record (plan Step 16): every automated action with its trigger, references and charge, plus the current autopilot status (mode, monthly cap, month-to-date spend).",
        "operationId": "get_goals_by_goal_id_timeline",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/scenarios": {
      "post": {
        "summary": "Run a what-if scenario against the goal's champion (plan Step 15). Charged upfront (``discovery.scenario``), refunded if the scenario fails. Results are persisted \u2014 saved scenarios are free to view.",
        "operationId": "post_goals_by_goal_id_scenarios",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Saved scenarios for a goal \u2014 persisted, rerunnable, comparable. Free to view (reads stored artifacts only).",
        "operationId": "get_goals_by_goal_id_scenarios",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/scenarios/parse": {
      "post": {
        "summary": "Parse a natural-language what-if into a structured scenario spec (plan Step 15, NL companion). Returns the spec for the builder to prefill/edit \u2014 it does NOT run the scenario (the client chains the existing run for auto-run). Charged upfront (``discovery.scenario_parse``, free if unconfigured), refunded if parsing fails.",
        "operationId": "post_goals_by_goal_id_scenarios_parse",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/scenarios/{scenario_id}/explain": {
      "post": {
        "summary": "A very short LLM report on WHY the simulation moved, with the provenance (validated edges, measured event curves) inline. The numbers are computed deterministically from stored evidence; the LLM only phrases them. Cached on the scenario document \u2014 repeat views are free; only the first generation is charged (``discovery.scenario_explain``, free if unconfigured), refunded on failure.",
        "operationId": "post_goals_by_goal_id_scenarios_by_scenario_id_explain",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          },
          {
            "name": "scenario_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/scenarios/sensitivity": {
      "post": {
        "summary": "Sensitivity (tornado) analysis: probe every simulatable driver with a \u00b1X% step and rank by end-of-horizon impact. Charged upfront (``discovery.scenario_sensitivity`` \u2014 it is up to 2 champion inferences per driver), refunded on failure. Persisted; GET re-views are free.",
        "operationId": "post_goals_by_goal_id_scenarios_sensitivity",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Latest persisted sensitivity analysis for a goal (free to view).",
        "operationId": "get_goals_by_goal_id_scenarios_sensitivity",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/scenarios/{scenario_id}": {
      "delete": {
        "summary": "delete_goal_scenario <DELETE>",
        "operationId": "delete_goals_scenarios_by_scenario_id",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "scenario_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/similar": {
      "get": {
        "summary": "E9 \"find similar\" \u2014 the same embedding space that powers recall and shock analogues, user-facing. ``?kind=signal&key=\u2026`` or ``?kind=event&event_id=\u2026``. Returns 503 when Qdrant is unavailable (the feature degrades, the platform doesn't).",
        "operationId": "get_goals_similar",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/shock-analogues": {
      "get": {
        "summary": "The analogue fan attached to the goal's most recent shock-log entry \u2014 \"in k similar past events, the target moved X to Y within 24h\". Empty when the goal never shocked or Qdrant was down when it did.",
        "operationId": "get_goals_by_goal_id_shock_analogues",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/alerts": {
      "get": {
        "summary": "list_goal_alerts <GET>",
        "operationId": "get_goals_by_goal_id_alerts",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "create_goal_alert <POST>",
        "operationId": "post_goals_by_goal_id_alerts",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/alerts/{alert_id}": {
      "put": {
        "summary": "update_goal_alert <PUT>",
        "operationId": "put_goals_by_goal_id_alerts_by_alert_id",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          },
          {
            "name": "alert_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "delete_goal_alert <DELETE>",
        "operationId": "delete_goals_by_goal_id_alerts_by_alert_id",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          },
          {
            "name": "alert_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/alerts/preview": {
      "post": {
        "summary": "Dry-run a condition against the champion's latest forecast so the builder can show \"this would trigger right now\" live while the user drags the threshold. Free \u2014 pure read + math.",
        "operationId": "post_goals_by_goal_id_alerts_preview",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/analyst/stream": {
      "post": {
        "summary": "Streaming Goal Analyst turn (SSE).",
        "operationId": "post_goals_by_goal_id_analyst_stream",
        "description": "Body: ``{\"session_id\": \"<optional>\", \"question\": \"<required>\"}``. The response is a ``text/event-stream`` payload with the same event contract as ``/signal/ask/stream`` (``start`` / ``text_delta`` / ``tool_start`` / ``tool_end`` / ``attachment`` / ``warning`` / ``done`` / ``error``) so the FE stream parser is shared.\n\nPrivacy: the goal is loaded with a workspace-scoped read (404 on miss \u2014 never an existence oracle), and the orchestrator forces workspace_id + goal server-side; the LLM cannot cross either boundary.",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/analyst/sessions": {
      "get": {
        "summary": "List the calling user's Goal Analyst sessions for this goal (newest first, no turn bodies).",
        "operationId": "get_goals_by_goal_id_analyst_sessions",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goal_id}/analyst/sessions/{session_id}": {
      "get": {
        "summary": "One full session transcript. 404 if it doesn't exist OR doesn't belong to the active (workspace, goal, user) triple \u2014 same response either way to avoid an existence oracle.",
        "operationId": "get_goals_by_goal_id_analyst_sessions_by_session_id",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete one session. 404 if it doesn't belong to the active (workspace, goal, user) triple.",
        "operationId": "delete_goals_by_goal_id_analyst_sessions_by_session_id",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [
          {
            "name": "goal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deployments": {
      "get": {
        "summary": "List all model deployments (promotions) for the current workspace with filtering and pagination.",
        "operationId": "get_deployments",
        "description": "Query parameters: - status: Filter by status (optional) - model_id: Filter by model within workspace (optional) - page: Page number (default: 1) - limit: Items per page (default: 20) - include_archived: Include archived deployments (default: false)",
        "tags": [
          "Deployments"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Deploy a trained model: put a pipeline's completed training into live serving.",
        "operationId": "post_deployments",
        "description": "Body parameters: - pipeline_id: The pipeline whose training is being deployed (required) - training_id: Specific training to deploy (required) - deployment_type: \"shared\" (multi-tenant serving, public),                    \"dedicated\" / \"kserve_dedicated\" (dedicated serving pod),                    \"foundation\" (foundation model servers)                    - auto-detected from the model's blueprint or                      ``model.foundation`` ref when omitted - dedicated_config: Configuration for dedicated deployments (optional) - reason: Reason for promotion (optional)\n\nAll deployments are treated the same: capacity is governed by a single per-plan deployment cap, and every deployment gets the standard serving resources.",
        "tags": [
          "Deployments"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals": {
      "post": {
        "summary": "Create a goal: validate \u2192 plan limit \u2192 charge \u2192 goal + goal segment \u2192 enqueue run (refund + cleanup on enqueue failure). Spec J1 / \u00a79.2.",
        "operationId": "post_goals",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Goals with active edge counts + last-run summaries (one pass each).",
        "operationId": "get_goals",
        "description": "",
        "tags": [
          "Goals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/inference": {
      "get": {
        "summary": "List historical inferences for the current workspace.",
        "operationId": "get_inference",
        "description": "Reads from the unified ``inferences`` collection (one row per inference; written by ``app.inferences.inference.inference_manager``). Scoped to the workspace on the ``X-Workspace-Id`` header so the FE can render a per-workspace history without hitting global data.\n\nQuery params:   page (int, 1-indexed, default 1)   limit (int, default 20, max 100)   deployment_id (str, optional) - filter to a single deployment   inference_type (str, optional) - 'segment' | 'raw'   sort_direction (str, 'asc' | 'desc', default 'desc' on ``timestamp``)\n\nResponse shape:   {     \"inferences\": [<inference doc, with predictions/quantiles trimmed                    to a sparkline budget>],     \"pagination\": {\"page\", \"limit\", \"total\", \"total_pages\"},   }",
        "tags": [
          "Inference"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "default": 1,
              "description": "1-indexed page number.",
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            },
            "required": false,
            "description": "1-indexed page number."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "default": 20,
              "description": "Rows per page (max 100).",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            },
            "required": false,
            "description": "Rows per page (max 100)."
          },
          {
            "name": "deployment_id",
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Filter to a single deployment.",
              "title": "Deployment Id"
            },
            "required": false,
            "description": "Filter to a single deployment."
          },
          {
            "name": "inference_type",
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "'segment' or 'raw'.",
              "title": "Inference Type"
            },
            "required": false,
            "description": "'segment' or 'raw'."
          },
          {
            "name": "sort_direction",
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": "desc",
              "description": "'asc' or 'desc' on timestamp.",
              "title": "Sort Direction"
            },
            "required": false,
            "description": "'asc' or 'desc' on timestamp."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListInferencesResponse.6e6e26b"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse.6e6e26b"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError.6a07bef"
                }
              }
            }
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/executions": {
      "get": {
        "summary": "List execution history for a workspace with pagination.",
        "operationId": "get_ingestion_executions",
        "description": "Query params: - job_id: Filter by job (optional) - source_id: Filter by source (optional) - connector_type: Filter by connector type (optional) - status: Filter by status (optional) - page: Page number (default 1) - per_page: Items per page (default 10) - sort_column: Column to sort by (default 'started_at') - sort_direction: Sort direction 'asc' or 'desc' (default 'desc')",
        "tags": [
          "Ingestion"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/jobs": {
      "get": {
        "summary": "List all ingestion jobs for a workspace with pagination",
        "operationId": "get_ingestion_jobs",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new ingestion job.",
        "operationId": "post_ingestion_jobs",
        "description": "Body: {     \"source_id\": \"uuid\",     \"name\": \"Daily Sales Import\",     \"description\": \"Import sales data every day\",     \"config\": {         \"query\": \"SELECT * FROM sales WHERE date > :last_sync\",         \"field_mappings\": [             {\"source_field\": \"sale_date\", \"target_key\": \"timestamp\", \"data_type\": \"datetime_timestamp\", \"is_timestamp\": true},             {\"source_field\": \"amount\", \"target_key\": \"revenue\", \"data_type\": \"continuous_numerical\"}         ],         \"options\": {\"delete_existing\": true}     },     \"schedule\": {         \"type\": \"cron\",         \"cron_expression\": \"0 2 * * *\",         \"timezone\": \"UTC\",         \"enabled\": true     },     \"priority\": 5 }",
        "tags": [
          "Ingestion"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ingestion/sources": {
      "get": {
        "summary": "List all data sources for a workspace",
        "operationId": "get_ingestion_sources",
        "description": "",
        "tags": [
          "Ingestion"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new data source connection.",
        "operationId": "post_ingestion_sources",
        "description": "Since the test-connection dry-run endpoint is used before creation, the source is automatically marked as tested and activated.\n\nBody: {     \"name\": \"My BigQuery Connection\",     \"connector_type\": \"bigquery\",     \"config\": {         \"connection\": {...},         \"credentials\": {...}     } }",
        "tags": [
          "Ingestion"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/models": {
      "get": {
        "summary": "func_get_blueprints <GET>",
        "operationId": "get_models",
        "description": "",
        "tags": [
          "Models"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new blueprint --- tags:   - Blueprint parameters:   - name: X-Workspace-Id     in: header     type: string     required: true     description: Workspace ID   - name: body     in: body     required: true     description: Blueprint data     schema:       type: object       required:         - name         - purpose         - description         - visibility         - categories         - tags         - metadata         - model_blueprint         - compilation_details         - data_split         - data_preprocessing         - training_details       properties:         name:           type: string           description: Name of the blueprint           example: \"LSTM long range for markets\"         purpose:           type: string           description: Purpose of the blueprint           example: \"Improve the prediction of the next value in a timeseries dataset\"         description:           type: string           description: Detailed description of the blueprint           example: \"This LSTM-based model includes multiple stacked layers for enhanced time series forecasting\"         visibility:           type: string           enum: [public, private]           description: Visibility of the blueprint           example: \"public\"         categories:           type: array           items:             type: string           description: Categories for the blueprint           example: [\"stocks\", \"prediction\"]         tags:           type: array           items:             type: string           description: Tags for the blueprint           example: [\"stock market\"]         metadata:           type: object           properties:             model_version:               type: string               example: \"3.0\"             framework:               type: string               example: \"TensorFlow\"             framework_version:               type: string               example: \"2.x\"             training_environment:               type: string               example: \"cloud\"             privacy:               type: string               example: \"obfuscated\"         model_blueprint:           type: object           description: The model architecture         compilation_details:           type: object           description: Model compilation settings         data_split:           type: object           description: How to split the data         data_preprocessing:           type: object           description: Data preprocessing steps         training_details:           type: object           description: Training configuration details responses:   201:     description: Blueprint created successfully   400:     description: Bad request parameters   401:     description: Unauthorized   403:     description: Forbidden   500:     description: Internal server error",
        "operationId": "post_models",
        "description": "Example:   POST /models   Headers: X-Workspace-Id: c1c4d85a-42d9-476a-a6f1-fa8b22e29672\n\n  This example:   - Creates a new blueprint for the specified workspace   - Sets the appropriate ownership and workspace association   - Initializes popularity metrics (rating, featured, in_use_by) to 0",
        "tags": [
          "Models"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/notifications": {
      "get": {
        "summary": "Paginated bell list.",
        "operationId": "get_notifications",
        "description": "Query params:   * ``per_page``  (default 50, max 100)   * ``page``      (default 1)   * ``unread``    (``true`` filters to read_at:null only)   * ``since``     (ISO datetime; only return rows newer than this -                    used by the bell saga to fetch deltas after the                    SSE channel reconnects)",
        "tags": [
          "Notifications"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/organization": {
      "post": {
        "summary": "Create a new organization with a plan",
        "operationId": "post_organization",
        "description": "POST /v1/organization/create Body: {     \"name\": \"Organization Name\",     \"plan_id\": \"startup\",  # startup, growth, scale, enterprise     \"address\": {         \"street\": \"123 Main St\",         \"city\": \"San Francisco\",         \"state\": \"CA\",         \"country\": \"USA\",         \"postal_code\": \"94102\"     },     \"billing_address\": {...}  # Optional, defaults to address }",
        "tags": [
          "Organizations"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pipelines": {
      "get": {
        "summary": "func_get_models <GET>",
        "operationId": "get_pipelines",
        "description": "",
        "tags": [
          "Pipelines"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a pipeline: bind one or more models to a segment with a schedule and a promotion policy.",
        "operationId": "post_pipelines",
        "description": "The ``models`` array is the one universal way to say what trains \u2014 each entry is a catalog reference (custom model, BYOM upload, or foundation model). The entries form a pool of peers: every run trains all of them on the same segment snapshot, and the best-scoring result becomes the promotion candidate. ``forecast_horizon`` is pipeline-level and shared by every entry, so cycle scores stay comparable; per-entry knobs (``lookback``, ``intensity``) ride on the entry itself.",
        "tags": [
          "Pipelines"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/segment": {
      "get": {
        "summary": "func_get_segments <GET>",
        "operationId": "get_segment",
        "description": "",
        "tags": [
          "Segments"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new segment with specified parameters.",
        "operationId": "post_segment",
        "description": "Request Body: - name: Segment name - description: Segment description - workspace_id: Workspace ID - features: List of feature definitions - labels: List of label definitions - interval: Time interval for the segment - tolerance: Tolerance for the segment - strategy: Strategy for the segment\n\nReturns: - JSON with segment details",
        "tags": [
          "Segments"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/signal": {
      "get": {
        "summary": "fnc_signal_list <GET>",
        "operationId": "get_signal",
        "description": "",
        "tags": [
          "Signals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "delete_signals <DELETE>",
        "operationId": "delete_signal",
        "description": "",
        "tags": [
          "Signals"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/training": {
      "get": {
        "summary": "Get a list of training jobs for the current workspace with optional filtering.",
        "operationId": "get_training",
        "description": "Query Parameters: - model_id: (optional) Filter trainings by specific model ID - page: (optional) Page number for pagination (default: 1) - per_page: (optional) Number of items per page (default: 100) - sort_column: (optional) Column to sort by (default: 'created_at')   Supports standard fields and special fields like 'report.accuracy_score' - sort_direction: (optional) Sort direction, 'asc' or 'desc' (default: 'desc')\n\nReturns: - JSON with trainings array and pagination information - Each training includes model info, status, execution details, and metrics",
        "tags": [
          "Trainings"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspace": {
      "get": {
        "summary": "func_get_workspaces <GET>",
        "operationId": "get_workspace",
        "description": "",
        "tags": [
          "Workspaces"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "func_create_workspace <POST>",
        "operationId": "post_workspace",
        "description": "",
        "tags": [
          "Workspaces"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "4XX": {
            "description": "Request error. Canonical envelope: `error.code`, `error.message`, `error.details`, plus a top-level `status` message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server error (same envelope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CategoriesResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CategoriesResponse.462ef8b.CategoriesData"
          }
        },
        "required": [
          "data"
        ],
        "title": "CategoriesResponse",
        "type": "object"
      },
      "StatusResponse.839bd04": {
        "description": "Standard status envelope (`utils.api_utils.responseStatusJSON`).",
        "properties": {
          "status": {
            "description": "Status or error message.",
            "title": "Status"
          }
        },
        "required": [
          "status"
        ],
        "title": "StatusResponse",
        "type": "object"
      },
      "ValidationError.6a07bef": {
        "title": "ValidationError",
        "description": "Model of a validation error response.",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ValidationError.6a07bef.ValidationErrorElement"
        }
      },
      "CategoryCountsQuery.462ef8b": {
        "properties": {
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "public",
            "description": "'public' (global marketplace) or 'org' (caller's organization marketplace).",
            "title": "Visibility"
          },
          "org_uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Organization to scope org-visibility counts to (must be one the caller belongs to).",
            "title": "Org Uid"
          }
        },
        "title": "CategoryCountsQuery",
        "type": "object"
      },
      "CategoryCountsResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CategoryCountsResponse.462ef8b.CategoryCountsData"
          }
        },
        "required": [
          "data"
        ],
        "title": "CategoryCountsResponse",
        "type": "object"
      },
      "IconUploadResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/IconUploadResponse.462ef8b.IconUploadData"
          }
        },
        "required": [
          "data"
        ],
        "title": "IconUploadResponse",
        "type": "object"
      },
      "SuggestListingQuery.462ef8b": {
        "properties": {
          "signal_key": {
            "description": "The signal key the seller wants to publish.",
            "title": "Signal Key",
            "type": "string"
          }
        },
        "required": [
          "signal_key"
        ],
        "title": "SuggestListingQuery",
        "type": "object"
      },
      "SuggestListingResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SuggestListingResponse.462ef8b.SuggestListingData"
          }
        },
        "required": [
          "data"
        ],
        "title": "SuggestListingResponse",
        "type": "object"
      },
      "ListListingsQuery.462ef8b": {
        "properties": {
          "q": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Substring match across title/description/signal_key/tags.",
            "title": "Q"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Taxonomy category slug.",
            "title": "Category"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'realtime', 'historical' or 'both'.",
            "title": "Kind"
          },
          "listing_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'signal' or 'event' (omit for both).",
            "title": "Listing Type"
          },
          "verified_only": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": false,
            "description": "Only listings from verified sellers.",
            "title": "Verified Only"
          },
          "featured_only": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": false,
            "description": "Only featured listings.",
            "title": "Featured Only"
          },
          "free_only": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": false,
            "description": "Only listings with no monthly and no upfront fee.",
            "title": "Free Only"
          },
          "seller_uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Filter to one seller (e.g. 'more from this provider').",
            "title": "Seller Uid"
          },
          "seller_scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'user' or 'org'; refines seller_uid.",
            "title": "Seller Scope"
          },
          "sort_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "created_at",
            "description": "created_at | updated_at | price_monthly_credits | subscribers.",
            "title": "Sort By"
          },
          "sort_order": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "desc",
            "description": "'asc' or 'desc'.",
            "title": "Sort Order"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "public",
            "description": "'public' (global marketplace) or 'org' (caller's organization marketplace).",
            "title": "Visibility"
          },
          "org_uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Organization to browse when visibility='org' (must be one the caller belongs to).",
            "title": "Org Uid"
          },
          "limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": 25,
            "description": "Page size (max 100).",
            "title": "Limit"
          },
          "offset": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": 0,
            "description": "Pagination offset.",
            "title": "Offset"
          }
        },
        "title": "ListListingsQuery",
        "type": "object"
      },
      "ListListingsResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ListListingsResponse.462ef8b.ListListingsData"
          }
        },
        "required": [
          "data"
        ],
        "title": "ListListingsResponse",
        "type": "object"
      },
      "GetListingResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/GetListingResponse.462ef8b.GetListingData"
          }
        },
        "required": [
          "data"
        ],
        "title": "GetListingResponse",
        "type": "object"
      },
      "PreviewListingQuery.462ef8b": {
        "properties": {
          "limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": 100,
            "description": "Max sample rows to return (max 500).",
            "title": "Limit"
          }
        },
        "title": "PreviewListingQuery",
        "type": "object"
      },
      "PreviewListingResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PreviewListingResponse.462ef8b.PreviewListingData"
          }
        },
        "required": [
          "data"
        ],
        "title": "PreviewListingResponse",
        "type": "object"
      },
      "CreateListingRequest.462ef8b": {
        "description": "Publish one signal (or event stream) as a marketplace listing.",
        "properties": {
          "signal_key": {
            "description": "The signal key to publish (event key/source for listing_type='event').",
            "title": "Signal Key",
            "type": "string"
          },
          "listing_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "signal",
            "description": "'signal' or 'event'.",
            "title": "Listing Type"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Defaults to the signal key.",
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Icon proxy URL from POST /listings/icon-upload.",
            "title": "Icon Url"
          },
          "source_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Source Label"
          },
          "sla": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Sla"
          },
          "update_frequency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Update Frequency"
          },
          "data_interval": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Data Interval"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "both",
            "description": "'realtime', 'historical' or 'both'.",
            "title": "Kind"
          },
          "categories": {
            "description": "Taxonomy slugs; at least one is required.",
            "items": {
              "type": "string"
            },
            "title": "Categories",
            "type": "array"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Tags"
          },
          "price_monthly_credits": {
            "description": "Recurring monthly price in credits (>= 0; 0 = no monthly fee).",
            "title": "Price Monthly Credits",
            "type": "number"
          },
          "price_onetime_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Upfront one-time fee in credits (>= 0; independent of the monthly price).",
            "title": "Price Onetime Credits"
          },
          "payout_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "credits",
            "description": "'cash' or 'credits'.",
            "title": "Payout Method"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "public",
            "description": "'public' or 'org'. Org-scoped listings are forced free and visible only to org members.",
            "title": "Visibility"
          },
          "org_uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Target organization for visibility='org' (must be one the caller belongs to).",
            "title": "Org Uid"
          },
          "source_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Source Id"
          },
          "license_acknowledged": {
            "description": "Must be true: the seller confirms they may license the data.",
            "title": "License Acknowledged",
            "type": "boolean"
          },
          "terms_acknowledged": {
            "description": "Must be true: the seller accepts the marketplace terms.",
            "title": "Terms Acknowledged",
            "type": "boolean"
          }
        },
        "required": [
          "signal_key",
          "categories",
          "price_monthly_credits",
          "license_acknowledged",
          "terms_acknowledged"
        ],
        "title": "CreateListingRequest",
        "type": "object"
      },
      "ListingResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ListingResponse.462ef8b.ListingData"
          }
        },
        "required": [
          "data"
        ],
        "title": "ListingResponse",
        "type": "object"
      },
      "PlanFeatureErrorResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PlanFeatureErrorResponse.462ef8b.PlanFeatureErrorData"
          }
        },
        "required": [
          "data"
        ],
        "title": "PlanFeatureErrorResponse",
        "type": "object"
      },
      "SimpleErrorResponse.462ef8b": {
        "description": "Error envelope for marketplace endpoints that return errors via responseJSON.",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SimpleErrorResponse.462ef8b.SimpleErrorData"
          }
        },
        "required": [
          "data"
        ],
        "title": "SimpleErrorResponse",
        "type": "object"
      },
      "UpdateListingRequest.462ef8b": {
        "description": "Editable listing fields; only supplied keys are updated. Pricing /\npayout changes apply to future charges only (in-flight subscriptions\nkeep their subscribe-time snapshot).",
        "properties": {
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Icon Url"
          },
          "source_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Source Label"
          },
          "sla": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Sla"
          },
          "update_frequency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Update Frequency"
          },
          "data_interval": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Data Interval"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'realtime', 'historical' or 'both'.",
            "title": "Kind"
          },
          "categories": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Replacement taxonomy slugs; at least one if supplied.",
            "title": "Categories"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Tags"
          },
          "price_monthly_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "New monthly price in credits (>= 0).",
            "title": "Price Monthly Credits"
          },
          "price_onetime_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "New upfront fee in credits (>= 0).",
            "title": "Price Onetime Credits"
          },
          "payout_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'cash' or 'credits'.",
            "title": "Payout Method"
          }
        },
        "title": "UpdateListingRequest",
        "type": "object"
      },
      "DeleteListingQuery.462ef8b": {
        "properties": {
          "force": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": false,
            "description": "Cancel all active subscriptions and delist anyway (otherwise active subs => 409).",
            "title": "Force"
          }
        },
        "title": "DeleteListingQuery",
        "type": "object"
      },
      "DeleteListingResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DeleteListingResponse.462ef8b.DeleteListingData"
          }
        },
        "required": [
          "data"
        ],
        "title": "DeleteListingResponse",
        "type": "object"
      },
      "DeleteListingConflictResponse.462ef8b": {
        "description": "409 returned when the listing still has active subscribers and force=false.",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DeleteListingConflictResponse.462ef8b.DeleteListingConflictData"
          }
        },
        "required": [
          "data"
        ],
        "title": "DeleteListingConflictResponse",
        "type": "object"
      },
      "MyListingsResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MyListingsResponse.462ef8b.MyListingsData"
          }
        },
        "required": [
          "data"
        ],
        "title": "MyListingsResponse",
        "type": "object"
      },
      "PublishedSignalsResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PublishedSignalsResponse.462ef8b.PublishedSignalsData"
          }
        },
        "required": [
          "data"
        ],
        "title": "PublishedSignalsResponse",
        "type": "object"
      },
      "PublishedEventsResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PublishedEventsResponse.462ef8b.PublishedEventsData"
          }
        },
        "required": [
          "data"
        ],
        "title": "PublishedEventsResponse",
        "type": "object"
      },
      "CashoutRequest.462ef8b": {
        "properties": {
          "amount": {
            "description": "Credits to withdraw from the cash earnings balance (> 0).",
            "title": "Amount",
            "type": "number"
          },
          "method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "manual",
            "description": "Payout method label; fulfilment is manual/off-platform.",
            "title": "Method"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Note"
          },
          "destination": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Free-form payout destination details (e.g. bank / PayPal info).",
            "title": "Destination"
          }
        },
        "required": [
          "amount"
        ],
        "title": "CashoutRequest",
        "type": "object"
      },
      "CashoutResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CashoutResponse.462ef8b.CashoutData"
          }
        },
        "required": [
          "data"
        ],
        "title": "CashoutResponse",
        "type": "object"
      },
      "InsufficientBalanceResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InsufficientBalanceResponse.462ef8b.InsufficientBalanceData"
          }
        },
        "required": [
          "data"
        ],
        "title": "InsufficientBalanceResponse",
        "type": "object"
      },
      "PayoutsResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PayoutsResponse.462ef8b.PayoutsData"
          }
        },
        "required": [
          "data"
        ],
        "title": "PayoutsResponse",
        "type": "object"
      },
      "EarningsResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/EarningsResponse.462ef8b.EarningsData"
          }
        },
        "required": [
          "data"
        ],
        "title": "EarningsResponse",
        "type": "object"
      },
      "SubscribeResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SubscribeResponse.462ef8b.SubscribeData"
          }
        },
        "required": [
          "data"
        ],
        "title": "SubscribeResponse",
        "type": "object"
      },
      "InsufficientCreditsResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InsufficientCreditsResponse.462ef8b.InsufficientCreditsData"
          }
        },
        "required": [
          "data"
        ],
        "title": "InsufficientCreditsResponse",
        "type": "object"
      },
      "SubscriptionResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SubscriptionResponse.462ef8b.SubscriptionData"
          }
        },
        "required": [
          "data"
        ],
        "title": "SubscriptionResponse",
        "type": "object"
      },
      "ListSubscriptionsQuery.462ef8b": {
        "properties": {
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Filter by status, e.g. 'active' or 'cancelled' (omit for all).",
            "title": "Status"
          }
        },
        "title": "ListSubscriptionsQuery",
        "type": "object"
      },
      "ListSubscriptionsResponse.462ef8b": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ListSubscriptionsResponse.462ef8b.ListSubscriptionsData"
          }
        },
        "required": [
          "data"
        ],
        "title": "ListSubscriptionsResponse",
        "type": "object"
      },
      "WebhookDelivery.839bd04": {
        "additionalProperties": true,
        "description": "Arbitrary provider payload.\n\nThe shape is defined by the external provider; the source's stored\n``event_config`` (array_path, text_path, occurred_at_path, id_path)\nmaps it onto events or signals. Send the raw JSON your provider emits.",
        "properties": {},
        "title": "WebhookDelivery",
        "type": "object"
      },
      "WebhookAcceptedResponse.839bd04": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/WebhookAcceptedResponse.839bd04.WebhookAcceptedData"
          }
        },
        "required": [
          "data"
        ],
        "title": "WebhookAcceptedResponse",
        "type": "object"
      },
      "PublicCellsResponse.839bd04": {
        "properties": {
          "default_cell": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Cell used when no claim matches.",
            "title": "Default Cell"
          },
          "cells": {
            "description": "All publicly routable cells.",
            "items": {
              "$ref": "#/components/schemas/PublicCellsResponse.839bd04.PublicCell"
            },
            "title": "Cells",
            "type": "array"
          }
        },
        "required": [
          "cells"
        ],
        "title": "PublicCellsResponse",
        "type": "object"
      },
      "InferenceRequest.6e6e26b": {
        "description": "Raw inference payload (OpenAI / HuggingFace / Triton compatible).",
        "properties": {
          "input": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "items": {
                  "items": {},
                  "type": "array"
                },
                "type": "array"
              }
            ],
            "description": "Model input tensor: a flat vector or a batch of vectors.",
            "title": "Input"
          },
          "parameters": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Optional runtime parameters forwarded to the serving backend.",
            "title": "Parameters"
          }
        },
        "required": [
          "input"
        ],
        "title": "InferenceRequest",
        "type": "object"
      },
      "InferenceResponse.6e6e26b": {
        "description": "Successful raw-inference response.",
        "properties": {
          "predictions": {
            "description": "Canonical predictions, one entry per label.",
            "items": {
              "$ref": "#/components/schemas/InferenceResponse.6e6e26b.Prediction"
            },
            "title": "Predictions",
            "type": "array"
          },
          "horizon": {
            "description": "Number of forecast steps in each prediction's point array.",
            "title": "Horizon",
            "type": "integer"
          },
          "labels": {
            "description": "Output label names, in prediction order.",
            "items": {
              "type": "string"
            },
            "title": "Labels",
            "type": "array"
          },
          "model_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Model Id"
          },
          "training_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Training Id"
          },
          "deployment_id": {
            "title": "Deployment Id",
            "type": "string"
          },
          "deployment_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Deployment Type"
          },
          "inference_id": {
            "description": "Unique id of this inference (use with GET /inference/{inference_id}).",
            "title": "Inference Id",
            "type": "string"
          },
          "latency_ms": {
            "title": "Latency Ms",
            "type": "number"
          },
          "timestamp": {
            "title": "Timestamp",
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/InferenceResponse.6e6e26b.InferenceUsage"
          }
        },
        "required": [
          "predictions",
          "horizon",
          "labels",
          "deployment_id",
          "inference_id",
          "latency_ms",
          "timestamp",
          "usage"
        ],
        "title": "InferenceResponse",
        "type": "object"
      },
      "ErrorResponse.6e6e26b": {
        "description": "Standard error envelope returned by inference endpoints.",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorResponse.6e6e26b.ErrorDetail"
          }
        },
        "required": [
          "error"
        ],
        "title": "ErrorResponse",
        "type": "object"
      },
      "SegmentInferenceRequest.6e6e26b": {
        "description": "Segment-based inference payload.\n\nFor trained-model deployments the body can be empty: the platform\nprepares model input from the deployment's segment automatically. For\nfoundation-direct deployments, ``segment_id`` is required and the\nforecast parameters (horizon, samples, quantile_levels, context_length)\nare honored.",
        "properties": {
          "segment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Segment to forecast. REQUIRED for foundation-direct deployments.",
            "title": "Segment Id"
          },
          "horizon": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Forecast steps ahead (foundation-direct only).",
            "title": "Horizon"
          },
          "samples": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Sample paths for probabilistic forecasts (default 100).",
            "title": "Samples"
          },
          "quantile_levels": {
            "anyOf": [
              {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Quantile levels to return (default [0.1, 0.5, 0.9]).",
            "title": "Quantile Levels"
          },
          "context_length": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "History window the model conditions on.",
            "title": "Context Length"
          },
          "parameters": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Optional parameters. Supports feature_debug (bool) to return the prepared feature vector.",
            "title": "Parameters"
          }
        },
        "title": "SegmentInferenceRequest",
        "type": "object"
      },
      "SegmentInferenceResponse.6e6e26b": {
        "description": "Successful segment-inference response (synchronous path).",
        "properties": {
          "predictions": {
            "items": {
              "$ref": "#/components/schemas/SegmentInferenceResponse.6e6e26b.Prediction"
            },
            "title": "Predictions",
            "type": "array"
          },
          "horizon": {
            "title": "Horizon",
            "type": "integer"
          },
          "labels": {
            "items": {
              "type": "string"
            },
            "title": "Labels",
            "type": "array"
          },
          "forecast_horizon": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Legacy alias of horizon.",
            "title": "Forecast Horizon"
          },
          "model_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Model Id"
          },
          "deployment_id": {
            "title": "Deployment Id",
            "type": "string"
          },
          "deployment_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Deployment Type"
          },
          "segment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Segment Id"
          },
          "segment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Segment Name"
          },
          "training_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Training Id"
          },
          "sequence_length": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Sequence Length"
          },
          "feature_names": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Feature Names"
          },
          "inference_id": {
            "title": "Inference Id",
            "type": "string"
          },
          "latency_ms": {
            "title": "Latency Ms",
            "type": "number"
          },
          "timestamp": {
            "title": "Timestamp",
            "type": "string"
          },
          "data_period": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SegmentInferenceResponse.6e6e26b.DataPeriod"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "shock": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Shock-playbook overlay info when the goal is in shock/recovery.",
            "title": "Shock"
          },
          "debug": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Feature-vector debug info when requested.",
            "title": "Debug"
          }
        },
        "required": [
          "predictions",
          "horizon",
          "labels",
          "deployment_id",
          "inference_id",
          "latency_ms",
          "timestamp"
        ],
        "title": "SegmentInferenceResponse",
        "type": "object"
      },
      "AsyncInferenceAccepted.6e6e26b": {
        "description": "202 response when the forecast is dispatched asynchronously.\n\nFoundation model servers scale to zero; a cold start can take minutes,\nso the API returns immediately and completion is signaled via the\nrealtime WebSocket event ``inference.completed``. Poll\n``GET /inference/{inference_id}`` as a fallback.",
        "properties": {
          "async": {
            "description": "Always true for this response.",
            "title": "Async",
            "type": "boolean"
          },
          "status": {
            "description": "Always 'pending'.",
            "title": "Status",
            "type": "string"
          },
          "inference_id": {
            "title": "Inference Id",
            "type": "string"
          },
          "deployment_id": {
            "title": "Deployment Id",
            "type": "string"
          },
          "segment_id": {
            "title": "Segment Id",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "async",
          "status",
          "inference_id",
          "deployment_id",
          "segment_id",
          "message"
        ],
        "title": "AsyncInferenceAccepted",
        "type": "object"
      },
      "ListInferencesQuery.6e6e26b": {
        "properties": {
          "page": {
            "default": 1,
            "description": "1-indexed page number.",
            "minimum": 1,
            "title": "Page",
            "type": "integer"
          },
          "limit": {
            "default": 20,
            "description": "Rows per page (max 100).",
            "maximum": 100,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "deployment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Filter to a single deployment.",
            "title": "Deployment Id"
          },
          "inference_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'segment' or 'raw'.",
            "title": "Inference Type"
          },
          "sort_direction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "desc",
            "description": "'asc' or 'desc' on timestamp.",
            "title": "Sort Direction"
          }
        },
        "title": "ListInferencesQuery",
        "type": "object"
      },
      "ListInferencesResponse.6e6e26b": {
        "properties": {
          "inferences": {
            "items": {
              "$ref": "#/components/schemas/ListInferencesResponse.6e6e26b.InferenceListItem"
            },
            "title": "Inferences",
            "type": "array"
          },
          "history_by_segment": {
            "additionalProperties": {
              "type": "object"
            },
            "description": "Per-segment history snapshots (interval_seconds, labels, row_count) for mini-charts.",
            "title": "History By Segment",
            "type": "object"
          },
          "pagination": {
            "$ref": "#/components/schemas/ListInferencesResponse.6e6e26b.Pagination"
          }
        },
        "required": [
          "inferences",
          "pagination"
        ],
        "title": "ListInferencesResponse",
        "type": "object"
      },
      "GetInferenceResponse.6e6e26b": {
        "properties": {
          "inference": {
            "description": "Full inference record: request/response payloads, resolved deployment and segment, model_metrics (held-out accuracy/skill), and the historical context series (history / history_meta) for charting.",
            "title": "Inference",
            "type": "object"
          }
        },
        "required": [
          "inference"
        ],
        "title": "GetInferenceResponse",
        "type": "object"
      },
      "UsageQuery.6e6e26b": {
        "properties": {
          "period": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "24h",
            "description": "Analytics window: 24h, 7d, 30d or all.",
            "title": "Period"
          },
          "bin_size": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Time-series bin: hour, day or week (auto if omitted).",
            "title": "Bin Size"
          }
        },
        "title": "UsageQuery",
        "type": "object"
      },
      "UsageResponse.6e6e26b": {
        "additionalProperties": true,
        "description": "Deployment usage analytics (counts, latency percentiles, time series).",
        "properties": {},
        "title": "UsageResponse",
        "type": "object"
      },
      "FoundationModelsQuery.27c3464": {
        "properties": {
          "family": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Filter by family, e.g. 'predictfm' or 'chronos_bolt'.",
            "title": "Family"
          },
          "task": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Filter by task ('forecast', 'embed', ...).",
            "title": "Task"
          },
          "include_deprecated": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'true' to include deprecated rows.",
            "title": "Include Deprecated"
          }
        },
        "title": "FoundationModelsQuery",
        "type": "object"
      },
      "ListFoundationModelsResponse.27c3464": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ListFoundationModelsResponse.27c3464.FoundationModelsData"
          }
        },
        "required": [
          "data"
        ],
        "title": "ListFoundationModelsResponse",
        "type": "object"
      },
      "FoundationModelDetailResponse.27c3464": {
        "properties": {
          "data": {
            "description": "One foundation model's metadata.",
            "title": "Data",
            "type": "object"
          }
        },
        "required": [
          "data"
        ],
        "title": "FoundationModelDetailResponse",
        "type": "object"
      },
      "AdaptersQuery.27c3464": {
        "properties": {
          "family": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Filter by the foundation model's family.",
            "title": "Family"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Filter by the foundation model's slug.",
            "title": "Slug"
          },
          "task": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Filter by task.",
            "title": "Task"
          },
          "owner": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Filter by adapter owner.",
            "title": "Owner"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'public' (default), 'private', or 'all' (public + your own).",
            "title": "Visibility"
          }
        },
        "title": "AdaptersQuery",
        "type": "object"
      },
      "ListAdaptersResponse.27c3464": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ListAdaptersResponse.27c3464.AdaptersData"
          }
        },
        "required": [
          "data"
        ],
        "title": "ListAdaptersResponse",
        "type": "object"
      },
      "AdapterDetailResponse.27c3464": {
        "properties": {
          "data": {
            "description": "One adapter's metadata.",
            "title": "Data",
            "type": "object"
          }
        },
        "required": [
          "data"
        ],
        "title": "AdapterDetailResponse",
        "type": "object"
      },
      "ByomUploadResponse.8a9eeb4": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ByomUploadResponse.8a9eeb4.ByomUploadData"
          }
        },
        "required": [
          "data"
        ],
        "title": "ByomUploadResponse",
        "type": "object"
      },
      "InsufficientCreditsResponse.8a9eeb4": {
        "description": "402 envelope returned when the caller's credit balance is too low.",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InsufficientCreditsResponse.8a9eeb4.ByomInsufficientCreditsData"
          }
        },
        "required": [
          "data"
        ],
        "title": "InsufficientCreditsResponse",
        "type": "object"
      },
      "ByomValidateRequest.8a9eeb4": {
        "properties": {
          "model_id": {
            "description": "Model id returned by /models/byom/upload.",
            "title": "Model Id",
            "type": "string"
          },
          "framework": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Framework hint ('onnx', 'torch', ...); auto-detected if omitted.",
            "title": "Framework"
          },
          "input_shape_hint": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Input shape hint used when signature inference is ambiguous.",
            "title": "Input Shape Hint"
          }
        },
        "required": [
          "model_id"
        ],
        "title": "ByomValidateRequest",
        "type": "object"
      },
      "ByomValidateResponse.8a9eeb4": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ByomValidateResponse.8a9eeb4.ByomValidateData"
          }
        },
        "required": [
          "data"
        ],
        "title": "ByomValidateResponse",
        "type": "object"
      },
      "ByomRegisterRequest.8a9eeb4": {
        "properties": {
          "model_id": {
            "description": "Model id returned by /models/byom/upload.",
            "title": "Model Id",
            "type": "string"
          },
          "model_uri": {
            "description": "S3 URI of the uploaded model.",
            "title": "Model Uri",
            "type": "string"
          },
          "framework": {
            "description": "Model framework as validated.",
            "title": "Framework",
            "type": "string"
          },
          "signature": {
            "description": "Signature object from /models/byom/validate.",
            "title": "Signature",
            "type": "object"
          },
          "validation": {
            "description": "Validation object from /models/byom/validate.",
            "title": "Validation",
            "type": "object"
          },
          "name": {
            "description": "Display name for the registered model.",
            "title": "Name",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "",
            "description": "Free-text description.",
            "title": "Description"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "private",
            "description": "'private' (default) or 'public'.",
            "title": "Visibility"
          },
          "license": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "proprietary",
            "description": "Model license.",
            "title": "License"
          },
          "preprocessing": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Optional preprocessing config applied before inference.",
            "title": "Preprocessing"
          },
          "segment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Segment to associate the model with.",
            "title": "Segment Id"
          }
        },
        "required": [
          "model_id",
          "model_uri",
          "framework",
          "signature",
          "validation",
          "name"
        ],
        "title": "ByomRegisterRequest",
        "type": "object"
      },
      "ByomRegisterResponse.8a9eeb4": {
        "properties": {
          "data": {
            "description": "Registration result: blueprint_id (+ optional model row info) and triton_config_pbtxt, a generated Triton config for the model.",
            "title": "Data",
            "type": "object"
          }
        },
        "required": [
          "data"
        ],
        "title": "ByomRegisterResponse",
        "type": "object"
      },
      "ByomDownloadResponse.8a9eeb4": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ByomDownloadResponse.8a9eeb4.ByomDownloadData"
          }
        },
        "required": [
          "data"
        ],
        "title": "ByomDownloadResponse",
        "type": "object"
      },
      "HealthResponse.839bd04": {
        "properties": {
          "status": {
            "description": "'healthy' when the service is running.",
            "title": "Status",
            "type": "string"
          },
          "timestamp": {
            "title": "Timestamp",
            "type": "number"
          },
          "uptime": {
            "description": "Seconds since process start.",
            "title": "Uptime",
            "type": "number"
          },
          "service": {
            "title": "Service",
            "type": "string"
          }
        },
        "required": [
          "status",
          "timestamp",
          "uptime",
          "service"
        ],
        "title": "HealthResponse",
        "type": "object"
      },
      "VersionResponse.839bd04": {
        "properties": {
          "api_version": {
            "title": "Api Version",
            "type": "string"
          },
          "service_version": {
            "title": "Service Version",
            "type": "string"
          },
          "build_version": {
            "title": "Build Version",
            "type": "string"
          },
          "namespace": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Namespace"
          },
          "cluster_runtime": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Cluster Runtime"
          },
          "use_working_format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Use Working Format"
          },
          "service": {
            "title": "Service",
            "type": "string"
          },
          "features": {
            "additionalProperties": {
              "type": "boolean"
            },
            "title": "Features",
            "type": "object"
          },
          "timestamp": {
            "title": "Timestamp",
            "type": "number"
          }
        },
        "required": [
          "api_version",
          "service_version",
          "build_version",
          "service",
          "features",
          "timestamp"
        ],
        "title": "VersionResponse",
        "type": "object"
      },
      "CategoriesResponse.462ef8b.CategoriesData": {
        "properties": {
          "categories": {
            "items": {
              "$ref": "#/components/schemas/CategoriesResponse.462ef8b.Category"
            },
            "title": "Categories",
            "type": "array"
          }
        },
        "required": [
          "categories"
        ],
        "title": "CategoriesData",
        "type": "object"
      },
      "CategoriesResponse.462ef8b.Category": {
        "properties": {
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Dotted taxonomy slug, e.g. 'finance.equities'.",
            "title": "Slug"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "parent_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Parent category slug (None for roots).",
            "title": "Parent Slug"
          },
          "sort_order": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Sort Order"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Icon"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Description"
          }
        },
        "title": "Category",
        "type": "object"
      },
      "ValidationError.6a07bef.ValidationErrorElement": {
        "title": "ValidationErrorElement",
        "description": "Model of a validation error response element.",
        "type": "object",
        "properties": {
          "loc": {
            "title": "Missing field name",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "msg": {
            "title": "Error message",
            "type": "string"
          },
          "type": {
            "title": "Error type",
            "type": "string"
          },
          "ctx": {
            "title": "Error context",
            "type": "object"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ]
      },
      "CategoryCountsResponse.462ef8b.CategoryCountsData": {
        "properties": {
          "counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "description": "Published-listing count keyed by root category slug (segment before the first dot).",
            "title": "Counts",
            "type": "object"
          }
        },
        "required": [
          "counts"
        ],
        "title": "CategoryCountsData",
        "type": "object"
      },
      "IconUploadResponse.462ef8b.IconUploadData": {
        "properties": {
          "icon_url": {
            "description": "Proxy URL of the uploaded icon; drop it straight into the listing's icon_url field.",
            "title": "Icon Url",
            "type": "string"
          }
        },
        "required": [
          "icon_url"
        ],
        "title": "IconUploadData",
        "type": "object"
      },
      "SuggestListingResponse.462ef8b.SuggestListingData": {
        "description": "Smart defaults for the publish wizard; every field is a suggestion\nthe user can override (empty string = no good guess).",
        "properties": {
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Description"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Suggested cadence: 'realtime', 'historical' or 'both'.",
            "title": "Kind"
          },
          "update_frequency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Update Frequency"
          },
          "data_interval": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Data Interval"
          },
          "data_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Data Type"
          },
          "first_signal_ts": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "First Signal Ts"
          },
          "latest_signal_ts": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Latest Signal Ts"
          },
          "signal_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Signal Count"
          },
          "avg_per_minute": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Observed average signals per minute.",
            "title": "Avg Per Minute"
          },
          "workspace_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Workspace Name"
          }
        },
        "title": "SuggestListingData",
        "type": "object"
      },
      "ListListingsResponse.462ef8b.ListListingsData": {
        "properties": {
          "listings": {
            "items": {
              "$ref": "#/components/schemas/ListListingsResponse.462ef8b.Listing"
            },
            "title": "Listings",
            "type": "array"
          },
          "total": {
            "description": "Total matching listings (ignores pagination).",
            "title": "Total",
            "type": "integer"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "title": "Offset",
            "type": "integer"
          }
        },
        "required": [
          "listings",
          "total",
          "limit",
          "offset"
        ],
        "title": "ListListingsData",
        "type": "object"
      },
      "ListListingsResponse.462ef8b.Listing": {
        "description": "Serialized marketplace listing (see ``_serialize_listing``).",
        "properties": {
          "listing_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Listing Id"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Icon Url"
          },
          "source_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Source Label"
          },
          "sla": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Sla"
          },
          "update_frequency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Publish cadence label, e.g. 'hourly' or 'daily'.",
            "title": "Update Frequency"
          },
          "data_interval": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Bucket spacing of the underlying series, e.g. '1h'.",
            "title": "Data Interval"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Cadence axis: 'realtime', 'historical' or 'both'.",
            "title": "Kind"
          },
          "categories": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Taxonomy category slugs.",
            "title": "Categories"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Tags"
          },
          "price_monthly_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Recurring monthly subscription price in credits (0 = no monthly fee).",
            "title": "Price Monthly Credits"
          },
          "price_onetime_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Upfront one-time fee in credits charged at subscribe time (0 = none).",
            "title": "Price Onetime Credits"
          },
          "payout_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'cash' or 'credits'.",
            "title": "Payout Method"
          },
          "license_acknowledged_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "License Acknowledged At"
          },
          "terms_acknowledged_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Terms Acknowledged At"
          },
          "terms_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Terms Version"
          },
          "featured": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Featured listings are pinned first on the browse page.",
            "title": "Featured"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'draft', 'published' or 'delisted'.",
            "title": "Status"
          },
          "listing_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'signal' (ClickHouse time-series) or 'event' (scored Mongo events).",
            "title": "Listing Type"
          },
          "signal_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The listed signal key (event key/source for event listings).",
            "title": "Signal Key"
          },
          "data_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Data Type"
          },
          "signal_count_cached": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Cached signal/event count for the listed key.",
            "title": "Signal Count Cached"
          },
          "subscribers_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Active subscriber count.",
            "title": "Subscribers Count"
          },
          "first_signal_ts_cached": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "First Signal Ts Cached"
          },
          "latest_signal_ts_cached": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Latest Signal Ts Cached"
          },
          "workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Seller workspace the signal is published from.",
            "title": "Workspace Id"
          },
          "source_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Source Id"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Updated At"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'public' (global marketplace) or 'org' (visible only to members of org_uid, always free).",
            "title": "Visibility"
          },
          "org_uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Owning organization for org-scoped listings.",
            "title": "Org Uid"
          },
          "seller": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ListListingsResponse.462ef8b.Seller"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          }
        },
        "title": "Listing",
        "type": "object"
      },
      "ListListingsResponse.462ef8b.Seller": {
        "description": "Public seller identity attached to a listing.",
        "properties": {
          "uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Seller uid (user or organization).",
            "title": "Uid"
          },
          "scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'user' or 'org'.",
            "title": "Scope"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Username"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Slug"
          },
          "avatar": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Avatar"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Best available display name (name, username, slug or email; 'Anonymous' as fallback).",
            "title": "Label"
          },
          "verified": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Whether the seller is marketplace-verified.",
            "title": "Verified"
          },
          "verified_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Verified At"
          }
        },
        "title": "Seller",
        "type": "object"
      },
      "GetListingResponse.462ef8b.GetListingData": {
        "properties": {
          "listing": {
            "$ref": "#/components/schemas/GetListingResponse.462ef8b.Listing"
          },
          "subscription": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GetListingResponse.462ef8b.ListingSubscriptionStatus"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Present when the request carries an X-Workspace-Id header."
          },
          "stats": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GetListingResponse.462ef8b.ListingStats"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Best-effort volume stats; omitted if binning fails."
          }
        },
        "required": [
          "listing"
        ],
        "title": "GetListingData",
        "type": "object"
      },
      "GetListingResponse.462ef8b.Listing": {
        "description": "Serialized marketplace listing (see ``_serialize_listing``).",
        "properties": {
          "listing_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Listing Id"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Icon Url"
          },
          "source_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Source Label"
          },
          "sla": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Sla"
          },
          "update_frequency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Publish cadence label, e.g. 'hourly' or 'daily'.",
            "title": "Update Frequency"
          },
          "data_interval": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Bucket spacing of the underlying series, e.g. '1h'.",
            "title": "Data Interval"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Cadence axis: 'realtime', 'historical' or 'both'.",
            "title": "Kind"
          },
          "categories": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Taxonomy category slugs.",
            "title": "Categories"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Tags"
          },
          "price_monthly_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Recurring monthly subscription price in credits (0 = no monthly fee).",
            "title": "Price Monthly Credits"
          },
          "price_onetime_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Upfront one-time fee in credits charged at subscribe time (0 = none).",
            "title": "Price Onetime Credits"
          },
          "payout_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'cash' or 'credits'.",
            "title": "Payout Method"
          },
          "license_acknowledged_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "License Acknowledged At"
          },
          "terms_acknowledged_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Terms Acknowledged At"
          },
          "terms_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Terms Version"
          },
          "featured": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Featured listings are pinned first on the browse page.",
            "title": "Featured"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'draft', 'published' or 'delisted'.",
            "title": "Status"
          },
          "listing_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'signal' (ClickHouse time-series) or 'event' (scored Mongo events).",
            "title": "Listing Type"
          },
          "signal_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The listed signal key (event key/source for event listings).",
            "title": "Signal Key"
          },
          "data_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Data Type"
          },
          "signal_count_cached": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Cached signal/event count for the listed key.",
            "title": "Signal Count Cached"
          },
          "subscribers_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Active subscriber count.",
            "title": "Subscribers Count"
          },
          "first_signal_ts_cached": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "First Signal Ts Cached"
          },
          "latest_signal_ts_cached": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Latest Signal Ts Cached"
          },
          "workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Seller workspace the signal is published from.",
            "title": "Workspace Id"
          },
          "source_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Source Id"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Updated At"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'public' (global marketplace) or 'org' (visible only to members of org_uid, always free).",
            "title": "Visibility"
          },
          "org_uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Owning organization for org-scoped listings.",
            "title": "Org Uid"
          },
          "seller": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GetListingResponse.462ef8b.Seller"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          }
        },
        "title": "Listing",
        "type": "object"
      },
      "GetListingResponse.462ef8b.ListingStats": {
        "description": "Full-range volume stats for the detail page's 'data over time' strip.",
        "properties": {
          "bins": {
            "description": "Time-bucketed signal-count bins across the full data range.",
            "items": {},
            "title": "Bins",
            "type": "array"
          },
          "signal_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Signal Count"
          },
          "min_timestamp": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Min Timestamp"
          },
          "max_timestamp": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Max Timestamp"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Duration Seconds"
          },
          "lag_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Estimated cadence (average spacing between samples).",
            "title": "Lag Seconds"
          },
          "value_types": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Value Types"
          },
          "treat_as": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Treat As"
          },
          "seasonality": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Detected seasonality info, when available.",
            "title": "Seasonality"
          }
        },
        "required": [
          "bins"
        ],
        "title": "ListingStats",
        "type": "object"
      },
      "GetListingResponse.462ef8b.ListingSubscriptionStatus": {
        "description": "Calling workspace's subscription state for this listing.",
        "properties": {
          "active": {
            "description": "Whether the calling workspace is already subscribed.",
            "title": "Active",
            "type": "boolean"
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Subscription Id"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Started At"
          },
          "internal_share": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "True when the subscription is a free same-owner/same-org share.",
            "title": "Internal Share"
          },
          "price_monthly_credits_at_subscribe": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Price Monthly Credits At Subscribe"
          },
          "price_onetime_credits_at_subscribe": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Price Onetime Credits At Subscribe"
          },
          "would_be_free": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "True if a fresh subscribe from this workspace would be free (same owner / same org / org-scoped listing).",
            "title": "Would Be Free"
          }
        },
        "required": [
          "active"
        ],
        "title": "ListingSubscriptionStatus",
        "type": "object"
      },
      "GetListingResponse.462ef8b.Seller": {
        "description": "Public seller identity attached to a listing.",
        "properties": {
          "uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Seller uid (user or organization).",
            "title": "Uid"
          },
          "scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'user' or 'org'.",
            "title": "Scope"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Username"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Slug"
          },
          "avatar": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Avatar"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Best available display name (name, username, slug or email; 'Anonymous' as fallback).",
            "title": "Label"
          },
          "verified": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Whether the seller is marketplace-verified.",
            "title": "Verified"
          },
          "verified_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Verified At"
          }
        },
        "title": "Seller",
        "type": "object"
      },
      "PreviewListingResponse.462ef8b.PreviewListingData": {
        "properties": {
          "listing_id": {
            "title": "Listing Id",
            "type": "string"
          },
          "signal_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Signal Key"
          },
          "data_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Data Type"
          },
          "rows": {
            "items": {
              "$ref": "#/components/schemas/PreviewListingResponse.462ef8b.PreviewRow"
            },
            "title": "Rows",
            "type": "array"
          },
          "count": {
            "description": "Number of rows returned.",
            "title": "Count",
            "type": "integer"
          }
        },
        "required": [
          "listing_id",
          "rows",
          "count"
        ],
        "title": "PreviewListingData",
        "type": "object"
      },
      "PreviewListingResponse.462ef8b.PreviewRow": {
        "properties": {
          "timestamp": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Timestamp"
          },
          "value": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Value"
          },
          "raw": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Raw signal payload as ingested.",
            "title": "Raw"
          },
          "data_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Data Type"
          }
        },
        "title": "PreviewRow",
        "type": "object"
      },
      "ListingResponse.462ef8b.Listing": {
        "description": "Serialized marketplace listing (see ``_serialize_listing``).",
        "properties": {
          "listing_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Listing Id"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Icon Url"
          },
          "source_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Source Label"
          },
          "sla": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Sla"
          },
          "update_frequency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Publish cadence label, e.g. 'hourly' or 'daily'.",
            "title": "Update Frequency"
          },
          "data_interval": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Bucket spacing of the underlying series, e.g. '1h'.",
            "title": "Data Interval"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Cadence axis: 'realtime', 'historical' or 'both'.",
            "title": "Kind"
          },
          "categories": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Taxonomy category slugs.",
            "title": "Categories"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Tags"
          },
          "price_monthly_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Recurring monthly subscription price in credits (0 = no monthly fee).",
            "title": "Price Monthly Credits"
          },
          "price_onetime_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Upfront one-time fee in credits charged at subscribe time (0 = none).",
            "title": "Price Onetime Credits"
          },
          "payout_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'cash' or 'credits'.",
            "title": "Payout Method"
          },
          "license_acknowledged_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "License Acknowledged At"
          },
          "terms_acknowledged_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Terms Acknowledged At"
          },
          "terms_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Terms Version"
          },
          "featured": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Featured listings are pinned first on the browse page.",
            "title": "Featured"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'draft', 'published' or 'delisted'.",
            "title": "Status"
          },
          "listing_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'signal' (ClickHouse time-series) or 'event' (scored Mongo events).",
            "title": "Listing Type"
          },
          "signal_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The listed signal key (event key/source for event listings).",
            "title": "Signal Key"
          },
          "data_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Data Type"
          },
          "signal_count_cached": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Cached signal/event count for the listed key.",
            "title": "Signal Count Cached"
          },
          "subscribers_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Active subscriber count.",
            "title": "Subscribers Count"
          },
          "first_signal_ts_cached": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "First Signal Ts Cached"
          },
          "latest_signal_ts_cached": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Latest Signal Ts Cached"
          },
          "workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Seller workspace the signal is published from.",
            "title": "Workspace Id"
          },
          "source_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Source Id"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Updated At"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'public' (global marketplace) or 'org' (visible only to members of org_uid, always free).",
            "title": "Visibility"
          },
          "org_uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Owning organization for org-scoped listings.",
            "title": "Org Uid"
          },
          "seller": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ListingResponse.462ef8b.Seller"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          }
        },
        "title": "Listing",
        "type": "object"
      },
      "ListingResponse.462ef8b.ListingData": {
        "properties": {
          "listing": {
            "$ref": "#/components/schemas/ListingResponse.462ef8b.Listing"
          }
        },
        "required": [
          "listing"
        ],
        "title": "ListingData",
        "type": "object"
      },
      "ListingResponse.462ef8b.Seller": {
        "description": "Public seller identity attached to a listing.",
        "properties": {
          "uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Seller uid (user or organization).",
            "title": "Uid"
          },
          "scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'user' or 'org'.",
            "title": "Scope"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Username"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Slug"
          },
          "avatar": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Avatar"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Best available display name (name, username, slug or email; 'Anonymous' as fallback).",
            "title": "Label"
          },
          "verified": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Whether the seller is marketplace-verified.",
            "title": "Verified"
          },
          "verified_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Verified At"
          }
        },
        "title": "Seller",
        "type": "object"
      },
      "PlanFeatureErrorResponse.462ef8b.PlanFeatureErrorData": {
        "properties": {
          "error": {
            "description": "'plan_feature_required'.",
            "title": "Error",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "feature": {
            "description": "The gated plan feature, e.g. 'marketplace_seller'.",
            "title": "Feature",
            "type": "string"
          },
          "plan_tier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The caller's current plan tier.",
            "title": "Plan Tier"
          }
        },
        "required": [
          "error",
          "message",
          "feature"
        ],
        "title": "PlanFeatureErrorData",
        "type": "object"
      },
      "SimpleErrorResponse.462ef8b.SimpleErrorData": {
        "properties": {
          "error": {
            "description": "Human-readable error summary.",
            "title": "Error",
            "type": "string"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Longer explanation, when available.",
            "title": "Message"
          }
        },
        "required": [
          "error"
        ],
        "title": "SimpleErrorData",
        "type": "object"
      },
      "DeleteListingResponse.462ef8b.DeleteListingData": {
        "properties": {
          "deleted": {
            "description": "The delisted listing_id.",
            "title": "Deleted",
            "type": "string"
          },
          "cancelled_subs": {
            "description": "Active subscriptions cancelled by the force cascade.",
            "title": "Cancelled Subs",
            "type": "integer"
          }
        },
        "required": [
          "deleted",
          "cancelled_subs"
        ],
        "title": "DeleteListingData",
        "type": "object"
      },
      "DeleteListingConflictResponse.462ef8b.DeleteListingConflictData": {
        "properties": {
          "error": {
            "title": "Error",
            "type": "string"
          },
          "active_subscribers": {
            "title": "Active Subscribers",
            "type": "integer"
          },
          "listing_id": {
            "title": "Listing Id",
            "type": "string"
          },
          "listing_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Listing Title"
          }
        },
        "required": [
          "error",
          "active_subscribers",
          "listing_id"
        ],
        "title": "DeleteListingConflictData",
        "type": "object"
      },
      "MyListingsResponse.462ef8b.MyListingItem": {
        "description": "Listing row on the seller dashboard (no seller block, plus KPIs).",
        "properties": {
          "listing_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Listing Id"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Icon Url"
          },
          "source_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Source Label"
          },
          "sla": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Sla"
          },
          "update_frequency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Publish cadence label, e.g. 'hourly' or 'daily'.",
            "title": "Update Frequency"
          },
          "data_interval": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Bucket spacing of the underlying series, e.g. '1h'.",
            "title": "Data Interval"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Cadence axis: 'realtime', 'historical' or 'both'.",
            "title": "Kind"
          },
          "categories": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Taxonomy category slugs.",
            "title": "Categories"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Tags"
          },
          "price_monthly_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Recurring monthly subscription price in credits (0 = no monthly fee).",
            "title": "Price Monthly Credits"
          },
          "price_onetime_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Upfront one-time fee in credits charged at subscribe time (0 = none).",
            "title": "Price Onetime Credits"
          },
          "payout_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'cash' or 'credits'.",
            "title": "Payout Method"
          },
          "license_acknowledged_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "License Acknowledged At"
          },
          "terms_acknowledged_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Terms Acknowledged At"
          },
          "terms_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Terms Version"
          },
          "featured": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Featured listings are pinned first on the browse page.",
            "title": "Featured"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'draft', 'published' or 'delisted'.",
            "title": "Status"
          },
          "listing_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'signal' (ClickHouse time-series) or 'event' (scored Mongo events).",
            "title": "Listing Type"
          },
          "signal_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The listed signal key (event key/source for event listings).",
            "title": "Signal Key"
          },
          "data_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Data Type"
          },
          "signal_count_cached": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Cached signal/event count for the listed key.",
            "title": "Signal Count Cached"
          },
          "subscribers_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Active subscriber count.",
            "title": "Subscribers Count"
          },
          "first_signal_ts_cached": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "First Signal Ts Cached"
          },
          "latest_signal_ts_cached": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Latest Signal Ts Cached"
          },
          "workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Seller workspace the signal is published from.",
            "title": "Workspace Id"
          },
          "source_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Source Id"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Updated At"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'public' (global marketplace) or 'org' (visible only to members of org_uid, always free).",
            "title": "Visibility"
          },
          "org_uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Owning organization for org-scoped listings.",
            "title": "Org Uid"
          },
          "seller": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MyListingsResponse.462ef8b.Seller"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "mrr_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Monthly recurring revenue estimate: active subs x monthly price x seller share.",
            "title": "Mrr Credits"
          },
          "lifetime_seller_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Lifetime settled seller payout in credits.",
            "title": "Lifetime Seller Credits"
          },
          "lifetime_charges_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Number of settled charges, lifetime.",
            "title": "Lifetime Charges Count"
          }
        },
        "title": "MyListingItem",
        "type": "object"
      },
      "MyListingsResponse.462ef8b.MyListingsData": {
        "properties": {
          "listings": {
            "items": {
              "$ref": "#/components/schemas/MyListingsResponse.462ef8b.MyListingItem"
            },
            "title": "Listings",
            "type": "array"
          }
        },
        "required": [
          "listings"
        ],
        "title": "MyListingsData",
        "type": "object"
      },
      "MyListingsResponse.462ef8b.Seller": {
        "description": "Public seller identity attached to a listing.",
        "properties": {
          "uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Seller uid (user or organization).",
            "title": "Uid"
          },
          "scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'user' or 'org'.",
            "title": "Scope"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Username"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Slug"
          },
          "avatar": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Avatar"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Best available display name (name, username, slug or email; 'Anonymous' as fallback).",
            "title": "Label"
          },
          "verified": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Whether the seller is marketplace-verified.",
            "title": "Verified"
          },
          "verified_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Verified At"
          }
        },
        "title": "Seller",
        "type": "object"
      },
      "PublishedSignalsResponse.462ef8b.PublishedListingSummary": {
        "description": "Compact listing summary used to decorate the Data Signals page.",
        "properties": {
          "listing_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Listing Id"
          },
          "signal_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Signal Key"
          },
          "listing_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Listing Type"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Status"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Title"
          },
          "workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Workspace Id"
          },
          "subscribers_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Subscribers Count"
          },
          "price_monthly_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Price Monthly Credits"
          },
          "price_onetime_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Price Onetime Credits"
          },
          "payout_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Payout Method"
          },
          "featured": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Featured"
          }
        },
        "title": "PublishedListingSummary",
        "type": "object"
      },
      "PublishedSignalsResponse.462ef8b.PublishedSignalsData": {
        "properties": {
          "by_signal_key": {
            "additionalProperties": {
              "$ref": "#/components/schemas/PublishedSignalsResponse.462ef8b.PublishedListingSummary"
            },
            "description": "Seller's active signal listings keyed by signal_key (newest wins per key).",
            "title": "By Signal Key",
            "type": "object"
          }
        },
        "required": [
          "by_signal_key"
        ],
        "title": "PublishedSignalsData",
        "type": "object"
      },
      "PublishedEventsResponse.462ef8b.PublishedEventsData": {
        "properties": {
          "by_event_key": {
            "additionalProperties": {
              "$ref": "#/components/schemas/PublishedEventsResponse.462ef8b.PublishedListingSummary"
            },
            "description": "Seller's active event listings keyed by event key/source (newest wins per key).",
            "title": "By Event Key",
            "type": "object"
          }
        },
        "required": [
          "by_event_key"
        ],
        "title": "PublishedEventsData",
        "type": "object"
      },
      "PublishedEventsResponse.462ef8b.PublishedListingSummary": {
        "description": "Compact listing summary used to decorate the Data Signals page.",
        "properties": {
          "listing_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Listing Id"
          },
          "signal_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Signal Key"
          },
          "listing_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Listing Type"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Status"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Title"
          },
          "workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Workspace Id"
          },
          "subscribers_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Subscribers Count"
          },
          "price_monthly_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Price Monthly Credits"
          },
          "price_onetime_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Price Onetime Credits"
          },
          "payout_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Payout Method"
          },
          "featured": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Featured"
          }
        },
        "title": "PublishedListingSummary",
        "type": "object"
      },
      "CashoutResponse.462ef8b.CashoutBalance": {
        "properties": {
          "cash_balance_credits": {
            "description": "Remaining cash balance after the atomic debit.",
            "title": "Cash Balance Credits",
            "type": "number"
          }
        },
        "required": [
          "cash_balance_credits"
        ],
        "title": "CashoutBalance",
        "type": "object"
      },
      "CashoutResponse.462ef8b.CashoutData": {
        "properties": {
          "request": {
            "$ref": "#/components/schemas/CashoutResponse.462ef8b.PayoutRequest"
          },
          "balance": {
            "$ref": "#/components/schemas/CashoutResponse.462ef8b.CashoutBalance"
          }
        },
        "required": [
          "request",
          "balance"
        ],
        "title": "CashoutData",
        "type": "object"
      },
      "CashoutResponse.462ef8b.PayoutRequest": {
        "description": "Serialized cashout request (see ``_serialize_payout_request``).",
        "properties": {
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Request Id"
          },
          "amount_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Amount Credits"
          },
          "method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Method"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Note"
          },
          "destination": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Free-form payout destination details supplied by the seller.",
            "title": "Destination"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'pending' until admin fulfils the payout, then 'paid'.",
            "title": "Status"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Updated At"
          },
          "paid_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Paid At"
          },
          "paid_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Paid Reference"
          }
        },
        "title": "PayoutRequest",
        "type": "object"
      },
      "InsufficientBalanceResponse.462ef8b.InsufficientBalanceData": {
        "properties": {
          "error": {
            "description": "'insufficient_balance'.",
            "title": "Error",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "available": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Cash balance available at request time.",
            "title": "Available"
          },
          "requested": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Amount that was requested.",
            "title": "Requested"
          }
        },
        "required": [
          "error",
          "message"
        ],
        "title": "InsufficientBalanceData",
        "type": "object"
      },
      "PayoutsResponse.462ef8b.PayoutRequest": {
        "description": "Serialized cashout request (see ``_serialize_payout_request``).",
        "properties": {
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Request Id"
          },
          "amount_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Amount Credits"
          },
          "method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Method"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Note"
          },
          "destination": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Free-form payout destination details supplied by the seller.",
            "title": "Destination"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'pending' until admin fulfils the payout, then 'paid'.",
            "title": "Status"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Updated At"
          },
          "paid_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Paid At"
          },
          "paid_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Paid Reference"
          }
        },
        "title": "PayoutRequest",
        "type": "object"
      },
      "PayoutsResponse.462ef8b.PayoutsData": {
        "properties": {
          "requests": {
            "items": {
              "$ref": "#/components/schemas/PayoutsResponse.462ef8b.PayoutRequest"
            },
            "title": "Requests",
            "type": "array"
          }
        },
        "required": [
          "requests"
        ],
        "title": "PayoutsData",
        "type": "object"
      },
      "EarningsResponse.462ef8b.CashEarnings": {
        "description": "Non-withdrawable cash ledger (paid out manually by admins).",
        "properties": {
          "balance_credits": {
            "title": "Balance Credits",
            "type": "number"
          },
          "lifetime_credits": {
            "title": "Lifetime Credits",
            "type": "number"
          },
          "lifetime_paid_out": {
            "title": "Lifetime Paid Out",
            "type": "number"
          },
          "last_credited_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Last Credited At"
          }
        },
        "required": [
          "balance_credits",
          "lifetime_credits",
          "lifetime_paid_out"
        ],
        "title": "CashEarnings",
        "type": "object"
      },
      "EarningsResponse.462ef8b.Charge": {
        "description": "Serialized marketplace charge (see ``_serialize_charge``).",
        "properties": {
          "charge_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Charge Id"
          },
          "subscription_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Subscription Id"
          },
          "listing_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Listing Id"
          },
          "buyer_uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Buyer Uid"
          },
          "buyer_scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Buyer Scope"
          },
          "seller_uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Seller Uid"
          },
          "seller_scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Seller Scope"
          },
          "charge_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Billing day for daily charges, or 'onetime:<subscription_id>' for upfront fees.",
            "title": "Charge Date"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'daily' (recurring proration) or 'onetime' (upfront fee).",
            "title": "Kind"
          },
          "amount_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Amount Credits"
          },
          "platform_cut_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Platform Cut Credits"
          },
          "seller_payout_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Seller Payout Credits"
          },
          "payout_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Payout Method"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Status"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Created At"
          }
        },
        "title": "Charge",
        "type": "object"
      },
      "EarningsResponse.462ef8b.CreditEarnings": {
        "description": "Lifetime credits earned from marketplace payouts.",
        "properties": {
          "lifetime_earned": {
            "title": "Lifetime Earned",
            "type": "number"
          },
          "lifetime_recurring": {
            "description": "Portion earned from recurring daily payouts.",
            "title": "Lifetime Recurring",
            "type": "number"
          },
          "lifetime_onetime": {
            "description": "Portion earned from upfront one-time fees.",
            "title": "Lifetime Onetime",
            "type": "number"
          },
          "lifetime_payouts": {
            "description": "Number of payout transactions.",
            "title": "Lifetime Payouts",
            "type": "integer"
          }
        },
        "required": [
          "lifetime_earned",
          "lifetime_recurring",
          "lifetime_onetime",
          "lifetime_payouts"
        ],
        "title": "CreditEarnings",
        "type": "object"
      },
      "EarningsResponse.462ef8b.EarningsData": {
        "properties": {
          "cash": {
            "$ref": "#/components/schemas/EarningsResponse.462ef8b.CashEarnings"
          },
          "credits": {
            "$ref": "#/components/schemas/EarningsResponse.462ef8b.CreditEarnings"
          },
          "recent_charges": {
            "items": {
              "$ref": "#/components/schemas/EarningsResponse.462ef8b.Charge"
            },
            "title": "Recent Charges",
            "type": "array"
          },
          "platform_cut_pct": {
            "description": "Platform's percentage cut of each charge.",
            "title": "Platform Cut Pct",
            "type": "integer"
          },
          "seller_share_pct": {
            "description": "Seller's percentage share of each charge.",
            "title": "Seller Share Pct",
            "type": "integer"
          }
        },
        "required": [
          "cash",
          "credits",
          "recent_charges",
          "platform_cut_pct",
          "seller_share_pct"
        ],
        "title": "EarningsData",
        "type": "object"
      },
      "SubscribeResponse.462ef8b.SubscribeData": {
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/SubscribeResponse.462ef8b.Subscription"
          },
          "onetime_charge_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Charge id of the upfront fee, if one was billed.",
            "title": "Onetime Charge Id"
          },
          "onetime_charged": {
            "description": "Upfront credits actually charged (0 for free / internal shares).",
            "title": "Onetime Charged",
            "type": "number"
          }
        },
        "required": [
          "subscription",
          "onetime_charged"
        ],
        "title": "SubscribeData",
        "type": "object"
      },
      "SubscribeResponse.462ef8b.Subscription": {
        "description": "Serialized marketplace subscription (see ``_serialize_subscription``).",
        "properties": {
          "subscription_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Subscription Id"
          },
          "listing_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Listing Id"
          },
          "signal_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Signal Key"
          },
          "seller_workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Seller Workspace Id"
          },
          "buyer_workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Buyer Workspace Id"
          },
          "buyer_uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Buyer Uid"
          },
          "buyer_scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'user' or 'org'.",
            "title": "Buyer Scope"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'active' or 'cancelled'.",
            "title": "Status"
          },
          "price_monthly_credits_at_subscribe": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Monthly price snapshot taken at subscribe time; in-flight billing uses this.",
            "title": "Price Monthly Credits At Subscribe"
          },
          "price_onetime_credits_at_subscribe": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "One-time fee snapshot taken at subscribe time.",
            "title": "Price Onetime Credits At Subscribe"
          },
          "onetime_charge_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Charge id of the upfront fee, if one was billed.",
            "title": "Onetime Charge Id"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Started At"
          },
          "cancelled_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Cancelled At"
          },
          "cancellation_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Cancellation Reason"
          },
          "last_charged_for_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Last day billed by the daily worker.",
            "title": "Last Charged For Date"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Created At"
          }
        },
        "title": "Subscription",
        "type": "object"
      },
      "InsufficientCreditsResponse.462ef8b.InsufficientCreditsData": {
        "properties": {
          "error": {
            "description": "'insufficient_credits'.",
            "title": "Error",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "needed": {
            "description": "Upfront credits required to subscribe.",
            "title": "Needed",
            "type": "number"
          }
        },
        "required": [
          "error",
          "message",
          "needed"
        ],
        "title": "InsufficientCreditsData",
        "type": "object"
      },
      "SubscriptionResponse.462ef8b.Subscription": {
        "description": "Serialized marketplace subscription (see ``_serialize_subscription``).",
        "properties": {
          "subscription_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Subscription Id"
          },
          "listing_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Listing Id"
          },
          "signal_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Signal Key"
          },
          "seller_workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Seller Workspace Id"
          },
          "buyer_workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Buyer Workspace Id"
          },
          "buyer_uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Buyer Uid"
          },
          "buyer_scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'user' or 'org'.",
            "title": "Buyer Scope"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'active' or 'cancelled'.",
            "title": "Status"
          },
          "price_monthly_credits_at_subscribe": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Monthly price snapshot taken at subscribe time; in-flight billing uses this.",
            "title": "Price Monthly Credits At Subscribe"
          },
          "price_onetime_credits_at_subscribe": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "One-time fee snapshot taken at subscribe time.",
            "title": "Price Onetime Credits At Subscribe"
          },
          "onetime_charge_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Charge id of the upfront fee, if one was billed.",
            "title": "Onetime Charge Id"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Started At"
          },
          "cancelled_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Cancelled At"
          },
          "cancellation_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Cancellation Reason"
          },
          "last_charged_for_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Last day billed by the daily worker.",
            "title": "Last Charged For Date"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Created At"
          }
        },
        "title": "Subscription",
        "type": "object"
      },
      "SubscriptionResponse.462ef8b.SubscriptionData": {
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/SubscriptionResponse.462ef8b.Subscription"
          }
        },
        "required": [
          "subscription"
        ],
        "title": "SubscriptionData",
        "type": "object"
      },
      "ListSubscriptionsResponse.462ef8b.ListSubscriptionsData": {
        "properties": {
          "subscriptions": {
            "items": {
              "$ref": "#/components/schemas/ListSubscriptionsResponse.462ef8b.SubscriptionWithListing"
            },
            "title": "Subscriptions",
            "type": "array"
          }
        },
        "required": [
          "subscriptions"
        ],
        "title": "ListSubscriptionsData",
        "type": "object"
      },
      "ListSubscriptionsResponse.462ef8b.Listing": {
        "description": "Serialized marketplace listing (see ``_serialize_listing``).",
        "properties": {
          "listing_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Listing Id"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Description"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Icon Url"
          },
          "source_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Source Label"
          },
          "sla": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Sla"
          },
          "update_frequency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Publish cadence label, e.g. 'hourly' or 'daily'.",
            "title": "Update Frequency"
          },
          "data_interval": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Bucket spacing of the underlying series, e.g. '1h'.",
            "title": "Data Interval"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Cadence axis: 'realtime', 'historical' or 'both'.",
            "title": "Kind"
          },
          "categories": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Taxonomy category slugs.",
            "title": "Categories"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Tags"
          },
          "price_monthly_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Recurring monthly subscription price in credits (0 = no monthly fee).",
            "title": "Price Monthly Credits"
          },
          "price_onetime_credits": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Upfront one-time fee in credits charged at subscribe time (0 = none).",
            "title": "Price Onetime Credits"
          },
          "payout_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'cash' or 'credits'.",
            "title": "Payout Method"
          },
          "license_acknowledged_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "License Acknowledged At"
          },
          "terms_acknowledged_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Terms Acknowledged At"
          },
          "terms_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Terms Version"
          },
          "featured": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Featured listings are pinned first on the browse page.",
            "title": "Featured"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'draft', 'published' or 'delisted'.",
            "title": "Status"
          },
          "listing_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'signal' (ClickHouse time-series) or 'event' (scored Mongo events).",
            "title": "Listing Type"
          },
          "signal_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The listed signal key (event key/source for event listings).",
            "title": "Signal Key"
          },
          "data_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Data Type"
          },
          "signal_count_cached": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Cached signal/event count for the listed key.",
            "title": "Signal Count Cached"
          },
          "subscribers_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Active subscriber count.",
            "title": "Subscribers Count"
          },
          "first_signal_ts_cached": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "First Signal Ts Cached"
          },
          "latest_signal_ts_cached": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Latest Signal Ts Cached"
          },
          "workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Seller workspace the signal is published from.",
            "title": "Workspace Id"
          },
          "source_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Source Id"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Updated At"
          },
          "visibility": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'public' (global marketplace) or 'org' (visible only to members of org_uid, always free).",
            "title": "Visibility"
          },
          "org_uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Owning organization for org-scoped listings.",
            "title": "Org Uid"
          },
          "seller": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ListSubscriptionsResponse.462ef8b.Seller"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          }
        },
        "title": "Listing",
        "type": "object"
      },
      "ListSubscriptionsResponse.462ef8b.Seller": {
        "description": "Public seller identity attached to a listing.",
        "properties": {
          "uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Seller uid (user or organization).",
            "title": "Uid"
          },
          "scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'user' or 'org'.",
            "title": "Scope"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Username"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Slug"
          },
          "avatar": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Avatar"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Best available display name (name, username, slug or email; 'Anonymous' as fallback).",
            "title": "Label"
          },
          "verified": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Whether the seller is marketplace-verified.",
            "title": "Verified"
          },
          "verified_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Verified At"
          }
        },
        "title": "Seller",
        "type": "object"
      },
      "ListSubscriptionsResponse.462ef8b.SubscriptionWithListing": {
        "properties": {
          "subscription_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Subscription Id"
          },
          "listing_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Listing Id"
          },
          "signal_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Signal Key"
          },
          "seller_workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Seller Workspace Id"
          },
          "buyer_workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Buyer Workspace Id"
          },
          "buyer_uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Buyer Uid"
          },
          "buyer_scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'user' or 'org'.",
            "title": "Buyer Scope"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'active' or 'cancelled'.",
            "title": "Status"
          },
          "price_monthly_credits_at_subscribe": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Monthly price snapshot taken at subscribe time; in-flight billing uses this.",
            "title": "Price Monthly Credits At Subscribe"
          },
          "price_onetime_credits_at_subscribe": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "One-time fee snapshot taken at subscribe time.",
            "title": "Price Onetime Credits At Subscribe"
          },
          "onetime_charge_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Charge id of the upfront fee, if one was billed.",
            "title": "Onetime Charge Id"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Started At"
          },
          "cancelled_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Cancelled At"
          },
          "cancellation_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Cancellation Reason"
          },
          "last_charged_for_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Last day billed by the daily worker.",
            "title": "Last Charged For Date"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Created At"
          },
          "listing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ListSubscriptionsResponse.462ef8b.Listing"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The subscribed listing (None if it no longer exists)."
          }
        },
        "title": "SubscriptionWithListing",
        "type": "object"
      },
      "WebhookAcceptedResponse.839bd04.WebhookAcceptedData": {
        "properties": {
          "status": {
            "description": "'ok' on success.",
            "title": "Status",
            "type": "string"
          },
          "kind": {
            "description": "Delivery kind that was processed: 'events' or 'signal'.",
            "title": "Kind",
            "type": "string"
          },
          "accepted": {
            "description": "Number of items accepted from this delivery.",
            "title": "Accepted",
            "type": "integer"
          }
        },
        "required": [
          "status",
          "kind",
          "accepted"
        ],
        "title": "WebhookAcceptedData",
        "type": "object"
      },
      "PublicCellsResponse.839bd04.PublicCell": {
        "properties": {
          "id": {
            "description": "Cell id, e.g. 'eu-1'.",
            "title": "Id",
            "type": "string"
          },
          "api_base_url": {
            "description": "Public API base URL for this cell.",
            "title": "Api Base Url",
            "type": "string"
          },
          "subdomain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Public API hostname for this cell.",
            "title": "Subdomain"
          }
        },
        "required": [
          "id",
          "api_base_url"
        ],
        "title": "PublicCell",
        "type": "object"
      },
      "InferenceResponse.6e6e26b.InferenceUsage": {
        "properties": {
          "input_tokens": {
            "title": "Input Tokens",
            "type": "integer"
          },
          "output_tokens": {
            "title": "Output Tokens",
            "type": "integer"
          }
        },
        "required": [
          "input_tokens",
          "output_tokens"
        ],
        "title": "InferenceUsage",
        "type": "object"
      },
      "InferenceResponse.6e6e26b.Prediction": {
        "description": "Canonical prediction entry: one per output label.",
        "properties": {
          "label": {
            "description": "Output label name (or the synthetic 'output' for raw tensors).",
            "title": "Label",
            "type": "string"
          },
          "point": {
            "description": "Point forecast values across the horizon.",
            "items": {},
            "title": "Point",
            "type": "array"
          },
          "quantiles": {
            "anyOf": [
              {
                "additionalProperties": {
                  "items": {},
                  "type": "array"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Optional quantile forecasts keyed by quantile level (e.g. '0.1', '0.5', '0.9').",
            "title": "Quantiles"
          }
        },
        "required": [
          "label",
          "point"
        ],
        "title": "Prediction",
        "type": "object"
      },
      "ErrorResponse.6e6e26b.ErrorDetail": {
        "properties": {
          "code": {
            "description": "Machine-readable error code, e.g. INFERENCE_FAILED.",
            "title": "Code",
            "type": "string"
          },
          "message": {
            "description": "Human-readable error message.",
            "title": "Message",
            "type": "string"
          },
          "retryable": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Whether retrying the request may succeed.",
            "title": "Retryable"
          },
          "details": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Additional error context.",
            "title": "Details"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "ErrorDetail",
        "type": "object"
      },
      "SegmentInferenceResponse.6e6e26b.DataPeriod": {
        "properties": {
          "start": {
            "title": "Start",
            "type": "string"
          },
          "end": {
            "title": "End",
            "type": "string"
          }
        },
        "required": [
          "start",
          "end"
        ],
        "title": "DataPeriod",
        "type": "object"
      },
      "SegmentInferenceResponse.6e6e26b.Prediction": {
        "description": "Canonical prediction entry: one per output label.",
        "properties": {
          "label": {
            "description": "Output label name (or the synthetic 'output' for raw tensors).",
            "title": "Label",
            "type": "string"
          },
          "point": {
            "description": "Point forecast values across the horizon.",
            "items": {},
            "title": "Point",
            "type": "array"
          },
          "quantiles": {
            "anyOf": [
              {
                "additionalProperties": {
                  "items": {},
                  "type": "array"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Optional quantile forecasts keyed by quantile level (e.g. '0.1', '0.5', '0.9').",
            "title": "Quantiles"
          }
        },
        "required": [
          "label",
          "point"
        ],
        "title": "Prediction",
        "type": "object"
      },
      "ListInferencesResponse.6e6e26b.InferenceListItem": {
        "properties": {
          "uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Uid"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "User Id"
          },
          "model_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Model Id"
          },
          "training_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Training Id"
          },
          "deployment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Deployment Id"
          },
          "deployment_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Deployment Type"
          },
          "timestamp": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Timestamp"
          },
          "inference_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Inference Type"
          },
          "request": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Request"
          },
          "response": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Trimmed response: success, predictions (sparkline budget), output_shape, error.",
            "title": "Response"
          },
          "performance": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Performance"
          },
          "segment_metadata": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Segment Metadata"
          },
          "deployment_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Deployment Label"
          },
          "segment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Segment Name"
          }
        },
        "title": "InferenceListItem",
        "type": "object"
      },
      "ListInferencesResponse.6e6e26b.Pagination": {
        "properties": {
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "total_pages": {
            "title": "Total Pages",
            "type": "integer"
          }
        },
        "required": [
          "page",
          "limit",
          "total",
          "total_pages"
        ],
        "title": "Pagination",
        "type": "object"
      },
      "ListFoundationModelsResponse.27c3464.FoundationModelsData": {
        "properties": {
          "models": {
            "description": "Available foundation models across every family. Each row carries family + slug (the unified identity), vendor, license, params and eval metadata.",
            "items": {
              "type": "object"
            },
            "title": "Models",
            "type": "array"
          },
          "count": {
            "title": "Count",
            "type": "integer"
          }
        },
        "required": [
          "models",
          "count"
        ],
        "title": "FoundationModelsData",
        "type": "object"
      },
      "ListAdaptersResponse.27c3464.AdaptersData": {
        "properties": {
          "adapters": {
            "description": "Fine-tuned adapters across every family. Each row carries the identity (family + slug) of the foundation model it was trained against.",
            "items": {
              "type": "object"
            },
            "title": "Adapters",
            "type": "array"
          },
          "count": {
            "title": "Count",
            "type": "integer"
          }
        },
        "required": [
          "adapters",
          "count"
        ],
        "title": "AdaptersData",
        "type": "object"
      },
      "ByomUploadResponse.8a9eeb4.ByomUploadData": {
        "properties": {
          "model_id": {
            "description": "Id to use with /models/byom/validate and /models/byom/register.",
            "title": "Model Id",
            "type": "string"
          },
          "model_uri": {
            "description": "S3 URI the model was uploaded to.",
            "title": "Model Uri",
            "type": "string"
          },
          "local_staging_path": {
            "description": "Server-side staging path of the uploaded file.",
            "title": "Local Staging Path",
            "type": "string"
          },
          "size_bytes": {
            "title": "Size Bytes",
            "type": "integer"
          },
          "ext": {
            "description": "File extension of the uploaded model, e.g. '.onnx'.",
            "title": "Ext",
            "type": "string"
          },
          "next": {
            "description": "Hint for the next call in the BYOM flow.",
            "title": "Next",
            "type": "string"
          }
        },
        "required": [
          "model_id",
          "model_uri",
          "local_staging_path",
          "size_bytes",
          "ext",
          "next"
        ],
        "title": "ByomUploadData",
        "type": "object"
      },
      "InsufficientCreditsResponse.8a9eeb4.ByomInsufficientCreditsData": {
        "properties": {
          "error": {
            "description": "Always 'insufficient_credits'.",
            "title": "Error",
            "type": "string"
          },
          "message": {
            "description": "Human-readable explanation of the shortfall.",
            "title": "Message",
            "type": "string"
          },
          "operation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Billing operation that was attempted.",
            "title": "Operation"
          },
          "needed": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Credits required to run the operation.",
            "title": "Needed"
          }
        },
        "required": [
          "error",
          "message"
        ],
        "title": "ByomInsufficientCreditsData",
        "type": "object"
      },
      "ByomValidateResponse.8a9eeb4.ByomValidateData": {
        "properties": {
          "model_id": {
            "title": "Model Id",
            "type": "string"
          },
          "detection": {
            "description": "Framework detection: framework, confidence, notes.",
            "title": "Detection",
            "type": "object"
          },
          "signature": {
            "description": "Inferred model signature (input/output names and shapes).",
            "title": "Signature",
            "type": "object"
          },
          "validation": {
            "$ref": "#/components/schemas/ByomValidateResponse.8a9eeb4.ByomValidationResult"
          }
        },
        "required": [
          "model_id",
          "detection",
          "signature",
          "validation"
        ],
        "title": "ByomValidateData",
        "type": "object"
      },
      "ByomValidateResponse.8a9eeb4.ByomValidationResult": {
        "properties": {
          "ok": {
            "description": "Overall validation verdict.",
            "title": "Ok",
            "type": "boolean"
          },
          "framework": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Framework"
          },
          "file_size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "File Size Bytes"
          },
          "static_warnings": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Static Warnings"
          },
          "static_errors": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Static Errors"
          },
          "dynamic_passed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Whether the live forward pass succeeded.",
            "title": "Dynamic Passed"
          },
          "forward_latency_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Forward Latency Ms"
          },
          "output_shape": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Output Shape"
          },
          "notes": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Notes"
          }
        },
        "required": [
          "ok"
        ],
        "title": "ByomValidationResult",
        "type": "object"
      },
      "ByomDownloadResponse.8a9eeb4.ByomDownloadData": {
        "properties": {
          "download_url": {
            "description": "Time-limited presigned URL for the original model file.",
            "title": "Download Url",
            "type": "string"
          },
          "filename": {
            "description": "Suggested filename for the download.",
            "title": "Filename",
            "type": "string"
          },
          "framework": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Model framework, e.g. 'onnx'.",
            "title": "Framework"
          },
          "expires_in_seconds": {
            "description": "Seconds until the URL expires.",
            "title": "Expires In Seconds",
            "type": "integer"
          }
        },
        "required": [
          "download_url",
          "filename",
          "expires_in_seconds"
        ],
        "title": "ByomDownloadData",
        "type": "object"
      },
      "ErrorDetail": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Machine-readable error code. Either surface-specific (e.g. `wrong_cell`, `insufficient_credits`, `ALREADY_DEPLOYED`) or derived from the HTTP status (`bad_request`, `unauthorized`, `not_found`, ...)."
          },
          "message": {
            "type": "string",
            "description": "Human-readable description of the failure."
          },
          "details": {
            "type": "object",
            "description": "Surface-specific context (balances, ids, ...).",
            "additionalProperties": true
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "error",
          "status"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          },
          "status": {
            "type": "string",
            "description": "Human-readable message; always mirrors `error.message`."
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "description": "Send `Authorization: Bearer <token>`. Programmatic access uses workspace API tokens (`pa_live_...`); interactive sessions use the JWT issued at login. Most endpoints also require the `X-Workspace-Id` header to select the target workspace.",
        "scheme": "bearer",
        "bearerFormat": "API token (pa_live_...) or JWT"
      }
    }
  },
  "servers": [
    {
      "url": "https://eu.api.predict.ai",
      "description": "This deployment's public API origin"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ]
}
