{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nicevois-com/json-schema/nicevois-com-training-job-schema.json",
  "title": "TrainingJob",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nicevois-com-openapi.json#/components/schemas/TrainingJob",
  "type": "object",
  "required": [
    "id",
    "status",
    "currentEpoch",
    "links"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "message": {
      "type": [
        "string",
        "null"
      ]
    },
    "modelName": {
      "type": [
        "string",
        "null"
      ]
    },
    "epochs": {
      "type": [
        "integer",
        "null"
      ]
    },
    "currentEpoch": {
      "type": [
        "integer",
        "null"
      ]
    },
    "durationSeconds": {
      "type": [
        "number",
        "null"
      ]
    },
    "createdAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "updatedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "startedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "completedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "estimatedCompletionAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "estimatedRemainingSeconds": {
      "type": [
        "number",
        "null"
      ]
    },
    "etaText": {
      "type": [
        "string",
        "null"
      ]
    },
    "expiresAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "subscriptionCreditCents": {
      "type": "integer"
    },
    "balanceDueCents": {
      "type": "integer"
    },
    "upload": {
      "oneOf": [
        {
          "$ref": "#/$defs/UploadInstruction"
        },
        {
          "type": "null"
        }
      ]
    },
    "artifacts": {
      "oneOf": [
        {
          "$ref": "#/$defs/Artifacts"
        },
        {
          "type": "null"
        }
      ]
    },
    "links": {
      "type": "object",
      "required": [
        "status",
        "start"
      ],
      "properties": {
        "status": {
          "type": "string",
          "format": "uri"
        },
        "start": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  },
  "$defs": {
    "Artifact": {
      "type": "object",
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "sizeBytes": {
          "type": [
            "integer",
            "null"
          ]
        },
        "downloadUrl": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "Artifacts": {
      "type": "object",
      "properties": {
        "pth": {
          "oneOf": [
            {
              "$ref": "#/$defs/Artifact"
            },
            {
              "type": "null"
            }
          ]
        },
        "index": {
          "oneOf": [
            {
              "$ref": "#/$defs/Artifact"
            },
            {
              "type": "null"
            }
          ]
        },
        "package": {
          "oneOf": [
            {
              "$ref": "#/$defs/Artifact"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "UploadInstruction": {
      "type": "object",
      "required": [
        "method",
        "url",
        "headers"
      ],
      "properties": {
        "method": {
          "const": "PUT"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "headers": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    }
  }
}