{"info":{"_postman_id":"0d83f3c3-fd91-4632-bc24-6c0ba0f6f87a","name":"Tier2 AI","description":"<html><head></head><body><h1 id=\"introduction\">Introduction</h1>\n<p>The Tier2AI API is a simple JSON API which provides access to our text classification machine learning model. To make a request, simply send an HTTP POST with a raw JSON body to <a href=\"https://ai-api.tier2.tech:2053\">https://ai-api.tier2.tech:2053</a></p>\n<h1 id=\"overview\">Overview</h1>\n<p>There are three elements in the root JSON object which are required.</p>\n<p>\"markers\" is a list of categories for which you would like to to the input_text. Any text input is accepted here, we provide examples, but the model will understand any category names that an average English speaker would. </p>\n<p>\"input_text\" is the text for which you would like to match to one or more categories.</p>\n<p>\"multinomial\" can be true or false. For text classification tasks where there may be more than one correct category, or no correct categories, this should be set to true. For tasks where there is exactly one correct category, this should be set to false.</p>\n<h1 id=\"interpreting-the-results\">Interpreting The Results</h1>\n<p>The results will return a percentage for each category. You can try some test data to get a feel for where the thresholds should be for the scores, but this is the numbers we have come up with.</p>\n<p>For \"multinomial\"==true:\nGreater than 94 is a match. If nothing is greater than 94, but some things are greater than 80, then the highest score is a match. If nothing is greater than 80, there is no match.</p>\n<p>For \"multinomial\"==False:\nWhichever score is the highest is the match</p>\n<h1 id=\"authentication\">Authentication</h1>\n<p>There is no authentication for the free tier of the API, commercial users paying for a license will be issued an API key which is passed with the URL as a GET Attribute \"api_key\".</p>\n<h1 id=\"error-codes\">Error Codes</h1>\n<p>The API will return JSON with the root element \"success\" set to false in the case of an error. The HTTP status code will also be of value 400 or greater. When \"success\"==false, the \"result\" element will be a string explaining the cause of the error.</p>\n<h1 id=\"rate-limit\">Rate limit</h1>\n<p>The free tier allows 100 programmatic requests in a 24-hour period. The free tier does not permit the use of the API for commercial purposes.</p>\n<p>There can be a maximum of 20 markers per request, but you can have unlimited markers simply by sending multiple requests to the API, using 20 markers at a time.</p>\n<p>input_text is currently limited to 320 characters per request for the free tier.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Introduction","slug":"introduction"},{"content":"Overview","slug":"overview"},{"content":"Interpreting The Results","slug":"interpreting-the-results"},{"content":"Authentication","slug":"authentication"},{"content":"Error Codes","slug":"error-codes"},{"content":"Rate limit","slug":"rate-limit"}],"owner":"11345233","collectionId":"0d83f3c3-fd91-4632-bc24-6c0ba0f6f87a","publishedId":"TzY69uSC","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-06-07T12:19:13.000Z"},"item":[{"name":"standard request","id":"c380b1c2-5030-4b5e-a25d-e636ed2ee796","protocolProfileBehavior":{"disabledSystemHeaders":{"user-agent":true},"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"input_text\": \"a new person is starting at the office today and we need to get them a laptop asap\",\r\n    \"markers\": [\r\n        \"employee termination\",\r\n        \"new hire\",\r\n        \"password reset request\",\r\n        \"computer purchase\",\r\n        \"broken printer\",\r\n        \"website work\",\r\n        \"site down emergency\",\r\n        \"network port installation\",\r\n        \"Microsoft office license purchase\",\r\n        \"can't open document\",\r\n        \"can't open app\",\r\n        \"Internet connectivity problem\",\r\n        \"frozen application\",\r\n        \"software update\",\r\n        \"new software install\",\r\n        \"phone problem\",\r\n        \"fax problem\",\r\n        \"broken scanner\",\r\n        \"PC peripheral problem\",\r\n        \"new account setup\"\r\n    ],\r\n    \"multinomial\": true\r\n}","options":{"raw":{"language":"json"}}},"url":"https://ai-api.tier2.tech:2053","description":"<p>Here is a standard multinomial example request with no issues.</p>\n","urlObject":{"protocol":"https","port":"2053","host":["ai-api","tier2","tech"],"query":[],"variable":[]}},"response":[{"id":"8822673b-6c02-4f0f-a890-4868e3f7f838","name":"https://ai-api.tier2.tech:2053","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"input_text\": \"a new person is starting at the office today and we need to get them a laptop asap\",\r\n    \"markers\": [\r\n        \"employee termination\",\r\n        \"new hire\",\r\n        \"password reset request\",\r\n        \"computer purchase\",\r\n        \"broken printer\",\r\n        \"website work\",\r\n        \"site down emergency\",\r\n        \"network port installation\",\r\n        \"Microsoft office license purchase\",\r\n        \"can't open document\",\r\n        \"can't open app\",\r\n        \"Internet connectivity problem\",\r\n        \"frozen application\",\r\n        \"software update\",\r\n        \"new software install\",\r\n        \"phone problem\",\r\n        \"fax problem\",\r\n        \"broken scanner\",\r\n        \"PC peripheral problem\",\r\n        \"new account setup\"\r\n    ],\r\n    \"multinomial\": true\r\n}","options":{"raw":{"language":"json"}}},"url":"https://ai-api.tier2.tech:2053"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"request\": {\r\n        \"sequences\": [\r\n            \"a new person is starting at the office today and we need to get them a laptop asap\"\r\n        ],\r\n        \"candidate_labels\": [\r\n            \"employee termination\",\r\n            \"new hire\",\r\n            \"password reset request\",\r\n            \"computer purchase\",\r\n            \"broken printer\",\r\n            \"website work\",\r\n            \"site down emergency\",\r\n            \"network port installation\",\r\n            \"Microsoft office license purchase\",\r\n            \"can't open document\",\r\n            \"can't open app\",\r\n            \"Internet connectivity problem\",\r\n            \"frozen application\",\r\n            \"software update\",\r\n            \"new software install\",\r\n            \"phone problem\",\r\n            \"fax problem\",\r\n            \"broken scanner\",\r\n            \"PC peripheral problem\",\r\n            \"new account setup\"\r\n        ],\r\n        \"multi_class\": true\r\n    },\r\n    \"result\": [\r\n        [\r\n            \"new hire\",\r\n            99.75\r\n        ],\r\n        [\r\n            \"computer purchase\",\r\n            99.6\r\n        ],\r\n        [\r\n            \"new software install\",\r\n            87.82\r\n        ],\r\n        [\r\n            \"PC peripheral problem\",\r\n            83.64\r\n        ],\r\n        [\r\n            \"website work\",\r\n            44.08\r\n        ],\r\n        [\r\n            \"new account setup\",\r\n            42.23\r\n        ],\r\n        [\r\n            \"site down emergency\",\r\n            41.99\r\n        ],\r\n        [\r\n            \"Microsoft office license purchase\",\r\n            40.15\r\n        ],\r\n        [\r\n            \"Internet connectivity problem\",\r\n            24.38\r\n        ],\r\n        [\r\n            \"software update\",\r\n            23.76\r\n        ],\r\n        [\r\n            \"can't open document\",\r\n            8.72\r\n        ],\r\n        [\r\n            \"password reset request\",\r\n            7.21\r\n        ],\r\n        [\r\n            \"network port installation\",\r\n            6.27\r\n        ],\r\n        [\r\n            \"fax problem\",\r\n            5.96\r\n        ],\r\n        [\r\n            \"frozen application\",\r\n            4.7\r\n        ],\r\n        [\r\n            \"can't open app\",\r\n            3.89\r\n        ],\r\n        [\r\n            \"broken printer\",\r\n            0.96\r\n        ],\r\n        [\r\n            \"broken scanner\",\r\n            0.81\r\n        ],\r\n        [\r\n            \"employee termination\",\r\n            0.75\r\n        ],\r\n        [\r\n            \"phone problem\",\r\n            0.73\r\n        ]\r\n    ],\r\n    \"gpu_id\": 1,\r\n    \"pid\": 2336,\r\n    \"success\": true\r\n}"}],"_postman_id":"c380b1c2-5030-4b5e-a25d-e636ed2ee796"},{"name":"non-multinomial request","id":"bfe6d537-5f92-4c62-8500-59196e540c42","protocolProfileBehavior":{"disabledSystemHeaders":{"user-agent":true},"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"input_text\": \"What did the reddit user say after detonating a bomb inside a bank? 'Wow! This blew up! Thanks for the gold'\",\r\n    \"markers\": [\r\n        \"funny\",\r\n      \t\"unfunny\"\r\n    ],\r\n    \"multinomial\": false\r\n}","options":{"raw":{"language":"json"}}},"url":"https://ai-api.tier2.tech:2053","description":"<p>Here is a standard non-multinomial example request with no issues.</p>\n","urlObject":{"protocol":"https","port":"2053","host":["ai-api","tier2","tech"],"query":[],"variable":[]}},"response":[{"id":"a5cc779c-064d-48c4-bfa4-fb3e0d75ba74","name":"https://ai-api.tier2.tech:2053","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"input_text\": \"What did the reddit user say after detonating a bomb inside a bank? 'Wow! This blew up! Thanks for the gold'\",\r\n    \"markers\": [\r\n        \"funny\",\r\n      \t\"unfunny\"\r\n    ],\r\n    \"multinomial\": false\r\n}","options":{"raw":{"language":"json"}}},"url":"https://ai-api.tier2.tech:2053"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"request\": {\r\n        \"sequences\": [\r\n            \"What did the reddit user say after detonating a bomb inside a bank? 'Wow! This blew up! Thanks for the gold'\"\r\n        ],\r\n        \"candidate_labels\": [\r\n            \"funny\",\r\n            \"unfunny\"\r\n        ],\r\n        \"multi_class\": false\r\n    },\r\n    \"result\": [\r\n        [\r\n            \"funny\",\r\n            98.15\r\n        ],\r\n        [\r\n            \"unfunny\",\r\n            1.85\r\n        ]\r\n    ],\r\n    \"gpu_id\": 0,\r\n    \"pid\": 2304,\r\n    \"success\": true\r\n}"}],"_postman_id":"bfe6d537-5f92-4c62-8500-59196e540c42"},{"name":"too many markers","id":"19b502be-23ba-4f97-9ae2-be913c172bf5","protocolProfileBehavior":{"disabledSystemHeaders":{"user-agent":true},"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"input_text\": \"a new person is starting at the office today and we need to get them a laptop asap\",\r\n    \"markers\": [\r\n        \"employee termination\",\r\n        \"new hire\",\r\n        \"password reset request\",\r\n        \"computer purchase\",\r\n        \"broken printer\",\r\n        \"website work\",\r\n        \"site down emergency\",\r\n        \"network port installation\",\r\n        \"Microsoft office license purchase\",\r\n        \"can't open document\",\r\n        \"can't open app\",\r\n        \"Internet connectivity problem\",\r\n        \"frozen application\",\r\n        \"software update\",\r\n        \"new software install\",\r\n        \"phone problem\",\r\n        \"fax problem\",\r\n        \"broken scanner\",\r\n        \"PC peripheral problem\",\r\n        \"new account setup\",\r\n        \"one too many\"\r\n    ],\r\n    \"multinomial\": true\r\n}","options":{"raw":{"language":"json"}}},"url":"https://ai-api.tier2.tech:2053","description":"<p>Here is a request with too many markers (21)</p>\n","urlObject":{"protocol":"https","port":"2053","host":["ai-api","tier2","tech"],"query":[],"variable":[]}},"response":[{"id":"538216e3-c81a-4c8e-b38f-c539511549e2","name":"https://ai-api.tier2.tech:2053","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"input_text\": \"a new person is starting at the office today and we need to get them a laptop asap\",\r\n    \"markers\": [\r\n        \"employee termination\",\r\n        \"new hire\",\r\n        \"password reset request\",\r\n        \"computer purchase\",\r\n        \"broken printer\",\r\n        \"website work\",\r\n        \"site down emergency\",\r\n        \"network port installation\",\r\n        \"Microsoft office license purchase\",\r\n        \"can't open document\",\r\n        \"can't open app\",\r\n        \"Internet connectivity problem\",\r\n        \"frozen application\",\r\n        \"software update\",\r\n        \"new software install\",\r\n        \"phone problem\",\r\n        \"fax problem\",\r\n        \"broken scanner\",\r\n        \"PC peripheral problem\",\r\n        \"new account setup\",\r\n        \"one too many\"\r\n    ],\r\n    \"multinomial\": true\r\n}","options":{"raw":{"language":"json"}}},"url":"https://ai-api.tier2.tech:2053"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"success\": false,\r\n    \"result\": \"ValueError: markers field must not contain more than 20 elements\",\r\n    \"request\": \"{\\r\\n    \\\"input_text\\\": \\\"a new person is starting at the office today and we need to get them a laptop asap\\\",\\r\\n    \\\"markers\\\": [\\r\\n        \\\"employee termination\\\",\\r\\n        \\\"new hire\\\",\\r\\n        \\\"password reset request\\\",\\r\\n        \\\"computer purchase\\\",\\r\\n        \\\"broken printer\\\",\\r\\n        \\\"website work\\\",\\r\\n        \\\"site down emergency\\\",\\r\\n        \\\"network port installation\\\",\\r\\n        \\\"Microsoft office license purchase\\\",\\r\\n        \\\"can't open document\\\",\\r\\n        \\\"can't open app\\\",\\r\\n        \\\"Internet connectivity problem\\\",\\r\\n        \\\"frozen application\\\",\\r\\n        \\\"software update\\\",\\r\\n        \\\"new software install\\\",\\r\\n        \\\"phone problem\\\",\\r\\n        \\\"fax problem\\\",\\r\\n        \\\"broken scanner\\\",\\r\\n        \\\"PC peripheral problem\\\",\\r\\n        \\\"new account setup\\\",\\r\\n        \\\"one too many\\\"\\r\\n    ],\\r\\n    \\\"multinomial\\\": true\\r\\n}\"\r\n}"}],"_postman_id":"19b502be-23ba-4f97-9ae2-be913c172bf5"},{"name":"input_text too long","id":"fbd649ab-2163-422c-8f86-953f8b5311e2","protocolProfileBehavior":{"disabledSystemHeaders":{"user-agent":true},"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"input_text\": \"All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy.\",\r\n    \"markers\": [\r\n        \"employee termination\",\r\n        \"new hire\",\r\n        \"password reset request\",\r\n        \"computer purchase\",\r\n        \"broken printer\",\r\n        \"website work\",\r\n        \"site down emergency\",\r\n        \"network port installation\",\r\n        \"Microsoft office license purchase\",\r\n        \"can't open document\",\r\n        \"can't open app\",\r\n        \"Internet connectivity problem\",\r\n        \"frozen application\",\r\n        \"software update\",\r\n        \"new software install\",\r\n        \"phone problem\",\r\n        \"fax problem\",\r\n        \"broken scanner\",\r\n        \"PC peripheral problem\",\r\n        \"new account setup\"\r\n    ],\r\n    \"multinomial\": true\r\n}","options":{"raw":{"language":"json"}}},"url":"https://ai-api.tier2.tech:2053","description":"<p>Here is a request with slightly too long of an input_text.</p>\n","urlObject":{"protocol":"https","port":"2053","host":["ai-api","tier2","tech"],"query":[],"variable":[]}},"response":[{"id":"d1d48663-eba8-41e4-9a69-c3cb5aa186c8","name":"https://ai-api.tier2.tech:2053","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"input_text\": \"All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy.\",\r\n    \"markers\": [\r\n        \"employee termination\",\r\n        \"new hire\",\r\n        \"password reset request\",\r\n        \"computer purchase\",\r\n        \"broken printer\",\r\n        \"website work\",\r\n        \"site down emergency\",\r\n        \"network port installation\",\r\n        \"Microsoft office license purchase\",\r\n        \"can't open document\",\r\n        \"can't open app\",\r\n        \"Internet connectivity problem\",\r\n        \"frozen application\",\r\n        \"software update\",\r\n        \"new software install\",\r\n        \"phone problem\",\r\n        \"fax problem\",\r\n        \"broken scanner\",\r\n        \"PC peripheral problem\",\r\n        \"new account setup\"\r\n    ],\r\n    \"multinomial\": true\r\n}","options":{"raw":{"language":"json"}}},"url":"https://ai-api.tier2.tech:2053"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"success\": false,\r\n    \"result\": \"ValueError: input_text must be no more than 320 characters\",\r\n    \"request\": \"{\\r\\n    \\\"input_text\\\": \\\"All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy. All work and no play makes jack a dull boy.\\\",\\r\\n    \\\"markers\\\": [\\r\\n        \\\"employee termination\\\",\\r\\n        \\\"new hire\\\",\\r\\n        \\\"password reset request\\\",\\r\\n        \\\"computer purchase\\\",\\r\\n        \\\"broken printer\\\",\\r\\n        \\\"website work\\\",\\r\\n        \\\"site down emergency\\\",\\r\\n        \\\"network port installation\\\",\\r\\n        \\\"Microsoft office license purchase\\\",\\r\\n        \\\"can't open document\\\",\\r\\n        \\\"can't open app\\\",\\r\\n        \\\"Internet connectivity problem\\\",\\r\\n        \\\"frozen application\\\",\\r\\n        \\\"software update\\\",\\r\\n        \\\"new software install\\\",\\r\\n        \\\"phone problem\\\",\\r\\n        \\\"fax problem\\\",\\r\\n        \\\"broken scanner\\\",\\r\\n        \\\"PC peripheral problem\\\",\\r\\n        \\\"new account setup\\\"\\r\\n    ],\\r\\n    \\\"multinomial\\\": true\\r\\n}\"\r\n}"}],"_postman_id":"fbd649ab-2163-422c-8f86-953f8b5311e2"}]}