{
  "swagger": "2.0",
  "_host": "max-image-caption-generator.codait-prod-41208c73af8fca213512856c7a09db52-0000.us-east.containers.appdomain.cloud",
  "_schemes": [
    "https"
  ],
  "_basePath": "/",
  "paths": {
    "/model/predict": {
      "post": {
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ModelPredictResponse"
            }
          }
        },
        "summary": "Make a prediction given input data",
        "operationId": "predict",
        "parameters": [
          {
            "name": "body",
            "in": "formData",
            "type": "file",
            "required": true
          }
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "tags": [
          "model"
        ]
      }
    }
  },
  "info": {
    "title": "Model Asset Exchange Server",
    "version": "0.1",
    "description": "This model generates captions from a fixed vocabulary that describe the contents of images in the COCO Dataset. The model consists of an encoder model – a deep convolutional net using the Inception-v3 architecture trained on ImageNet-2012 data – and a decoder model – an LSTM network that is trained conditioned on the encoding from the image encoder model. The input to the model is an image, and the output is a sentence describing the image content. The model is based on the Show and Tell Image Caption Generator Model."
  },
  "produces": [
    "application/json"
  ],
  "consumes": [
    "application/json"
  ],
  "tags": [
    {
      "name": "model",
      "description": "Model information and inference operations"
    }
  ],
  "definitions": {
    "ModelMetadata": {
      "required": [
        "description",
        "id",
        "name"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Model identifier"
        },
        "name": {
          "type": "string",
          "description": "Model name"
        },
        "description": {
          "type": "string",
          "description": "Model description"
        },
        "license": {
          "type": "string",
          "description": "Model license"
        }
      },
      "type": "object"
    },
    "ModelPredictResponse": {
      "required": [
        "status"
      ],
      "properties": {
        "status": {
          "type": "string",
          "description": "Response status message"
        },
        "predictions": {
          "type": "array",
          "description": "Predicted labels and probabilities",
          "items": {
            "$ref": "#/definitions/LabelPrediction"
          }
        }
      },
      "type": "object"
    },
    "LabelPrediction": {
      "required": [
        "caption",
        "probability"
      ],
      "properties": {
        "index": {
          "type": "string",
          "description": "Labels ranked by highest score"
        },
        "caption": {
          "type": "string",
          "description": "Caption generated by image"
        },
        "probability": {
          "type": "number"
        }
      },
      "type": "object"
    }
  },
  "responses": {
    "ParseError": {
      "description": "When a mask can't be parsed"
    },
    "MaskError": {
      "description": "When any error occurs on mask"
    }
  }
}
