{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/recolorthepast-com/json-schema/recolorthepast-com-job-schema.json",
  "title": "Job",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/recolorthepast-com-openapi.json#/components/schemas/Job",
  "type": "object",
  "required": [
    "id",
    "imageId",
    "mode",
    "status",
    "ready"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "imageId": {
      "type": "string",
      "format": "uuid"
    },
    "mode": {
      "type": "string",
      "enum": [
        "preview",
        "paid"
      ]
    },
    "status": {
      "$ref": "#/$defs/JobStatus"
    },
    "creditsCost": {
      "type": "integer"
    },
    "errorCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "result": {
      "type": [
        "object",
        "null"
      ]
    },
    "ready": {
      "type": "boolean",
      "description": "True when the result can be downloaded"
    }
  },
  "$defs": {
    "JobStatus": {
      "type": "string",
      "enum": [
        "queued",
        "leased",
        "processing",
        "succeeded",
        "failed"
      ]
    }
  }
}