Jump to content

FaceHub API


Welcome to the FaceHub API Reference. If you're new to FaceHub, create an account and follow this guide to get started.

Endpoints

All calls to the API need to start with the appropriate base URL:

GET or POST https://facehub.net/api

For Enterprise accounts with their own endpoint, please contact your account manager for more information.

Authentication

To access the API, you need to get the API Key. It is issued free of charge after consideration of the application. To submit a request, please fill out this short form.

Models Endpoint

GET https://facehub.net/api/data/models


Get information on the models using filter by parameters

Name Type Description
key string Authorization API key
perPage int Models per page
sortDir string asc — ascending, desc — descending
agency_id int ID of agency that the model belongs to
gender int 0 — female, 1 — male
height int Required height (in centimeters) of models
bust int Required bust (in centimeters) of models
waist int Required waist (in centimeters) of models
hips int Required hips (in centimeters) of models
shoes int Required shoes size of models
eyes string Required eye color
hair string Required hair color

Agencies Endpoint

GET https://facehub.net/api/data/agencies


Get information on agencies using filter by parameters

Name Type Description
key string Authorization API key
perPage int Agencies per page
page int Current page number
sortDir string asc — ascending, desc — descending
title string Required title of agency
type int 1 — for get only mother agency
genders int 0 — only female, 1 — only make
language string Required work language
male_count int Required number of male models
female_count int Required number of female models

Reviews Endpoint

GET https://facehub.net/api/data/reviews


Get list of reviews

Name Type Description
key string Authorization API key
perPage int Agencies per page
page int Current page number
sortDir string asc — ascending, desc — descending
agency_id string Required title of agency
author string Agent or model
type string neutral, positive, negative

Scoring by AI Endpoint

POST https://facehub.net/api/data/tools/scoring


Get model scoring by photo

Name Type Description
key string Authorization API key
images[] file Up to 3 image files (.png or .jpg)

Similar Search Endpoint

POST https://facehub.net/api/data/tools/similar


Get similar model by photo

Name Type Description
key string Authorization API key
images[] file 1 image file (.png or .jpg)

Errors

Code Description
1S290/A The IP address that is sending the request has been banned from the community. This may happen automatically if the IP Address has repeatedly sent many requests with invalid API keys.
1S290/D The IP address that is sending the request has sent multiple requests with an invalid API key and so is prevented from sending any more requests for several minutes.
2S290/6 No API key or OAuth access token was sent in the request.
2S290/8 The API key was valid, but is configured to only be valid for requests coming from certain IP addresses and IP address the request was sent from is not in the allowed list.
2S290/B The API key was valid, but it is not configured to be used as URL authentication and must be used in AUTHORIZATION headers.
3S290/7 The API key was valid, but it is not configured to be used as URL authentication and must be used in AUTHORIZATION headers.
2S290/9 The API key sent in the request is not valid.
3S290/3 An X-IPS-Language header was sent in the request (which can be used to specify a language ID for the response), but its value was not valid.
3S290/4 The endpoint the request was sent to does not exist (the first level contains an invalid character, only alphanumerics are acceptable).
2S290/1 The endpoint the request was sent to does not exist (the first level contains an invalid character, only alphanumerics are acceptable).
2S291/1 The endpoint the request was sent to does not exist (the URL contains too many levels).
2S291/3 The API key does not have permission to access the requested endpoint.
3S291/2 The endpoint the request was sent to does not exist - the HTTP request method may be incorrect (for example, sending a GET rather than a POST).
3S290/9 The OAuth access token sent in the request is not valid.
1S290/E The OAuth access token sent in the request was valid but has expired.
3S290/B The OAuth access token has not been authorised to access any scopes.

Conventions

These are principles that describe how all API methods work.

  • Trailing slashes are ignored: /transmissions is equivalent to /transmissions/.
  • URL paths, query parameter names and field names are case sensitive.
  • URL paths use lower case, with dashes separating words.
  • Query parameters and JSON fields use lower case.
  • The HTTP status indicates whether an operation failed or succeeded.
  • All APIs return standard HTTP error code formats.
  • Unexpected query parameters and request body fields are ignored.
  • Our JSON number type is bounded to a signed 32-bit integer.
×