Generate Photo Avatar Images
POST
https://api.konpro.ai/v1/photo_avatar/photo/generateEasily create personalized AI avatar images based on your photo inputs by specifying various appearance and style parameters.
Request History
Log in to see full request history
| TIME | STATUS | USER AGENT |
|---|---|---|
| Make a request to see history. | ||
0 Requests This Month
cURL Request
shell
curl --request POST \
--url https://api.konpro.ai/v1/photo_avatar/photo/generate \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '{
"name": "John Doe",
"age": "Young Adult",
"gender": "Man",
"ethnicity": "East Asian",
"orientation": "square",
"pose": "close_up",
"style": "Realistic",
"appearance": "A confident young man with short black hair and brown eyes",
"callback_url": "https://example.com/callback",
"callback_id": "avatarGen123"
}'Request Body Parameters
| Field | Type | Description |
|---|---|---|
| name | string | Name assigned to the generated avatar |
| age | string | Age group classification. Allowed values: Young Adult, Early Middle Age, Late Middle Age, Senior, Unspecified |
| gender | string | Gender classification. Allowed values: Woman, Man, Unspecified |
| ethnicity | string | Ethnic category. Examples: White, Black, Asian American, East Asian, South East Asian, South Asian, Middle Eastern, Pacific, Hispanic, Unspecified |
| orientation | string | Image orientation. Allowed values: square, horizontal, vertical |
| pose | string | Avatar pose choice. Options: half_body, close_up, full_body |
| style | string | Artistic style of the avatar image. Options: Realistic, Pixar, Cinematic, Vintage, Noir, Cyberpunk, Unspecified |
| appearance | string | Detailed textual description or prompt of the avatar's appearance (max 1000 characters) |
| callback_url | string | URL to receive a notification when avatar generation is complete |
| callback_id | string | Custom identifier for callback tracking |
Response
Response Structure
Returns confirmation and job ID for avatar generation. Errors returned if parameters are invalid or generation fails.
Sample Successful Response
json
{
"job_id": "job_123456",
"status": "processing",
"message": "Avatar generation started successfully"
}Notes
- Requires API authentication.
- Avatar generation is asynchronous and may take several minutes to complete.
- Use callback_url to receive notifications when generation is complete.
- All appearance parameters are optional but recommended for better results.
- Refer to Error Responses for error information.
Example Usage
Shell
curl --request POST \
--url https://api.konpro.ai/v1/photo_avatar/photo/generate \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '{
"name": "John Doe",
"age": "Young Adult",
"gender": "Man",
"ethnicity": "East Asian",
"orientation": "square",
"pose": "close_up",
"style": "Realistic",
"appearance": "A confident young man with short black hair and brown eyes",
"callback_url": "https://example.com/callback",
"callback_id": "avatarGen123"
}'LANGUAGE
CREDENTIALS
HEADER
RESPONSE
Examples
Choose an example:
application/json
200 - Success
400 - Bad Request
LANGUAGE
CREDENTIALS
HEADER
RESPONSE
Examples
Choose an example:
application/json
200 - Success
400 - Bad Request