{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/craftstory-com/json-schema/craftstory-com-image-schema.json",
  "title": "Image",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/craftstory-com-openapi.yml#/components/schemas/Image",
  "required": [
    "prompt",
    "credits"
  ],
  "type": "object",
  "properties": {
    "id": {
      "title": "Id",
      "type": "string",
      "format": "uuid",
      "readOnly": true
    },
    "status": {
      "title": "Status",
      "type": "string",
      "readOnly": true
    },
    "status_failed": {
      "title": "Status failed",
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "finish_reason": {
      "title": "Finish reason",
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "STOP",
        "FINISH_REASON_UNSPECIFIED",
        "MAX_TOKENS",
        "SAFETY",
        "RECITATION",
        "LANGUAGE",
        "OTHER",
        "BLOCKLIST",
        "PROHIBITED_CONTENT",
        "SPII",
        "MALFORMED_FUNCTION_CALL",
        "IMAGE_SAFETY",
        "UNEXPECTED_TOOL_CALL",
        "IMAGE_PROHIBITED_CONTENT",
        "NO_IMAGE",
        "IMAGE_RECITATION",
        "IMAGE_OTHER"
      ]
    },
    "status_percentage": {
      "title": "Status percentage",
      "type": "integer",
      "readOnly": true
    },
    "credits_refunded": {
      "title": "Credits refunded",
      "type": "boolean",
      "readOnly": true
    },
    "model": {
      "title": "Model",
      "type": "string",
      "readOnly": true
    },
    "aspect_ratio": {
      "title": "Aspect ratio",
      "type": "string",
      "enum": [
        556,
        969,
        245,
        61,
        184,
        243
      ]
    },
    "prompt": {
      "title": "Prompt",
      "type": "string",
      "maxLength": 2000,
      "minLength": 1
    },
    "credits": {
      "title": "Credits",
      "type": "integer",
      "maximum": 2147483647,
      "minimum": 0
    },
    "image_url": {
      "title": "Image url",
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "source_images": {
      "title": "Source images",
      "type": "integer",
      "readOnly": true
    },
    "created": {
      "title": "Created",
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "updated": {
      "title": "Updated",
      "type": "string",
      "format": "date-time",
      "readOnly": true
    }
  }
}