{"info":{"_postman_id":"d7d90fef-b63b-4d44-96d0-a0eb025cc958","name":"Hive API Documentation","description":"<html><head></head><body><p>These are Hive's api endpoints</p>\n<p>Contact Support:\n Email: <a href=\"mailto:support@thehive.ai\">support@thehive.ai</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"10761036","collectionId":"d7d90fef-b63b-4d44-96d0-a0eb025cc958","publishedId":"SzmZcLbX","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-05-02T01:41:55.000Z"},"item":[{"name":"v1/task","item":[{"name":"Task Summary","id":"f75f4633-79b3-43db-be36-d6a6673502ec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"https://api.thehive.ai/api/v1/task?task_id=<uuid>&frame_limit=<integer>&frame_offset=<integer>","description":"<p>Calling this synchronous endpoint with a specified task_id returns the API result response object for completed tasks, or an in-progress message if the task is still in progress.</p>\n","urlObject":{"path":["v1","task"],"host":["https://api.thehive.ai/api"],"query":[{"description":{"content":"<p>(Required) Unique ID of the task.</p>\n","type":"text/plain"},"key":"task_id","value":"<uuid>"},{"description":{"content":"<p>Only applicable for long video/audio projects. By default we only return results for 200 frames from the video starting at frame_offset.</p>\n","type":"text/plain"},"key":"frame_limit","value":"<integer>"},{"description":{"content":"<p>Only applicable for long video/audio projects. By default we return frames starting from the first (0) frame up to frame_limit.</p>\n","type":"text/plain"},"key":"frame_offset","value":"<integer>"}],"variable":[]}},"response":[{"id":"7dcb844f-7bff-49e9-b7e0-461d2b783242","name":"OK","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://api.thehive.ai/api/v1/task?task_id=<uuid>&frame_limit=<integer>&frame_offset=<integer>","host":["https://api.thehive.ai/api"],"path":["v1","task"],"query":[{"key":"task_id","value":"<uuid>"},{"key":"frame_limit","value":"<integer>"},{"key":"frame_offset","value":"<integer>"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"project_id\": \"<integer>\",\n \"task_id\": \"<uuid>\",\n \"state\": \"<string>\",\n \"created_on\": \"<datetime>\",\n \"completed_on\": \"<datetime>\",\n \"image_url\": \"<url>\",\n \"original_filename\": \"<string>\",\n \"task_units\": \"<integer>\",\n \"base_customer_charge\": \"<float>\",\n \"total_customer_charge\": \"<float>\",\n \"status\": [\n  {\n   \"status\": {\n    \"code\": \"<string>\",\n    \"message\": \"<string>\"\n   },\n   \"response\": {\n    \"input\": {\n     \"id\": \"<uuid>\",\n     \"charge\": \"<float>\",\n     \"model\": \"<string>\",\n     \"model_version\": \"<integer>\",\n     \"model_type\": \"<string>\",\n     \"created_on\": \"<datetime>\",\n     \"media\": {\n      \"type\": \"<string>\",\n      \"mimetype\": \"<string>\",\n      \"duration\": \"<number>\",\n      \"width\": \"<number>\",\n      \"height\": \"<number>\"\n     },\n     \"user_id\": \"<number>\",\n     \"project_id\": \"<integer>\"\n    },\n    \"output\": [\n     {\n      \"time\": \"<float>\",\n      \"classes\": [\n       {\n        \"class\": \"<string>\",\n        \"score\": \"<float>\"\n       },\n       {\n        \"class\": \"<string>\",\n        \"score\": \"<float>\"\n       }\n      ]\n     },\n     {\n      \"time\": \"<float>\",\n      \"classes\": [\n       {\n        \"class\": \"<string>\",\n        \"score\": \"<float>\"\n       },\n       {\n        \"class\": \"<string>\",\n        \"score\": \"<float>\"\n       }\n      ]\n     }\n    ]\n   }\n  },\n  {\n   \"status\": {\n    \"code\": \"<string>\",\n    \"message\": \"<string>\"\n   },\n   \"response\": {\n    \"input\": {\n     \"id\": \"<uuid>\",\n     \"charge\": \"<float>\",\n     \"model\": \"<string>\",\n     \"model_version\": \"<integer>\",\n     \"model_type\": \"<string>\",\n     \"created_on\": \"<datetime>\",\n     \"media\": {\n      \"type\": \"<string>\",\n      \"mimetype\": \"<string>\",\n      \"duration\": \"<number>\",\n      \"width\": \"<number>\",\n      \"height\": \"<number>\"\n     },\n     \"user_id\": \"<number>\",\n     \"project_id\": \"<integer>\"\n    },\n    \"output\": [\n     {\n      \"time\": \"<float>\",\n      \"classes\": [\n       {\n        \"class\": \"<string>\",\n        \"score\": \"<float>\"\n       },\n       {\n        \"class\": \"<string>\",\n        \"score\": \"<float>\"\n       }\n      ]\n     },\n     {\n      \"time\": \"<float>\",\n      \"classes\": [\n       {\n        \"class\": \"<string>\",\n        \"score\": \"<float>\"\n       },\n       {\n        \"class\": \"<string>\",\n        \"score\": \"<float>\"\n       }\n      ]\n     }\n    ]\n   }\n  }\n ]\n}"}],"_postman_id":"f75f4633-79b3-43db-be36-d6a6673502ec"},{"name":"Asynchronously Hit Our Platform","id":"2be5da45-4c70-4eb8-8a9f-af887a757e82","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Authorization","value":"","description":"<p>Please enter \"Token {api_token}\". Api tokens exist per project. You can obtain your project's api token on the project dashboard.</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"image\": \"<binary>\",\n    \"callback_url\": \"<string>\",\n    \"metadata\": \"<string>\"\n}"},"url":"https://api.thehive.ai/api/v1/task/async","description":"<p>The asynchronous endpoint is preferred for users who are submitting large volumes in batches as well as tasks containing large files (i.e. longer videos or audio clips).</p>\n<p>  The asynchronous endpoint immediately sends a response acknowledging receipt of the task, along with a unique ‘task_id’. It then closes the connection. Once the task is completed, Hive will send a POST request to the provided callback_url containing the completed task’s results.</p>\n<p>  Appropriate for both Model Only and Model + Manual Review projects.</p>\n","urlObject":{"path":["v1","task","async"],"host":["https://api.thehive.ai/api"],"query":[],"variable":[]}},"response":[{"id":"4fc64763-09a5-4249-bd40-a268cd6c2218","name":"Success! We have accepted your task into our system. The 'id' provided in the response is known as a task_id and will allow you to reference the task in our systems. ","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"image_url\": \"https://d24edro6ichpbm.thehive.ai/demo_static_media/brands/brands_6.jpg\",\n    \"callback_url\": \"https://mycallback.com/server\",\n    \"metadata\": \"id-000000\"\n}"},"url":"https://api.thehive.ai/api/v1/task/async"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"id\": \"<uuid>\",\n \"message\": \"<string>\"\n}"},{"id":"cb9fec6b-4407-4a93-8cf6-cb76ae5b4deb","name":"Invalid input","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"image_url\": \"https://d24edro6ichpbm.thehive.ai/demo_static_media/brands/brands_6.jpg\",\n    \"callback_url\": \"https://mycallback.com/server\",\n    \"metadata\": \"id-000000\"\n}"},"url":"https://api.thehive.ai/api/v1/task/async"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"return_code\": \"<integer>\",\n \"message\": \"<string>\"\n}"}],"_postman_id":"2be5da45-4c70-4eb8-8a9f-af887a757e82"},{"name":"Trigger a Callback for a Completed Task","id":"1e93aa7b-370f-4dd1-9aad-34fd5aa3b9f0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Authorization","value":"","description":"<p>Please enter \"Token {api_token}\". Api tokens exist per project. You can obtain your project's api token on the project dashboard.</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"task_id\": \"<uuid>\",\n    \"url_override\": \"<string>\",\n    \"metadata_override\": \"<string>\"\n}"},"url":"https://api.thehive.ai/api/v1/task/callback","description":"<p>Hitting this endpoint will send a callback from our servers to the callback url if the task is completed.</p>\n","urlObject":{"path":["v1","task","callback"],"host":["https://api.thehive.ai/api"],"query":[],"variable":[]}},"response":[{"id":"18f7efeb-3314-4856-9736-a132b405f964","name":"task_id could not be found","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"task_id\": \"<uuid>\",\n    \"url_override\": \"<string>\",\n    \"metadata_override\": \"<string>\"\n}"},"url":"https://api.thehive.ai/api/v1/task/callback"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"return_code\": \"<integer>\",\n \"message\": \"<string>\"\n}"},{"id":"944ebd60-9e6a-4da1-9b38-432762efc9b7","name":"callback could not be sent","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"task_id\": \"<uuid>\",\n    \"url_override\": \"<string>\",\n    \"metadata_override\": \"<string>\"\n}"},"url":"https://api.thehive.ai/api/v1/task/callback"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"return_code\": \"<integer>\",\n \"message\": \"<string>\"\n}"},{"id":"9fdfedd4-fdf7-473c-9de4-de5ad134048e","name":"Success! We will be sending the callback shortly.","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"task_id\": \"<uuid>\",\n    \"url_override\": \"<string>\",\n    \"metadata_override\": \"<string>\"\n}"},"url":"https://api.thehive.ai/api/v1/task/callback"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"message\": \"<string>\"\n}"}],"_postman_id":"1e93aa7b-370f-4dd1-9aad-34fd5aa3b9f0"},{"name":"Synchronously Hit Our Platform","id":"9227ee1b-fc14-4bf8-82b4-6a6df996c1f5","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"connection":true,"accept-encoding":true,"accept":true,"user-agent":true}},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Authorization","value":"Token vQfabNBbSnZxGKrYZoFqRyQL6K3RUtlt","description":"<p>Please enter \"Token {api_token}\". Api tokens exist per project. You can obtain your project's api token on the project dashboard.</p>\n"}],"body":{"mode":"formdata","formdata":[{"key":"image","type":"file","src":"/Users/richardli/Downloads/image.png"}]},"url":"https://api.thehive.ai/api/v2/task/sync","description":"<p>A synchronous endpoint is preferred for users who have real-time needs, low latency requirements, and are submitting continuous / cyclical requests.</p>\n<p>  The synchronous endpoint keeps the HTTP request open until results have finished processing and then sends the results directly in the response message.</p>\n<p>  Appropriate for Model Only projects.</p>\n","urlObject":{"path":["v2","task","sync"],"host":["https://api.thehive.ai/api"],"query":[],"variable":[]}},"response":[{"id":"45ae7d94-8d6d-461d-bc9e-0cd631ad9b1e","name":"Success!","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"image_url\": \"https://d24edro6ichpbm.thehive.ai/demo_static_media/brands/brands_6.jpg\"\n}"},"url":"https://api.thehive.ai/api/v2/task/sync"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"id\": \"<uuid>\",\n \"project_id\": \"<integer>\",\n \"status\": [\n  {\n   \"status\": {\n    \"code\": \"<string>\",\n    \"message\": \"<string>\"\n   },\n   \"response\": {\n    \"input\": {\n     \"id\": \"<uuid>\",\n     \"charge\": \"<float>\",\n     \"model\": \"<string>\",\n     \"model_version\": \"<integer>\",\n     \"model_type\": \"<string>\",\n     \"created_on\": \"<datetime>\",\n     \"media\": {\n      \"type\": \"<string>\",\n      \"mimetype\": \"<string>\",\n      \"duration\": \"<number>\",\n      \"width\": \"<number>\",\n      \"height\": \"<number>\"\n     },\n     \"user_id\": \"<number>\",\n     \"project_id\": \"<integer>\"\n    },\n    \"output\": [\n     {\n      \"time\": \"<float>\",\n      \"classes\": [\n       {\n        \"class\": \"<string>\",\n        \"score\": \"<float>\"\n       },\n       {\n        \"class\": \"<string>\",\n        \"score\": \"<float>\"\n       }\n      ]\n     },\n     {\n      \"time\": \"<float>\",\n      \"classes\": [\n       {\n        \"class\": \"<string>\",\n        \"score\": \"<float>\"\n       },\n       {\n        \"class\": \"<string>\",\n        \"score\": \"<float>\"\n       }\n      ]\n     }\n    ]\n   }\n  },\n  {\n   \"status\": {\n    \"code\": \"<string>\",\n    \"message\": \"<string>\"\n   },\n   \"response\": {\n    \"input\": {\n     \"id\": \"<uuid>\",\n     \"charge\": \"<float>\",\n     \"model\": \"<string>\",\n     \"model_version\": \"<integer>\",\n     \"model_type\": \"<string>\",\n     \"created_on\": \"<datetime>\",\n     \"media\": {\n      \"type\": \"<string>\",\n      \"mimetype\": \"<string>\",\n      \"duration\": \"<number>\",\n      \"width\": \"<number>\",\n      \"height\": \"<number>\"\n     },\n     \"user_id\": \"<number>\",\n     \"project_id\": \"<integer>\"\n    },\n    \"output\": [\n     {\n      \"time\": \"<float>\",\n      \"classes\": [\n       {\n        \"class\": \"<string>\",\n        \"score\": \"<float>\"\n       },\n       {\n        \"class\": \"<string>\",\n        \"score\": \"<float>\"\n       }\n      ]\n     },\n     {\n      \"time\": \"<float>\",\n      \"classes\": [\n       {\n        \"class\": \"<string>\",\n        \"score\": \"<float>\"\n       },\n       {\n        \"class\": \"<string>\",\n        \"score\": \"<float>\"\n       }\n      ]\n     }\n    ]\n   }\n  }\n ],\n \"error\": \"<string>\",\n \"from_cache\": \"<boolean>\",\n \"metadata\": \"<string>\",\n \"code\": \"<integer>\",\n \"user_id\": \"<integer>\",\n \"created_on\": \"<dateTime>\"\n}"},{"id":"64232033-f146-43cf-8c8d-8f6807a23451","name":"Invalid input","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"image_url\": \"https://d24edro6ichpbm.thehive.ai/demo_static_media/brands/brands_6.jpg\"\n}"},"url":"https://api.thehive.ai/api/v2/task/sync"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"return_code\": \"<integer>\",\n \"message\": \"<string>\"\n}"}],"_postman_id":"9227ee1b-fc14-4bf8-82b4-6a6df996c1f5"}],"id":"2e230db9-df5d-41b5-b0b0-2e2611cdda90","_postman_id":"2e230db9-df5d-41b5-b0b0-2e2611cdda90","description":""},{"name":"customer","item":[{"name":"Get Custom Text Classes","event":[{"listen":"test","script":{"id":"358c9325-bf69-4077-a5ae-f26986ab8994","exec":[""],"type":"text/javascript"}}],"id":"4e7a3a94-ae71-4cd6-856c-94ae09ab04c5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://cust-stg.thehive.ai/api/project/:project_id/custom_text_class","urlObject":{"path":["api","project",":project_id","custom_text_class"],"host":["https://cust-stg.thehive.ai"],"query":[],"variable":[{"type":"string","value":"272306","key":"project_id"}]}},"response":[],"_postman_id":"4e7a3a94-ae71-4cd6-856c-94ae09ab04c5"}],"id":"bdfac28f-f03c-4767-bfd2-7d560878f364","description":"<p>Customer Endpoints</p>\n","_postman_id":"bdfac28f-f03c-4767-bfd2-7d560878f364"}],"event":[{"listen":"prerequest","script":{"id":"7f1724f4-40b1-453e-ada1-c9c491500cbf","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"2307a554-f115-47b9-ae02-7aa1f5b540e4","type":"text/javascript","exec":[""]}}],"variable":[{"key":"baseUrl","value":"https://api.thehive.ai/api"},{"key":"stagingCustomerUrl","value":"https://cust-stg.thehive.ai"}]}