Generate Avatar
Avatar API
Generate Avatar
Create a new AI avatar from a text prompt
POST
Generate Avatar
Endpoint
Request Body
Text description of the desired avatar. Be specific about appearance, style, setting, and mood.Example:
"cyberpunk warrior, neon lights, futuristic city, dramatic lighting"AI model to use for generation.Options:
flux- Fast, 2 credits (standard quality)imagen3- High quality, 5 creditsreality4- Ultra realistic, 5 credits
Elements to avoid in the generation.Example:
"blurry, low quality, distorted, extra limbs"Output image aspect ratio.Options:
1:1, 16:9, 9:16, 4:3, 3:4How closely to follow the prompt (7-15 recommended).Range: 1-20. Higher values = stricter adherence
Random seed for reproducible results. Use same seed with same prompt for identical output.Range: 0 to 2147483647
Number of variations to generate simultaneously.Range: 1-4. Each variation costs credits.
Apply a predefined style template.Options:
professional, anime, fantasy, cyberpunk, renaissance, realisticResponse
Unique avatar identifier
Current generation status:
queued, processing, completed, failedThe prompt used for generation
AI model used
Full resolution image URL (available when status = completed)
Thumbnail image URL (available when status = completed)
Image width in pixels
Image height in pixels
Credits deducted for this generation
ISO 8601 timestamp of creation
Example Request
Example Response
Processing (Immediate Response)
Completed (After Polling)
Error Responses
Insufficient Credits
Invalid Prompt
Rate Limited
Polling for Completion
After initiating generation, poll the avatar status endpoint:Batch Generation
Generate multiple variations in parallel:Best Practices
Cost Optimization:
- Start with
fluxmodel (2 credits) for iteration - Switch to premium models once prompt is refined
- Use seeds to reproduce good results without regenerating
- Batch similar prompts together for efficiency
Related Endpoints
- Get Avatar - Check generation status
- List Avatars - View all your avatars
- Publish Avatar - Share to community
Authorizations
Your Percify API token
Body
application/json
Text description of the avatar to generate
Example:
"Professional headshot of a young entrepreneur, confident smile, modern office background, warm lighting"
AI model to use for generation
Available options:
flux, imagen3, reality4 Output image aspect ratio
Available options:
1:1, 16:9, 9:16, 4:3, 3:4 Elements to avoid in the generation
Seed for reproducible results
Response
Avatar generated successfully
Unique avatar identifier
URL to the generated avatar image
Prompt used for generation
AI model used
Generation status
Available options:
processing, completed, failed Credits consumed for this generation