> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bitstudio.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate with product references

> Place your garments on a generated model, or reuse saved products and avatars.

Add product references to `POST /v1/images/generate` and describe the person and scene. Generate accepts up to **three garment references**. For a specific person photo and up to four items, use [virtual try-on](/api-reference/try-on/multiple-items).

## Start with a product photo

Replace the URL with a publicly accessible image file you control:

```bash theme={null}
curl https://api.bitstudio.ai/v1/images/generate \
  -H "Authorization: Bearer $BITSTUDIO_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: shirt-studio-001' \
  -d '{
    "model_text": "An adult fashion model with short dark hair",
    "outfit_image_urls": ["https://your-cdn.example/shirt.jpg"],
    "prompt": "Front-facing catalogue photo in a clean white studio with soft daylight. Keep the shirt colour, collar, buttons, and print visible.",
    "aspect_ratio": "3:4"
  }'
```

Add a second or third garment to the same array to build an outfit. Use clear product views and avoid extra garments that you do not want in the result. Compare the generated image with your source before publishing it.

Choose one reference format per request:

| Your references                                        | Request field       |
| ------------------------------------------------------ | ------------------- |
| Public image URLs                                      | `outfit_image_urls` |
| IDs returned by [upload](/api-reference/images/upload) | `outfit_image_ids`  |
| Products saved as outfit assets                        | `outfit_asset_ids`  |

Do not mix these arrays in one request. The [runnable quickstart](/api-reference/quickstart) shows the complete local-file upload and generation flow.

## Reuse a product, avatar, or preset

Save recurring products and reference photos as [assets](/api-reference/assets-workflow). Put product IDs in `outfit_asset_ids`; saved avatars, presets, and poses go in `asset_ids`.

This body reuses a saved avatar and one saved product. Replace both IDs with assets accessible to your API key:

```json theme={null}
{
  "asset_ids": ["11111111-1111-4111-8111-111111111111"],
  "outfit_asset_ids": ["22222222-2222-4222-8222-222222222222"],
  "prompt": "Front-facing catalogue portrait in a white studio with soft, even lighting",
  "aspect_ratio": "3:4"
}
```

Assets need actual reference photos. A thumbnail URL alone does not supply the product's reference images. An outfit asset can group several views of the same product.

Save each returned ID, [check progress](/api-reference/jobs/get), then use `result.url`. To adjust a completed image, send `result.id` to [edit](/api-reference/operations/edit).

[Choose quality and output count →](/api-reference/generate/settings)
