{"openapi": "3.1.0", "info": {"title": "Complementary Framework Model API", "version": "2.0.0.dev0", "description": "Model-agnostic hosting API: catalog, predict, forecast and evaluate for any model described by a manifest (model.json).\n\nDiscovery: `GET /models` -> `GET /models/{name}` -> `GET /models/{name}/schema?op=` (JSON Schema of the body) -> `GET /models/{name}/example?op=` (runnable bodies) -> `POST /predict/{name}` or `/forecast/{name}`.\n\nErrors use the ErrorEnvelope shape `{error: {code, message, details}, request_id}`; `message` is safe to show, `code` is stable (listed per operation in `x-error-codes`). Every 400/422 error has `details.errors: [{loc, msg, type}]` (plus code-specific keys such as `missing`, `too_short`, `row`/`field`/`problem`), `details.error_count` and, where a generic next step helps, `details.hint`. Successful write (admin) responses include `request_id`.\n\n| code | HTTP | meaning | details |\n|---|---|---|---|\n| `BAD_REQUEST` | 400 | The request could not be understood |  |\n| `INVALID_JSON` | 400 | The body is not valid JSON (NaN/Infinity are not JSON) |  |\n| `UNAUTHORIZED` | 401 | X-API-Key header missing (drafts, archived versions, write endpoints) |  |\n| `FORBIDDEN` | 403 | X-API-Key not accepted |  |\n| `NOT_FOUND` | 404 | Unknown URL |  |\n| `MODEL_NOT_FOUND` | 404 | Unknown model or version, or an unpublished version without a key | model, version, available |\n| `METRICS_NOT_FOUND` | 404 | The model has no recorded metrics | model |\n| `METHOD_NOT_ALLOWED` | 405 | Wrong HTTP method (see the Allow header) |  |\n| `PAYLOAD_TOO_LARGE` | 413 | Body larger than MAX_JSON_BYTES | max_bytes |\n| `UNSUPPORTED_MEDIA_TYPE` | 415 | Send Content-Type: application/json | content_type |\n| `INPUT_INVALID` | 422 | The body does not match the request contract or the model's inputs | errors[] with loc, msg, type (+ row, field, problem, value, allowed for model inputs), error_count |\n| `MISSING_INPUTS` | 422 | Values needed to build features are absent (all listed at once) | missing[] with variable, periods, reason; hint |\n| `HISTORY_INVALID` | 422 | History/future has gaps, duplicates, unparseable periods, non-numeric values or is too short | missing_periods, duplicate_periods, unparseable, invalid_values, too_short {var: {have, need}}, hint |\n| `HORIZON_TOO_LONG` | 422 | Horizon above the model's or the server's maximum, or limited by policy 'refuse' | requested, max_horizon | usable_horizon, variables |\n| `FEATURE_MISMATCH` | 422 | Raw 'input' rows have the wrong number of values | expected, got |\n| `MANIFEST_INVALID` | 400 | The model's manifest cannot be used | problems |\n| `INTERNAL_ERROR` | 500 | Unexpected server error (no details are exposed; quote request_id) | request_id |\n| `MODEL_LOAD_FAILED` | 500 | The model file could not be loaded | exception_type |\n| `PREDICTION_FAILED` | 500 | The model raised an error or returned invalid values | exception_type |\n| `NOT_SUPPORTED` | 501 | The operation is not available for this model (e.g. forecast without a forecast description, predict on a Prophet model) | supported_ops, hint, problems |\n| `FLAVOR_UNAVAILABLE` | 501 | The model's library is not installed on this server | flavor, missing_module |\n| `WRITE_DISABLED` | 503 | Write endpoints are disabled (no API_KEYS configured) |  |\n| `STORAGE_UNAVAILABLE` | 503 | The model storage (MODEL_ROOT) is missing or unreadable; retry later (see /ready) | hint |\n| `BAD_ARCHIVE` | 400 | The uploaded zip or file name is unsafe or has a disallowed file type | violations[] {path, problem}, allowed_extensions, errors |\n| `VERSION_EXISTS` | 409 | The version number is already used | version, version_source, suggested_version, hint |\n| `NOT_DRAFT` | 409 | Only draft versions can be changed | state |\n| `NOT_READY` | 409 | The version's status does not allow publishing (or replacing a published version) | status, reasons[] |\n| `NEVER_PUBLISHED` | 409 | Rollback target was never published | state |\n| `VERSION_IS_CURRENT` | 409 | The published version cannot be deleted while other versions exist (use force=true) | model, version |\n| `MODEL_NAME_CONFLICT` | 409 | A folder whose name differs only in letter case exists | model |\n| `STORAGE_BUSY` | 409 | Another write to the same model is in progress; retry | model |"}, "servers": [{"url": "/v1", "description": "Versioned API"}, {"url": "/", "description": "Unprefixed (backward compatible)"}], "tags": [{"name": "service"}, {"name": "catalog"}, {"name": "inference"}, {"name": "admin", "description": "Write API (X-API-Key required)"}], "paths": {"/": {"get": {"summary": "Service index", "tags": ["service"], "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IndexResponse"}}}}}}}, "/evaluate/{name}": {"post": {"summary": "Evaluate", "description": "Metrics from arrays, from predictions vs actuals, or a rolling backtest.", "tags": ["inference"], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}, "description": "Model name (letters, digits, '.', '_', '+', '-')"}, {"name": "version", "in": "query", "required": false, "schema": {"type": "string"}, "description": "Specific version; draft/archived versions require an API key"}], "security": [{}, {"ApiKeyAuth": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EvaluateRequest"}}}}, "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EvaluateResponse"}}}}, "400": {"description": "Malformed request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "401": {"description": "API key missing", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "403": {"description": "API key invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "404": {"description": "Model or version not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "413": {"description": "Body too large", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "415": {"description": "Body is not JSON", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "422": {"description": "Input invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "500": {"description": "Server or model error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "501": {"description": "Operation not supported / flavor unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "503": {"description": "Model storage unavailable (STORAGE_UNAVAILABLE) or write endpoints disabled (WRITE_DISABLED)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}}, "x-error-codes": ["INVALID_JSON", "UNAUTHORIZED", "FORBIDDEN", "MODEL_NOT_FOUND", "PAYLOAD_TOO_LARGE", "STORAGE_UNAVAILABLE", "UNSUPPORTED_MEDIA_TYPE", "INPUT_INVALID", "MISSING_INPUTS", "HISTORY_INVALID", "HORIZON_TOO_LONG", "FEATURE_MISMATCH", "INTERNAL_ERROR", "MODEL_LOAD_FAILED", "PREDICTION_FAILED", "NOT_SUPPORTED", "FLAVOR_UNAVAILABLE"]}}, "/forecast/{name}": {"post": {"summary": "Forecast", "description": "Multi-step forecast; missing future values are reported together (MISSING_INPUTS).", "tags": ["inference"], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}, "description": "Model name (letters, digits, '.', '_', '+', '-')"}, {"name": "version", "in": "query", "required": false, "schema": {"type": "string"}, "description": "Specific version; draft/archived versions require an API key"}], "security": [{}, {"ApiKeyAuth": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ForecastRequest"}}}}, "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ForecastResponse"}}}}, "400": {"description": "Malformed request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "401": {"description": "API key missing", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "403": {"description": "API key invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "404": {"description": "Model or version not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "413": {"description": "Body too large", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "415": {"description": "Body is not JSON", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "422": {"description": "Input invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "500": {"description": "Server or model error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "501": {"description": "Operation not supported / flavor unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "503": {"description": "Model storage unavailable (STORAGE_UNAVAILABLE) or write endpoints disabled (WRITE_DISABLED)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}}, "x-error-codes": ["INVALID_JSON", "UNAUTHORIZED", "FORBIDDEN", "MODEL_NOT_FOUND", "PAYLOAD_TOO_LARGE", "STORAGE_UNAVAILABLE", "UNSUPPORTED_MEDIA_TYPE", "INPUT_INVALID", "MISSING_INPUTS", "HISTORY_INVALID", "HORIZON_TOO_LONG", "FEATURE_MISMATCH", "INTERNAL_ERROR", "MODEL_LOAD_FAILED", "PREDICTION_FAILED", "NOT_SUPPORTED", "FLAVOR_UNAVAILABLE"]}}, "/health": {"get": {"summary": "Liveness (always 200 while the process runs) and storage ok|unavailable", "tags": ["service"], "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HealthResponse"}}}}}}}, "/models": {"get": {"summary": "List published models (does not load artifacts)", "tags": ["catalog"], "parameters": [{"name": "include_drafts", "in": "query", "required": false, "schema": {"type": "boolean", "default": false}, "description": "With a valid API key: also models with only draft versions, and latest_version / has_newer_draft on every item"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ModelList"}}}}, "500": {"description": "Server or model error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "503": {"description": "Model storage unavailable (STORAGE_UNAVAILABLE) or write endpoints disabled (WRITE_DISABLED)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}}, "x-error-codes": ["INTERNAL_ERROR", "MODEL_LOAD_FAILED", "STORAGE_UNAVAILABLE"], "security": [{}, {"ApiKeyAuth": []}]}}, "/models/upload": {"post": {"summary": "Upload a model version (draft)", "tags": ["admin"], "security": [{"ApiKeyAuth": []}], "parameters": [], "responses": {"201": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminUploadResponse"}}}}, "400": {"$ref": "#/components/responses/Error"}, "401": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "409": {"$ref": "#/components/responses/Error"}, "413": {"$ref": "#/components/responses/Error"}, "422": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}, "requestBody": {"required": true, "content": {"multipart/form-data": {"schema": {"type": "object", "required": ["model_name", "model"], "properties": {"model_name": {"type": "string"}, "model": {"type": "string", "format": "binary"}, "version": {"type": "string"}, "manifest": {"type": "string", "format": "binary"}, "metadata": {"type": "string", "format": "binary"}, "metrics": {"type": "string", "format": "binary"}, "assets[]": {"type": "array", "items": {"type": "string", "format": "binary"}}, "asset_paths[]": {"type": "array", "items": {"type": "string"}}, "inference": {"type": "string", "format": "binary"}, "title": {"type": "string"}, "description": {"type": "string"}, "tags": {"type": "string"}, "disease": {"type": "string"}, "publish": {"type": "string", "enum": ["true", "false"]}, "overwrite": {"type": "string", "enum": ["true", "false"]}}}}}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "WRITE_DISABLED", "INVALID_JSON", "PAYLOAD_TOO_LARGE", "INPUT_INVALID", "INTERNAL_ERROR", "STORAGE_UNAVAILABLE", "BAD_ARCHIVE", "VERSION_EXISTS", "NOT_DRAFT", "NOT_READY", "NEVER_PUBLISHED", "VERSION_IS_CURRENT", "MODEL_NAME_CONFLICT", "STORAGE_BUSY"]}}, "/models/validate": {"post": {"summary": "Validate a bundle without storing it", "tags": ["admin"], "security": [{"ApiKeyAuth": []}], "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminReportResponse"}}}}, "400": {"$ref": "#/components/responses/Error"}, "401": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "413": {"$ref": "#/components/responses/Error"}, "422": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}, "requestBody": {"required": true, "content": {"multipart/form-data": {"schema": {"type": "object", "required": ["model_name", "model"], "properties": {"model_name": {"type": "string"}, "model": {"type": "string", "format": "binary"}, "version": {"type": "string"}, "manifest": {"type": "string", "format": "binary"}, "metadata": {"type": "string", "format": "binary"}, "metrics": {"type": "string", "format": "binary"}, "assets[]": {"type": "array", "items": {"type": "string", "format": "binary"}}, "asset_paths[]": {"type": "array", "items": {"type": "string"}}, "inference": {"type": "string", "format": "binary"}, "title": {"type": "string"}, "description": {"type": "string"}, "tags": {"type": "string"}, "disease": {"type": "string"}, "publish": {"type": "string", "enum": ["true", "false"]}, "overwrite": {"type": "string", "enum": ["true", "false"]}}}}}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "WRITE_DISABLED", "INVALID_JSON", "PAYLOAD_TOO_LARGE", "INPUT_INVALID", "INTERNAL_ERROR", "STORAGE_UNAVAILABLE", "BAD_ARCHIVE"]}}, "/models/{name}": {"get": {"summary": "Model details", "tags": ["catalog"], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}, "description": "Model name (letters, digits, '.', '_', '+', '-')"}, {"name": "version", "in": "query", "required": false, "schema": {"type": "string"}, "description": "Specific version; draft/archived versions require an API key"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ModelDetail"}}}}, "401": {"description": "API key missing", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "403": {"description": "API key invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "404": {"description": "Model or version not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "503": {"description": "Model storage unavailable (STORAGE_UNAVAILABLE) or write endpoints disabled (WRITE_DISABLED)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "MODEL_NOT_FOUND", "STORAGE_UNAVAILABLE"], "security": [{}, {"ApiKeyAuth": []}]}, "delete": {"summary": "Delete a model and all its versions", "tags": ["admin"], "security": [{"ApiKeyAuth": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminDeleteResponse"}}}}, "401": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "WRITE_DISABLED", "MODEL_NOT_FOUND", "INTERNAL_ERROR", "STORAGE_UNAVAILABLE"]}}, "/models/{name}/example": {"get": {"summary": "Runnable example request bodies (does not load the model)", "tags": ["catalog"], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}, "description": "Model name (letters, digits, '.', '_', '+', '-')"}, {"name": "version", "in": "query", "required": false, "schema": {"type": "string"}, "description": "Specific version; draft/archived versions require an API key"}, {"name": "op", "in": "query", "required": false, "schema": {"type": "string", "enum": ["predict", "forecast"], "default": "predict"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExampleResponse"}}}}, "401": {"description": "API key missing", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "403": {"description": "API key invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "404": {"description": "Model or version not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "422": {"description": "Input invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "500": {"description": "Server or model error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "501": {"description": "Operation not supported / flavor unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "503": {"description": "Model storage unavailable (STORAGE_UNAVAILABLE) or write endpoints disabled (WRITE_DISABLED)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "MODEL_NOT_FOUND", "INPUT_INVALID", "INTERNAL_ERROR", "MODEL_LOAD_FAILED", "NOT_SUPPORTED", "FLAVOR_UNAVAILABLE", "STORAGE_UNAVAILABLE"], "security": [{}, {"ApiKeyAuth": []}]}}, "/models/{name}/health": {"get": {"summary": "Load the model and report health", "tags": ["catalog"], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}, "description": "Model name (letters, digits, '.', '_', '+', '-')"}, {"name": "version", "in": "query", "required": false, "schema": {"type": "string"}, "description": "Specific version; draft/archived versions require an API key"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ModelHealthResponse"}}}}, "401": {"description": "API key missing", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "403": {"description": "API key invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "404": {"description": "Model or version not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "500": {"description": "Server or model error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "501": {"description": "Operation not supported / flavor unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "MODEL_NOT_FOUND", "INTERNAL_ERROR", "MODEL_LOAD_FAILED", "NOT_SUPPORTED", "FLAVOR_UNAVAILABLE"], "security": [{}, {"ApiKeyAuth": []}]}}, "/models/{name}/metrics": {"get": {"summary": "Recorded evaluation metrics", "tags": ["catalog"], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}, "description": "Model name (letters, digits, '.', '_', '+', '-')"}, {"name": "version", "in": "query", "required": false, "schema": {"type": "string"}, "description": "Specific version; draft/archived versions require an API key"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MetricsResponse"}}}}, "401": {"description": "API key missing", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "403": {"description": "API key invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "404": {"description": "Model or version not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "503": {"description": "Model storage unavailable (STORAGE_UNAVAILABLE) or write endpoints disabled (WRITE_DISABLED)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "MODEL_NOT_FOUND", "STORAGE_UNAVAILABLE", "METRICS_NOT_FOUND"], "security": [{}, {"ApiKeyAuth": []}]}}, "/models/{name}/next-version": {"get": {"summary": "Suggest the next free version number (default bump=minor, as the portal and copy use)", "tags": ["admin"], "security": [{"ApiKeyAuth": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "bump", "in": "query", "required": false, "schema": {"type": "string", "enum": ["minor", "patch", "major"], "default": "minor"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminNextVersionResponse"}}}}, "401": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "422": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "WRITE_DISABLED", "MODEL_NOT_FOUND", "INPUT_INVALID", "INTERNAL_ERROR", "STORAGE_UNAVAILABLE"]}}, "/models/{name}/reload": {"post": {"summary": "Force every worker to reload the model", "tags": ["admin"], "security": [{"ApiKeyAuth": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminReloadResponse"}}}}, "401": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "WRITE_DISABLED", "MODEL_NOT_FOUND", "INTERNAL_ERROR", "STORAGE_UNAVAILABLE"]}}, "/models/{name}/rollback": {"post": {"summary": "Publish a previously published version again", "tags": ["admin"], "security": [{"ApiKeyAuth": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminModelResponse"}}}}, "401": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "409": {"$ref": "#/components/responses/Error"}, "422": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["version"], "properties": {"version": {"type": "string"}}}}}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "WRITE_DISABLED", "MODEL_NOT_FOUND", "INPUT_INVALID", "INTERNAL_ERROR", "STORAGE_UNAVAILABLE", "VERSION_EXISTS", "NOT_DRAFT", "NOT_READY", "NEVER_PUBLISHED", "VERSION_IS_CURRENT", "MODEL_NAME_CONFLICT", "STORAGE_BUSY"]}}, "/models/{name}/schema": {"get": {"summary": "JSON Schema of the request body for an operation (does not load the model)", "tags": ["catalog"], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}, "description": "Model name (letters, digits, '.', '_', '+', '-')"}, {"name": "version", "in": "query", "required": false, "schema": {"type": "string"}, "description": "Specific version; draft/archived versions require an API key"}, {"name": "op", "in": "query", "required": false, "schema": {"type": "string", "enum": ["predict", "forecast"], "default": "predict"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SchemaResponse"}}}}, "401": {"description": "API key missing", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "403": {"description": "API key invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "404": {"description": "Model or version not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "422": {"description": "Input invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "500": {"description": "Server or model error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "501": {"description": "Operation not supported / flavor unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "503": {"description": "Model storage unavailable (STORAGE_UNAVAILABLE) or write endpoints disabled (WRITE_DISABLED)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "MODEL_NOT_FOUND", "INPUT_INVALID", "INTERNAL_ERROR", "MODEL_LOAD_FAILED", "NOT_SUPPORTED", "FLAVOR_UNAVAILABLE", "STORAGE_UNAVAILABLE"], "security": [{}, {"ApiKeyAuth": []}]}}, "/models/{name}/version": {"get": {"summary": "Resolved version", "tags": ["catalog"], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}, "description": "Model name (letters, digits, '.', '_', '+', '-')"}, {"name": "version", "in": "query", "required": false, "schema": {"type": "string"}, "description": "Specific version; draft/archived versions require an API key"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VersionResponse"}}}}, "401": {"description": "API key missing", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "403": {"description": "API key invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "404": {"description": "Model or version not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "503": {"description": "Model storage unavailable (STORAGE_UNAVAILABLE) or write endpoints disabled (WRITE_DISABLED)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "MODEL_NOT_FOUND", "STORAGE_UNAVAILABLE"], "security": [{}, {"ApiKeyAuth": []}]}}, "/models/{name}/versions": {"get": {"summary": "List versions (newest first)", "tags": ["admin"], "security": [{"ApiKeyAuth": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminVersionListResponse"}}}}, "401": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "WRITE_DISABLED", "MODEL_NOT_FOUND", "INTERNAL_ERROR", "STORAGE_UNAVAILABLE"]}}, "/models/{name}/versions/{version}": {"get": {"summary": "Version details: record, manifest, report, files", "tags": ["admin"], "security": [{"ApiKeyAuth": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "version", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminVersionDetailResponse"}}}}, "401": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "WRITE_DISABLED", "MODEL_NOT_FOUND", "INTERNAL_ERROR", "STORAGE_UNAVAILABLE"]}, "delete": {"summary": "Delete a version", "tags": ["admin"], "security": [{"ApiKeyAuth": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "version", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "force", "in": "query", "required": false, "schema": {"type": "boolean"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminDeleteResponse"}}}}, "401": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "409": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "WRITE_DISABLED", "MODEL_NOT_FOUND", "INTERNAL_ERROR", "STORAGE_UNAVAILABLE", "VERSION_EXISTS", "NOT_DRAFT", "NOT_READY", "NEVER_PUBLISHED", "VERSION_IS_CURRENT", "MODEL_NAME_CONFLICT", "STORAGE_BUSY"]}}, "/models/{name}/versions/{version}/approve-code": {"post": {"summary": "Approve (or revoke) custom code", "tags": ["admin"], "security": [{"ApiKeyAuth": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "version", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminApproveResponse"}}}}, "401": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"approved": {"type": "boolean"}, "approved_by": {"type": "string"}}}}}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "WRITE_DISABLED", "MODEL_NOT_FOUND", "INTERNAL_ERROR", "STORAGE_UNAVAILABLE"]}}, "/models/{name}/versions/{version}/assets": {"post": {"summary": "Add a file to a draft (CSV mapping conversion with convert=mapping)", "tags": ["admin"], "security": [{"ApiKeyAuth": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "version", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminAssetResponse"}}}}, "401": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "409": {"$ref": "#/components/responses/Error"}, "413": {"$ref": "#/components/responses/Error"}, "422": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}, "requestBody": {"required": true, "content": {"multipart/form-data": {"schema": {"type": "object", "required": ["file", "path"], "properties": {"file": {"type": "string", "format": "binary"}, "path": {"type": "string"}, "convert": {"type": "string", "enum": ["mapping"]}}}}}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "WRITE_DISABLED", "MODEL_NOT_FOUND", "PAYLOAD_TOO_LARGE", "INPUT_INVALID", "INTERNAL_ERROR", "STORAGE_UNAVAILABLE", "VERSION_EXISTS", "NOT_DRAFT", "NOT_READY", "NEVER_PUBLISHED", "VERSION_IS_CURRENT", "MODEL_NAME_CONFLICT", "STORAGE_BUSY"]}}, "/models/{name}/versions/{version}/copy": {"post": {"summary": "Create a draft from the files of an existing version (e.g. a legacy folder), without re-uploading the model file", "tags": ["admin"], "security": [{"ApiKeyAuth": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "version", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"201": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminCopyResponse"}}}}, "400": {"$ref": "#/components/responses/Error"}, "401": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "409": {"$ref": "#/components/responses/Error"}, "413": {"$ref": "#/components/responses/Error"}, "415": {"$ref": "#/components/responses/Error"}, "422": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminCopyRequest"}}}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "WRITE_DISABLED", "MODEL_NOT_FOUND", "INVALID_JSON", "PAYLOAD_TOO_LARGE", "UNSUPPORTED_MEDIA_TYPE", "INPUT_INVALID", "INTERNAL_ERROR", "STORAGE_UNAVAILABLE", "BAD_ARCHIVE", "VERSION_EXISTS", "NOT_DRAFT", "NOT_READY", "NEVER_PUBLISHED", "VERSION_IS_CURRENT", "MODEL_NAME_CONFLICT", "STORAGE_BUSY"]}}, "/models/{name}/versions/{version}/examples": {"post": {"summary": "Add golden examples (explicit or generated from inputs + expected values)", "tags": ["admin"], "security": [{"ApiKeyAuth": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "version", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminModelReportResponse"}}}}, "401": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "409": {"$ref": "#/components/responses/Error"}, "415": {"$ref": "#/components/responses/Error"}, "422": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object"}}}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "WRITE_DISABLED", "MODEL_NOT_FOUND", "UNSUPPORTED_MEDIA_TYPE", "INPUT_INVALID", "INTERNAL_ERROR", "STORAGE_UNAVAILABLE", "VERSION_EXISTS", "NOT_DRAFT", "NOT_READY", "NEVER_PUBLISHED", "VERSION_IS_CURRENT", "MODEL_NAME_CONFLICT", "STORAGE_BUSY"]}}, "/models/{name}/versions/{version}/manifest": {"put": {"summary": "Replace a draft's manifest and re-validate", "tags": ["admin"], "security": [{"ApiKeyAuth": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "version", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminModelReportResponse"}}}}, "401": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "409": {"$ref": "#/components/responses/Error"}, "415": {"$ref": "#/components/responses/Error"}, "422": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Manifest"}}}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "WRITE_DISABLED", "MODEL_NOT_FOUND", "UNSUPPORTED_MEDIA_TYPE", "INPUT_INVALID", "INTERNAL_ERROR", "STORAGE_UNAVAILABLE", "VERSION_EXISTS", "NOT_DRAFT", "NOT_READY", "NEVER_PUBLISHED", "VERSION_IS_CURRENT", "MODEL_NAME_CONFLICT", "STORAGE_BUSY"]}}, "/models/{name}/versions/{version}/manifest/suggest": {"post": {"summary": "Suggest a manifest from training column names", "tags": ["admin"], "security": [{"ApiKeyAuth": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "version", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminSuggestResponse"}}}}, "401": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "415": {"$ref": "#/components/responses/Error"}, "422": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminSuggestRequest"}}}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "WRITE_DISABLED", "MODEL_NOT_FOUND", "UNSUPPORTED_MEDIA_TYPE", "INPUT_INVALID", "INTERNAL_ERROR", "STORAGE_UNAVAILABLE"]}}, "/models/{name}/versions/{version}/publish": {"post": {"summary": "Publish a version", "tags": ["admin"], "security": [{"ApiKeyAuth": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "version", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminModelResponse"}}}}, "401": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "409": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"allow_raw_only": {"type": "boolean"}}}}}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "WRITE_DISABLED", "MODEL_NOT_FOUND", "INTERNAL_ERROR", "STORAGE_UNAVAILABLE", "VERSION_EXISTS", "NOT_DRAFT", "NOT_READY", "NEVER_PUBLISHED", "VERSION_IS_CURRENT", "MODEL_NAME_CONFLICT", "STORAGE_BUSY"]}}, "/models/{name}/versions/{version}/validate": {"post": {"summary": "Re-run validation", "tags": ["admin"], "security": [{"ApiKeyAuth": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "version", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminModelReportResponse"}}}}, "401": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}, "x-error-codes": ["UNAUTHORIZED", "FORBIDDEN", "WRITE_DISABLED", "MODEL_NOT_FOUND", "INTERNAL_ERROR", "STORAGE_UNAVAILABLE"]}}, "/predict/{name}": {"post": {"summary": "Predict", "description": "Exactly one of `input` (alias `X`, raw matrix), `records` or `history`.", "tags": ["inference"], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string"}, "description": "Model name (letters, digits, '.', '_', '+', '-')"}, {"name": "version", "in": "query", "required": false, "schema": {"type": "string"}, "description": "Specific version; draft/archived versions require an API key"}], "security": [{}, {"ApiKeyAuth": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PredictRequest"}}}}, "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PredictResponse"}}}}, "400": {"description": "Malformed request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "401": {"description": "API key missing", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "403": {"description": "API key invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "404": {"description": "Model or version not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "413": {"description": "Body too large", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "415": {"description": "Body is not JSON", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "422": {"description": "Input invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "500": {"description": "Server or model error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "501": {"description": "Operation not supported / flavor unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}, "503": {"description": "Model storage unavailable (STORAGE_UNAVAILABLE) or write endpoints disabled (WRITE_DISABLED)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}}, "x-error-codes": ["INVALID_JSON", "UNAUTHORIZED", "FORBIDDEN", "MODEL_NOT_FOUND", "PAYLOAD_TOO_LARGE", "STORAGE_UNAVAILABLE", "UNSUPPORTED_MEDIA_TYPE", "INPUT_INVALID", "MISSING_INPUTS", "HISTORY_INVALID", "HORIZON_TOO_LONG", "FEATURE_MISMATCH", "INTERNAL_ERROR", "MODEL_LOAD_FAILED", "PREDICTION_FAILED", "NOT_SUPPORTED", "FLAVOR_UNAVAILABLE"]}}, "/ready": {"get": {"summary": "Readiness: storage, flavors, loaded models", "tags": ["service"], "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReadyResponse"}}}}, "503": {"description": "Model storage unavailable (same body, storage: unavailable)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReadyResponse"}}}}}, "description": "200 with status ok or degraded (read-only storage, unmigrated legacy folders); 503 with the same body when the model storage cannot be read. Use /health (always 200 while the process runs, with storage ok|unavailable) for liveness.", "x-error-codes": ["STORAGE_UNAVAILABLE"]}}}, "components": {"schemas": {"AdminApproveResponse": {"properties": {"model": {"$ref": "#/components/schemas/AdminVersionRecord"}, "request_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Request Id"}, "custom_code_enabled": {"title": "Custom Code Enabled", "type": "boolean"}}, "required": ["model", "custom_code_enabled"], "title": "AdminApproveResponse", "type": "object"}, "AdminAssetResponse": {"properties": {"model": {"$ref": "#/components/schemas/AdminVersionRecord"}, "report": {"$ref": "#/components/schemas/ValidationReport"}, "request_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Request Id"}, "path": {"title": "Path", "type": "string"}}, "required": ["model", "report", "path"], "title": "AdminAssetResponse", "type": "object"}, "AdminCopyRequest": {"properties": {"version": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Version of the new draft (default: next minor after the highest numeric version, e.g. 1.0.0 -> 1.1.0, like the admin portal)", "title": "Version"}}, "title": "AdminCopyRequest", "type": "object"}, "AdminCopyResponse": {"properties": {"model": {"$ref": "#/components/schemas/AdminVersionRecord"}, "report": {"$ref": "#/components/schemas/ValidationReport"}, "request_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Request Id"}, "copied_from": {"title": "Copied From", "type": "string"}, "version_source": {"description": "form | next | default", "title": "Version Source", "type": "string"}}, "required": ["model", "report", "copied_from", "version_source"], "title": "AdminCopyResponse", "type": "object"}, "AdminDeleteResponse": {"properties": {"status": {"title": "Status", "type": "string"}, "name": {"title": "Name", "type": "string"}, "version": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Version"}, "request_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Request Id"}}, "required": ["status", "name", "version"], "title": "AdminDeleteResponse", "type": "object"}, "AdminFeatureInterpretation": {"properties": {"input_name": {"description": "The training column name as sent in feature_names", "title": "Input Name", "type": "string"}, "interpreted_as": {"description": "What the framework will compute for this column, in plain words", "title": "Interpreted As", "type": "string"}, "op": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Feature operation: raw, lag, rolling, time, cyclic, category_map ...", "title": "Op"}, "source": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Input variable the column is computed from", "title": "Source"}, "role": {"description": "Role of that input (target, auxiliary, exogenous, group, feature) or 'calendar'", "title": "Role", "type": "string"}, "role_source": {"description": "manifest (already described for this version) | pattern (guessed from the name) | calendar", "title": "Role Source", "type": "string"}, "feature_index": {"description": "Index of the feature in manifest_draft.features", "title": "Feature Index", "type": "integer"}, "questions": {"description": "Open questions about this column (answer them instead of parsing 'unresolved' messages)", "items": {"$ref": "#/components/schemas/AdminQuestion"}, "title": "Questions", "type": "array"}}, "required": ["input_name", "interpreted_as", "role", "role_source", "feature_index"], "title": "AdminFeatureInterpretation", "type": "object"}, "AdminFileEntry": {"properties": {"path": {"title": "Path", "type": "string"}, "size": {"title": "Size", "type": "integer"}}, "required": ["path", "size"], "title": "AdminFileEntry", "type": "object"}, "AdminModelReportResponse": {"properties": {"model": {"$ref": "#/components/schemas/AdminVersionRecord"}, "report": {"$ref": "#/components/schemas/ValidationReport"}, "request_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Request Id"}}, "required": ["model", "report"], "title": "AdminModelReportResponse", "type": "object"}, "AdminModelResponse": {"properties": {"model": {"$ref": "#/components/schemas/AdminVersionRecord"}, "request_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Request Id"}}, "required": ["model"], "title": "AdminModelResponse", "type": "object"}, "AdminNextVersionResponse": {"properties": {"name": {"title": "Name", "type": "string"}, "version": {"description": "Suggested free version number", "title": "Version", "type": "string"}, "bump": {"description": "patch | minor | major", "title": "Bump", "type": "string"}, "version_source": {"description": "next | default (the model has no versions)", "title": "Version Source", "type": "string"}, "existing": {"description": "Versions that already exist (newest number first)", "items": {"type": "string"}, "title": "Existing", "type": "array"}, "request_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Request Id"}}, "required": ["name", "version", "bump", "version_source", "existing"], "title": "AdminNextVersionResponse", "type": "object"}, "AdminQuestion": {"additionalProperties": true, "properties": {"code": {"description": "DERIVED_COLUMN | ROLLING_WINDOW_END | MAPPING_FILE | FREQUENCY | TARGET", "title": "Code", "type": "string"}, "text": {"title": "Text", "type": "string"}, "options": {"items": {"$ref": "#/components/schemas/AdminQuestionOption"}, "title": "Options", "type": "array"}, "about": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Code of the 'unresolved' item the question belongs to", "title": "About"}, "asset_path": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "MAPPING_FILE: the bundle path to upload the mapping to", "title": "Asset Path"}}, "required": ["code", "text"], "title": "AdminQuestion", "type": "object"}, "AdminQuestionOption": {"properties": {"value": {"title": "Value", "type": "string"}, "label": {"description": "Plain-language answer", "title": "Label", "type": "string"}, "feature": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "default": null, "description": "Feature definition that replaces the column's feature in manifest_draft.features when this answer is chosen", "title": "Feature"}}, "required": ["value", "label"], "title": "AdminQuestionOption", "type": "object"}, "AdminReloadResponse": {"properties": {"status": {"title": "Status", "type": "string"}, "revision": {"title": "Revision", "type": "integer"}, "request_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Request Id"}}, "required": ["status", "revision"], "title": "AdminReloadResponse", "type": "object"}, "AdminReportResponse": {"properties": {"report": {"$ref": "#/components/schemas/ValidationReport"}, "version": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Version the upload would get", "title": "Version"}, "version_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "form | manifest | metadata | next | default", "title": "Version Source"}, "request_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Request Id"}}, "required": ["report"], "title": "AdminReportResponse", "type": "object"}, "AdminSuggestRequest": {"properties": {"feature_names": {"items": {"type": "string"}, "title": "Feature Names", "type": "array"}, "target": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Target"}, "time_column": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Time Column"}, "group_by": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "default": null, "title": "Group By"}, "frequency": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Frequency"}}, "required": ["feature_names"], "title": "AdminSuggestRequest", "type": "object"}, "AdminSuggestResponse": {"properties": {"manifest_draft": {"additionalProperties": true, "title": "Manifest Draft", "type": "object"}, "unresolved": {"items": {"additionalProperties": true, "type": "object"}, "title": "Unresolved", "type": "array"}, "feature_count": {"title": "Feature Count", "type": "integer"}, "model_n_features": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Model N Features"}, "features": {"description": "One item per column of feature_names, in order", "items": {"$ref": "#/components/schemas/AdminFeatureInterpretation"}, "title": "Features", "type": "array"}, "questions": {"description": "Questions not tied to one column (e.g. FREQUENCY, TARGET)", "items": {"$ref": "#/components/schemas/AdminQuestion"}, "title": "Questions", "type": "array"}, "request_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Request Id"}}, "required": ["manifest_draft", "unresolved", "feature_count", "model_n_features"], "title": "AdminSuggestResponse", "type": "object"}, "AdminUploadResponse": {"properties": {"status": {"default": "uploaded", "description": "Always 'uploaded' (legacy compatibility)", "title": "Status", "type": "string"}, "name": {"title": "Name", "type": "string"}, "model": {"$ref": "#/components/schemas/AdminVersionRecord"}, "report": {"$ref": "#/components/schemas/ValidationReport"}, "published": {"title": "Published", "type": "boolean"}, "publish_skipped_reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Publish Skipped Reason"}, "version_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Where the version number came from: form (the 'version' field) | manifest | metadata (metadata.json) | next (next patch after the newest version) | default (1.0.0)", "title": "Version Source"}, "request_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Same as the X-Request-ID header (for audit logs)", "title": "Request Id"}}, "required": ["name", "model", "report", "published"], "title": "AdminUploadResponse", "type": "object"}, "AdminVersionDetailResponse": {"properties": {"model": {"$ref": "#/components/schemas/AdminVersionRecord"}, "manifest": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Manifest"}, "report": {"anyOf": [{"$ref": "#/components/schemas/ValidationReport"}, {"type": "null"}]}, "files": {"items": {"$ref": "#/components/schemas/AdminFileEntry"}, "title": "Files", "type": "array"}, "request_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Request Id"}}, "required": ["model", "manifest", "report", "files"], "title": "AdminVersionDetailResponse", "type": "object"}, "AdminVersionListResponse": {"properties": {"name": {"title": "Name", "type": "string"}, "current": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Current"}, "versions": {"items": {"$ref": "#/components/schemas/AdminVersionRecord"}, "title": "Versions", "type": "array"}, "request_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Request Id"}}, "required": ["name", "current", "versions"], "title": "AdminVersionListResponse", "type": "object"}, "AdminVersionRecord": {"properties": {"name": {"title": "Name", "type": "string"}, "version": {"title": "Version", "type": "string"}, "state": {"description": "draft | published | archived", "title": "State", "type": "string"}, "status": {"description": "ready | needs_manifest | failed", "title": "Status", "type": "string"}, "reasons": {"items": {"type": "string"}, "title": "Reasons", "type": "array"}, "created_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Created At"}, "sha256": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Sha256"}, "code_approved": {"title": "Code Approved", "type": "boolean"}, "legacy": {"title": "Legacy", "type": "boolean"}, "current": {"title": "Current", "type": "boolean"}}, "required": ["name", "version", "state", "status", "reasons", "code_approved", "legacy", "current"], "title": "AdminVersionRecord", "type": "object"}, "Artifact": {"additionalProperties": true, "properties": {"path": {"default": "model.pkl", "title": "Path", "type": "string"}, "format": {"anyOf": [{"enum": ["joblib", "pickle", "xgboost_json", "xgboost_ubj", "lightgbm_txt", "catboost_cbm", "prophet_json", "onnx"], "type": "string"}, {"type": "null"}], "default": null, "description": "Inferred from the file extension when omitted", "title": "Format"}, "sha256": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Sha256"}}, "title": "Artifact", "type": "object"}, "Assumption": {"properties": {"variable": {"title": "Variable", "type": "string"}, "policy": {"title": "Policy", "type": "string"}, "steps": {"items": {"type": "integer"}, "title": "Steps", "type": "array"}, "note": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Note"}}, "required": ["variable", "policy", "steps"], "title": "Assumption", "type": "object"}, "BuildInfo": {"properties": {"built_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "When the running image was built (UTC); null outside a container", "title": "Built At"}, "source_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Fingerprint of the packaged source; changes with every code change", "title": "Source Id"}, "tests_passed_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "When the build-time test suite passed for this image", "title": "Tests Passed At"}}, "title": "BuildInfo", "type": "object"}, "Calibration": {"additionalProperties": true, "description": "A monotone curve applied to predictions after the inverse transform and before clipping/rounding: the value is\nlinearly interpolated between the points (``x`` increasing), and values outside ``x`` take the nearest end point.\n``isotonic`` stores a fitted ``sklearn.isotonic.IsotonicRegression`` (``X_thresholds_``/``y_thresholds_``).", "properties": {"method": {"const": "isotonic", "default": "isotonic", "title": "Method", "type": "string"}, "x": {"description": "Model outputs (target scale), strictly increasing", "items": {"type": "number"}, "minItems": 2, "title": "X", "type": "array"}, "y": {"description": "Calibrated values at x", "items": {"type": "number"}, "minItems": 2, "title": "Y", "type": "array"}}, "required": ["x", "y"], "title": "Calibration", "type": "object"}, "Capabilities": {"properties": {"predict": {"title": "Predict", "type": "boolean"}, "forecast": {"title": "Forecast", "type": "boolean"}, "evaluate": {"title": "Evaluate", "type": "boolean"}}, "required": ["predict", "forecast", "evaluate"], "title": "Capabilities", "type": "object"}, "CategoryMapFeature": {"additionalProperties": true, "description": "Maps a categorical value to a number using a JSON mapping file in the bundle\n(``{\"Kampala\": 17, ...}``). ``unknown='error'`` rejects unseen categories (recommended).", "properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Output feature name; defaults are derived from op/source.", "title": "Name"}, "op": {"const": "category_map", "title": "Op", "type": "string"}, "source": {"title": "Source", "type": "string"}, "mapping": {"description": "Bundle-relative path to a JSON object mapping category -> number", "title": "Mapping", "type": "string"}, "unknown": {"default": "error", "enum": ["error", "value"], "title": "Unknown", "type": "string"}, "unknown_value": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null, "title": "Unknown Value"}}, "required": ["op", "source", "mapping"], "title": "CategoryMapFeature", "type": "object"}, "Check": {"properties": {"id": {"title": "Id", "type": "string"}, "level": {"default": "error", "enum": ["error", "warning", "info"], "title": "Level", "type": "string"}, "ok": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "True passed, False failed, None skipped", "title": "Ok"}, "message": {"title": "Message", "type": "string"}, "hint": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "What the uploader should do to fix it", "title": "Hint"}, "detail": {"additionalProperties": true, "title": "Detail", "type": "object"}}, "required": ["id", "ok", "message"], "title": "Check", "type": "object"}, "ConstantFeature": {"additionalProperties": true, "properties": {"name": {"title": "Name", "type": "string"}, "op": {"const": "constant", "title": "Op", "type": "string"}, "value": {"title": "Value", "type": "number"}}, "required": ["name", "op", "value"], "title": "ConstantFeature", "type": "object"}, "CustomCode": {"additionalProperties": true, "properties": {"entrypoint": {"default": "inference.py", "title": "Entrypoint", "type": "string"}}, "title": "CustomCode", "type": "object"}, "CyclicFeature": {"additionalProperties": true, "description": "``fn(2*pi*(value - offset)/period)`` of a calendar part. Default name ``{part}_{fn}``.", "properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Output feature name; defaults are derived from op/source.", "title": "Name"}, "op": {"const": "cyclic", "title": "Op", "type": "string"}, "part": {"enum": ["month", "quarter", "dayofweek", "dayofyear", "weekofyear", "day"], "title": "Part", "type": "string"}, "fn": {"enum": ["sin", "cos"], "title": "Fn", "type": "string"}, "period": {"exclusiveMinimum": 0, "title": "Period", "type": "number"}, "offset": {"default": 0.0, "title": "Offset", "type": "number"}}, "required": ["op", "part", "fn", "period"], "title": "CyclicFeature", "type": "object"}, "DataSpec": {"additionalProperties": true, "properties": {"time": {"anyOf": [{"$ref": "#/components/schemas/TimeSpec"}, {"type": "null"}], "default": null}, "group_by": {"items": {"type": "string"}, "title": "Group By", "type": "array"}, "target": {"anyOf": [{"$ref": "#/components/schemas/TargetSpec"}, {"type": "null"}], "default": null}}, "title": "DataSpec", "type": "object"}, "ErrorBody": {"properties": {"code": {"title": "Code", "type": "string", "description": "Stable machine-readable error code: BAD_REQUEST, INVALID_JSON, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, MODEL_NOT_FOUND, METRICS_NOT_FOUND, METHOD_NOT_ALLOWED, PAYLOAD_TOO_LARGE, UNSUPPORTED_MEDIA_TYPE, INPUT_INVALID, MISSING_INPUTS, HISTORY_INVALID, HORIZON_TOO_LONG, FEATURE_MISMATCH, MANIFEST_INVALID, INTERNAL_ERROR, MODEL_LOAD_FAILED, PREDICTION_FAILED, NOT_SUPPORTED, FLAVOR_UNAVAILABLE, WRITE_DISABLED, STORAGE_UNAVAILABLE, BAD_ARCHIVE, VERSION_EXISTS, NOT_DRAFT, NOT_READY, NEVER_PUBLISHED, VERSION_IS_CURRENT, MODEL_NAME_CONFLICT, STORAGE_BUSY (see x-error-codes on each operation)", "examples": ["MISSING_INPUTS"]}, "message": {"title": "Message", "type": "string"}, "details": {"additionalProperties": true, "title": "Details", "type": "object"}}, "required": ["code", "message"], "title": "ErrorBody", "type": "object"}, "ErrorEnvelope": {"properties": {"error": {"$ref": "#/components/schemas/ErrorBody"}, "request_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Request Id"}}, "required": ["error"], "title": "ErrorEnvelope", "type": "object"}, "EvaluateRequest": {"additionalProperties": false, "properties": {"mode": {"default": "arrays", "enum": ["predict", "backtest", "arrays"], "title": "Mode", "type": "string"}, "y_true": {"anyOf": [{"items": {"type": "number"}, "type": "array"}, {"type": "null"}], "default": null, "title": "Y True"}, "y_pred": {"anyOf": [{"items": {"type": "number"}, "type": "array"}, {"type": "null"}], "default": null, "title": "Y Pred"}, "input": {"anyOf": [{"items": {"items": {}, "type": "array"}, "type": "array"}, {"type": "null"}], "default": null, "title": "Input"}, "records": {"anyOf": [{"items": {"additionalProperties": true, "type": "object"}, "type": "array"}, {"type": "null"}], "default": null, "title": "Records"}, "actual": {"anyOf": [{"items": {"type": "number"}, "type": "array"}, {"type": "null"}], "default": null, "title": "Actual"}, "group": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "default": null, "title": "Group"}, "history": {"anyOf": [{"additionalProperties": {"items": {}, "type": "array"}, "type": "object"}, {"items": {"additionalProperties": true, "type": "object"}, "type": "array"}, {"type": "null"}], "default": null, "title": "History"}, "horizon": {"anyOf": [{"minimum": 1, "type": "integer"}, {"type": "null"}], "default": null, "title": "Horizon"}, "origins": {"default": 1, "maximum": 24, "minimum": 1, "title": "Origins", "type": "integer"}, "version": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Version"}}, "title": "EvaluateRequest", "type": "object"}, "EvaluateResponse": {"properties": {"metrics": {"additionalProperties": {"anyOf": [{"type": "number"}, {"type": "null"}]}, "title": "Metrics", "type": "object"}, "warnings": {"items": {"type": "string"}, "title": "Warnings", "type": "array"}, "folds": {"items": {"additionalProperties": true, "type": "object"}, "title": "Folds", "type": "array"}, "model": {"anyOf": [{"$ref": "#/components/schemas/ModelRef"}, {"type": "null"}], "default": null}, "meta": {"anyOf": [{"$ref": "#/components/schemas/Meta"}, {"type": "null"}], "default": null}}, "required": ["metrics"], "title": "EvaluateResponse", "type": "object"}, "Example": {"additionalProperties": true, "description": "A golden test: running ``request`` through the framework must reproduce ``expected``.", "properties": {"id": {"title": "Id", "type": "string"}, "op": {"enum": ["predict", "forecast"], "title": "Op", "type": "string"}, "request": {"additionalProperties": true, "title": "Request", "type": "object"}, "expected": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "default": null, "title": "Expected"}, "tolerance": {"$ref": "#/components/schemas/Tolerance"}}, "required": ["id", "op", "request"], "title": "Example", "type": "object"}, "ExampleResponse": {"properties": {"op": {"title": "Op", "type": "string"}, "name": {"title": "Name", "type": "string"}, "version": {"title": "Version", "type": "string"}, "requests": {"items": {"additionalProperties": true, "type": "object"}, "title": "Requests", "type": "array"}}, "required": ["op", "name", "version", "requests"], "title": "ExampleResponse", "type": "object"}, "ForecastPoint": {"properties": {"step": {"title": "Step", "type": "integer"}, "period": {"title": "Period", "type": "string"}, "value": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Value"}, "intervals": {"anyOf": [{"additionalProperties": {"maxItems": 2, "minItems": 2, "prefixItems": [{"type": "number"}, {"type": "number"}], "type": "array"}, "type": "object"}, {"type": "null"}], "default": null, "title": "Intervals"}, "features": {"anyOf": [{"items": {"type": "number"}, "type": "array"}, {"type": "null"}], "default": null, "title": "Features"}}, "required": ["step", "period", "value"], "title": "ForecastPoint", "type": "object"}, "ForecastRequest": {"additionalProperties": false, "properties": {"horizon": {"description": "Number of periods to forecast", "minimum": 1, "title": "Horizon", "type": "integer"}, "group": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "default": null, "description": "Series key, e.g. {\"district\": \"Kampala\"}", "title": "Group"}, "start": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "First forecast period; default: period after the last history point (or after training end for native models)", "title": "Start"}, "history": {"anyOf": [{"additionalProperties": {"items": {}, "type": "array"}, "type": "object"}, {"items": {"additionalProperties": true, "type": "object"}, "type": "array"}, {"type": "null"}], "default": null, "title": "History"}, "future": {"anyOf": [{"additionalProperties": {"items": {}, "type": "array"}, "type": "object"}, {"items": {"additionalProperties": true, "type": "object"}, "type": "array"}, {"type": "null"}], "default": null, "description": "Known future values of exogenous variables", "title": "Future"}, "policies": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "default": null, "description": "Override how missing future values are filled (only choices the manifest allows)", "title": "Policies"}, "intervals": {"anyOf": [{"items": {"type": "number"}, "type": "array"}, {"type": "null"}], "default": null, "description": "Interval levels, e.g. [0.8]", "title": "Intervals"}, "include_features": {"default": false, "title": "Include Features", "type": "boolean"}, "version": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Version"}}, "required": ["horizon"], "title": "ForecastRequest", "type": "object"}, "ForecastResponse": {"properties": {"model": {"$ref": "#/components/schemas/ModelRef"}, "group": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "default": null, "title": "Group"}, "frequency": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Frequency"}, "forecast": {"items": {"$ref": "#/components/schemas/ForecastPoint"}, "title": "Forecast", "type": "array"}, "assumptions": {"items": {"$ref": "#/components/schemas/Assumption"}, "title": "Assumptions", "type": "array"}, "warnings": {"items": {"type": "string"}, "title": "Warnings", "type": "array"}, "meta": {"$ref": "#/components/schemas/Meta"}}, "required": ["model", "forecast", "meta"], "title": "ForecastResponse", "type": "object"}, "ForecastSpec": {"additionalProperties": true, "properties": {"strategy": {"default": "recursive", "enum": ["recursive", "native"], "title": "Strategy", "type": "string"}, "max_horizon": {"default": 12, "maximum": 520, "minimum": 1, "title": "Max Horizon", "type": "integer"}, "future_exogenous": {"$ref": "#/components/schemas/FutureExogenous"}, "auxiliary": {"additionalProperties": {"enum": ["require", "carry_forward", "ratio_to_target"], "type": "string"}, "title": "Auxiliary", "type": "object"}, "feed_back": {"default": "postprocessed", "enum": ["raw", "postprocessed"], "title": "Feed Back", "type": "string"}, "intervals": {"$ref": "#/components/schemas/IntervalSpec"}}, "title": "ForecastSpec", "type": "object"}, "FutureExogenous": {"additionalProperties": true, "properties": {"default": {"enum": ["require", "carry_forward", "seasonal_average", "refuse"], "type": "string", "default": "require", "title": "Default"}, "per_variable": {"additionalProperties": {"enum": ["require", "carry_forward", "seasonal_average", "refuse"], "type": "string"}, "title": "Per Variable", "type": "object"}}, "title": "FutureExogenous", "type": "object"}, "GoldenResult": {"properties": {"id": {"title": "Id", "type": "string"}, "ok": {"title": "Ok", "type": "boolean"}, "max_abs_err": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null, "description": "Largest |actual - expected| over numeric values", "title": "Max Abs Err"}, "message": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Message"}, "max_rel_err": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null, "description": "Largest |actual - expected| / |expected| (expected != 0)", "title": "Max Rel Err"}, "expected": {"anyOf": [{"items": {}, "type": "array"}, {"type": "null"}], "default": null, "description": "Expected output values of the example (first 50)", "title": "Expected"}, "actual": {"anyOf": [{"items": {}, "type": "array"}, {"type": "null"}], "default": null, "description": "Values the framework produced for the example (first 50)", "title": "Actual"}, "tolerance": {"anyOf": [{"additionalProperties": {"type": "number"}, "type": "object"}, {"type": "null"}], "default": null, "description": "Tolerance applied: |actual - expected| <= abs + rel * |expected|", "title": "Tolerance"}}, "required": ["id", "ok"], "title": "GoldenResult", "type": "object"}, "HealthResponse": {"properties": {"status": {"description": "Always 'ok' while the process answers (liveness)", "examples": ["ok"], "title": "Status", "type": "string"}, "storage": {"default": "ok", "description": "ok | unavailable: whether the model storage (MODEL_ROOT) is readable. When 'unavailable' the catalog and inference answer 503 STORAGE_UNAVAILABLE and GET /ready answers 503", "examples": ["ok"], "title": "Storage", "type": "string"}}, "required": ["status"], "title": "HealthResponse", "type": "object"}, "IndexResponse": {"properties": {"name": {"title": "Name", "type": "string"}, "version": {"title": "Version", "type": "string"}, "build": {"$ref": "#/components/schemas/BuildInfo", "description": "Facts about the deployed image, used to confirm a push-to-deploy"}, "docs": {"title": "Docs", "type": "string"}, "openapi": {"title": "Openapi", "type": "string"}}, "required": ["name", "version", "build", "docs", "openapi"], "title": "IndexResponse", "type": "object"}, "InputSpec": {"additionalProperties": true, "description": "A raw variable a caller supplies. ``role`` drives forecasting behaviour:\ntarget (fed back from predictions), auxiliary (endogenous, not predicted),\nexogenous (external drivers), static (constant per group), group (series key),\nfeature (plain tabular input).", "properties": {"name": {"title": "Name", "type": "string"}, "type": {"default": "number", "enum": ["number", "integer", "string", "boolean"], "title": "Type", "type": "string"}, "role": {"default": "feature", "enum": ["target", "auxiliary", "exogenous", "static", "group", "feature"], "title": "Role", "type": "string"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Description"}, "unit": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Unit"}, "minimum": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null, "title": "Minimum"}, "maximum": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null, "title": "Maximum"}, "enum": {"anyOf": [{"items": {"anyOf": [{"type": "string"}, {"type": "integer"}, {"type": "number"}]}, "type": "array"}, {"type": "null"}], "default": null, "title": "Enum"}, "enum_from": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Bundle-relative mapping file whose keys are the allowed values", "title": "Enum From"}, "ui_group": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Ui Group"}, "same_period_confirmed": {"default": false, "description": "The publisher confirms that the value of the period being predicted is known when the prediction is made (for example suspected cases reported before confirmed cases). Without it, a lag model that reads this case count at the predicted period is not ready (check features.same_period).", "title": "Same Period Confirmed", "type": "boolean"}}, "required": ["name"], "title": "InputSpec", "type": "object"}, "InputSummary": {"properties": {"name": {"title": "Name", "type": "string"}, "type": {"title": "Type", "type": "string"}, "role": {"title": "Role", "type": "string"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Label"}, "unit": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Unit"}}, "required": ["name", "type", "role"], "title": "InputSummary", "type": "object"}, "IntervalSpec": {"additionalProperties": true, "properties": {"method": {"default": "none", "enum": ["none", "native", "residual_quantiles"], "title": "Method", "type": "string"}, "levels": {"items": {"exclusiveMaximum": 1, "exclusiveMinimum": 0, "type": "number"}, "title": "Levels", "type": "array"}, "quantiles_file": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Bundle-relative JSON: {\"0.8\": [lo_residual, hi_residual]}", "title": "Quantiles File"}}, "title": "IntervalSpec", "type": "object"}, "LagFeature": {"additionalProperties": true, "description": "Values of ``source`` at t-k for each k in ``lags``, expanded in the listed order.\nDefault names: ``{source}_lag{k}``. ``name`` may only be set when there is a single lag.", "properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Output feature name; defaults are derived from op/source.", "title": "Name"}, "op": {"const": "lag", "title": "Op", "type": "string"}, "source": {"title": "Source", "type": "string"}, "lags": {"items": {"maximum": 520, "minimum": 1, "type": "integer"}, "minItems": 1, "title": "Lags", "type": "array"}}, "required": ["op", "source", "lags"], "title": "LagFeature", "type": "object"}, "Manifest": {"additionalProperties": true, "properties": {"manifest_version": {"const": "1", "default": "1", "title": "Manifest Version", "type": "string"}, "name": {"title": "Name", "type": "string"}, "version": {"default": "1.0.0", "title": "Version", "type": "string"}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Title"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Description"}, "tags": {"items": {"type": "string"}, "title": "Tags", "type": "array"}, "disease": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Disease"}, "authors": {"items": {"type": "string"}, "title": "Authors", "type": "array"}, "license": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "License"}, "created_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Created At"}, "intended_use": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Plain-language purpose and audience of the model (e.g. 'Planning of malaria commodities per district by the national programme; not for individual diagnosis').", "title": "Intended Use"}, "limitations": {"description": "Known limitations users must be told about, one sentence each (e.g. 'Trained on 2019-2023 HMIS data from 12 districts only').", "items": {"type": "string"}, "title": "Limitations", "type": "array"}, "task": {"default": "regression", "enum": ["regression", "classification", "forecast"], "title": "Task", "type": "string"}, "flavor": {"enum": ["sklearn", "xgboost", "lightgbm", "catboost", "prophet", "statsmodels", "onnx", "custom"], "title": "Flavor", "type": "string"}, "artifact": {"$ref": "#/components/schemas/Artifact"}, "runtime": {"$ref": "#/components/schemas/Runtime"}, "data": {"$ref": "#/components/schemas/DataSpec"}, "inputs": {"items": {"$ref": "#/components/schemas/InputSpec"}, "title": "Inputs", "type": "array"}, "features": {"items": {"discriminator": {"mapping": {"category_map": "#/components/schemas/CategoryMapFeature", "constant": "#/components/schemas/ConstantFeature", "cyclic": "#/components/schemas/CyclicFeature", "lag": "#/components/schemas/LagFeature", "onehot": "#/components/schemas/OneHotFeature", "raw": "#/components/schemas/RawFeature", "rolling": "#/components/schemas/RollingFeature", "time": "#/components/schemas/TimeFeature"}, "propertyName": "op"}, "oneOf": [{"$ref": "#/components/schemas/RawFeature"}, {"$ref": "#/components/schemas/LagFeature"}, {"$ref": "#/components/schemas/RollingFeature"}, {"$ref": "#/components/schemas/TimeFeature"}, {"$ref": "#/components/schemas/CyclicFeature"}, {"$ref": "#/components/schemas/CategoryMapFeature"}, {"$ref": "#/components/schemas/OneHotFeature"}, {"$ref": "#/components/schemas/ConstantFeature"}]}, "title": "Features", "type": "array"}, "forecast": {"anyOf": [{"$ref": "#/components/schemas/ForecastSpec"}, {"type": "null"}], "default": null}, "outputs": {"$ref": "#/components/schemas/OutputSpec"}, "examples": {"items": {"$ref": "#/components/schemas/Example"}, "title": "Examples", "type": "array"}, "metrics": {"additionalProperties": true, "title": "Metrics", "type": "object"}, "custom_code": {"anyOf": [{"$ref": "#/components/schemas/CustomCode"}, {"type": "null"}], "default": null}}, "required": ["name", "flavor"], "title": "Manifest", "type": "object"}, "ManifestSummary": {"properties": {"inputs": {"items": {"$ref": "#/components/schemas/InputSummary"}, "title": "Inputs", "type": "array"}, "feature_count": {"title": "Feature Count", "type": "integer"}, "group_by": {"items": {"type": "string"}, "title": "Group By", "type": "array"}, "frequency": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Frequency"}, "max_horizon": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "title": "Max Horizon"}, "target": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Target"}}, "required": ["inputs", "feature_count", "group_by"], "title": "ManifestSummary", "type": "object"}, "Meta": {"properties": {"latency_ms": {"title": "Latency Ms", "type": "integer"}, "model": {"title": "Model", "type": "string"}, "request_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Request Id"}}, "required": ["latency_ms", "model"], "title": "Meta", "type": "object"}, "MetricsResponse": {"properties": {"metrics": {"additionalProperties": true, "description": "Metrics as recorded (legacy key names such as 'R-squared' kept)", "title": "Metrics", "type": "object"}, "normalized": {"additionalProperties": {"type": "number"}, "description": "Numeric metrics with standard names: R2, MAE, RMSE, MSE, MAPE, sMAPE", "title": "Normalized", "type": "object"}, "raw": {"additionalProperties": true, "description": "The recorded metrics, unchanged (same as 'metrics')", "title": "Raw", "type": "object"}, "unit": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Unit of the model output (MAE/RMSE are in this unit)", "title": "Unit"}, "warnings": {"description": "Impossible combinations, e.g. RMSE smaller than MAE", "items": {"type": "string"}, "title": "Warnings", "type": "array"}, "name": {"title": "Name", "type": "string"}, "version": {"title": "Version", "type": "string"}}, "required": ["metrics", "name", "version"], "title": "MetricsResponse", "type": "object"}, "ModelDetail": {"additionalProperties": true, "description": "Includes every key of the legacy ``metadata.json`` (e.g. ``framework``, ``freq``) as extra properties.", "properties": {"name": {"title": "Name", "type": "string"}, "version": {"title": "Version", "type": "string"}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Title"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Description"}, "tags": {"items": {"type": "string"}, "title": "Tags", "type": "array"}, "task": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Task"}, "flavor": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Flavor"}, "status": {"description": "ready | needs_manifest | failed", "title": "Status", "type": "string"}, "capabilities": {"$ref": "#/components/schemas/Capabilities"}, "disease": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Disease"}, "updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Updated At"}, "state": {"title": "State", "type": "string"}, "current_version": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Version marked current (published), if any", "title": "Current Version"}, "frequency": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "pandas offset alias of the model's periods, e.g. 'MS' monthly (month start), 'QE' quarterly (quarter end), 'W-MON', 'D'", "title": "Frequency"}, "frequency_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Where 'frequency' comes from: manifest (model.json) | model (introspected from the model file) | metadata (legacy metadata.json only: UNVERIFIED until the folder is validated with 'cfapi migrate') | null (unknown)", "title": "Frequency Source"}, "time_column": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Name of the period column in history/future data", "title": "Time Column"}, "max_horizon": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "description": "Longest forecast horizon a request may ask for: min(manifest limit, server_max_horizon), the same number as limits.max_horizon of /schema?op=forecast; null when the model cannot forecast", "title": "Max Horizon"}, "server_max_horizon": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "description": "HARD_MAX_HORIZON of this server (upper bound for every model)", "title": "Server Max Horizon"}, "has_metrics": {"default": false, "description": "True when evaluation metrics are recorded (GET /models/{name}/metrics)", "title": "Has Metrics", "type": "boolean"}, "outputs": {"$ref": "#/components/schemas/OutputsSummary", "description": "What a prediction is: name, unit (e.g. 'cases') and type"}, "authors": {"description": "Manifest authors ([] when not stated)", "items": {"type": "string"}, "title": "Authors", "type": "array"}, "license": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Licence of the model as stated in the manifest", "title": "License"}, "created_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "When the bundle was created (manifest created_at, e.g. by cf.package)", "title": "Created At"}, "published_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "When this version was last published on this server (state), null for drafts", "title": "Published At"}, "intended_use": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Plain-language purpose and audience stated by the publisher", "title": "Intended Use"}, "limitations": {"description": "Known limitations stated by the publisher, one sentence each", "items": {"type": "string"}, "title": "Limitations", "type": "array"}, "input_format": {"default": null, "title": "Input Format"}, "output_format": {"default": null, "title": "Output Format"}, "file": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "File"}, "size_bytes": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "title": "Size Bytes"}, "metrics": {"additionalProperties": true, "title": "Metrics", "type": "object"}, "status_reasons": {"items": {"type": "string"}, "title": "Status Reasons", "type": "array"}, "manifest_summary": {"anyOf": [{"$ref": "#/components/schemas/ManifestSummary"}, {"type": "null"}], "default": null}, "manifest_problems": {"items": {"additionalProperties": true, "type": "object"}, "title": "Manifest Problems", "type": "array"}, "introspection": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "default": null, "description": "Model facts (flavor, n_features, frequency, training_end ...) from the model loaded in this worker or, without loading, from the stored validation report", "title": "Introspection"}, "introspection_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "loaded | report | null", "title": "Introspection Source"}, "training_end": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Last period of the training data (native forecasters)", "title": "Training End"}, "metrics_normalized": {"additionalProperties": {"type": "number"}, "description": "Numeric metrics with standard names: R2, MAE, RMSE, MSE, MAPE, sMAPE (other names kept); 'metrics' keeps the recorded names", "title": "Metrics Normalized", "type": "object"}, "metrics_warnings": {"description": "Impossible recorded metrics, e.g. RMSE smaller than MAE (treat the metrics with care)", "items": {"type": "string"}, "title": "Metrics Warnings", "type": "array"}, "forecast_policies": {"anyOf": [{"additionalProperties": {"$ref": "#/components/schemas/PolicyChoice"}, "type": "object"}, {"type": "null"}], "default": null, "description": "Per external/auxiliary variable: default policy for missing future values and allowed choices", "title": "Forecast Policies"}, "links": {"additionalProperties": {"type": "string"}, "title": "Links", "type": "object"}}, "required": ["name", "version", "status", "capabilities", "state", "links"], "title": "ModelDetail", "type": "object"}, "ModelHealthResponse": {"properties": {"status": {"examples": ["healthy"], "title": "Status", "type": "string"}, "name": {"title": "Name", "type": "string"}, "version": {"title": "Version", "type": "string"}, "flavor": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Flavor"}}, "required": ["status", "name", "version"], "title": "ModelHealthResponse", "type": "object"}, "ModelList": {"properties": {"models": {"items": {"$ref": "#/components/schemas/ModelListItem"}, "title": "Models", "type": "array"}}, "required": ["models"], "title": "ModelList", "type": "object"}, "ModelListItem": {"properties": {"name": {"title": "Name", "type": "string"}, "version": {"title": "Version", "type": "string"}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Title"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Description"}, "tags": {"items": {"type": "string"}, "title": "Tags", "type": "array"}, "task": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Task"}, "flavor": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Flavor"}, "status": {"description": "ready | needs_manifest | failed", "title": "Status", "type": "string"}, "capabilities": {"$ref": "#/components/schemas/Capabilities"}, "disease": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Disease"}, "updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Updated At"}, "state": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "draft | published | archived", "title": "State"}, "current_version": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Version marked current (published), if any", "title": "Current Version"}, "frequency": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "pandas offset alias of the model's periods, e.g. 'MS' monthly (month start), 'QE' quarterly (quarter end), 'W-MON', 'D'", "title": "Frequency"}, "frequency_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Where 'frequency' comes from: manifest (model.json) | model (introspected from the model file) | metadata (legacy metadata.json only: UNVERIFIED until the folder is validated with 'cfapi migrate') | null (unknown)", "title": "Frequency Source"}, "time_column": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Name of the period column in history/future data", "title": "Time Column"}, "max_horizon": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "description": "Longest forecast horizon a request may ask for: min(manifest limit, server_max_horizon), the same number as limits.max_horizon of /schema?op=forecast; null when the model cannot forecast", "title": "Max Horizon"}, "server_max_horizon": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "description": "HARD_MAX_HORIZON of this server (upper bound for every model)", "title": "Server Max Horizon"}, "has_metrics": {"default": false, "description": "True when evaluation metrics are recorded (GET /models/{name}/metrics)", "title": "Has Metrics", "type": "boolean"}, "outputs": {"$ref": "#/components/schemas/OutputsSummary", "description": "What a prediction is: name, unit (e.g. 'cases') and type"}, "authors": {"description": "Manifest authors ([] when not stated)", "items": {"type": "string"}, "title": "Authors", "type": "array"}, "license": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Licence of the model as stated in the manifest", "title": "License"}, "created_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "When the bundle was created (manifest created_at, e.g. by cf.package)", "title": "Created At"}, "published_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "When this version was last published on this server (state), null for drafts", "title": "Published At"}, "intended_use": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Plain-language purpose and audience stated by the publisher", "title": "Intended Use"}, "limitations": {"description": "Known limitations stated by the publisher, one sentence each", "items": {"type": "string"}, "title": "Limitations", "type": "array"}, "latest_version": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Only with ?include_drafts=true (API key): newest version in any state", "title": "Latest Version"}, "has_newer_draft": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": null, "description": "Only with ?include_drafts=true (API key): a draft newer than the listed version exists", "title": "Has Newer Draft"}}, "required": ["name", "version", "status", "capabilities"], "title": "ModelListItem", "type": "object"}, "ModelRef": {"properties": {"name": {"title": "Name", "type": "string"}, "version": {"title": "Version", "type": "string"}, "flavor": {"title": "Flavor", "type": "string"}}, "required": ["name", "version", "flavor"], "title": "ModelRef", "type": "object"}, "ModelSummary": {"properties": {"name": {"title": "Name", "type": "string"}, "version": {"title": "Version", "type": "string"}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Title"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Description"}, "tags": {"items": {"type": "string"}, "title": "Tags", "type": "array"}, "task": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Task"}, "flavor": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Flavor"}, "status": {"description": "ready | needs_manifest | failed", "title": "Status", "type": "string"}, "capabilities": {"$ref": "#/components/schemas/Capabilities"}, "disease": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Disease"}, "updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Updated At"}, "state": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "draft | published | archived", "title": "State"}, "current_version": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Version marked current (published), if any", "title": "Current Version"}, "frequency": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "pandas offset alias of the model's periods, e.g. 'MS' monthly (month start), 'QE' quarterly (quarter end), 'W-MON', 'D'", "title": "Frequency"}, "frequency_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Where 'frequency' comes from: manifest (model.json) | model (introspected from the model file) | metadata (legacy metadata.json only: UNVERIFIED until the folder is validated with 'cfapi migrate') | null (unknown)", "title": "Frequency Source"}, "time_column": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Name of the period column in history/future data", "title": "Time Column"}, "max_horizon": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "description": "Longest forecast horizon a request may ask for: min(manifest limit, server_max_horizon), the same number as limits.max_horizon of /schema?op=forecast; null when the model cannot forecast", "title": "Max Horizon"}, "server_max_horizon": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": null, "description": "HARD_MAX_HORIZON of this server (upper bound for every model)", "title": "Server Max Horizon"}, "has_metrics": {"default": false, "description": "True when evaluation metrics are recorded (GET /models/{name}/metrics)", "title": "Has Metrics", "type": "boolean"}, "outputs": {"$ref": "#/components/schemas/OutputsSummary", "description": "What a prediction is: name, unit (e.g. 'cases') and type"}, "authors": {"description": "Manifest authors ([] when not stated)", "items": {"type": "string"}, "title": "Authors", "type": "array"}, "license": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Licence of the model as stated in the manifest", "title": "License"}, "created_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "When the bundle was created (manifest created_at, e.g. by cf.package)", "title": "Created At"}, "published_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "When this version was last published on this server (state), null for drafts", "title": "Published At"}, "intended_use": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Plain-language purpose and audience stated by the publisher", "title": "Intended Use"}, "limitations": {"description": "Known limitations stated by the publisher, one sentence each", "items": {"type": "string"}, "title": "Limitations", "type": "array"}}, "required": ["name", "version", "status", "capabilities"], "title": "ModelSummary", "type": "object"}, "OneHotFeature": {"additionalProperties": true, "description": "One 0/1 feature per category, in the listed order. Names ``{name or source}={category}``.", "properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Output feature name; defaults are derived from op/source.", "title": "Name"}, "op": {"const": "onehot", "title": "Op", "type": "string"}, "source": {"title": "Source", "type": "string"}, "categories": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}, {"type": "number"}]}, "minItems": 1, "title": "Categories", "type": "array"}}, "required": ["op", "source", "categories"], "title": "OneHotFeature", "type": "object"}, "OutputSpec": {"additionalProperties": true, "properties": {"name": {"default": "prediction", "title": "Name", "type": "string"}, "unit": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Unit"}, "type": {"default": "continuous", "enum": ["count", "continuous", "binary", "label", "probability"], "title": "Type", "type": "string"}, "classes": {"anyOf": [{"items": {"anyOf": [{"type": "string"}, {"type": "integer"}, {"type": "number"}]}, "type": "array"}, {"type": "null"}], "default": null, "title": "Classes"}}, "title": "OutputSpec", "type": "object"}, "OutputsSummary": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Name"}, "unit": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Unit"}, "type": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "count | continuous | binary | label | probability", "title": "Type"}}, "title": "OutputsSummary", "type": "object"}, "PolicyChoice": {"properties": {"default": {"type": "string", "description": "Policy applied when the request does not override it", "title": "Default"}, "allowed": {"description": "Policies a forecast request may choose in 'policies'", "items": {"type": "string"}, "title": "Allowed", "type": "array"}}, "required": ["default", "allowed"], "title": "PolicyChoice", "type": "object"}, "PredictRequest": {"additionalProperties": false, "description": "Exactly one mode must be used:\n- ``input`` (alias ``X``): raw 2-D feature matrix in the model's own order (always allowed).\n- ``records``: list of named rows, for models whose features need no history.\n- ``history`` (+ ``group``, optional ``period``): one-step prediction for lag-based models.", "properties": {"input": {"anyOf": [{"items": {"items": {}, "type": "array"}, "type": "array"}, {"type": "null"}], "default": null, "description": "Raw 2-D feature matrix in the model's feature order (alias: X)", "title": "Input"}, "records": {"anyOf": [{"items": {"additionalProperties": true, "type": "object"}, "type": "array"}, {"type": "null"}], "default": null, "title": "Records"}, "group": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "default": null, "title": "Group"}, "history": {"anyOf": [{"additionalProperties": {"items": {}, "type": "array"}, "type": "object"}, {"items": {"additionalProperties": true, "type": "object"}, "type": "array"}, {"type": "null"}], "default": null, "title": "History"}, "period": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Period to predict; defaults to the one after the last history period", "title": "Period"}, "version": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Draft/older version to use (requires API key)", "title": "Version"}}, "title": "PredictRequest", "type": "object"}, "PredictResponse": {"properties": {"predictions": {"items": {}, "title": "Predictions", "type": "array"}, "probabilities": {"anyOf": [{"items": {"additionalProperties": {"type": "number"}, "type": "object"}, "type": "array"}, {"type": "null"}], "default": null, "title": "Probabilities"}, "classes": {"anyOf": [{"items": {}, "type": "array"}, {"type": "null"}], "default": null, "title": "Classes"}, "model": {"$ref": "#/components/schemas/ModelRef"}, "warnings": {"items": {"type": "string"}, "title": "Warnings", "type": "array"}, "meta": {"$ref": "#/components/schemas/Meta"}}, "required": ["predictions", "model", "meta"], "title": "PredictResponse", "type": "object"}, "RawFeature": {"additionalProperties": true, "description": "Value of ``source`` for the row itself (records mode) or at period t (history mode).", "properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Output feature name; defaults are derived from op/source.", "title": "Name"}, "op": {"const": "raw", "title": "Op", "type": "string"}, "source": {"title": "Source", "type": "string"}}, "required": ["op", "source"], "title": "RawFeature", "type": "object"}, "ReadyResponse": {"properties": {"status": {"description": "ok | degraded. HTTP 200 for both, except 503 (status degraded, storage unavailable) when the model storage cannot be read", "title": "Status", "type": "string"}, "storage": {"default": "ok", "description": "ok | unavailable (same as GET /health)", "title": "Storage", "type": "string"}, "model_root_readable": {"default": true, "title": "Model Root Readable", "type": "boolean"}, "model_root_writable": {"title": "Model Root Writable", "type": "boolean"}, "problems": {"description": "Why the status is degraded", "items": {"type": "string"}, "title": "Problems", "type": "array"}, "flavors": {"additionalProperties": {"additionalProperties": true, "type": "object"}, "description": "{flavor: {available, version, reason}}", "title": "Flavors", "type": "object"}, "models_total": {"title": "Models Total", "type": "integer"}, "models_loaded": {"title": "Models Loaded", "type": "integer"}, "unmigrated_models": {"description": "Legacy model folders never validated on this server (no report.json): their frequency and row width are estimates until an operator runs 'cfapi migrate' (status degraded)", "items": {"type": "string"}, "title": "Unmigrated Models", "type": "array"}}, "required": ["status", "model_root_writable", "flavors", "models_total", "models_loaded"], "title": "ReadyResponse", "type": "object"}, "RollingFeature": {"additionalProperties": true, "description": "Aggregate of ``source`` over periods t-offset-window+1 .. t-offset. Default name ``{source}_roll{agg}{window}``.", "properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Output feature name; defaults are derived from op/source.", "title": "Name"}, "op": {"const": "rolling", "title": "Op", "type": "string"}, "source": {"title": "Source", "type": "string"}, "window": {"maximum": 520, "minimum": 1, "title": "Window", "type": "integer"}, "agg": {"default": "mean", "enum": ["mean", "sum", "min", "max", "std"], "title": "Agg", "type": "string"}, "offset": {"default": 1, "maximum": 520, "minimum": 0, "title": "Offset", "type": "integer"}}, "required": ["op", "source", "window"], "title": "RollingFeature", "type": "object"}, "Runtime": {"additionalProperties": true, "properties": {"python": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Python"}, "libraries": {"additionalProperties": {"type": "string"}, "title": "Libraries", "type": "object"}}, "title": "Runtime", "type": "object"}, "SchemaResponse": {"additionalProperties": true, "properties": {"op": {"title": "Op", "type": "string"}, "name": {"title": "Name", "type": "string"}, "version": {"title": "Version", "type": "string"}, "json_schema": {"additionalProperties": true, "description": "JSON Schema (2020-12) of the request body, UI hints under x-cf-ui", "title": "Json Schema", "type": "object"}, "limits": {"additionalProperties": true, "title": "Limits", "type": "object"}, "input_modes": {"items": {"type": "string"}, "title": "Input Modes", "type": "array"}, "status": {"title": "Status", "type": "string"}, "explanation": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "title": "Explanation"}, "frequency": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "pandas offset alias of the periods ('MS', 'QE', 'W-MON', 'D')", "title": "Frequency"}, "frequency_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "manifest | model | metadata (unverified) | null, as in GET /models", "title": "Frequency Source"}, "time_column": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Name of the period column in history/future data", "title": "Time Column"}, "group_by": {"description": "Series key columns, sent in 'group'", "items": {"type": "string"}, "title": "Group By", "type": "array"}, "target": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Predicted variable (fed back while forecasting)", "title": "Target"}, "outputs": {"anyOf": [{"$ref": "#/components/schemas/OutputsSummary"}, {"type": "null"}], "default": null}, "policies": {"anyOf": [{"additionalProperties": {"$ref": "#/components/schemas/PolicyChoice"}, "type": "object"}, {"type": "null"}], "default": null, "description": "forecast: default policy per variable (also x-cf-default-policy in json_schema) and choices", "title": "Policies"}}, "required": ["op", "name", "version", "json_schema", "limits", "input_modes", "status"], "title": "SchemaResponse", "type": "object"}, "TargetSpec": {"additionalProperties": true, "properties": {"name": {"title": "Name", "type": "string"}, "type": {"default": "continuous", "enum": ["count", "continuous", "binary", "label"], "title": "Type", "type": "string"}, "transform": {"default": "none", "description": "Transform the model was trained on; predictions are inverted", "enum": ["none", "log1p", "sqrt"], "title": "Transform", "type": "string"}, "calibration": {"anyOf": [{"$ref": "#/components/schemas/Calibration"}, {"type": "null"}], "default": null, "description": "Curve applied after the inverse transform (e.g. isotonic)"}, "clip_min": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null, "title": "Clip Min"}, "clip_max": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null, "title": "Clip Max"}, "round": {"default": false, "title": "Round", "type": "boolean"}}, "required": ["name"], "title": "TargetSpec", "type": "object"}, "TimeFeature": {"additionalProperties": true, "description": "Calendar part of period t (or of the record's time column). Default name = ``part``.", "properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Output feature name; defaults are derived from op/source.", "title": "Name"}, "op": {"const": "time", "title": "Op", "type": "string"}, "part": {"enum": ["year", "month", "quarter", "dayofweek", "dayofyear", "weekofyear", "day"], "title": "Part", "type": "string"}}, "required": ["op", "part"], "title": "TimeFeature", "type": "object"}, "TimeSpec": {"additionalProperties": true, "properties": {"column": {"default": "period", "title": "Column", "type": "string"}, "frequency": {"description": "pandas offset alias, e.g. 'MS' monthly (month start), 'QE' quarter end, 'W-MON', 'D'", "title": "Frequency", "type": "string"}}, "required": ["frequency"], "title": "TimeSpec", "type": "object"}, "Tolerance": {"additionalProperties": true, "description": "Allowed difference for golden examples: ``|actual - expected| <= abs + rel * |expected|``. When an example does\nnot set its own tolerance (or keeps a default), ``cf_core.golden.effective_tolerance`` applies abs 1e-4 / rel 1e-4,\nor abs 0.5 for targets rounded to whole numbers (``data.target.round``).", "properties": {"abs": {"default": 0.0001, "title": "Abs", "type": "number"}, "rel": {"default": 0.0001, "title": "Rel", "type": "number"}}, "title": "Tolerance", "type": "object"}, "ValidationReport": {"properties": {"status": {"enum": ["ready", "needs_manifest", "failed"], "title": "Status", "type": "string"}, "summary": {"title": "Summary", "type": "string"}, "checks": {"items": {"$ref": "#/components/schemas/Check"}, "title": "Checks", "type": "array"}, "introspection": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "default": null, "title": "Introspection"}, "manifest_draft": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "default": null, "description": "Best-effort manifest the framework could infer", "title": "Manifest Draft"}, "golden": {"items": {"$ref": "#/components/schemas/GoldenResult"}, "title": "Golden", "type": "array"}, "capabilities": {"additionalProperties": {"type": "boolean"}, "title": "Capabilities", "type": "object"}}, "required": ["status", "summary"], "title": "ValidationReport", "type": "object"}, "VersionResponse": {"properties": {"version": {"title": "Version", "type": "string"}, "name": {"title": "Name", "type": "string"}, "state": {"title": "State", "type": "string"}, "status": {"title": "Status", "type": "string"}, "legacy": {"title": "Legacy", "type": "boolean"}}, "required": ["version", "name", "state", "status", "legacy"], "title": "VersionResponse", "type": "object"}}, "securitySchemes": {"ApiKeyAuth": {"type": "apiKey", "in": "header", "name": "X-API-Key"}}, "responses": {"Error": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorEnvelope"}}}}}}}