v1

latestOpenAPI 3.0.02026-07-248574216.0 KB
Avatar

Instant Avatar

This is a simplified version of the avatar service which requires only one image and one request to generate the avatar. The process is asynchronous and will require an additional call to get the result. See below for more details.

post/avatars/instant

Request body

imagesstring[] required

The list of images to generate the avatars for. There should be at least one image URL provided. It's required to use either JPG (recommended) or PNG images, as well as for the best performance all files are recommended to be downsized to 512x512 pixels.

promptstring required

The prompt.

negative_promptstring

The negative prompt (don’t generate this type of avatars). Don't use the nagitve keywords such as 'no', e.g. don't use 'no distorted faces', use 'distorted faces'. The usage of this negative prompt is not guaranteed.

countnumber

The number of avatars to generate.

Example request

{
  "prompt": "Black and white photo of a woman styled in a vintage fashion reminiscent of the 1940s. \n She has a classic hairstyle with curls and waves, and she's wearing a fur stole and a dark, elegant dress, vintage or retro fashion. \n She is wearing a wide-brimmed hat adorned with what looks like feathers, a pearl necklace, and a fur stole. \n Her hairstyle is also reminiscent of the 1940s, with curls and waves monochrome,  black and white. The woman is looking directly at the camera with a slight smile, and her expression is one of elegance and confidence. \n The background is blurred, in indoor with Old style bookshelf in background. \n The overall style of the image suggests it could be from a film or a photoshoot designed to evoke a classic or glamorous era.\n",
  "negative_prompt": "extra fingers, extra arms, extra hands, ugly, tiling, poorly drawn hands, poorly drawn face, poorly drawn feet, out of frame, extra limbs, extra leg, disfigured, deformed, body out of frame, \n blurry, bad anatomy, blurred, watermark, text, grainy, signature, cut off, draft, cutoff head, ugly teeth, ugly mouth, mutant face, mutant hand, mutant arm, nudity, NSFW, gun, weapon, drone, \n bikini, naked, (lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, cartoony, cartoon, green, blue, \n colors, colorful, vivid, sepia, noir, open chest,  open bust, open torso\n"
}

Response

Accepted.

status'processing' | 'error' | 'success'

The status of the submitted request. Pay attention to handle these properly:

  • processing
  • error
  • success

For instance, if the images submitted are reported as not valid, then you may not expect to get the inference results. You will need to fix the images and then resubmit.

inference_idstring

The unique identifier of this inference.

Example response

{
  "inference_id": "1116b57cb-1999-4bfd-8c42-c739a006a111"
}