Available workflows

Review the end-to-end pipelines you can trigger through the Hautech API. Each workflow lists its inputs, step-by-step usage, and sample code to help you integrate quickly.

Full Naomi workflow (ID: dc1bd611-effc-443c-978a-88593553588d)

Creates a pose from a pose image, prepares apparel, and runs the Naomi pipeline to generate an AI model.

Workflow parameters

  • poseImageId: ID of the uploaded pose image
  • aspectRatio: Desired output aspect ratio (for example, "7:10")
  • imageId: ID of the uploaded clothing image
  • label: Optional description of the clothing item
  • isHuman: Optional boolean indicating if the subject is human
  • prompt: Required context for image generation
  • enhancePrompt: Optional boolean for automatic prompt enhancement
  • seed: Optional integer for reproducible results

Aspect ratio examples

'1:1': { width: 1024, height: 1024 },
'9:7': { width: 1152, height: 896 },
'7:9': { width: 896, height: 1152 },
'7:10': { width: 832, height: 1200 },
'10:7': { width: 1200, height: 832 },
'19:13': { width: 1216, height: 832 },
'13:19': { width: 832, height: 1216 },
'7:4': { width: 1344, height: 768 },
'4:7': { width: 768, height: 1344 },
'12:5': { width: 1536, height: 640 },
'5:12': { width: 640, height: 1536 },

Prompt examples

Example 1:

Minimalist, full-body shot, African American female model with rich, deep brown skin tone, glowing
with warmth and radiance, high cheekbones, full lips, and a well-defined jawline. Standing straight
with one hip slightly tilted, her left arm resting along her side and her right hand gently placed on
her hip, facing forward with a relaxed posture. Wearing (blue Kenzo Paris tiger t-shirt, regular fit,
graphic print, untucked), (black straight-leg jeans, clean finish, high waist), (white low-top
sneakers, minimal design). Plain white studio background, sharp focus, high contrast, clean and modern
aesthetic, emphasizes bold fashion statement with a relaxed yet confident posture.

Example 2:

Minimalist, full-body studio shot, modern Australian female model with fair to lightly tanned skin and
warm undertones, blue eyes, slightly wavy blonde hair styled naturally loose, soft defined facial
features, athletic and lean body. She stands straight with a relaxed posture, one hip slightly tilted,
her left arm resting along her side and her right hand gently placed on her hip, facing forward with a
natural, confident expression and relaxed elegance. Wearing (blue Kenzo Paris tiger t-shirt, regular
fit), (light wash straight-leg jeans, mid-rise, casual fit), (white low-top sneakers, minimal design).
Plain white studio background, clean high-contrast lighting, sharp focus, emphasizes modern Australian
beauty and casual designer fashion.

Step-by-step guide

  1. Upload images: Upload your clothing and pose images using the upload process.
  2. Run the workflow: Call the workflow endpoint with your parameters.
  3. Wait for completion: Poll the pipeline status until it finishes.
  4. Retrieve results: Fetch the generated image from the pipeline output.

Complete example

import axios from 'axios';
import fs from 'fs';
import FormData from 'form-data';

const token = 'YOUR_TOKEN';
const baseUrl = 'https://api.hautech.ai';

const prompt =
  'The main image should feature the model standing elegantly in a modern urban street setting. ' +
  'The composition should highlight the jeans in a natural pose with confidence.';
const label = 'a cardigan cloth';
const imagePath = './src/image-big.png';
const poseImagePath = './src/pose.png';
const size = '7:10';
const seed = Math.floor(Math.random() * 1e6);

const uploadImage = async (path: string) => {
  // Implementation omitted for brevity. See guides#upload-image for details.
  return 'YOUR_IMAGE_ID';
};

const waitForPipeline = async (pipelineId: string) => {
  while (true) {
    const res = await axios.get(`${baseUrl}/v1/pipelines/${pipelineId}`, {
      headers: { Authorization: `Bearer ${token}` },
    });

    if (res.data.status !== 'pending') return res.data;
    await new Promise((resolve) => setTimeout(resolve, 1000));
  }
};

(async () => {
  const poseImageId = await uploadImage(poseImagePath);
  const imageId = await uploadImage(imagePath);

  const run = await axios.post(
    `${baseUrl}/v1/workflows/run/dc1bd611-effc-443c-978a-88593553588d`,
    {
      input: {
        poseImageId,
        imageId,
        label,
        prompt,
        seed,
        aspectRatio: size,
        enhancePrompt: true,
        isHuman: true,
      },
    },
    {
      headers: { Authorization: `Bearer ${token}` },
    },
  );

  const result = await waitForPipeline(run.data.pipelineId);
  console.log('✅ Final output:', result.output);
})();

Naomi Pipeline (ID: b8bfacd4-e6e8-401b-91ce-acc01f1f2b75)

Runs the Naomi AI model to generate an image based on prepared pose and clothing images.

Workflow parameters

  • poseId: ID of the prepared pose
  • imageId: ID of the prepared clothing image
  • label: Optional clothing description
  • prompt: Required generation prompt
  • enhancePrompt: Optional boolean to improve the prompt automatically
  • seed: Optional integer for reproducible results

