
Profile Picture Maker API
Turn any photo into a polished profile picture: remove the background, add a colour, gradient or pattern backdrop, crop to a circle and add a ring.
All API requests require a valid API key passed in the Authorization header as a Bearer token.
10 requests per minute
1 endpoint available
Overview
Turns one photo into a square profile picture PNG. By default an AI model (BiRefNet) removes the photo's background and the subject is placed on a new backdrop: a gradient, solid colour, pattern, the original background, or transparency. The picture is framed as a circle, rounded square or square (outside the shape is transparent), with an optional outline or glow around the subject, a ring around the frame and a drop shadow. It uses the same renderer as the web page.
Framing
zoom1 means the photo just covers the frame. It can go down to 0.5 when the background is removed and replaced; otherwise the minimum is 1. The maximum is 5.offsetXandoffsetYmove the photo's centre from the frame's centre, in frame widths (0.1 = 10% of the frame). They are clamped so the photo never leaves a gap at the frame's edge.- Leave all three out for the page's starting view: centred, with tall photos nudged down so the upper part (where a face usually is) stays in frame.
- With
removeBackground=false, the backdrop and outline settings have no effect and the photo fills the frame.
Limits and behavior
- Send the photo as multipart/form-data in the
filefield: JPEG, PNG, WebP, GIF (first frame), AVIF or TIFF, up to 20 MB. HEIC is not supported. Photos are worked on at up to 2048 px on the long edge. - This endpoint can call a paid AI model, so it always uses the AI tier: 10 requests a minute and 200 a day per API key, even with
removeBackground=false. - Booleans are the strings
trueorfalse. Colours are hex,#rgbor#rrggbb. - Photos and results are not stored. The response body is the PNG itself; errors are JSON.
Endpoints
https://opentools.ca/api/v1/tools/profile-picture-makerRequest Body
Content-Type: multipart/form-data
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | file | Required | The photo. JPEG, PNG, WebP, GIF, AVIF or TIFF, up to 20 MB. |
| removeBackground | boolean | Optional | Remove the photo background with AI and use the backdrop instead.Default: true |
| size | number Enum: 400, 800, 1024 | Optional | Width and height of the PNG in pixels.Default: 1024 |
| shape | string Enum: circle, rounded, square | Optional | Frame shape. Outside a circle or rounded square is transparent.Default: circle |
| backdrop | string Enum: gradient, solid, pattern, original, transparent | Optional | What goes behind the subject when the background is removed.Default: gradient |
| colour | string | Optional | Backdrop colour for backdrop=solid.Default: #ffffff |
| gradientFrom | string | Optional | Start colour for backdrop=gradient.Default: #f8fafc |
| gradientTo | string | Optional | End colour for backdrop=gradient.Default: #cbd5e1 |
| gradientAngle | number | Optional | Gradient angle in degrees, 0-360, as in CSS (0 points up, 90 points right).Default: 180 |
| pattern | string Enum: dots, stripes, sunburst, grid | Optional | Pattern for backdrop=pattern.Default: dots |
| patternBase | string | Optional | Pattern background colour. Defaults to the page preset for the pattern (dots #f1f5f9, stripes #dbeafe, sunburst #fdba74, grid #f8fafc). |
| patternInk | string | Optional | Pattern colour. Defaults to the page preset (dots #cbd5e1, stripes #bfdbfe, sunburst #fb923c, grid #cbd5e1). |
| outline | string Enum: none, outline, glow | Optional | Sticker-style outline or soft glow around the cut-out subject.Default: none |
| outlineColour | string | Optional | Outline or glow colour.Default: #ffffff |
| outlineSize | number | Optional | Outline or glow size as a fraction of the picture width, 0.005-0.04.Default: 0.015 |
| ringWidth | number | Optional | Ring around the frame as a fraction of the picture width, 0-0.08. 0 means no ring.Default: 0 |
| ringColour | string | Optional | Ring colour.Default: #ffffff |
| shadow | boolean | Optional | Soft drop shadow under the subject.Default: false |
| zoom | number | Optional | Photo zoom, 0.5-5 (1 = just covers the frame). See Framing. |
| offsetX | number | Optional | Horizontal offset of the photo centre, in frame widths. See Framing. |
| offsetY | number | Optional | Vertical offset of the photo centre, in frame widths. See Framing. |
Response Example
The body is the picture (Content-Type: image/png), sent as an attachment named "<photo name>-profile-<size>.png". Errors return JSON, for example:
{
"success": false,
"error": "Invalid request.",
"details": [
{
"field": "shape",
"message": "Invalid enum value. Expected 'circle' | 'rounded' | 'square', received 'oval'"
}
]
}Error Codes
Code Examples
curl -X POST https://opentools.ca/api/v1/tools/profile-picture-maker \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@me.jpg" \
-F "backdrop=solid" \
-F "colour=#0a66c2" \
-F "ringWidth=0.02" \
-F "size=800" \
-o me-profile.pngRather use it in your browser? Open the Profile Picture Maker