{"openapi":"3.0.0","info":{"title":"snapWONDERS OpenAPI Specification","description":"All the snapWONDERS API services is available over the Clearnet / **Web** and\nDark Web **Tor** and **I2P** ( [read more](https://snapwonders.com/browsing-safely) )\n\nCurrent offerings:\n * **Analyse:** Deep media analysis on images, photos and videos ( [read more](https://snapwonders.com/analyse-media-overview) )\n * **Hide:** Hide and conceal images, photos and videos. **Coming soon!** ( [read more](https://snapwonders.com/hide-media-overview) )\n * **Reveal:** Reveal and show hidden images, photos and videos. **Coming soon!** ( [read more](https://snapwonders.com/hide-media-overview) )\n\n---\n**Contact:** [snapWONDERS.com/contact](https://snapwonders.com/contact)\n/ [swonderstzr43aczpcwdoyc25vwxngyromja7pyb5sf26ap3v535sxqd.onion/contact](http://swonderstzr43aczpcwdoyc25vwxngyromja7pyb5sf26ap3v535sxqd.onion/contact)\n/ [snapWONDERS.i2p/contact](http://snapwonders.i2p/contact)\n\n**Home:** [snapWONDERS.com](https://snapwonders.com)\n/ [swonderstzr43aczpcwdoyc25vwxngyromja7pyb5sf26ap3v535sxqd.onion](http://swonderstzr43aczpcwdoyc25vwxngyromja7pyb5sf26ap3v535sxqd.onion)\n/ [snapWONDERS.i2p](http://snapwonders.i2p)","termsOfService":"https://snapwonders.com/terms-of-service","contact":{"name":"snapWONDERS support","url":"https://snapwonders.com/contact"},"version":"1.0"},"servers":[{"url":"https://api.snapwonders.com/","description":"OAS over Clearnet / Web"},{"url":"http://swonderstzr43aczpcwdoyc25vwxngyromja7pyb5sf26ap3v535sxqd.onion/api/","description":"OAS over Dark Web / Tor"},{"url":"http://snapwonders.i2p/api/","description":"OAS over Dark Web / I2P"},{"url":"http://6ymp5jqysizmejdwaqiehcsgjoyb4s7sbgssquishk66drujomka.b32.i2p/api/","description":"OAS over Dark Web / I2P (full address)"}],"paths":{"/v1/job/analyse":{"post":{"tags":["Jobs"],"summary":"Create a deep media analysis job request","operationId":"analyse","requestBody":{"description":"Start an analyse job request","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAnalyse"}}}},"responses":{"200":{"description":"Returns the location of the *job-url* to use for obtaining the job status","headers":{"Location":{"description":"The *job-url* to use for obtaining the job status and results","schema":{"type":"string"}}}},"401":{"description":"Unauthorised access possibly because your API key token is invalid. Response body contains the error message details"},"422":{"description":"Invalid inputs. Response body contains the error message details"},"500":{"description":"All other status codes *4XX* and *5XX* is an error. Response body contains the error message details"}},"security":[{"api_key":[]}]}},"/v1/job/status/{key}":{"post":{"tags":["Jobs"],"summary":"Status of the job and result-url when available","operationId":"status","parameters":[{"name":"key","in":"path","description":"The key contained within the *job-url*","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the job status or results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatus"}}}},"401":{"description":"Unauthorised access possibly because your API key token is invalid. Response body contains the error message details"},"422":{"description":"Invalid inputs. Response body contains the error message details"},"500":{"description":"All other status codes *4XX* and *5XX* is an error. Response body contains the error message details"}},"security":[{"api_key":[]}]}},"/v1/job/result/{key}":{"get":{"tags":["Jobs"],"summary":"Access the job results","operationId":"result","parameters":[{"name":"key","in":"path","description":"The key contained within the *result-url* returned via the Job Status API call","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the job results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResult"}}}},"401":{"description":"Unauthorised access possibly because your API key token is invalid. Response body contains the error message details"},"422":{"description":"Invalid inputs. Response body contains the error message details"},"500":{"description":"All other status codes *4XX* and *5XX* is an error. Response body contains the error message details"}},"security":[{"api_key":[]}]}},"/v1/upload/create-media-url":{"post":{"tags":["Upload"],"summary":"Create upload media-url to be used with the resumable APIs","operationId":"createMediaUrl","requestBody":{"description":"You must provide the file metadata that will be uploaded. This includes the file\nname and file size (in bytes)","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileMetadata"}}}},"responses":{"201":{"description":"Returns the location of the *media-url* to use for resumable uploading","headers":{"Location":{"description":"The *media-url* to use with the resumable uploading APIs","schema":{"type":"string"}},"Upload-Expires":{"description":"The expiry for the *media-url*","schema":{"type":"string"}},"Tus-Resumable":{"description":"The version of the Tus protocol being used","schema":{"type":"string"}}}},"401":{"description":"Unauthorised access possibly because your API key token is invalid. Response body contains the error message details"},"422":{"description":"Invalid inputs. Response body contains the error message details"},"500":{"description":"All other status codes *4XX* and *5XX* is an error. Response body contains the error message details"}},"security":[{"api_key":[]}]}},"/v1/upload/resumable/{key}":{"delete":{"tags":["Upload"],"summary":"Deletes a resumable upload media-url if it is not already deleted or expired","operationId":"resumableDelete","parameters":[{"name":"key","in":"path","description":"The key contained within the *media-url*","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Unlinked the *media-url*"},"401":{"description":"Unauthorised access possibly because your API key token is invalid. Response body contains the error message details"},"404":{"description":"Invalid or deleted *media-url*. Response body contains the error message details"},"410":{"description":"Invalid or deleted *media-url*. Response body contains the error message details"},"422":{"description":"Invalid, expired or deleted *media-url*. Response body contains the error message details"},"500":{"description":"All other status codes *4XX* and *5XX* is an error. Response body contains the error message details"}},"security":[{"api_key":[]}]},"head":{"tags":["Upload"],"summary":"Obtain the current upload offset position in which the file uploading should resume from","operationId":"resumableHead","parameters":[{"name":"key","in":"path","description":"The key contained within the *media-url*","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the *upload offset* position in which the uploading should resume from","headers":{"Upload-Offset":{"description":"The *file offset* position in which you should continue to resume reading file data from.\nSuccessful file upload occurs when file offset matches your total file size","schema":{"type":"integer"}},"Upload-Expires":{"description":"The expiry for the *media-url*","schema":{"type":"string"}},"Tus-Resumable":{"description":"The version of the Tus protocol being used","schema":{"type":"string"}}}},"401":{"description":"Unauthorised access possibly because your API key token is invalid. Response body contains the error message details"},"422":{"description":"Invalid, expired or deleted *media-url*. Response body contains the error message details"},"500":{"description":"All other status codes *4XX* and *5XX* is an error. Response body contains the error message details"}},"security":[{"api_key":[]}]},"patch":{"tags":["Upload"],"summary":"Upload the next chunk of file data which is appended from the current offset position.\nDo not upload file data chunks of more than 5MB in size. This allows you to resume from errornous file uploads\nand continue from the last known successful patch upload","operationId":"resumablePatch","parameters":[{"name":"key","in":"path","description":"The key contained within the *media-url*","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"required":["offset","file"],"properties":{"offset":{"description":"The offset position in which the file data chunk starts from. Start at ZERO\nand upload each chunk. Increment the offset position after each successful chunk upload","format":"int64","example":"4000000"},"file":{"description":"Select your photo, image or video","type":"file","format":"binary"}},"type":"object"}}}},"responses":{"200":{"description":"Returns the *upload offset* position in which the uploading should resume from\nfor the next chunked file data. You will need to keep repeating this until the entire file has been uploaded","headers":{"Upload-Offset":{"description":"The *file offset* position in which you should continue to resume reading\nfile data from","schema":{"type":"integer"}},"Upload-Expires":{"description":"The expiry for the *media-url*","schema":{"type":"string"}},"Tus-Resumable":{"description":"The version of the Tus protocol being used","schema":{"type":"string"}}}},"204":{"description":"Uploading file was successfully completed","headers":{"Upload-Offset":{"description":"The *file offset* position in which you should continue to resume reading\nfile data from","schema":{"type":"integer"}},"Upload-Expires":{"description":"The expiry for the *media-url*","schema":{"type":"string"}},"Tus-Resumable":{"description":"The version of the Tus protocol being used","schema":{"type":"string"}}}},"401":{"description":"Unauthorised access possibly because your API key token is invalid. Response body contains the error message details"},"422":{"description":"Invalid, expired or deleted *media-url*. Response body contains the error message details"},"500":{"description":"All other status codes *4XX* and *5XX* is an error. Response body contains the error message details"}},"security":[{"api_key":[]}]}}},"components":{"schemas":{"FileMetadata":{"description":"The metadata information for the file being uploaded","required":["name","size"],"properties":{"name":{"description":"The file name","type":"string","format":"string","example":"DSC20210723.jpg"},"size":{"description":"The size of the file being uploaded in bytes","type":"integer","format":"int64","example":"123000"}},"type":"object"},"JobAnalyse":{"description":"The Analyse preferences","required":["key","enableTips","enableExtraAnalysis"],"properties":{"key":{"description":"The key contained within the *media-url*","type":"string","example":"f21383da03-7feefc-64e1b8d6a2803"},"enableTips":{"description":"Enable extra tips where available","type":"boolean"},"enableExtraAnalysis":{"description":"Enable extra deep anlaysis where available","type":"boolean"}},"type":"object"},"JobResult":{"description":"The job results","required":["key","results"],"properties":{"key":{"description":"The key contained within the *result-url*","type":"string","example":"b000383da03-7feefc-64e1b8d6a2809"},"results":{"description":"The results in JSON form","type":"object"}},"type":"object"},"JobStatus":{"description":"The job status and result-url","required":["key","status","message","resultUrl"],"properties":{"key":{"description":"The key contained within the *job-url*","type":"string","example":"a000383da03-7feefc-64e1b8d6a2803"},"status":{"description":"Displays the job status","type":"string","example":"PROCESSING"},"message":{"description":"Displays message information regarding the job status (if any)","type":"string","example":"Please wait..."},"resultUrl":{"description":"When the job is successfully completed, this will contain a URL to the results in JSON form","type":"string","example":""}},"type":"object"}},"securitySchemes":{"api_key":{"type":"apiKey","name":"api_key","in":"header"}}},"tags":[{"name":"Upload","description":"Upload files to snapWONDERS by using the **media-url** reference that was created when calling the\nAPI *upload/create-media-url*. Uploading files is based on the Tus protocol [tus.io](https://tus.io/)\n1. Create the upload media url by calling the API *upload/create-media-url*\n2. Upload a data chunk by calling the API *PATCH upload/resumable/{key}* with the correct data offset position\n3. Confirm successful upload of data chunk by calling the API *HEAD upload/resumable/{key}*\n4. Repeat Steps 2 to 3 until each data chunk has been successfully uploaded until the entire media has been uploaded"},{"name":"Jobs","description":"The snapWONDERs offerings are initiated by creating Job requests. Use the API\n*jobs/status* with the **job-key** reference to track the job status. Once the Job status indicates\njob completion you can then use the API *jobs/results*  with the **result-key** to download the results.\nCurrent offerings:\n* **Analyse:** Use the API *jobs/analyse* to for deep media Analysis on images, photos and videos\n* **Hide:** Use the API *jobs/hide* to hide and conceal media. **Coming soon!**\n* **Reveal:** Use the API *jobs/reveal* to reveal and show hidden media. **Coming soon!**"}]}