Self-Portrait
imageimage/self-portraitOne photo of a person becomes a studio shoot: their real face, restyled into a new scene, wardrobe and light.
Their photo
One prompt laterThis is not a clone and it does not train anything. You send one photograph and a description of the look you want; the render keeps the person's real face and rebuilds everything around it. Because it produces a likeness, the Terms of Use require that you have the person's permission.
Billed per image. $0.05 flat, and every image comes back at 4K. Live rate from GET /v3/pricing.
A complete call
Restyle one photograph into a cinematic studio portrait.
1Upload the photograph
POST /v3/files/upload returns a file id. One photo is enough.
curl -X POST "https://api.neurall.io/v3/files/upload" \
-H "Authorization: nl-YOUR_API_KEY" \
-F "files=@portrait.jpg"It answers with the file ids
{
"files": [
{
"id": "f_9c21e0b4",
"originalName": "portrait.jpg",
"size": 734112
}
]
}2Submit the render
POST /v3/generations with the file id from step 1 in args.image. This produces a likeness of a real person: under the Terms of Use you must have their permission.
curl -X POST "https://api.neurall.io/v3/generations" \
-H "Authorization: nl-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"feature": "image/self-portrait",
"args": {
"image": "f_9c21e0b4",
"prompt": "Cinematic studio portrait, charcoal wool coat, moody side light against a deep grey backdrop, shallow depth of field, composed and confident.",
"expression": "default",
"aspectRatio": "3:4"
}
}'It answers immediately
{
"generation": {
"id": "4b7e…",
"feature": "image/self-portrait",
"kind": "image",
"status": "pending"
}
}3Poll until it lands
Poll GET /v3/generations/{id}, or pass webhookUrl on submit and skip polling.
# repeat every 2s or so until status is done, error or timeout
curl "https://api.neurall.io/v3/generations/9f2c1d84-6a3b-4f21-9c77-2f0a1b8e5d43" \
-H "Authorization: nl-YOUR_API_KEY"Once status is done
{
"generation": {
"status": "done",
"output": {
"image": "https://cdn.neurall.io/…/image.png",
"mime": "image/png"
}
}
}output holds the finished asset on a signed CDN URL. Download it rather than hotlinking: API-created outputs expire 24 hours after the request.
Arguments
imagestringrequired- Exactly one entry: the photograph of the person. A file id from POST /v3/files/upload.
- PNG, JPEG, WebP, GIF, HEIC or AVIF, up to 30 MB and 30 megapixels per file, 10 files per upload request.
- An uploaded file is deleted 24 hours after it lands, so upload again for a later render rather than caching an id.
- Exactly one image. Two or more is a 400: this feature restyles one person.
- A clear, well-lit face works best. The render keeps whatever the photo actually shows.
args.imageThe person- Do not name them in the prompt at all. Write only the scene you want them in; the render already has the face and is instructed to keep it.
promptstringrequired- The look: scene, wardrobe, lighting, mood. Style only. Every fidelity clause (keep the real face, the framing rules) is appended server-side, so you never write them.
- Describe the scene, never the person. Describing their features invites the render to change them.
expressionstringdefaults to 'default'- The face they pull: default, happy, shocked, sad, angry, excited, nervous. default keeps their natural expression.
aspectRatio'W:H'defaults to '1:1'- Any ratio you like, written as width:height.
- Between 1:3 and 3:1. Outside that range is a 400.
How the prompt refers to this
Never describe the person's features, age or build. The prompt is read as direction for everything except them.
Output
Once status is done, the generation carries an output object with these fields. On any other status, output is absent.
imagestring- The finished portrait, as a URL. Every image comes back at 4K.
- A signed URL that expires 24 hours after the request (expiresAt on the generation). Download the file rather than hotlinking it.
mimestring- The image's MIME type, e.g. image/png.
Limits and failure
- Images
- Exactly one, 30 MB and 30 megapixels max, deleted 24 hours after upload.
- Aspect ratio
- Any W:H between 1:3 and 3:1.
- Likeness
- You must have the person's permission; the Terms of Use cover it, there is nothing to send.
- Render time
- A generation that has not finished in 15 minutes is marked timeout and refunded.
- Concurrency
- Your plan caps how many generations run at once. Over it the API answers 429 with a Retry-After header; wait that many seconds rather than retrying immediately.
- Output lifetime
- API-created outputs expire 24 hours after the request (expiresAt on the generation). Download the file rather than hotlinking it.
- Deletion
- DELETE /v3/generations/{id} removes the generation and its rendered assets immediately, rather than waiting for the 24 hour expiry. It does not refund anything and cannot cancel a render already in flight.
- Failure
- A failed or timed-out generation is refunded automatically.
Worth knowing
- The face is preserved, not invented: this is an edit of the photograph you send, which is why one photo is enough and why no training step exists.
- A refusal (rare, and usually a false positive on clothing or context) comes back as an error status, and is refunded like any other failure.