Unlock the potential of AI-driven face generation with Face Studio's simple REST API. Seamlessly integrate Face Studio's capabilities into your applications or streamline your workflow through automation. Use the Quick Start guide below, or browse the full API reference at your convenience:
The Face Studio API is hosted on facestud.io and currently has a single GET endpoint located at /v1/generate
. For testing purposes, you can access the API without authentication, but the request is heavily throttled. Here's an example request using the curl tool:
$curl https://facestud.io/v1/generate -o face.jpeg
This saves the image as a file named face.jpeg
at the current working directory.
For authenticated access, please create an API key.
Please go to My API Keys to create and manage your API keys.
To request an API key, please log in or register.
Once you have an API key, you can authenticate requests using the standard HTTP Token Authorization scheme by including your token in the Authorization header. For example, to make an authenticated request, use the following curl
command:
$curl -H "Authorization: Token your_api_key_here" https://facestud.io/v1/generate -o face.jpeg
For examples in Python and other languages, check out Examples in Python, PHP, C#, Java. To view rate limits, please see Throttle and Rate Limits.
Here are Basic parameters that you can include in your request:
- gender: male, female
- age: 0—80
- ethnicity: european, african, west_asian, south_asian, east_asian, southeast_asian, latin_american
- format: jpeg, webp
- resolution: 128—1024
Parameters can be omitted, in which case, the value will be randomly chosen for your convenience. In other words, a parameterless request returns a completely random face! For seed value and other parameters, take a look at Advanced Parameters.
The following examples have HTTP authentication omitted for brevity. To generate a male face of European appearance at age 25, use this curl
command:
$curl "https://facestud.io/v1/generate?gender=male&age=25ðnicity=european" -o face.jpeg
To generate a face of African appearance of any gender and age that is saved in 512×512 webp format, use this curl
command:
$curl "https://facestud.io/v1/generate?ethnicity=african&format=webp&resolution=512" -o face.webp
For more concrete and practical examples, take a look at A List of Practical Examples. Feel free to experiment with the API and see the results!
If you prefer using RapidAPI.com, we also offer our API service through them. For more information, visit Face Studio @ RapidAPI.