Generate portraits using PeelAPI’s models
cURL
curl --request POST \ --url https://api.peelapi.com/v1/portraits \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form model_id=portrait-1-pro \ --form 'character_image=<string>' \ --form style_id=123 \ --form 'style_image=<string>' \ --form aspect_ratio=1:1 \ --form number_of_images=1 \ --form 'clothing_instructions=<string>' \ --form character_image.0='@example-file' \ --form style_image.0='@example-file'
{ "data": { "job_id": "job_123", "links": { "self": "/v1/jobs/job_123", "stream": "/v1/jobs/job_123/stream" } }, "errors": "<unknown>" }
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
portrait-1-pro
portrait-1-mini
9:16
2:3
3:4
1:1
4:3
3:2
16:9
1 <= x <= 4
Job accepted
Show child attributes
"job_123"
"/v1/jobs/job_123"
"/v1/jobs/job_123/stream"