Ai Smile Filter API guide
Ai Smile Filter API: Add a smile effect to faces in a portrait or group photo. Supply the image to edit.
Model overview
Add a smile effect to faces in a portrait or group photo. Supply the image to edit.
API integration
| Documentation | Value |
|---|---|
| API invocation identifier | ai-smile-filter |
| Integration | Async task API |
Use this invocation identifier in API requests. Check your authorized model catalog for access. Follow the Quickstart for your first complete call.
Request parameters
Studio presets describe the form setup, not guaranteed server defaults. Send preset values explicitly to reproduce them.
The URL of the input image.
Media types: image/*.
No parameters match. Clear the search or reset the filters.
Model rules
Reference media
- Clear front-facing portraits with good lighting are recommended; obscured faces and extreme angles can reduce quality.
Model behavior
- On a group photo, the effect applies to visible faces rather than a selectable individual face.
Request examples
Replace example media URLs and YOUR_... input identifiers with your own valid resources. Examples are checked against the exported item schema; media access and paid execution are separate runtime checks.
Set MUSESPARK_API_KEY and a stable MUSESPARK_REQUEST_ID before submitting. Preserve the request ID for retries of the same request and use a new ID for new work. Python examples use requests; JavaScript examples use Node.js 20 or later. The standalone Quickstart includes task polling and recovery.
Add a smile to a portrait
curl --fail-with-body 'https://api.musespark.ai/api/v1/openapi/task' \
-H "Authorization: Bearer $MUSESPARK_API_KEY" \
-H "X-Idempotency-Key: $MUSESPARK_REQUEST_ID" \
-H 'Content-Type: application/json' \
-d '{
"item_key": "ai-smile-filter",
"parameters": {
"image": "https://example.com/adult-portrait.jpg"
}
}'Parameters used: image.
Output
The output is an edited image with a smile effect on visible faces.
Creation returns a task ID inside data. Poll that task until completion, then save data.result.output_urls and any data.result.batch_results. See the task lifecycle for terminal states, result retention, and errors.
Troubleshooting
More than one person receives the effect. The item has no face-index control. Use a portrait containing only the intended subject if you need a single-person edit.
For rejected inputs, check the field type, accepted values, and conditional requirements in Request parameters and Model rules. Correct the affected fields before submitting again.
If creation times out, preserve the request identity and any known task ID. Follow Errors, timeouts and retries before submitting again.
Related docs
The public input snapshot was exported on 2026-11-09. Current prices and availability are listed in the model center.