{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nicevois-com/json-schema/nicevois-com-audio-job-schema.json",
  "title": "AudioJob",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nicevois-com-openapi.json#/components/schemas/AudioJob",
  "type": "object",
  "required": [
    "id",
    "tool",
    "status",
    "price",
    "outputs",
    "websiteUrl",
    "links"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "tool": {
      "type": "string"
    },
    "toolName": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "awaiting_upload",
        "running",
        "completed",
        "failed",
        "cancelled"
      ]
    },
    "stage": {
      "type": [
        "string",
        "null"
      ]
    },
    "message": {
      "type": [
        "string",
        "null"
      ]
    },
    "error": {
      "type": [
        "string",
        "null"
      ]
    },
    "fileName": {
      "type": [
        "string",
        "null"
      ]
    },
    "durationSeconds": {
      "type": [
        "number",
        "null"
      ]
    },
    "createdAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "price": {
      "const": "free"
    },
    "upload": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "type": "object",
          "required": [
            "method",
            "url",
            "headers"
          ],
          "properties": {
            "method": {
              "const": "PUT"
            },
            "url": {
              "type": "string",
              "format": "uri"
            },
            "headers": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "receivedBytes": {
              "type": "integer"
            }
          }
        }
      ]
    },
    "outputs": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "stem",
          "name",
          "downloadUrl"
        ],
        "properties": {
          "stem": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "downloadUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "pollAfterSeconds": {
      "type": [
        "integer",
        "null"
      ]
    },
    "websiteUrl": {
      "type": "string",
      "format": "uri"
    },
    "links": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  }
}