API Reference

Allows users to securely upload images (either as a source or target).

Log in to see full request history

Curl Request

curl --location 'https://staging.cypherface.com/api/upload/generate-url/' \
--header 'authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjeXBoZXJGYWNlSWQiOiI2N2I0ODhkOGI0Yjk1YjM5M2ZiZGZmNzQiLCJ4QXBpS2V5IjoiY2JmZTBiYWYtZGI2NS00NDYzLWJhZWMtYTk4NjMzYTEzZWY3IiwiaWF0IjoxNzQwNjY0NjI5LCJleHAiOjE3NDA4Mzc0Mjl9.UL6hwXTNlVcB5lLT-pt5SehK6BnvOHGPj50KuUBYR-4' \
--header 'Content-Type: application/json' \
--header 'Cookie: connect.sid=s%3AyoqwqQtJPuetxSVZLt9_3cikxJ6eSZO-.RDMRaaGKPjP%2F7f6E1pJeiOCPXiu61fEP8J8PwHvgW%2BY' \
--data '{
    "userId":"6789fb11e94adea011383478",
    "imageName":"amitabh (2).jpg",
    "contentType":"image/jpeg",
    "type":"upload"
}'

Process

  1. Validate the user's authorization token and input parameters (imageName, `contentType`, type).
  2. If the type is upload, check if a source image already exists for the user
    • If not, generate a Generate URL and return the URL.
    • If an image exists, check if it has been processed. If not, update the record and provide a new upload URL.
  3. If the type is match, generate a Generate URL.
Body Params
string
required
Defaults to profile.jpg

Name of the image to upload.

string
required

MIME type of the image.

string
required

Either upload or match.

string
required
Headers
string
required

Bearer token for user auth.

Responses

Language
Credentials
:
Click Try It! to start a request and see the response here! Or choose an example:
application/json