Topview Logo
  • Create viral videos with
    GPT-4o + Ads library
    Use GPT-4o to edit video empowered by Youtube & Tiktok & Facebook ads library. Turns your links or media assets into viral videos in one click.
    Try it free
    gpt video

    How to Create AI Avatar with API [Postman] | ModelsLab

    blog thumbnail

    Introduction

    Hello everyone, today I'm excited to show you how to generate an AI avatar using the PHGEN API from ModelsLab. Let's get started!

    To begin, we need Postman and access to the ModelsLab platform. Follow these steps to create your AI avatar:

    1. Navigate to ModelsLab Documentation:

    2. Locate PHGEN API:

      • In the documentation, look for the "Image Editing" section where you will find PHGEN.
    3. Copy the Endpoint:

      • Copy the PHGEN endpoint URL provided in the documentation.
    4. Paste in Postman:

      • Open Postman and paste the copied endpoint URL into the URL section.
    5. Prepare the Request JSON:

      • Copy the request JSON from the documentation’s body section and paste it into the body section of Postman.
    6. Add API Key and Face Image:

      • Enter your API key in the Authorization section. You can obtain a key by signing up on ModelsLab.
      • Upload the face image you wish to transform. For demonstration, I have a face image ready.
    7. Set Image Dimensions:

      • Specify the height and width ratio. Here, I’m setting it to 512 by 768.
    8. Enter a Prompt:

    9. Make the API Call:

      • After setting up the above details, click on the send button to make the API call.
    10. Check the Generated Image:

      • You will receive the generated image in the response. For example, an image using the face I uploaded.

    AI Avatar API

    Transforming to Different Styles

    • Anime and 3D Style:
      • If you want to transform the generated image into another style, you can use the style parameter.
      • ModelsLab supports four styles: Comic, CTV 3D, Anime, and Realistic. By default, the style is set to Realistic if no style is specified.
      • To change styles, enter the style parameter in your JSON request. For example, to generate a 3D style, add "style": "3D".
    1. Generate a 3D Style Image:

      • Add the style parameter and set it to 3D, then make the API call again.
    2. View the Transformed Image:

      • Check the new image in the response. The 3D style image should reflect the prompt and dimensions you set earlier.

    And that’s it! With these steps, you can generate and transform AI avatars into various styles using PHGEN API from ModelsLab.


    Keywords

    • AI Avatar
    • PHGEN API
    • ModelsLab
    • Postman
    • Image Editing
    • API Endpoint
    • JSON Request
    • Image Styles

    FAQ

    Q1. What tools do I need to generate an AI avatar? A1. You need Postman and access to ModelsLab documentation and API.

    Q2. Where can I find the PHGEN API documentation? A2. The PHGEN API documentation is available under the "Image Editing" section on ModelsLab’s website.

    Q3. What is the default image style in PHGEN? A3. The default style is Realistic if no specific style is set.

    Q4. What styles are supported by the PHGEN API? A4. The PHGEN API supports Comic, CTV 3D, Anime, and Realistic styles.

    Q5. How do I transform the generated image into a new style? A5. You can transform the style by adding the style parameter to your JSON request and setting it to the desired style.

    Q6. Can I use my own images with the PHGEN API? A6. Yes, you can upload your own face images to be transformed by the API.

    Q7. How do I obtain an API key for ModelsLab? A7. You can obtain an API key by signing up on the ModelsLab platform.

    Q8. What dimensions are recommended for the images? A8. The dimensions used in the example are 512 by 768, but you can adjust as needed.

    One more thing

    In addition to the incredible tools mentioned above, for those looking to elevate their video creation process even further, Topview.ai stands out as a revolutionary online AI video editor.

    TopView.ai provides two powerful tools to help you make ads video in one click.

    Materials to Video: you can upload your raw footage or pictures, TopView.ai will edit video based on media you uploaded for you.

    Link to Video: you can paste an E-Commerce product link, TopView.ai will generate a video for you.

    You may also like