{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/spritecook-ai/json-schema/spritecook-ai-api-job-response-schema.json",
  "title": "ApiJobResponse",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/spritecook-ai-openapi.json#/components/schemas/ApiJobResponse",
  "properties": {
    "job_id": {
      "type": "string",
      "title": "Job Id"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "progress": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Progress"
    },
    "character_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Character Id"
    },
    "assets": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/ApiAssetInfo"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Assets"
    },
    "output": {
      "anyOf": [
        {
          "$ref": "#/$defs/ApiAnimationOutput"
        },
        {
          "type": "null"
        }
      ]
    },
    "file": {
      "anyOf": [
        {
          "$ref": "#/$defs/ApiBackgroundRemovalFile"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error"
    },
    "credits_used": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Credits Used"
    },
    "credits_remaining": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Credits Remaining"
    },
    "poll_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Poll Url"
    },
    "created_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Created At"
    },
    "finished_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Finished At"
    },
    "service_notice": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Service Notice"
    }
  },
  "type": "object",
  "required": [
    "job_id",
    "status"
  ],
  "$defs": {
    "ApiAnimationOutput": {
      "properties": {
        "asset_id": {
          "type": "string",
          "title": "Asset Id"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Url"
        },
        "spritesheet_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Spritesheet Url"
        },
        "content_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Content Type"
        },
        "metadata": {
          "$ref": "#/$defs/ApiAnimationOutputMetadata"
        }
      },
      "type": "object",
      "required": [
        "asset_id",
        "metadata"
      ],
      "title": "ApiAnimationOutput"
    },
    "ApiAnimationOutputMetadata": {
      "properties": {
        "frame_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Frame Count"
        },
        "fps": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Fps"
        },
        "frame_width": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Frame Width"
        },
        "frame_height": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Frame Height"
        },
        "animation_mode": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Animation Mode"
        }
      },
      "type": "object",
      "title": "ApiAnimationOutputMetadata"
    },
    "ApiAssetInfo": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Url"
        },
        "sprite_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sprite Url"
        },
        "spritesheet_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Spritesheet Url"
        },
        "display_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Display Name"
        },
        "file_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "File Name"
        },
        "width": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Width"
        },
        "height": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Height"
        },
        "prompt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Prompt"
        },
        "created_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Created At"
        },
        "asset_kind": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Asset Kind"
        },
        "tilesetKind": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tilesetkind"
        },
        "tilesetPieceSet": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tilesetpieceset"
        },
        "tilesetPerspective": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tilesetperspective"
        },
        "tilesetElevation": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tilesetelevation"
        },
        "tilesetTileSize": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tilesettilesize"
        },
        "tilesetStyleMode": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tilesetstylemode"
        },
        "tilesetGridSize": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tilesetgridsize"
        },
        "tilesetGridWidth": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tilesetgridwidth"
        },
        "tilesetGridHeight": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tilesetgridheight"
        },
        "tilesetOutputSize": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tilesetoutputsize"
        },
        "tilesetOutputWidth": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tilesetoutputwidth"
        },
        "tilesetOutputHeight": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tilesetoutputheight"
        },
        "tilesetAtlasColumns": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tilesetatlascolumns"
        },
        "tilesetAtlasRows": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tilesetatlasrows"
        },
        "tilesetEdges": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tilesetedges"
        }
      },
      "type": "object",
      "required": [
        "id"
      ],
      "title": "ApiAssetInfo"
    },
    "ApiBackgroundRemovalFile": {
      "properties": {
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Url"
        },
        "content_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Content Type"
        },
        "media_kind": {
          "type": "string",
          "enum": [
            "image",
            "animation"
          ],
          "title": "Media Kind"
        },
        "width": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Width"
        },
        "height": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Height"
        },
        "frame_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Frame Count"
        },
        "fps": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Fps"
        },
        "expires_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Expires At",
          "description": "When this temporary file stops being available (ISO 8601). Download it before then."
        },
        "expired": {
          "type": "boolean",
          "title": "Expired",
          "description": "True once the file is no longer available; url is then null.",
          "default": false
        }
      },
      "type": "object",
      "required": [
        "media_kind"
      ],
      "title": "ApiBackgroundRemovalFile"
    }
  }
}