---
title: AI Avatar API — Generate Avatars from a Selfie | ModelsLab
description: AI avatar API: turn one selfie into styled avatars with a single POST to /api/v6/image_editing/face_gen. Hosted image URLs in seconds. Plans from $21/month.
url: https://modelslab.com/ai-avatar-api
canonical: https://modelslab.com/ai-avatar-api
type: website
component: Seo/AiAvatarApi
generated_at: 2026-09-16T12:06:19.386537Z
---

Imagen

AI Avatar API — Generate Avatars from a Selfie
---

Generate styled AI avatars from a single selfie with one POST request. Face identity stays, the style follows your prompt. Image plans from $21/month for 3,250 API calls.

[Get API Key — $21/Month](https://modelslab.com/register) [API Documentation](https://docs.modelslab.com)

What the AI Avatar API Does
---

### One Selfie In, a Styled Avatar Out

The AI avatar API takes a single face photo and a text prompt and returns an image that keeps the identity of the face while rendering it in the style you describe — a studio headshot, an anime character, a 3D render, a comic panel. There is no template library to browse and no multi-photo training step; the face is read from the reference image at request time.

It runs on the same REST API and the same key as the rest of the ModelsLab image catalogue, so an avatar can be upscaled, relit, animated or lip-synced by passing its URL to the next endpoint.

### What a Request Looks Like

POST https://modelslab.com/api/v6/image\_editing/face\_gen with `face\_image` set to the selfie URL and `prompt` describing the style. Optional fields cover `negative\_prompt`, `width`, `height`, `samples` (up to 2 per call), `seed` for reproducibility, a `style` preset (`realistic`, `anime`, `3d`, `comic`, `chibi`) and a `webhook` URL for async delivery.

- Face identity preserved from one reference photo
- Style controlled by prompt or the style preset
- Up to 2 samples per request, optional width and height
- Hosted image URLs in the response — no base64 handling
- Seed parameter for repeatable results
- Same key covers upscaling, relighting and video

AI Avatar API quick start
---

One POST to /api/v6/image\_editing/face\_gen with a selfie URL and a style prompt. Returns a hosted URL for the rendered avatar.

### Python — generate an avatar from a selfie

Python

```
<code>1import requests
2

3response = requests.post(
4    "https://modelslab.com/api/v6/image_editing/face_gen",
5    json={
6        "key": "YOUR_MODELSLAB_API_KEY",
7        "face_image": "https://example.com/selfie.jpg",
8        "prompt": "professional headshot, studio lighting, sharp focus",
9        "negative_prompt": "blurry, distorted, low quality",
10        "style": "realistic",
11        "width": 1024,
12        "height": 1024,
13        "samples": 1,
14    },
15)
16

17print(response.json()["output"][0])</code>
```

### JavaScript — anime avatar with a fixed seed

JavaScript

```
<code>1const response = await fetch(
2  'https://modelslab.com/api/v6/image_editing/face_gen',
3  {
4    method: 'POST',
5    headers: { 'Content-Type': 'application/json' },
6    body: JSON.stringify({
7      key: 'YOUR_MODELSLAB_API_KEY',
8      face_image: 'https://example.com/selfie.jpg',
9      prompt: 'anime avatar, cel shading, soft studio light',
10      style: 'anime',
11      seed: 42,
12      samples: 1,
13    }),
14  },
15);
16

17const data = await response.json();
18console.log(data.output[0]);</code>
```

### cURL — quick test from the terminal

bash

```
<code>1curl -X POST 'https://modelslab.com/api/v6/image_editing/face_gen' \
2  -H 'Content-Type: application/json' \
3  -d '{
4    "key": "YOUR_MODELSLAB_API_KEY",
5    "face_image": "https://example.com/selfie.jpg",
6    "prompt": "corporate portrait, neutral background",
7    "style": "realistic",
8    "samples": 1
9  }'</code>
```

Avatar Endpoints on the Same Key
---

face\_gen is the avatar endpoint. The neighbours below cover the steps before and after it.

| Endpoint | What it does | Typical use |
|---|---|---|
| POST /api/v6/image\_editing/face\_gen | Styled avatar from one selfie | Profile pictures, characters, headshots |
| POST /api/v6/image\_editing/head\_shot | Same endpoint, headshot-oriented alias | Corporate and team headshots |
| POST /api/v6/image\_editing/super\_resolution | Upscale the avatar | Print and large-format use |
| POST /api/v7/video-fusion/image-to-video | Animate the avatar | Intro clips, social loops |
| POST /api/v7/video-fusion/lip-sync | Make the avatar speak an audio track | Talking-head explainers |

Every endpoint accepts and returns hosted image URLs, so the output of one is the input of the next.

Ship Avatars in 3 Steps
---

From API key to a styled avatar in one request.

STEP 01

STEP 01

### Step 1: Get Your API Key

Create a ModelsLab account, subscribe to an image plan from $21/month for 3,250 API calls, and copy your key from the dashboard.

STEP 02

STEP 02

### Step 2: Send the Selfie and a Style Prompt

POST to /api/v6/image\_editing/face\_gen with face\_image set to a hosted selfie URL and prompt describing the look. A straight-on, well-lit photo gives the most faithful identity.

STEP 03

STEP 03

### Step 3: Use, Upscale or Animate the Result

The response carries a hosted image URL. Serve it directly, upscale it with super\_resolution, or pass it to image-to-video or lip-sync to make the avatar move and speak.

[Get API Key ](https://modelslab.com/register)

Related image API guides
---

[### Image Editing API

Inpainting, object removal, background replacement and upscaling on the same key.](/image-editing-api) [### Image Generation API

10,000+ models for text-to-image and image-to-image at a flat $0.0047.](https://modelslab.com/image-generation-api) [### Lip Sync API

Make a generated avatar speak any audio track with matched mouth movement.](/lip-sync-api)

### Consistent Characters Across Many Images

face\_gen is the fastest route to one avatar from one photo. When a product needs the same character across dozens of scenes — a game, a brand mascot, a virtual presenter — train a LoRA on a small photo set instead and generate from that model with the text-to-image endpoint. Both paths run on the same plan and key; the difference is setup time against consistency.

### Pricing

Image plans start at $21/month for 3,250 API calls and $47/month for 10,000. Avatar generation on self-hosted models is one call per image and is covered by the plan. The $149/month Open Source Unlimited plan removes the per-call limit on the open-weight image models ModelsLab self-hosts. There is no separate avatar fee.

Why Developers Use the ModelsLab Avatar API
---

Key advantages that set us apart

One selfie in, styled avatar out — no training step

Face identity preserved, style set by prompt

Five style presets: realistic, anime, 3D, comic, chibi

Hosted image URLs back in seconds

Seed parameter for repeatable output

Chain to upscale, relight, animate or lip sync

Image plans from $21/month for 3,250 calls

One API key across image, video, speech and LLM

Our Popular Use Cases

What teams build with the AI avatar API:

Profile Pictures at Sign-UpGame and Community CharactersTeam HeadshotsVirtual PresentersMarketing PersonasCreator Tools

Offer a generated avatar during onboarding from the photo the user already uploaded. One request per style option.

![Profile Pictures at Sign-Up](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/0fbacb1a-6e34-4254-0a9d-5e75178cf200/768)

AI Avatar API FAQ
---


POST https://modelslab.com/api/v6/image\_editing/face\_gen with face\_image set to a selfie URL and prompt describing the style. The response carries a hosted URL for the avatar, or an id to fetch when the request is queued.


Image plans start at $21/month for 3,250 API calls and $47/month for 10,000. Avatar generation on self-hosted models costs one call per image and is covered by your plan.


Any style you can describe in the prompt, plus five presets: realistic, anime, 3D, comic and chibi. Face identity is kept from the reference selfie while the style follows the prompt.


No. face\_gen works from a single selfie. For a fixed character across many images, train a LoRA on a small photo set and generate avatars from that model instead.


ModelsLab is a paid service. Image plans start at $21/month for 3,250 API calls. Creating an account is free, but generating avatars requires an active plan.


Yes. Pass the avatar URL to /api/v7/video-fusion/image-to-video to animate it, or to /api/v7/video-fusion/lip-sync with an audio track to make it speak. All of it runs on the same API key.

Your Data is Secure: GDPR Compliant AI Services
---

![ModelsLab GDPR Compliance Certification Badge](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/28133112-07fe-4c1c-44eb-36948d51ae00/768)

AI Image API Pricing Starting at $0.0047 Per Image
---

ModelsLab offers subscription plans from $21/month (Basic) and $47/month (Standard, 10,000 API calls) to $149/month (Open Source Unlimited). All plans include access to Flux, SDXL, Stable Diffusion 3, and 10,000+ community models. Choose a paid plan, cancel anytime, 100% refund policy.

Coming Soon
---

We are making some changes to our pricing, please check back later.

Get Expert Support in Seconds

We're Here to Help.
---

Want to know more? You can email us anytime at <support@modelslab.com>

Chat with support[View Docs](https://docs.modelslab.com)


POST https://modelslab.com/api/v6/image_editing/face_gen with `face_image` set to a selfie URL and `prompt` describing the style. The response carries a hosted URL for the avatar, or an id to fetch when the request is queued.


Image plans start at $21/month for 3,250 API calls and $47/month for 10,000. Avatar generation on self-hosted models costs one call per image and is covered by your plan.


Any style you can describe in the prompt: realistic headshots, anime, 3D render, illustration, pixel art. Face identity is kept from the reference selfie while the style follows the prompt.


No. face_gen works from a single selfie. For a fixed character across many images, train a LoRA on a small photo set instead and generate avatars from that model.


ModelsLab is a paid service. Image plans start at $21/month for 3,250 API calls. Creating an account is free, but generating avatars requires an active plan.


Yes. Pass the avatar URL to /api/v7/video-fusion/image-to-video to animate it, or to /api/v7/video-fusion/lip-sync with an audio track to make it speak. All of it runs on the same API key.

Explore Our Other Solutions
---

Unlock your creative potential and scale your business with ModelsLab's comprehensive suite of AI-powered solutions.

[Audio Gen

### AI Audio Generation

Text-to-speech, voice cloning, music generation, and audio processing APIs.

Explore Audio Gen](https://modelslab.com/audio-gen) [Video Fusion

### AI Video Generation & Tools

Create, edit, and enhance videos with AI-powered generation and transformation tools.

Explore Video Fusion](https://modelslab.com/video-generation) [Chat

### Engage Seamlessly with LLM

Access powerful language models for chatbots, content generation, and AI assistants.

Explore Chat](https://modelslab.com/custom-llm) [3D Verse

### Create Stunning 3D Models

Transform images and text into 3D models with advanced AI-powered generation.

Explore 3D Verse](https://modelslab.com/text-to-3d)

Plugins

Explore Plugins for Pro
---

Our plugins are designed to work with the most popular content creation software.

[Explore Plugins](https://modelslab.com/pro#plugins) [Learn More](https://modelslab.com/pro)

API

Build Apps with ModelsLab

ML

 API
---

Use our API to build apps, generate AI art, create videos, and produce audio with ease.

[API Documentation](https://docs.modelslab.com) [Playground](https://modelslab.com/models)

## Frequently Asked Questions

### How do I generate an AI avatar via the API?
POST https://modelslab.com/api/v6/image_editing/face_gen with `face_image` set to a selfie URL and `prompt` describing the style. The response carries a hosted URL for the avatar, or an id to fetch when the request is queued.

### How much does the AI avatar API cost?
Image plans start at $21/month for 3,250 API calls and $47/month for 10,000. Avatar generation on self-hosted models costs one call per image and is covered by your plan.

### Which styles can the avatar API produce?
Any style you can describe in the prompt: realistic headshots, anime, 3D render, illustration, pixel art. Face identity is kept from the reference selfie while the style follows the prompt.

### Do I need more than one photo?
No. face_gen works from a single selfie. For a fixed character across many images, train a LoRA on a small photo set instead and generate avatars from that model.

### Is there a free AI avatar API?
ModelsLab is a paid service. Image plans start at $21/month for 3,250 API calls. Creating an account is free, but generating avatars requires an active plan.

### Can I animate the avatar afterwards?
Yes. Pass the avatar URL to /api/v7/video-fusion/image-to-video to animate it, or to /api/v7/video-fusion/lip-sync with an audio track to make it speak. All of it runs on the same API key.


---

*This markdown version is optimized for AI agents and LLMs.*

**Links:**
- [Website](https://modelslab.com)
- [API Documentation](https://docs.modelslab.com)
- [Blog](https://modelslab.com/blog)

---
*Generated by ModelsLab - 2026-09-16*