Alchemy RecipeIntermediateautomation

Fashion lookbook generation from style guide specifications

Published

Fashion brands face a recurring challenge: translating written style guides into visual lookbooks that actually match the brand's aesthetic. A design team typically spends days manually creating mood boards, sourcing reference images, and feeding them into design tools. A product manager writes detailed specifications about colour palettes, silhouettes, and seasonal trends, but turning that into a cohesive visual collection still demands significant manual effort.

What if that entire process happened automatically? Style guide specifications flow into an AI image generation tool, which produces candidate images, which then get refined and arranged into a structured lookbook by a second AI tool, all without anyone touching their keyboard between steps. This is what modern orchestration platforms enable, and it's worth exploring because it actually saves time compared to the manual workflow.

This guide walks through building exactly that workflow using two complementary AI tools and an orchestration layer. We'll focus on practical implementation details: which APIs to call, how to structure your requests, where bottlenecks emerge, and how to handle the edge cases that always appear in production.

The Automated Workflow

How it works conceptually

The workflow runs in three distinct stages. First, a style guide specification (written as a document or form submission) arrives in your orchestration tool. Second, that specification gets transformed into image generation prompts and sent to an AI image generation API. Third, the generated images flow into a second tool for composition and arrangement into a final lookbook format.......

For this setup, we're using nsketch-ai for image generation from detailed style descriptions, and weryai for lookbook composition and layout. The orchestration layer sits in the middle, deciding when to trigger each step and handling the data transformation between APIs.

Choosing your orchestration tool

All three options (Zapier, n8n, Make) work for this workflow. Here's the practical difference: Zapier suits teams who want quick setup with minimal configuration; n8n offers more control and runs on your own infrastructure; Make provides a middle ground with reasonable pricing and power. For fashion workflows where you might regenerate lookbooks dozens of times per day, n8n running on a modest VPS typically proves most cost-effective after your first few months.

We'll show the implementation using n8n, as it gives the clearest picture of what's happening at each step.

Step 1: Receiving the style guide specification

Your workflow needs a trigger. This could be a webhook, a form submission, or a scheduled check of an email inbox. For a fashion team, a webhook works well: your design tool or content management system posts the specification directly to your n8n instance....... For more on this, see Fashion brand social media content calendar from mood boards. For more on this, see Fashion brand weekly content calendar from mood boards to....

Create a Webhook trigger node in n8n and configure it to accept POST requests:


POST /webhook/fashion-lookbook
Content-Type: application/json

{
  "brand_name": "Autumn Collection 2025",
  "colour_palette": ["#2C3E50", "#E74C3C", "#ECF0F1", "#BDC3C7"],
  "mood": "minimalist, structured, earthy",
  "garment_types": ["trousers", "oversized blazer", "fitted dress"],
  "silhouette_focus": "clean lines, slightly oversized proportions",
  "target_demographic": "professionals aged 25-40",
  "lookbook_pages": 5,
  "style_notes": "Inspired by Scandinavian design. Prioritise natural fabrics. Avoid bright primary colours."
}

n8n automatically parses this JSON and makes it available to downstream nodes. Store this data because you'll reference it throughout the workflow.

Step 2: Transforming specifications into prompts

Raw style guide data isn't ideal for image generation APIs. You need an intermediate step that constructs detailed, nuanced prompts. This is where Claude Code excels, but you can also use a function node in n8n itself.

Here's a function node in n8n that builds image generation prompts from your style specification:

const spec = $input.all()[0].json;

const prompts = [];

for (let i = 0; i < spec.lookbook_pages; i++) {
  const garmentType = spec.garment_types[i % spec.garment_types.length];
  
  const prompt = `
Fashion photography. ${garmentType} in ${spec.mood} style.
Colour palette: ${spec.colour_palette.join(", ")}.
Silhouette: ${spec.silhouette_focus}.
Brand aesthetic: ${spec.brand_name}.
Professional product photography, studio lighting, neutral background.
${spec.style_notes}
  `.trim();
  
  prompts.push({
    page: i + 1,
    garment: garmentType,
    prompt: prompt
  });
}...... For more on this, see [Product photography studio with AI model training and mar...](/blog/product-photography-studio-with-ai-model-training-and-marketing-variations).

return prompts;

This produces an array of five separate prompts, each targeting a different garment type from your specification. Each prompt is structured to include colour information, mood, silhouette details, and any brand-specific notes. The nsketch-ai API responds better to detailed, layered prompts than vague requests.

Step 3: Calling the nsketch-ai API

