Reference
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
format |
string | no | image (JPEG), png, base64 or json. Default: image. |
size |
integer | no | Square resize in pixels; 0 keeps the native crop. Default: 0. |
quality |
integer | no | JPEG quality 0 to 100. Default: 85. |
Example request
curl -s "https://api2.globus.studio/v2/facefake?format=json&size=512"
A face generator API returns a portrait of a person who does not exist. The image is synthetic: no model was photographed, no consent was collected and no real person can be identified from it.
That property makes it useful for design mockups and demo data, and dangerous for anything that implies a real human. The endpoint is a tool, and the rules for using a synthetic face sit with the caller.
What the face generator API returns
By default the face generator API returns a JPEG image, ready to save or show in a browser.
curl -s "https://api2.globus.studio/v2/facefake?size=512" --output face.jpg
Four formats are available through format on the face generator API:
imagereturns a JPEG, the default;pngreturns a PNG;base64andjsonreturn a data URI inside a JSON object, which is convenient when the client cannot handle a binary response.
{
"success": true,
"image": "data:image/jpeg;base64,...",
"size": 512,
"type": "image/jpeg"
}
quality sets the JPEG quality from 0 to 100, with 85 as the default. size scales the cropped face to a square of that many pixels. Leave size at 0 to keep the native crop.
Why the faces look familiar anyway
The face generator API draws on a generative model that was trained on photographs of real people. The output is new, and the statistics of faces are inherited from that training data. This is the same trade-off every synthetic portrait service makes.
Two practical consequences follow. First, a generated face can resemble a real person by chance, so do not attach a name, a biography or a quote to it. Second, the image is not a photograph of anyone, and it should never be presented as one.
Where synthetic portraits help
Design and QA are the honest uses:
- fill an avatar slot while the design is in progress;
- build a test fixture for a user list or a customer dashboard;
- illustrate an article about privacy or synthetic media, with a caption that says the image is generated;
- populate a demo environment that ships to a client without personal data.
All four cases share a property: nobody is expected to believe the person exists.
Where they cause harm
A synthetic portrait becomes a problem the moment it is used as evidence of a person. Fake testimonials, invented team members on a landing page, accounts behind a review farm and identity documents are the obvious cases. The legal exposure differs by country, and the reputational exposure does not: when the image is exposed as synthetic, every claim next to it loses weight.
Do not use the face generator API to create images of a specific real person. The generator does not take a reference photo, and any attempt to push it toward a named individual turns a design tool into a deepfake tool.
If a dataset of faces is published, label it as synthetic. A caption and a metadata field cost nothing and prevent a long argument later.
Failures and limits
The portraits come from an upstream image provider, and that dependency is the main source of errors. When the provider is slow or refuses the request, the endpoint returns a JSON error with {"error": true, "message": "Failed to fetch image"} and no image. A client should treat that as a temporary failure and retry later, not as a broken key.
Generation is heavier than a lookup, so the endpoint sits in the rate-limited group together with the other heavy routes. A 429 carries Retry-After.
Cache what you generate. A portrait does not need to be requested again for every page view, and a local copy costs nothing. The flip side matters too: the same call returns a different face each time, so keep the file you used if a mockup must stay stable.
Using the image in a page
Set width and height attributes on the img tag, and write an alt that describes a placeholder rather than a person. “Portrait placeholder” is honest. “Photo of Anna, our accountant” is a claim the image cannot support.
<img src="/media/face-512.jpg" alt="Portrait placeholder" width="512" height="512">
Related endpoints
For a plain grey rectangle with exact dimensions, the image placeholder API is lighter than a face generator API call and always available. For a link or a short string as a scannable image, use the QR generator.
Build a small library you can defend
A mockup rarely needs a hundred faces. Generate a handful of synthetic faces, save them with a note that says where they came from and that the person does not exist, and reuse them across demos. A folder of five labelled portraits is easier to audit than a cache of five hundred, and the note answers the question a client will ask. When an image leaves the project, the note travels with it: a caption, a field in the media library or a line in the README. That record costs a minute and prevents the argument that starts when a synthetic portrait is mistaken for a real colleague.
Further reading: Content Authenticity Initiative on labelling synthetic media.