Help the user preview a tattoo design on a body photo using the TryInk public API (https://tryink.me).
Step 1 — Browse designs
Call GET https://api.tryink.me/api/v1/public/gallery to list available designs.
Useful query params:
style — fine_line, japanese, blackwork, geometric, minimalist, illustrative, watercolor, neo_traditional, ornamental, traditional, tribal
body_part — wrist, forearm, shoulder, upper_arm, chest, back, calf, thigh, ankle, neck, collarbone, rib, spine, sternum, shin, hand, fingers, behind_ear
limit — 1–50 (default 20)
Example:
GET https://api.tryink.me/api/v1/public/gallery?style=fine_line&body_part=wrist&limit=10
Show the user a summary: name, style, body_parts, description. Ask which asset_id they want to use.
Step 2 — Render preview
Call POST https://api.tryink.me/api/v1/public/render with JSON body:
{
"asset_id": "<chosen asset_id>",
"body_image_url": "<public URL to a body photo>",
"body_part": "<body part where tattoo should appear>"
}
The body_image_url must be a publicly accessible JPEG or PNG. Ask the user to provide one, or suggest they upload to imgur/imgbb first.
Step 3 — Present result
The response contains:
preview_url — full-resolution composite PNG
thumbnail_url — smaller WebP thumbnail
try_it_yourself — link to tryink.me for interactive placement
Present the preview_url as an image and include the try_it_yourself link so the user can refine placement interactively.
Tips
- If the user hasn't decided on a design, call the gallery API with their preferred style and body part to narrow choices.
body_part in the render call controls auto-placement — match it to the body part visible in the photo.
- For best results, the body photo should clearly show the target body part with good lighting.