openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 11.5 kB
JSON
{"openapi":"3.0.0","info":{"contact":{"x-twitter":"openalpr"},"description":"The OpenALPR CarCheck API allows you to send images to the cloud for processing. \nThe image will be analyzed for license plates and vehicle make/models. The results \nare returned in JSON format\n","title":"OpenALPR CarCheck API","version":"3.0.1","x-apisguru-categories":["cloud"],"x-logo":{"url":"https://twitter.com/openalpr/profile_image?size=original"},"x-origin":[{"format":"swagger","url":"http://doc.openalpr.com/api/specs/cloudapi.yaml","version":"2.0"}],"x-providerName":"openalpr.com"},"paths":{"/config":{"get":{"description":"Get a list of available results for plate and vehicle recognition\n","operationId":"getConfig","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"properties":{"countries":{"items":{"properties":{"code":{"example":"us","type":"string"},"name":{"example":"North America","type":"string"}},"type":"object"},"type":"array"},"vehicle_labels":{"properties":{"bodytype":{"items":{"example":"sedan-compact","type":"string"},"type":"array"},"color":{"items":{"example":"blue","type":"string"},"type":"array"},"make":{"items":{"example":"volvo","type":"string"},"type":"array"},"makemodel":{"items":{"example":"volvo_v40","type":"string"},"type":"array"},"orientation":{"items":{"example":45,"type":"string"},"type":"array"},"year":{"items":{"example":"2000-2004","type":"string"},"type":"array"}},"type":"object"}}}}}}}}},"/recognize":{"post":{"description":"Send an image for OpenALPR to analyze and provide metadata back\nThe image is sent as a file using a form data POST\n","operationId":"recognizeFile","parameters":[{"$ref":"#/components/parameters/secret_key"},{"$ref":"#/components/parameters/recognize_vehicle"},{"$ref":"#/components/parameters/country"},{"$ref":"#/components/parameters/return_image"},{"$ref":"#/components/parameters/topn"},{"$ref":"#/components/parameters/is_cropped"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"image":{"description":"The image file that you wish to analyze\n","type":"string","format":"binary"}},"required":["image"]}}},"required":true},"responses":{"200":{"$ref":"#/components/responses/api_200"},"400":{"$ref":"#/components/responses/api_400"},"401":{"$ref":"#/components/responses/api_401"},"402":{"$ref":"#/components/responses/api_402"},"403":{"$ref":"#/components/responses/api_403"}}}},"/recognize_bytes":{"post":{"description":"Send an image for OpenALPR to analyze and provide metadata back\nThe image is sent as base64 encoded bytes.\n","operationId":"recognizeBytes","parameters":[{"$ref":"#/components/parameters/secret_key"},{"$ref":"#/components/parameters/recognize_vehicle"},{"$ref":"#/components/parameters/country"},{"$ref":"#/components/parameters/return_image"},{"$ref":"#/components/parameters/topn"}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"The image file that you wish to analyze encoded in base64\n","required":true},"responses":{"200":{"$ref":"#/components/responses/api_200"},"400":{"$ref":"#/components/responses/api_400"},"401":{"$ref":"#/components/responses/api_401"},"402":{"$ref":"#/components/responses/api_402"},"403":{"$ref":"#/components/responses/api_403"}}}},"/recognize_url":{"post":{"description":"Send an image for OpenALPR to analyze and provide metadata back\nThe image is sent as a URL. The OpenALPR service will download the image \nand process it\n","operationId":"recognizeUrl","parameters":[{"description":"A URL to an image that you wish to analyze\n","in":"query","name":"image_url","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/secret_key"},{"$ref":"#/components/parameters/recognize_vehicle"},{"$ref":"#/components/parameters/country"},{"$ref":"#/components/parameters/return_image"},{"$ref":"#/components/parameters/topn"}],"responses":{"200":{"$ref":"#/components/responses/api_200"},"400":{"$ref":"#/components/responses/api_400"},"401":{"$ref":"#/components/responses/api_401"},"402":{"$ref":"#/components/responses/api_402"},"403":{"$ref":"#/components/responses/api_403"}}}}},"servers":[{"url":"https://api.openalpr.com/v3"}],"components":{"parameters":{"country":{"description":"Defines the training data used by OpenALPR. \"us\" analyzes \nNorth-American style plates. \"eu\" analyzes European-style plates.\n\nThis field is required if using the \"plate\" task\n","in":"query","name":"country","required":true,"schema":{"type":"string"}},"is_cropped":{"description":"When providing a plate or vehicle that is already cropped, \nthis performs a recognition against the full crop and does not \nattempt to localize the plate/vehicle\n","in":"query","name":"is_cropped","required":false,"schema":{"type":"integer","enum":[0,1],"default":0}},"recognize_vehicle":{"description":"If set to 1, the vehicle will also be recognized in the image\nThis requires an additional credit per request\n","in":"query","name":"recognize_vehicle","required":false,"schema":{"type":"integer","enum":[0,1],"default":0}},"return_image":{"description":"If set to 1, the image you uploaded will be encoded in base64 and \nsent back along with the response\n","in":"query","name":"return_image","required":false,"schema":{"type":"integer","enum":[0,1],"default":0}},"secret_key":{"description":"The secret key used to authenticate your account. You can view your \nsecret key by visiting \nhttps://cloud.openalpr.com/\n","in":"query","name":"secret_key","required":true,"schema":{"type":"string"}},"topn":{"description":"The number of results you would like to be returned for plate \ncandidates and vehicle classifications\n","in":"query","name":"topn","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":10}}},"responses":{"api_200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Maximum number of requests allowed from your IP in a period","schema":{"type":"integer"}},"X-Ratelimit-Remaining":{"description":"Number of remaining requests allowed during this period","schema":{"type":"integer"}},"X-Ratelimit-Reset":{"description":"Epoch time when the next period begins","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"properties":{"credit_cost":{"description":"The number of API credits that were used to process this image","type":"integer"},"credits_monthly_total":{"description":"The maximum number of API credits available this month according to your plan","type":"integer"},"credits_monthly_used":{"description":"The number of API credits used this month","type":"integer"},"data_type":{"description":"Specifies the type of data in this response","enum":["alpr_results","alpr_group","heartbeat"],"type":"string"},"epoch_time":{"description":"Epoch time that the image was processed in milliseconds","type":"number"},"img_height":{"description":"Height of the input image in pixels","type":"integer"},"img_width":{"description":"Width of the uploaded image in pixels","type":"integer"},"processing_time":{"properties":{"plates":{"description":"Time spent performing license plate recognition (in milliseconds)","type":"number"},"total":{"description":"Time spent processing all tasks (in milliseconds)","type":"number"},"vehicles":{"description":"Time spent performing vehicle recognition (in milliseconds)","type":"number"}},"type":"object"},"regions_of_interest":{"description":"Describes the areas analyzed in the input image","items":{"$ref":"#/components/schemas/region_of_interest"},"type":"array"},"results":{"items":{"$ref":"#/components/schemas/plate_details"},"type":"array"},"vehicles":{"description":"Describes all vehicles found in the input image","items":{"$ref":"#/components/schemas/vehicles"},"type":"array"},"version":{"description":"API format version","type":"integer"}}}}}},"api_400":{"description":"Parameter is invalid","content":{"application/json":{"schema":{"properties":{"error":{"description":"Text error message describing the invalid input","type":"string"}}}}}},"api_401":{"description":"User not authorized or invalid secret_key","content":{"application/json":{"schema":{"properties":{"error":{"description":"Text error message describing the invalid input","type":"string"}}}}}},"api_402":{"description":"Monthly usage limit exceeded","content":{"application/json":{"schema":{"properties":{"error":{"description":"Text error message describing the invalid input","type":"string"}}}}}},"api_403":{"description":"Temporary rate-limit exceeded","content":{"application/json":{"schema":{"properties":{"error":{"description":"Text error message describing the invalid input","type":"string"}}}}}}},"schemas":{"coordinate":{"properties":{"x":{"type":"integer"},"y":{"type":"integer"}},"type":"object"},"plate_candidate":{"properties":{"confidence":{"description":"Confidence percentage that the plate number is correct","type":"number"},"matches_template":{"description":"Indicates whether the plate matched a regional text pattern","type":"integer"},"plate":{"description":"Plate number","type":"string"}},"type":"object"},"plate_details":{"properties":{"candidates":{"description":"All the top N candidates that could be the correct plate number","items":{"$ref":"#/components/schemas/plate_candidate"},"type":"array"},"confidence":{"description":"Confidence percentage that the plate number is correct","type":"number"},"coordinates":{"description":"The X/Y coordinates of the license plate in the image\nFour coordinates are provided that form a polygon starting\nfrom the top-left and moving clockwise ending in the bottom left\n","items":{"$ref":"#/components/schemas/coordinate"},"type":"array"},"matches_template":{"description":"Indicates whether the plate matched a regional text pattern","type":"integer"},"plate":{"description":"Best plate number for this plate","type":"string"},"processing_time_ms":{"description":"Number of milliseconds to process the license plate","type":"number"},"region":{"description":"Specified or detected region (e.g., tx for Texas)","type":"string"},"region_confidence":{"description":"Confidence percentage that the plate region is correct","type":"number"},"requested_topn":{"description":"The max number of results requested","type":"integer"},"vehicle":{"$ref":"#/components/schemas/vehicle_details"},"vehicle_region":{"$ref":"#/components/schemas/region_of_interest"}},"type":"object"},"region_of_interest":{"properties":{"height":{"type":"integer"},"width":{"type":"integer"},"x":{"type":"integer"},"y":{"type":"integer"}},"type":"object"},"vehicle_candidate":{"properties":{"confidence":{"description":"confidence of value (percent)","type":"number"},"name":{"description":"name of value","type":"string"}},"type":"object"},"vehicle_details":{"properties":{"body_type":{"items":{"$ref":"#/components/schemas/vehicle_candidate"},"type":"array"},"color":{"items":{"$ref":"#/components/schemas/vehicle_candidate"},"type":"array"},"make":{"items":{"$ref":"#/components/schemas/vehicle_candidate"},"type":"array"},"make_model":{"items":{"$ref":"#/components/schemas/vehicle_candidate"},"type":"array"},"orientation":{"items":{"$ref":"#/components/schemas/vehicle_candidate"},"type":"array"},"year":{"items":{"$ref":"#/components/schemas/vehicle_candidate"},"type":"array"}},"type":"object"},"vehicles":{"properties":{"details":{"$ref":"#/components/schemas/vehicle_details"},"height":{"type":"integer"},"width":{"type":"integer"},"x":{"type":"integer"},"y":{"type":"integer"}},"type":"object"}}}}