{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/createprints-ai/json-schema/createprints-ai-artwork-status-schema.json",
  "title": "ArtworkStatus",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/createprints-ai-openapi.yml#/components/schemas/ArtworkStatus",
  "type": "object",
  "required": [
    "jobId",
    "id",
    "status",
    "statusCode",
    "creditsRemaining",
    "imageUploaded",
    "imagePrivate",
    "purchasable",
    "aspect",
    "imageModelSize",
    "colorScheme"
  ],
  "properties": {
    "jobId": {
      "type": "string",
      "format": "uuid"
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Legacy alias of `jobId`."
    },
    "status": {
      "type": "string",
      "enum": [
        "processing",
        "failed",
        "complete",
        "unknown"
      ]
    },
    "statusCode": {
      "type": "integer",
      "enum": [
        1,
        2,
        3
      ]
    },
    "creditsRemaining": {
      "type": "integer",
      "minimum": 0
    },
    "imageUploaded": {
      "type": "boolean"
    },
    "imagePaths": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "image_paths": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "imagePrivate": {
      "type": "boolean"
    },
    "visibility": {
      "type": [
        "string",
        "null"
      ]
    },
    "source": {
      "type": [
        "string",
        "null"
      ]
    },
    "purchasable": {
      "type": "boolean"
    },
    "aspect": {
      "$ref": "#/$defs/Aspect"
    },
    "imageModelSize": {
      "type": "string"
    },
    "promptSize": {
      "type": [
        "integer",
        "null"
      ]
    },
    "title": {
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "originalPrompt": {
      "type": [
        "string",
        "null"
      ]
    },
    "revisedPrompt": {
      "type": [
        "string",
        "null"
      ]
    },
    "keywords": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "warnings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ImportWarning"
      }
    },
    "artworkCheck": {
      "$ref": "#/$defs/ArtworkCheck"
    },
    "colorScheme": {
      "$ref": "#/$defs/ColorScheme"
    }
  },
  "additionalProperties": true,
  "$defs": {
    "ArtworkCheck": {
      "type": "object",
      "description": "Standalone-artwork classifier result; fields may expand.",
      "properties": {
        "status": {
          "type": "string"
        },
        "warningCodes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "error": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": true
    },
    "Aspect": {
      "type": "string",
      "enum": [
        "square",
        "portrait",
        "landscape"
      ]
    },
    "ColorAffect": {
      "type": "object",
      "description": "Continuous mood and colour analysis generated from the artwork palette.",
      "required": [
        "arousal",
        "valence",
        "warmth",
        "complexity",
        "emotions",
        "primaryTrait",
        "temperature",
        "energyLevel",
        "impactLevel",
        "harmony",
        "rooms",
        "recommendedRooms",
        "rationale"
      ],
      "properties": {
        "arousal": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "valence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "warmth": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "complexity": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 1
        },
        "emotions": {
          "type": "array",
          "maxItems": 4,
          "items": {
            "type": "string"
          }
        },
        "primaryTrait": {
          "type": "string"
        },
        "temperature": {
          "type": "string"
        },
        "energyLevel": {
          "type": "string"
        },
        "impactLevel": {
          "type": "string"
        },
        "harmony": {
          "type": "object",
          "required": [
            "type",
            "hueClusters"
          ],
          "properties": {
            "type": {
              "type": "string"
            },
            "hueClusters": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "rooms": {
          "type": "array",
          "maxItems": 5,
          "items": {
            "type": "object",
            "required": [
              "room",
              "score"
            ],
            "properties": {
              "room": {
                "type": "string"
              },
              "score": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            }
          }
        },
        "recommendedRooms": {
          "type": "array",
          "maxItems": 3,
          "items": {
            "type": "string"
          }
        },
        "rationale": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "ColorScheme": {
      "type": "object",
      "description": "Persisted colour classification and affect analysis. Legacy palette fields retain their stored JSON value shapes.",
      "required": [
        "colorPsychology",
        "colorPalette",
        "dominantColor",
        "vibrantColor",
        "complementaryColors",
        "affect"
      ],
      "properties": {
        "colorCategory": {
          "type": [
            "string",
            "null"
          ]
        },
        "colorPsychology": {
          "type": "object",
          "required": [
            "impactLevel",
            "primaryTrait"
          ],
          "properties": {
            "impactLevel": {
              "type": [
                "string",
                "null"
              ]
            },
            "primaryTrait": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        },
        "recommendedRoom": {
          "type": [
            "string",
            "null"
          ]
        },
        "colorPalette": {
          "type": "array",
          "items": {}
        },
        "dominantColor": {
          "type": "array",
          "items": {}
        },
        "vibrantColor": {
          "type": "array",
          "items": {}
        },
        "complementaryColors": {
          "type": "array",
          "items": {}
        },
        "affect": {
          "oneOf": [
            {
              "$ref": "#/$defs/ColorAffect"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "ImportWarning": {
      "type": "object",
      "required": [
        "code",
        "severity",
        "message"
      ],
      "properties": {
        "code": {
          "type": "string"
        },
        "severity": {
          "type": "string",
          "const": "warning"
        },
        "message": {
          "type": "string"
        }
      }
    }
  }
}