Virtual try-on API for Shopify merchants
Call one OpenAI-compatible try-on gateway from your Shopify app, theme extension, or backend — without juggling separate Kling, Gemini, OpenAI, and FAL SDKs.
Short answer: Shopify merchants and app builders can drive virtual try-on
from a single TryOn-API.com key. Use the OpenAI-compatible
/api/v1/chat/completions route (or the native multipart /tryon
endpoint), tag person and garment images with tryon_role, and spend from one
unified credit balance across providers.
Where it fits in a Shopify stack
- Theme / storefront app: collect a shopper selfie (or size inputs) and a product image, then call your backend which proxies TryOn-API.com.
- Private app / custom backend: keep the
tryon_API key server-side; never expose it in theme Liquid or browser JS. - Catalog prep: reuse existing product photos as garment inputs — the gateway routes to dedicated try-on engines and image models repurposed for try-on.
- Fallback: pass
models[]so a slow or down provider does not blank the product page experience.
Minimal integration shape
// Server-side (Shopify app / worker) — never ship the key to the theme
const client = new OpenAI({{
baseURL: "https://tryon-api.com/api/v1",
apiKey: process.env.TRYON_API_KEY,
}});
const res = await client.chat.completions.create({{
model: "kling/kolors-v1-5",
modalities: ["image"],
messages: [{{ role: "user", content: [
{{ type: "text", text: "put the garment on the person" }},
{{ type: "image_url", image_url: {{ url: personDataUrl }}, tryon_role: "person" }},
{{ type: "image_url", image_url: {{ url: garmentDataUrl }}, tryon_role: "garment" }},
]}}],
}});
Why not call providers from the theme?
Direct provider SDKs mean multiple keys, billing accounts, and response shapes — and keys in the browser are a leak risk. TryOn-API.com keeps one schema, one key on your server, and automatic fallback. For a product comparison of gateway vs OpenRouter vs direct SDKs, see Compare.
Next steps for merchants
- Create a key in API Keys after signing in.
- Browse per-model credit costs on Models.
- Prototype in the Playground, then wire your Shopify app backend.
- Top up credits via Billing when you leave the free/demo path.
Frequently asked questions
Can I call TryOn-API.com directly from Shopify Liquid or theme JS?
No. Keep the tryon_ API key on your app backend or a server-side worker. The theme should only call your own endpoint, which then calls TryOn-API.com with the Bearer key.
Does this replace a Shopify AR shoe try-on app?
No. This page is about the developer API gateway for generative try-on image generation. For mobile AR shoe try-on on Shopify storefronts, see the separate WEARFITS Shopify app surfaces (e.g. arviewer.mobi).
Which models work for apparel try-on?
Dedicated try-on engines such as Kling Kolors plus image models repurposed for try-on (Gemini, gpt-image-1, FAL FLUX Kontext). Browse current slugs and credit costs on the Models page.
See also the machine-readable llms.txt and full API reference.