Edit — transform existing photos
The/edit endpoint takes one or more input images and a text prompt, then produces a transformed version. When you
reference a profile, the person’s identity is preserved even through dramatic transformations.
When to use it: adding or removing people from group shots, adjusting camera angle or lighting, restyling scenes
and backgrounds, creating seasonal or themed variations - anything where the edit needs to look like the real person.
How profiles help: pass the user’s profile IDs in
profile_ids so the API knows which identities to preserve. The
API matches the people in the input photo to the provided profiles automatically. You can also use [[profile_id]] in
the prompt to reference a specific person explicitly, e.g. "Make [[abc123]] smile wider".
Example request body:
Generate — create new images from scratch
The/generate endpoint creates images from a text prompt alone — no input image is needed. When you reference a
profile, the generated person looks exactly like the actual person (or pet).
When to use it: professional headshots, holiday cards and family portraits, profile pictures in any setting or style,
couple and group photos where everyone doesn’t need to be in the same room — any scenario where you need a photo-realistic image of specific people.
How profiles help: the generated person matches the trained profile’s appearance — face shape, features, hair, and
skin tone are all preserved. Reference profiles directly in the prompt with
[[profile_id]] syntax.
Example request body:
The
/generate endpoint does not accept images or profile_ids. Reference profiles in the prompt with
[[profile_id]] syntax instead. If you need to transform an existing photo, use /edit.Enhance — automatic quality improvement
The/enhance endpoint improves a photo automatically — no text prompt, no parameters to tune. Unlike most AI image
services, Phota infers all enhancement parameters on its own: lighting, sharpness, color balance, and overall quality.
When to use it: photos taken in poor lighting, blurry or noisy images, photos with compression artifacts — any photo where quality fell short.
How profiles help: when profile IDs are provided, enhancement preserves and can improve the rendering of known faces
in the photo.
Example request body:
Next steps
Profiles guide
Learn how to create and manage profiles for identity preservation.
Quickstart
Walk through the full workflow with code examples.
API reference
Explore the full endpoint documentation.















