AI ID Photo Generation API
POSThttps://api.acedata.cloud/headshots/generate
Generate AI ID photos from templates and portraits.
Request Headers
acceptstring
Specify the response format returned by the server.
Please select
authorizationstring
Bearer token
Request Body
modestringRequired parameter
The speed mode for generating ID photos is set to `fast` (quick) by default. Optional values: `fast` (quick), `relax` (slow).
templatestringRequired parameter
Style templates for ID photos. Choose the target template from the available enumeration values, such as `male_portrait`, `female_portrait`, `business_photo`, etc., to generate the corresponding style of ID photo.
image_urlsarrayRequired parameter
URL link or base64 encoded string (in array form) of the portrait image.
callback_urlstring
Webhook callback URL for asynchronous notifications.
asyncboolean
Whether to process in asynchronous mode. When set to `true`, the interface immediately returns `task_id`, without the need to provide `callback_url`, and then the result can be obtained by polling the corresponding task query interface; if `callback_url` is also provided, the result will be pushed to that callback address.
Please select
Response
AI ID Photo Production
Allow Use General Balance
When 'Allow General Balance' is enabled, the general balance is used automatically if an app's balance is insufficient.
Kind reminder: For streaming requests, the above code may not be fully applicable. Please refer to the integration documentation for changes.
