Outfit Generation

Designs outfits for any occasion from prompts, perfect for fashion tech and e-commerce. It generates outfit captions in text or JSON, detailing color, pattern, style, material, sleeve, hemline, etc.

Use these APIs to design outfits for any occasion based on specific prompts. Perfect for fashion tech developers and e-commerce companies!

Create an experiment

POST https://prod.server.tryonlabs.ai/api/v1/experiment/

Create an experiment to trigger the generation of a new outfit based on a text prompt.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

action

generate_outfit

Please provide the experiment action. e.g. generate_outfit, virtual_try_on, etc.

params

{"prompt": "A flat lay image of a dress with Color: Pink, Department: Dresses, Detail: Split Thigh, Fabric-Elasticity: No Sretch, Fit: Fitted, Hemline: Slit, Material: Woven, Neckline: Spaghetti Straps, Pattern: Floral, Sleeve-Length: Sleeveless, Style: Boho, Type: Cami Top, Waistline: High. Do not generate a human model.", "height":1024, "width": 1024, "seed": -1, "guidance_scale": 4.5, "num_inference_steps": 20, "num_images_per_prompt": 1, "strength": 0.8}

Pass the parameters to use for generation.

Response


{
    "status": "running",
    "experiment": {
        "id": "xxxxxxxxxx",
        "created_on": "xxxx-xx-xxxxx:xx:xx.xxxxxxx",
        "output": null,
        "params": "{\"prompt\": \"A flat lay image of a dress with Color: Pink, Department: Dresses, Detail: Split Thigh, Fabric-Elasticity: No Sretch, Fit: Fitted, Hemline: Slit, Material: Woven, Neckline: Spaghetti Straps, Pattern: Floral, Sleeve-Length: Sleeveless, Style: Boho, Type: Cami Top, Waistline: High. Do not generate a human model.\", \"height\":1024, \"width\": 1024, \"seed\": -1, \"guidance_scale\": 4.5, \"num_inference_steps\": 20, \"num_images_per_prompt\": 1, \"strength\": 0.8}",
        "aimodel": "outfit_ai",
        "action": "generate_outfit",
        "status": "pending",
        "store": null,
        "access": "private",
        "user_feedback": null,
        "redirect_count": 0,
        "model": null,
        "garment": null,
        "result": null,
        "user": "xxxxxxxxxx",
        "results": []
    }
}

Check experiment status

GET https://prod.server.tryonlabs.ai/api/v1/experiment/{id}/

Call this endpoint to fetch an experiment containing the status and other details.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Response

{
    "status": "success",
    "experiment": {
        "id": "xxxxxxxxxx",
        "created_on": "xxxx-xx-xxxxx:xx:xx.xxxxxxx",
        "output": null,
        "params": "{\"prompt\": \"A flat lay image of a dress with Color: Pink, Department: Dresses, Detail: Split Thigh, Fabric-Elasticity: No Sretch, Fit: Fitted, Hemline: Slit, Material: Woven, Neckline: Spaghetti Straps, Pattern: Floral, Sleeve-Length: Sleeveless, Style: Boho, Type: Cami Top, Waistline: High. Do not generate a human model.\", \"height\":1024, \"width\": 1024, \"seed\": -1, \"guidance_scale\": 4.5, \"num_inference_steps\": 20, \"num_images_per_prompt\": 1, \"strength\": 0.8}",
        "aimodel": "outfit_ai",
        "action": "generate_outfit",
        "status": "completed",
        "store": null,
        "access": "private",
        "user_feedback": null,
        "redirect_count": 0,
        "model": null,
        "garment": null,
        "result": {
            "id": "xxxxxxxxxx",
            "image_url": "api/v1/ei/xxxxxxxxxx/d?token=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            "created_on": "xxxx-xx-xxxxx:xx:xx.xxxxxxx",
            "type": "result",
            "gender": null,
            "model_type": null,
            "garment_type": null,
            "garment_brand": "Unknown",
            "access": "private",
            "shopify_product_id": null,
            "shopify_product_handle": null,
            "preprocessing": "pending",
            "user": "xxxxxxxxxx"
        },
        "user": "xxxxxxxxxx",
        "results": []
    }
}

If you've generated multiple images, the remaining images will be listed in the "results" parameter of the output JSON object.

Download generated image(s)

POST https://prod.server.tryonlabs.ai/api/v1/ei/d?token={image_token}/

Use this endpoint to download the generated image(s).

Response

Status Code: 200

  // empty response

Last updated