nsketch-ai handles detailed fashion and product visualisation requests. You'll make one API call per image you want to generate.

Create an HTTP request node configured like this:


POST https://api.nsketch-ai.com/v1/generate
Authorization: Bearer YOUR_NSKETCH_API_KEY
Content-Type: application/json

{
  "prompt": "Oversized blazer in minimalist, structured, earthy style. Colour palette: #2C3E50, #E74C3C, #ECF0F1, #BDC3C7. Silhouette: clean lines, slightly oversized proportions. Brand aesthetic: Autumn Collection 2025. Professional product photography, studio lighting, neutral background. Inspired by Scandinavian design. Prioritise natural fabrics. Avoid bright primary colours.",
  "style": "product_photography",
  "aspect_ratio": "4:5",
  "quality": "high",
  "num_variations": 2
}

The key parameters here:

  • style: "product_photography" tells nsketch-ai you want clean, professional output rather than editorial or artistic styles.

  • aspect_ratio: "4:5" matches typical fashion lookbook proportions.

  • quality: "high" requests higher resolution output (this costs more but produces lookbooks that don't look AI-generated in obvious ways).

  • num_variations: 2 gives you backup options in case one image doesn't quite match the aesthetic.

The API returns a response like this:

{
  "status": "success",
  "images": [
    {
      "id": "img_abc123",
      "url": "https://cdn.nsketch-ai.com/images/img_abc123.png",
      "seed": 42857,
      "prompt_used": "Oversized blazer..."
    },
    {
      "id": "img_abc124",
      "url": "https://cdn.nsketch-ai.com/images/img_abc124.png",
      "seed": 42858,
      "prompt_used": "Oversized blazer..."
    }
  ],
  "generation_time": 8.3,
  "cost": 0.04
}

Store both the image URLs and their generation metadata. You'll need this for the next step.

Step 4: Looping through all prompts

You have five prompts but need to call the nsketch-ai API five times. n8n's "Loop" node handles this elegantly.

Add a Loop node that iterates over the prompts array created in Step 2. Inside the loop, place the HTTP request node that calls nsketch-ai. After the loop completes, you'll have a collection of images, each with metadata about which garment type and page number it corresponds to.

Combine all results into a single array:

const allImages = [];

$input.all().forEach(item => {
  if (item.json.images && Array.isArray(item.json.images)) {
    item.json.images.forEach(img => {
      allImages.push({
        url: img.url,
        seed: img.seed,
        page: item.json.page,
        garment: item.json.garment
      });
    });
  }
});

return { images: allImages };

At this point, you have a collection of AI-generated images, each tagged with metadata about where it belongs in the lookbook.

Step 5: Composing the lookbook with weryai

weryai specialises in arranging visual content into structured layouts. Think of it as an automated layout engine for image collections. It can create multi-page documents, apply consistent styling, add text overlays, and export in various formats.

Call the weryai API with your images and layout preferences:


POST https://api.weryai.com/v1/compose
Authorization: Bearer YOUR_WERYAI_API_KEY
Content-Type: application/json

{
  "project_name": "Autumn Collection 2025 Lookbook",
  "layout_template": "fashion_lookbook_5page",
  "images": [
    {
      "url": "https://cdn.nsketch-ai.com/images/img_abc123.png",
      "page": 1,
      "caption": "Oversized Blazer",
      "metadata": {"garment": "oversized blazer"}
    },
    {
      "url": "https://cdn.nsketch-ai.com/images/img_abc124.png",
      "page": 2,
      "caption": "Fitted Dress",
      "metadata": {"garment": "fitted dress"}
    }
  ],
  "styling": {
    "background_colour": "#ECF0F1",
    "font_family": "Helvetica Neue",
    "accent_colour": "#2C3E50",
    "include_colour_palette": true
  },
  "export_format": "pdf",
  "page_size": "A4"
}

Key parameters for weryai:

  • layout_template: "fashion_lookbook_5page" selects a pre-built layout designed for fashion lookbooks. Other options include "mood_board", "grid_4x4", and "editorial".

  • include_colour_palette: true automatically displays the colour palette from your style guide on the first page.

  • export_format: "pdf" produces a file ready for sharing with stakeholders or sending to production. You can also request "png" or "html" for different uses.

weryai responds with:

{
  "status": "success",
  "project_id": "proj_xyz789",
  "lookbook_url": "https://cdn.weryai.com/lookbooks/proj_xyz789.pdf",
  "preview_url": "https://cdn.weryai.com/preview/proj_xyz789_thumb.png",
  "pages": 5,
  "composition_time": 12.4
}

Step 6: Saving and notifying

The final step stores the completed lookbook somewhere your team can access it and sends a notification that the process is complete.

In n8n, add nodes to:

  1. Write to file storage (Google Drive, AWS S3, or your own file server):
const filename = `lookbook_${$input.all()[0].json.project_name}_${new Date().toISOString().split('T')[0]}.pdf`;
const downloadUrl = $input.all()[0].json.lookbook_url;

return {
  filename: filename,
  url: downloadUrl,
  timestamp: new Date().toISOString()
};
  1. Send a notification via Slack, email, or your internal tools:

New lookbook generated: Autumn Collection 2025
PDF: [link to lookbook_url]
Preview: [link to preview_url]
Generated at: 2025-01-15 14:32 UTC
Total time: 28 seconds

Putting it all together in n8n

Your workflow should look like this in sequence:

  1. Webhook trigger (receives style guide specification)
  2. Function node (transforms spec into prompts)
  3. Loop node containing:
    • HTTP request to nsketch-ai
    • Wait 1 second (to avoid rate limits)
  4. Function node (consolidates all generated images)
  5. HTTP request to weryai (composes lookbook)
  6. HTTP request to your file storage (saves the PDF)
  7. Slack notification (alerts the team)

Test this end-to-end with a sample style guide before deploying to production.

The Manual Alternative

If you prefer human oversight at each stage, the workflow can pause between steps. After nsketch-ai generates images, insert a "Wait for approval" node that sends the candidate images to your design team via email or Slack. They select their preferred images, and only then does the workflow proceed to weryai. This adds latency (typically 2-4 hours while someone reviews images) but gives more control over the final output.

For small teams generating lookbooks infrequently, this hybrid approach often makes sense. You keep the tedious data-wrangling automated but retain human judgment over aesthetics. Just know that every approval step roughly doubles your total time to completion.

Pro Tips

Rate limiting and request pacing

Both nsketch-ai and weryai have rate limits. nsketch-ai typically allows 10 requests per minute on standard plans; weryai allows 5 composition requests per minute. In your loop, add a "Wait" node between API calls set to 6-7 seconds. This keeps you well below the limit and prevents 429 (too many requests) errors.

// In a code node between loop iterations
const delayMs = 6500;
await new Promise(resolve => setTimeout(resolve, delayMs));
return { delayed: true };

Error handling for failed generations

Sometimes nsketch-ai generates an image that doesn't match your specification well. Build in a retry mechanism: if an image doesn't meet your quality standards, resubmit the same prompt with a slightly different seed value. In the HTTP request node, configure error handling to retry up to 2 times with exponential backoff.

Cost optimisation

Each nsketch-ai request at high quality costs roughly £0.04-£0.06. A 5-page lookbook with 2 variations per page costs around £0.40-£0.60. If you're generating 20 lookbooks per month, that's £8-£12 in generation costs alone. Consider using medium quality for draft lookbooks (costs 50% less) and high quality only for final versions approved by leadership. Store generated images for 90 days rather than regenerating from scratch when minor tweaks are requested.

Validating prompts before generation

Before you send a prompt to nsketch-ai, validate it programmatically. Check that colour hex codes are properly formatted, that garment types exist in a pre-defined list, and that mood descriptions don't contain contradictory terms. A short validation step prevents wasted API calls on malformed requests.

Version control for style guides

Keep a record of which specification version produced which lookbook. Store the exact JSON payload that triggered the workflow alongside the final PDF. When a designer asks "why did it generate trousers instead of a skirt?" you can check the original specification and clarify the input. This also helps when you want to regenerate a lookbook later; you know exactly what prompt produced acceptable results previously.

Cost Breakdown

ToolPlan NeededMonthly CostNotes
nsketch-aiPay-as-you-go£8-£20~£0.04-£0.06 per high-quality image; depends on generation frequency
weryaiStarter£15Includes 50 compositions per month; additional at £0.30 each
n8nSelf-hosted£0-£5Free if you run your own server; costs only hosting
n8n CloudStarter£25Managed hosting; includes 2,000 workflow executions per month
Slack (optional)Standard£7-£8If not already in use; provides notification integration
File storage (optional)Google Drive / AWS S3£0-£10Depends on lookbook volume; typically negligible

Running this workflow monthly with 20 lookbooks on self-hosted n8n costs roughly £25-£50 in API fees plus your server hosting. Using n8n Cloud instead, costs rise to £40-£65 per month. For teams generating 50+ lookbooks per month, the fixed orchestration costs become irrelevant compared to generation costs.

More Recipes