AI profile picture generator from a photo

Turn one photo into a square profile picture with Sume's image API: send the photo as a reference, ask for a 1:1 result, then optionally cut out the background.

5 min readSume
All posts

To make a profile picture from a photo with Sume, send the photo as an image reference on POST /v1/images, describe the picture you want, and ask for a square result with aspect_ratio: "1:1". The photo goes in input_references as a public HTTPS URL. Whether a given model keeps a face recognisable is not something Sume's docs promise, so judge the result by eye before you use it.

Everything below is from Image models, read 2026-09-29. For the wider headshot question see AI headshot generator.

What does the request look like?

The reference goes in the input_references array as an image_url object. The documented example uses openai/gpt-image-2; read GET /v1/images/models for the models and ratios your key can use.

curl -X POST https://api.sume.com/v1/images \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-image-2",
    "prompt": "clean studio profile picture of the person in this photo, shoulders up, soft daylight, plain light-gray backdrop",
    "aspect_ratio": "1:1",
    "input_references": [
      {"type": "image_url",
       "image_url": {"url": "https://example.com/photo.jpg"}}
    ]
  }'

Which rules apply to the source photo?

A profile picture is usually square, so ask for 1:1 explicitly. Use auto only when you want the result to keep the photo's own shape. Read supported_parameters for your model first, because a model only accepts the values its catalog lists.

From Image models, read 2026-09-29.
RuleWhat the docs say
Where the photo livesReference URLs must be public HTTPS; localhost, private-network, and non-HTTPS URLs are rejected before submission
Reference supportModels whose input_references descriptor is {"min": 0, "max": 0} are text-to-image only and reject references
Square outputaspect_ratio accepts 1:1 among its normalized ratios
Matching the photoOn edit calls prefer aspect_ratio: "auto" to match the reference; omitting the field is not the same as auto

What if I want a transparent background?

For a transparent PNG, use the background remover, which is the documented cutout step: send its URL to POST /v1/rmbg-1.0/remove and you get a PNG with alpha. Copy the generated file first, since result URLs from /v1/images are signed. The step is described in Remove background API.

Background removal is $0.0225 per image on API pricing, plus a 5.5% agent fee by default. Image generation is priced per model in the catalog, so read the price for your model there.

How do I get the picture back?

POST /v1/images waits up to 30 seconds and returns the result if it is ready. Otherwise you get a 202 job envelope and poll the job. Copy the file to your own storage when it finishes.

  • Reference photo must be reachable without a login; a private share link will fail.
  • One request can ask for several images with n, up to 10, but each model has a lower ceiling in the catalog.
  • Do not rely on negative_prompt; the request schema has no such field, so say what you want in the prompt instead.
  • For the general reference-photo workflow, see Image to image AI.

Sources

Related posts

More in Use cases

All Use cases posts

Written by Sume