swagger: '2.0' info: version: '3.0' title: Microsoft Azure Custom Vision Prediction Client host: southcentralus.api.cognitive.microsoft.com basePath: /customvision/v3.0/prediction schemes: - https paths: /{projectId}/classify/iterations/{publishedName}/url: post: tags: - ImagePredictionApi summary: 'Microsoft Azure Classify An Image Url And Saves The Result' operationId: microsoftAzureClassifyimageurl consumes: - application/json - application/xml - text/xml - application/x-www-form-urlencoded produces: - application/json - application/xml - text/xml parameters: - name: projectId in: path description: The project id. required: true type: string format: uuid x-nullable: false - name: publishedName in: path description: Specifies the name of the model to evaluate against. required: true type: string - name: imageUrl in: body description: An ImageUrl that contains the url of the image to be evaluated. required: true schema: $ref: '#/definitions/ImageUrl' - name: application in: query description: Optional. Specifies the name of application using the endpoint. required: false type: string x-nullable: true responses: '200': description: OK schema: $ref: '#/definitions/ImagePrediction' default: description: Error response schema: $ref: '#/definitions/CustomVisionError' x-ms-examples: Successful ClassifyImageUrl request: $ref: ./examples/ClassifyImageUrl.json description: Needs a more full description created. /{projectId}/classify/iterations/{publishedName}/image: post: tags: - ImagePredictionApi summary: 'Microsoft Azure Classify An Image And Saves The Result' operationId: microsoftAzureClassifyimage consumes: - multipart/form-data - application/octet-stream produces: - application/json - application/xml - text/xml parameters: - name: projectId in: path description: The project id. required: true type: string format: uuid x-nullable: false - name: publishedName in: path description: Specifies the name of the model to evaluate against. required: true type: string - name: application in: query description: Optional. Specifies the name of application using the endpoint. required: false type: string x-nullable: true - name: imageData in: formData description: >- Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB. required: true type: file responses: '200': description: OK schema: $ref: '#/definitions/ImagePrediction' default: description: Error response schema: $ref: '#/definitions/CustomVisionError' x-ms-examples: Successful ClassifyImage request: $ref: ./examples/ClassifyImage.json description: Needs a more full description created. /{projectId}/classify/iterations/{publishedName}/url/nostore: post: tags: - ImagePredictionApi summary: 'Microsoft Azure Classify An Image Url Without Saving The Result' operationId: microsoftAzureClassifyimageurlwithnostore consumes: - application/json - application/xml - text/xml - application/x-www-form-urlencoded produces: - application/json - application/xml - text/xml parameters: - name: projectId in: path description: The project id. required: true type: string format: uuid x-nullable: false - name: publishedName in: path description: Specifies the name of the model to evaluate against. required: true type: string - name: imageUrl in: body description: >- An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated. required: true schema: $ref: '#/definitions/ImageUrl' - name: application in: query description: Optional. Specifies the name of application using the endpoint. required: false type: string x-nullable: true responses: '200': description: OK schema: $ref: '#/definitions/ImagePrediction' default: description: Error response schema: $ref: '#/definitions/CustomVisionError' x-ms-examples: Successful ClassifyImageUrlWithNoStore request: $ref: ./examples/ClassifyImageUrlWithNoStore.json description: Needs a more full description created. /{projectId}/classify/iterations/{publishedName}/image/nostore: post: tags: - ImagePredictionApi summary: 'Microsoft Azure Classify An Image Without Saving The Result' operationId: microsoftAzureClassifyimagewithnostore consumes: - multipart/form-data - application/octet-stream produces: - application/json - application/xml - text/xml parameters: - name: projectId in: path description: The project id. required: true type: string format: uuid x-nullable: false - name: publishedName in: path description: Specifies the name of the model to evaluate against. required: true type: string - name: application in: query description: Optional. Specifies the name of application using the endpoint. required: false type: string x-nullable: true - name: imageData in: formData description: >- Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 0MB. required: true type: file responses: '200': description: OK schema: $ref: '#/definitions/ImagePrediction' default: description: Error response schema: $ref: '#/definitions/CustomVisionError' x-ms-examples: Successful ClassifyImageWithNoStore request: $ref: ./examples/ClassifyImageWithNoStore.json description: Needs a more full description created. /{projectId}/detect/iterations/{publishedName}/url: post: tags: - ImagePredictionApi summary: 'Microsoft Azure Detect Objects In An Image Url And Saves The Result' operationId: microsoftAzureDetectimageurl consumes: - application/json - application/xml - text/xml - application/x-www-form-urlencoded produces: - application/json - application/xml - text/xml parameters: - name: projectId in: path description: The project id. required: true type: string format: uuid x-nullable: false - name: publishedName in: path description: Specifies the name of the model to evaluate against. required: true type: string - name: imageUrl in: body description: An ImageUrl that contains the url of the image to be evaluated. required: true schema: $ref: '#/definitions/ImageUrl' - name: application in: query description: Optional. Specifies the name of application using the endpoint. required: false type: string x-nullable: true responses: '200': description: OK schema: $ref: '#/definitions/ImagePrediction' default: description: Error response schema: $ref: '#/definitions/CustomVisionError' x-ms-examples: Successful DetectImageUrl request: $ref: ./examples/DetectImageUrl.json description: Needs a more full description created. /{projectId}/detect/iterations/{publishedName}/image: post: tags: - ImagePredictionApi summary: 'Microsoft Azure Detect Objects In An Image And Saves The Result' operationId: microsoftAzureDetectimage consumes: - multipart/form-data - application/octet-stream produces: - application/json - application/xml - text/xml parameters: - name: projectId in: path description: The project id. required: true type: string format: uuid x-nullable: false - name: publishedName in: path description: Specifies the name of the model to evaluate against. required: true type: string - name: application in: query description: Optional. Specifies the name of application using the endpoint. required: false type: string x-nullable: true - name: imageData in: formData description: >- Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB. required: true type: file responses: '200': description: OK schema: $ref: '#/definitions/ImagePrediction' default: description: Error response schema: $ref: '#/definitions/CustomVisionError' x-ms-examples: Successful DetectImage request: $ref: ./examples/DetectImage.json description: Needs a more full description created. /{projectId}/detect/iterations/{publishedName}/url/nostore: post: tags: - ImagePredictionApi summary: 'Microsoft Azure Detect Objects In An Image Url Without Saving The Result' operationId: microsoftAzureDetectimageurlwithnostore consumes: - application/json - application/xml - text/xml - application/x-www-form-urlencoded produces: - application/json - application/xml - text/xml parameters: - name: projectId in: path description: The project id. required: true type: string format: uuid x-nullable: false - name: publishedName in: path description: Specifies the name of the model to evaluate against. required: true type: string - name: imageUrl in: body description: >- An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated. required: true schema: $ref: '#/definitions/ImageUrl' - name: application in: query description: Optional. Specifies the name of application using the endpoint. required: false type: string x-nullable: true responses: '200': description: OK schema: $ref: '#/definitions/ImagePrediction' default: description: Error response schema: $ref: '#/definitions/CustomVisionError' x-ms-examples: Successful DetectImageUrlWithNoStore request: $ref: ./examples/DetectImageUrlWithNoStore.json description: Needs a more full description created. /{projectId}/detect/iterations/{publishedName}/image/nostore: post: tags: - ImagePredictionApi summary: 'Microsoft Azure Detect Objects In An Image Without Saving The Result' operationId: microsoftAzureDetectimagewithnostore consumes: - multipart/form-data - application/octet-stream produces: - application/json - application/xml - text/xml parameters: - name: projectId in: path description: The project id. required: true type: string format: uuid x-nullable: false - name: publishedName in: path description: Specifies the name of the model to evaluate against. required: true type: string - name: application in: query description: Optional. Specifies the name of application using the endpoint. required: false type: string x-nullable: true - name: imageData in: formData description: >- Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 0MB. required: true type: file responses: '200': description: OK schema: $ref: '#/definitions/ImagePrediction' default: description: Error response schema: $ref: '#/definitions/CustomVisionError' x-ms-examples: Successful DetectImageWithNoStore request: $ref: ./examples/DetectImageWithNoStore.json description: Needs a more full description created. definitions: ImageUrl: description: Image url. required: - url type: object properties: url: description: Url of the image. type: string readOnly: false x-nullable: false ImagePrediction: description: Result of an image prediction request. type: object properties: id: format: uuid description: Prediction Id. type: string readOnly: true x-nullable: false project: format: uuid description: Project Id. type: string readOnly: true x-nullable: false iteration: format: uuid description: Iteration Id. type: string readOnly: true x-nullable: false created: format: date-time description: Date this prediction was created. type: string readOnly: true x-nullable: false predictions: description: List of predictions. type: array items: $ref: '#/definitions/Prediction' x-nullable: false readOnly: true Prediction: description: Prediction result. type: object properties: probability: format: float description: Probability of the tag. type: number readOnly: true x-nullable: false tagId: format: uuid description: Id of the predicted tag. type: string readOnly: true x-nullable: false tagName: description: Name of the predicted tag. type: string readOnly: true x-nullable: true boundingBox: $ref: '#/definitions/BoundingBox' description: Bounding box of the prediction. readOnly: true x-nullable: true BoundingBox: description: Bounding box that defines a region of an image. required: - left - top - width - height type: object properties: left: format: float description: Coordinate of the left boundary. type: number readOnly: false x-nullable: false top: format: float description: Coordinate of the top boundary. type: number readOnly: false x-nullable: false width: format: float description: Width. type: number readOnly: false x-nullable: false height: format: float description: Height. type: number readOnly: false x-nullable: false CustomVisionError: required: - code - message type: object properties: code: description: The error code. enum: - NoError - BadRequest - BadRequestExceededBatchSize - BadRequestNotSupported - BadRequestInvalidIds - BadRequestProjectName - BadRequestProjectNameNotUnique - BadRequestProjectDescription - BadRequestProjectUnknownDomain - BadRequestProjectUnknownClassification - BadRequestProjectUnsupportedDomainTypeChange - BadRequestProjectUnsupportedExportPlatform - BadRequestIterationName - BadRequestIterationNameNotUnique - BadRequestIterationDescription - BadRequestIterationIsNotTrained - BadRequestWorkspaceCannotBeModified - BadRequestWorkspaceNotDeletable - BadRequestTagName - BadRequestTagNameNotUnique - BadRequestTagDescription - BadRequestTagType - BadRequestMultipleNegativeTag - BadRequestImageTags - BadRequestImageRegions - BadRequestNegativeAndRegularTagOnSameImage - BadRequestRequiredParamIsNull - BadRequestIterationIsPublished - BadRequestInvalidPublishName - BadRequestInvalidPublishTarget - BadRequestUnpublishFailed - BadRequestSubscriptionApi - BadRequestExceedProjectLimit - BadRequestExceedIterationPerProjectLimit - BadRequestExceedTagPerProjectLimit - BadRequestExceedTagPerImageLimit - BadRequestExceededQuota - BadRequestCannotMigrateProjectWithName - BadRequestNotLimitedTrial - BadRequestImageBatch - BadRequestImageStream - BadRequestImageUrl - BadRequestImageFormat - BadRequestImageSizeBytes - BadRequestImageExceededCount - BadRequestTrainingNotNeeded - BadRequestTrainingNotNeededButTrainingPipelineUpdated - BadRequestTrainingValidationFailed - BadRequestClassificationTrainingValidationFailed - BadRequestMultiClassClassificationTrainingValidationFailed - BadRequestMultiLabelClassificationTrainingValidationFailed - BadRequestDetectionTrainingValidationFailed - BadRequestTrainingAlreadyInProgress - BadRequestDetectionTrainingNotAllowNegativeTag - BadRequestInvalidEmailAddress - BadRequestDomainNotSupportedForAdvancedTraining - BadRequestExportPlatformNotSupportedForAdvancedTraining - BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining - BadRequestExportValidationFailed - BadRequestExportAlreadyInProgress - BadRequestPredictionIdsMissing - BadRequestPredictionIdsExceededCount - BadRequestPredictionTagsExceededCount - BadRequestPredictionResultsExceededCount - BadRequestPredictionInvalidApplicationName - BadRequestPredictionInvalidQueryParameters - BadRequestInvalid - UnsupportedMediaType - Forbidden - ForbiddenUser - ForbiddenUserResource - ForbiddenUserSignupDisabled - ForbiddenUserSignupAllowanceExceeded - ForbiddenUserDoesNotExist - ForbiddenUserDisabled - ForbiddenUserInsufficientCapability - ForbiddenDRModeEnabled - ForbiddenInvalid - NotFound - NotFoundProject - NotFoundProjectDefaultIteration - NotFoundIteration - NotFoundIterationPerformance - NotFoundTag - NotFoundImage - NotFoundDomain - NotFoundApimSubscription - NotFoundInvalid - Conflict - ConflictInvalid - ErrorUnknown - ErrorProjectInvalidWorkspace - ErrorProjectInvalidPipelineConfiguration - ErrorProjectInvalidDomain - ErrorProjectTrainingRequestFailed - ErrorProjectExportRequestFailed - ErrorFeaturizationServiceUnavailable - ErrorFeaturizationQueueTimeout - ErrorFeaturizationInvalidFeaturizer - ErrorFeaturizationAugmentationUnavailable - ErrorFeaturizationUnrecognizedJob - ErrorFeaturizationAugmentationError - ErrorExporterInvalidPlatform - ErrorExporterInvalidFeaturizer - ErrorExporterInvalidClassifier - ErrorPredictionServiceUnavailable - ErrorPredictionModelNotFound - ErrorPredictionModelNotCached - ErrorPrediction - ErrorPredictionStorage - ErrorRegionProposal - ErrorInvalid type: string x-ms-enum: name: CustomVisionErrorCodes modelAsString: true message: description: A message explaining the error reported by the service. type: string parameters: Endpoint: name: Endpoint in: path description: Supported Cognitive Services endpoints. required: true type: string x-ms-parameter-location: client x-ms-skip-url-encoding: true securityDefinitions: apim_key: type: apiKey name: Prediction-Key in: header security: - apim_key: [] x-ms-parameterized-host: hostTemplate: '{Endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint' tags: - name: ImagePredictionApi