Skip to content

Uwear.ai API Documentation

Uwear.ai API allows you to call our AI models from your application. Upload clothing images or create avatars, and generate visuals of AI-generated humans wearing the clothing or new visuals of the avatars in seconds. You can also upscale generated images or create short videos from them.

Our API is always up to date with our latest AI models. Since April 3rd, 2025, we're using Drape2, which features increased realism and consistency with clothing. Users should expect regular improvements in clothing fidelity and overall photo quality in the coming months. Learn more at https://uwear.ai/announcing-drape2.

Getting Started

To get started with the Uwear.ai API:

  • Sign up at dev.uwear.ai to get your API credentials
  • Keep your API keys secure and never share them
  • Purchase API credits

    Warning: API credits can only be used to make API calls. They cannot be used on the virtual studio webapp and vice versa.

Understanding Generation Process

  • Three main ways to initiate a Generation Request:

    1. Prepare Clothing Item in Advance: Upload a clothing item, get an ID, then use this ID in a Generation Request.
    2. Direct Clothing Upload with Generation: Provide clothing item data directly with a Generation Request.
    3. Use a Prepared Avatar: Have an avatar_id ready (from the process described in the "Avatars" section below) and use it in a Generation Request.
  • Clothing Item Upload Details (relevant to methods 1 & 2):

    • use_image_enhancement: true (default): Costs 1 credit. We process the item (remove background, generate descriptions).
    • use_image_enhancement: false: Costs 0 credits. Use your image and descriptions as-is. Best for pre-cleaned flat lays with good descriptions, as quality impacts results.
    • Uploading the same image URL multiple times reuses the existing processed item without extra charges.
  • Direct Upload Tradeoff: Uploading an item directly in a generation request makes that specific request slower due to the required item processing before generation starts.

  • Generation Requests: Specify details like image count, camera angle, and model description.

    • enhance_user_prompt: true (default): Our AI refines your prompt for better results.
    • enhance_user_prompt: false: Use your exact prompt (only if well-crafted).
  • Generation Results: Once submitted, requests initiate the creation of Generation Results containing the AI images. See the section below on how to monitor status and retrieve results. Completion typically takes 5 seconds per image. Generated images are delivered in PNG format with 704 x 1024 pixel resolution.

  • Retrieving Generation Results:

    • Method 1: Polling Specific Details: Call Get Generation Details using the ID of your generation request. Monitor the status field. Once the status indicates completion (e.g., "completed"), the response will contain the Generation Results, including URLs to the generated images.
    • Method 2: Listing with Optional Inclusion: Call Get All Generations and optionally use the include=generation_results query parameter. This parameter nests the generation results directly within each generation object. This method can act as a trigger, allowing you to fetch the generation status and its results simultaneously once it's completed, without needing to poll the status separately.
    • Choosing a Method: Polling Get Generation Details (Method 1) is best if you need to actively track the progress of a specific request. Using Get All Generations with the include parameter (Method 2) is more efficient if you primarily need the results once a generation is finished, potentially triggered by a webhook or a scheduled check, as it retrieves status and results in a single call.
  • Sequential Processing: Multiple requests are processed one after another (concurrent generation is planned).

  • Image Expiry: Generated images are available for 4 hours.

  • Upscaling and Video Generation: After generating an image, you can upscale it for higher resolution or create a short video based on it.

Avatars

Avatars allow you to create, save, and reuse specific AI-generated persons or characters across multiple image generations. This is useful for maintaining consistency or exploring different scenarios with the same virtual individual.

There are a few key operations involved in working with avatars:

  1. Create Avatar (Generation Request - POST /avatar-generation): This is an image generation operation found under "Generation Requests".

    • It's used to produce an initial visual representation of an avatar based on your prompt, num_images, camera settings, etc. The output is a standard Generation Result containing the avatar image(s).
    • Crucially, this same operation is also used to generate new images of an avatar that you have already saved (see step 2). In this mode, you provide the avatar_id of the saved avatar along with your prompt and other settings.
  2. Save Avatar (Avatars Endpoint - POST /avatars): This operation is found under the "Avatars" category.

    • It allows you to take any generation_result_id (whether it came from a Create Avatar generation, a clothing item generation, or any other image generation process) and save it as a persistent, named avatar entity.
    • You provide an avatar_name, an optional avatar_description, and the generation_result_id of the image you want to save.
    • This operation will return a unique avatar_id for the newly saved avatar.
    • Saving an avatar itself (linking to an existing generation result) does not typically incur additional generation credits if the source image was already part of a paid generation.
  3. Generating New Images with a Saved Avatar: Once an avatar is saved and you have its avatar_id:

    • You use this avatar_id as an input to the Create Avatar (Generation Request - POST /avatar-generation) operation mentioned in step 1.
    • This allows you to create new visuals (different poses, scenes, styles) for that specific, persistent avatar.

Avatar Workflow Summary

Managing Avatars

Besides creating and generating with avatars, you can also manage your saved avatars using standard CRUD operations available under the "Avatars" category:

  • Get Avatar Details: Retrieve information about a specific saved avatar by its avatar_id.
  • Update Avatar: Modify a saved avatar's avatar_name or avatar_description.
  • Delete Avatar: Remove a saved avatar by its avatar_id.
  • Get All Avatars: List all avatars you have saved.

Pricing

Our API uses a credit-based system. Purchase credits via our dev portal.

Operation TypePrice per OperationNotes
Clothing Upload (enhanced)1 credit (0.10USD)Costs 1 credit if use_image_enhancement is true (default). We process the item (remove background, generate descriptions).
Clothing Upload (non-enhanced)0 credit (0.00USD)No charge if use_image_enhancement is false. Requires a clean image and good descriptions from you.
Avatar Creation0 credit (0.00USD)Based on an existing Generation Result. Assumes the source image was part of a paid generation.
Image Generation1 credit (0.10USD)For clothing items. Credits charged only for successful generations. Failed requests are recredited automatically.
Avatar Generation1 credit (0.10USD)For avatars. Credits charged only for successful generations. Failed requests are recredited automatically.
Image Upscaling1 credit (0.10USD)Upscale a generated image to a higher resolution.
Video Generation (5 seconds)5 credits (0.50USD)Create a 5-second video from a generated image.
Video Generation (10 seconds)10 credits (1.00USD)Create a 10-second video from a generated image.

Enterprise Scale

For enterprise solutions including increased API quotas and custom integrations with our AI models, please contact us at hello@uwear.ai.