الانتقال إلى المحتوى الرئيسي
POST
/
headshots
/
generate
Generate
curl --request POST \
  --url https://api.acedata.cloud/headshots/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "mode": "fast",
  "template": "male_portrait",
  "image_urls": [
    "<string>"
  ],
  "callback_url": "<string>"
}
'
{
  "data": [
    {
      "id": "202410231117",
      "template": "男形象照",
      "image_url": "https://static.aipedias.com/aicamera/...."
    },
    {
      "id": "2024102311170",
      "template": "男形象照",
      "image_url": "https://static.aipedias.com/aicamera/...."
    }
  ],
  "success": true,
  "task_id": "5636d6ba-957f-475e-a98a-718a07ee89a6"
}

التفويضات

Authorization
string
header
مطلوب

الترويسات

accept
enum<string>

Specifies the format of the response from the server.

الخيارات المتاحة:
application/json

الجسم

application/json
mode
enum<string>
افتراضي:fast
مطلوب

The channel speed for generating ID photos is fast by default.

الخيارات المتاحة:
fast,
relax
template
enum<string>
مطلوب

The style of the Headshot. Use 'generate' for the first time and templates values for subsequent styles, and you can specify specific template to perform on the generated Headshots.

الخيارات المتاحة:
male_portrait,
male_portrait2,
kindergarten,
logo_tshirt,
wedding,
business_photo,
bob_suit,
female_portrait
image_urls
string[]
مطلوب

A link to a portrait image or base64 encoding.

callback_url
string

Webhook callback URL for asynchronous notifications.

الاستجابة

Headshots generated successfully or operation performed successfully.

data
array

The detail of the generated headshots.

success
boolean

Indicates if the task was successful executed.

task_id
string

The ID of the imagine task.