{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nicevois-com/json-schema/nicevois-com-conversion-job-schema.json",
  "title": "ConversionJob",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nicevois-com-openapi.json#/components/schemas/ConversionJob",
  "type": "object",
  "required": [
    "id",
    "status"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "modelName": {
      "type": [
        "string",
        "null"
      ]
    },
    "fileName": {
      "type": [
        "string",
        "null"
      ]
    },
    "transpose": {
      "type": [
        "integer",
        "null"
      ]
    },
    "stage": {
      "type": [
        "string",
        "null"
      ]
    },
    "stageMessage": {
      "type": [
        "string",
        "null"
      ]
    },
    "providerState": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "error": {
      "type": [
        "string",
        "null"
      ]
    },
    "upload": {
      "oneOf": [
        {
          "$ref": "#/$defs/UploadInstruction"
        },
        {
          "type": "null"
        }
      ]
    },
    "outputs": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "normal",
            "cleaned"
          ],
          "properties": {
            "normal": {
              "oneOf": [
                {
                  "$ref": "#/$defs/ConversionOutput"
                },
                {
                  "type": "null"
                }
              ]
            },
            "cleaned": {
              "oneOf": [
                {
                  "$ref": "#/$defs/ConversionOutput"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "timings": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": true
    },
    "restoration": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": true
    },
    "files": {
      "type": "array",
      "description": "Every file the conversion produced; a whole-song cover adds the finished cover and its stems. Download one with createConversionDownload by kind.",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "listenUrl": {
            "type": "string"
          },
          "downloadUrl": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "wholeSong": {
      "type": "boolean"
    }
  },
  "$defs": {
    "ConversionOutput": {
      "type": "object",
      "required": [
        "listenUrl"
      ],
      "properties": {
        "listenUrl": {
          "type": "string",
          "format": "uri"
        },
        "downloadUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        }
      }
    },
    "UploadInstruction": {
      "type": "object",
      "required": [
        "method",
        "url",
        "headers"
      ],
      "properties": {
        "method": {
          "const": "PUT"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "headers": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    }
  }
}