CodingMantra LogoCodingMantra
GalleryProductsPortfolioServicesGamesPricingContact
  1. Home
  2. API Documentation
  3. Image Tools
  4. Apparel Try-On

Apparel Try-On API

Virtually try on apparel on a model or generate professional fashion photos.

GET
/api/image/apparel-try-on-prompts

Retrieve a list of all available pre-defined scene instructions for the Apparel Try-On endpoint.

Example Request

curl -X GET 'https://codingmantra.com/api/image/apparel-try-on-prompts'

Example Response

{
  "data": [
    {
      "id": "minimalist-studio",
      "title": "Minimalist Studio",
      "categoryId": "studio-fashion",
      "categoryTitle": "Studio & Fashion Shoots",
      "demoImageUrl": "https://..."
    },
    // ... more prompts
  ]
}

POST
/api/image/apparel-try-on

Virtually try on apparel on a model or generate a professional fashion photo.

Request Body

FieldTypeDescription
apparelImagesArray of ObjectsRequired. An array of apparel image objects. Each object must have either a `dataUrl` or `url`. Supports optional `label` and `prompt`.
modelImagestringOptional. A data URI or URL of a person to model the apparel. If omitted, an AI model will be generated.
promptstringOptional. Additional instructions for the scene or model style.
logoImagestringOptional. A data URI or URL of a logo to place on the image.
logoPlacementstringOptional. Instructions for logo placement (e.g., 'top-left', 'center').
logoSizenumberOptional. A numeric value (0.1 to 0.5) representing the logo size as a percentage of the image.
referenceImagestringOptional. A data URI or URL of a reference image to guide the style.
aspectRatiostringOptional. Default: `'9:16'`.
outputResultstringOptional. `'base64'` (default) or `'url'`.

Example Request

curl -X POST 'https://codingmantra.com/api/image/apparel-try-on' \
     -H 'Content-Type: application/json' \
     -H 'Authorization: Bearer YOUR_API_KEY' \
     -d '{
          "apparelImages": [
            { "url": "https://example.com/t-shirt.png", "label": "white t-shirt" }
          ],
          "modelImage": "https://example.com/model.jpg",
          "prompt": "urban street style",
          "aspectRatio": "9:16"
        }'

Example Response

{
  "data": {
    "photoDataUri": "data:image/png;base64,..."
  }
}

On This Page

GET PromptsPOST Apparel Try-OnFAQ

Frequently Asked Questions

CodingMantra LogoCodingMantra

Providing business solutions for small and medium-sized businesses and helping them to grow.

WhatsApp ChannelX / TwitterLinkedInInstagramFacebookGitHubYouTube

Company

  • About Us
  • Services
  • Products
  • Portfolio
  • Pricing
  • Blog
  • API Docs
  • Contact Us

Top Tools

  • All Tools
  • Image Gallery
  • Image Tools
  • Digital Marketing
  • Financial Tools
  • Games
  • SEO Tools

Legal

  • Privacy Policy
  • Terms & Conditions
  • Return Policy
  • Deals
  • Sitemap

© 2026 CodingMantra. All Rights Reserved.