Step-by-step guide

  1. Prepare pose and clothing images using the corresponding workflows.
  2. Call the workflow endpoint with your parameters.
  3. Poll the pipeline status until completion.
  4. Retrieve the generated image from the pipeline output.

Example

import axios from 'axios';

const token = 'YOUR_TOKEN';
const baseUrl = 'https://api.hautech.ai';

const waitForPipeline = async (pipelineId: string) => {
  while (true) {
    const res = await axios.get(`${baseUrl}/v1/pipelines/${pipelineId}`, {
      headers: { Authorization: `Bearer ${token}` },
    });

    if (res.data.status !== 'pending') return res.data;
    await new Promise((resolve) => setTimeout(resolve, 1000));
  }
};

(async () => {
  const poseId = 'YOUR_PREPARED_POSE_ID';
  const imageId = 'YOUR_PREPARED_IMAGE_ID';

  const run = await axios.post(
    `${baseUrl}/v1/workflows/run/b8bfacd4-e6e8-401b-91ce-acc01f1f2b75`,
    {
      input: {
        poseId,
        imageId,
        label: 'a cardigan cloth',
        prompt: 'Model in urban setting with natural lighting',
        enhancePrompt: true,
        seed: 123456,
      },
    },
    {
      headers: { Authorization: `Bearer ${token}` },
    },
  );

  const result = await waitForPipeline(run.data.pipelineId);
  console.log('✅ Final output:', result.output);
})();

Prepare Image Pipeline (ID: 31789314-f1c5-4c9f-9c41-0b6708015788)

Prepares a clothing image for downstream AI models.

Workflow parameters

  • imageId: ID of the uploaded clothing image
  • label: Optional clothing description
  • isHuman: Optional boolean flag indicating if the subject is human

Step-by-step guide

  1. Upload your clothing image using the upload flow.
  2. Run the workflow with your parameters.
  3. Poll for completion.
  4. Retrieve the prepared image ID from the pipeline output.

Example

import axios from 'axios';
import fs from 'fs';
import FormData from 'form-data';

const token = 'YOUR_TOKEN';
const baseUrl = 'https://api.hautech.ai';

const uploadImage = async (path: string) => {
  // Implementation omitted. See guides#upload-image for the three-step upload process.
  return 'YOUR_IMAGE_ID';
};

const waitForPipeline = async (pipelineId: string) => {
  while (true) {
    const res = await axios.get(`${baseUrl}/v1/pipelines/${pipelineId}`, {
      headers: { Authorization: `Bearer ${token}` },
    });

    if (res.data.status !== 'pending') return res.data;
    await new Promise((resolve) => setTimeout(resolve, 1000));
  }
};

(async () => {
  const imagePath = './src/clothing.png';
  const imageId = await uploadImage(imagePath);

  const run = await axios.post(
    `${baseUrl}/v1/workflows/run/31789314-f1c5-4c9f-9c41-0b6708015788`,
    {
      input: {
        imageId,
        label: 'a cardigan cloth',
        isHuman: true,
      },
    },
    {
      headers: { Authorization: `Bearer ${token}` },
    },
  );

  const result = await waitForPipeline(run.data.pipelineId);
  console.log('✅ Prepared image ID:', result.output.preparedImageId);
})();

Prepare Pose Pipeline (ID: b4aa5223-8e67-4e62-9b70-1672d1bc43c9)

Prepares a pose image for downstream AI models.

Workflow parameters

  • poseImageId: ID of the uploaded pose image
  • aspectRatio: Desired output aspect ratio (for example, "7:10")

Step-by-step guide

  1. Upload the pose image using the upload flow.
  2. Run the workflow with your parameters.
  3. Poll for completion.
  4. Retrieve the prepared pose ID from the pipeline output.

Example

import axios from 'axios';
import fs from 'fs';
import FormData from 'form-data';

const token = 'YOUR_TOKEN';
const baseUrl = 'https://api.hautech.ai';

const uploadImage = async (path: string) => {
  // Implementation omitted. See guides#upload-image for details.
  return 'YOUR_IMAGE_ID';
};

const waitForPipeline = async (pipelineId: string) => {
  while (true) {
    const res = await axios.get(`${baseUrl}/v1/pipelines/${pipelineId}`, {
      headers: { Authorization: `Bearer ${token}` },
    });

    if (res.data.status !== 'pending') return res.data;
    await new Promise((resolve) => setTimeout(resolve, 1000));
  }
};

(async () => {
  const posePath = './src/pose.png';
  const poseImageId = await uploadImage(posePath);

  const run = await axios.post(
    `${baseUrl}/v1/workflows/run/b4aa5223-8e67-4e62-9b70-1672d1bc43c9`,
    {
      input: {
        poseImageId,
        aspectRatio: '7:10',
      },
    },
    {
      headers: { Authorization: `Bearer ${token}` },
    },
  );

  const result = await waitForPipeline(run.data.pipelineId);
  console.log('✅ Prepared pose ID:', result.output.poseId);
})();