{
"swagger": "2.0",
"info": {
"title": "Custom_Vision_Prediction_1.0",
"version": "1.0"
},
"host": "cognitiveswwprod.cognitiveservices.azure.com",
"basePath": "/customvision/v1.0/Prediction",
"schemes": [
"https"
],
"securityDefinitions": {
"apiKeyHeader": {
"type": "apiKey",
"name": "Prediction-key",
"in": "header"
},
"apiKeyQuery": {
"type": "apiKey",
"name": "Prediction-key",
"in": "query"
}
},
"security": [
{
"apiKeyHeader": []
},
{
"apiKeyQuery": []
}
],
"x-servers": [
{
"url": "https://cognitiveswwprod.cognitiveservices.azure.com"
},
{
"url": "https://switzerlandwest.api.cognitive.microsoft.com"
},
{
"url": "https://cognitiveswwprod.openai.azure.com"
}
],
"paths": {
"/{projectId}/image": {
"post": {
"description": "Predict an image",
"operationId": "58acd3c1ef062f0344a42814",
"summary": "PredictImage",
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Format - uuid. The project to evaluate against",
"required": true,
"type": "string"
},
{
"name": "iterationId",
"in": "query",
"description": "Format - uuid. Optional. Specifies the id of a particular iteration to evaluate against.\r\n The default iteration for the project will be used when not specified.",
"type": "string"
},
{
"name": "application",
"in": "query",
"description": "Optional. Specifies the name of application using the endpoint.",
"type": "string"
},
{
"name": "imageData",
"in": "formData",
"required": true,
"type": "file"
}
],
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json",
"text/json",
"application/xml",
"text/xml"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ImagePredictionResultModel"
},
"examples": {
"application/json": {
"Id": "string",
"Project": "string",
"Iteration": "string",
"Created": "string",
"Predictions": [
{
"TagId": "string",
"Tag": "string",
"Probability": 0.0
}
]
},
"text/json": {
"Id": "string",
"Project": "string",
"Iteration": "string",
"Created": "string",
"Predictions": [
{
"TagId": "string",
"Tag": "string",
"Probability": 0.0
}
]
},
"application/xml": "\r\n string\r\n string\r\n string\r\n string\r\n \r\n string\r\n string\r\n 0\r\n \r\n",
"text/xml": "\r\n string\r\n string\r\n string\r\n string\r\n \r\n string\r\n string\r\n 0\r\n \r\n"
}
}
}
}
},
"/{projectId}/inline/image": {
"post": {
"description": "Predict an image and save the results",
"operationId": "595d3ae583e9320cbc8152f0",
"summary": "PredictImageAndSaveResults",
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Format - uuid. The project to evaluate against",
"required": true,
"type": "string"
},
{
"name": "iterationId",
"in": "query",
"description": "Format - uuid. Optional. Specifies the id of a particular iteration to evaluate against.\r\n The default iteration for the project will be used when not specified.",
"type": "string"
},
{
"name": "application",
"in": "query",
"description": "Optional. Specifies the name of application using the endpoint.",
"type": "string"
},
{
"name": "imageData",
"in": "formData",
"required": true,
"type": "file"
}
],
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json",
"text/json",
"application/xml",
"text/xml"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ImagePredictionResultModel"
},
"examples": {
"application/json": {
"Id": "string",
"Project": "string",
"Iteration": "string",
"Created": "string",
"Predictions": [
{
"TagId": "string",
"Tag": "string",
"Probability": 0.0
}
]
},
"text/json": {
"Id": "string",
"Project": "string",
"Iteration": "string",
"Created": "string",
"Predictions": [
{
"TagId": "string",
"Tag": "string",
"Probability": 0.0
}
]
},
"application/xml": "\r\n string\r\n string\r\n string\r\n string\r\n \r\n string\r\n string\r\n 0\r\n \r\n",
"text/xml": "\r\n string\r\n string\r\n string\r\n string\r\n \r\n string\r\n string\r\n 0\r\n \r\n"
}
}
}
}
},
"/{projectId}/url": {
"post": {
"description": "Predict an image url",
"operationId": "58acd3c1ef062f0344a42813",
"summary": "PredictImageUrl",
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Format - uuid. The project to evaluate against",
"required": true,
"type": "string"
},
{
"name": "iterationId",
"in": "query",
"description": "Format - uuid. Optional. Specifies the id of a particular iteration to evaluate against.\r\n The default iteration for the project will be used when not specified.",
"type": "string"
},
{
"name": "application",
"in": "query",
"description": "Optional. Specifies the name of application using the endpoint.",
"type": "string"
},
{
"name": "imageUrl",
"in": "body",
"schema": {
"$ref": "#/definitions/ImageUrl"
},
"description": "An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated"
}
],
"consumes": [
"application/json",
"text/json",
"application/xml",
"text/xml",
"application/x-www-form-urlencoded"
],
"produces": [
"application/json",
"text/json",
"application/xml",
"text/xml"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ImagePredictionResultModel"
},
"examples": {
"application/json": {
"Id": "string",
"Project": "string",
"Iteration": "string",
"Created": "string",
"Predictions": [
{
"TagId": "string",
"Tag": "string",
"Probability": 0.0
}
]
},
"text/json": {
"Id": "string",
"Project": "string",
"Iteration": "string",
"Created": "string",
"Predictions": [
{
"TagId": "string",
"Tag": "string",
"Probability": 0.0
}
]
},
"application/xml": "\r\n string\r\n string\r\n string\r\n string\r\n \r\n string\r\n string\r\n 0\r\n \r\n",
"text/xml": "\r\n string\r\n string\r\n string\r\n string\r\n \r\n string\r\n string\r\n 0\r\n \r\n"
}
}
}
}
},
"/{projectId}/inline/url": {
"post": {
"description": "Predict an image url and save the results",
"operationId": "595d3ae583e9320cbc8152ef",
"summary": "PredictImageUrlAndSaveResults",
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Format - uuid. The project to evaluate against",
"required": true,
"type": "string"
},
{
"name": "iterationId",
"in": "query",
"description": "Format - uuid. Optional. Specifies the id of a particular iteration to evaluate against.\r\n The default iteration for the project will be used when not specified.",
"type": "string"
},
{
"name": "application",
"in": "query",
"description": "Optional. Specifies the name of application using the endpoint.",
"type": "string"
},
{
"name": "imageUrl",
"in": "body",
"schema": {
"$ref": "#/definitions/ImageUrl"
},
"description": "An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated"
}
],
"consumes": [
"application/json",
"text/json",
"application/xml",
"text/xml",
"application/x-www-form-urlencoded"
],
"produces": [
"application/json",
"text/json",
"application/xml",
"text/xml"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ImagePredictionResultModel"
},
"examples": {
"application/json": {
"Id": "string",
"Project": "string",
"Iteration": "string",
"Created": "string",
"Predictions": [
{
"TagId": "string",
"Tag": "string",
"Probability": 0.0
}
]
},
"text/json": {
"Id": "string",
"Project": "string",
"Iteration": "string",
"Created": "string",
"Predictions": [
{
"TagId": "string",
"Tag": "string",
"Probability": 0.0
}
]
},
"application/xml": "\r\n string\r\n string\r\n string\r\n string\r\n \r\n string\r\n string\r\n 0\r\n \r\n",
"text/xml": "\r\n string\r\n string\r\n string\r\n string\r\n \r\n string\r\n string\r\n 0\r\n \r\n"
}
}
}
}
}
},
"definitions": {
"ImageUrl": {
"type": "object",
"properties": {
"Url": {
"type": "string",
"x-nullable": true
}
},
"x-nullable": true,
"example": {
"Url": "string"
}
},
"ImagePredictionResultModel": {
"description": "result of an image prediction request",
"type": "object",
"properties": {
"Id": {
"format": "uuid",
"type": "string",
"readOnly": true,
"x-nullable": false
},
"Project": {
"format": "uuid",
"type": "string",
"readOnly": true,
"x-nullable": false
},
"Iteration": {
"format": "uuid",
"type": "string",
"readOnly": true,
"x-nullable": false
},
"Created": {
"format": "date-time",
"type": "string",
"readOnly": true,
"x-nullable": false
},
"Predictions": {
"type": "array",
"items": {
"$ref": "#/definitions/ImageTagPrediction"
},
"readOnly": true,
"x-nullable": true
}
},
"x-nullable": true
},
"ImageTagPrediction": {
"type": "object",
"properties": {
"TagId": {
"format": "uuid",
"type": "string",
"readOnly": true,
"x-nullable": false
},
"Tag": {
"type": "string",
"readOnly": true,
"x-nullable": true
},
"Probability": {
"format": "float",
"type": "number",
"readOnly": true,
"x-nullable": false
}
},
"x-nullable": true
}
},
"tags": []
}