> Garmo API docs as Markdown. This page: https://garmo.studio/api/docs/generate/ · All docs in one file: https://garmo.studio/api/docs/llms-full.txt

# Generate photos

POST/generate

Makes new photos from one product photo. Without a model: product photos in the setting your prompt describes. With a model: the product worn by a Garmo model (or your own), in planned poses, in a catalog scene or one Garmo picks.

Cost: 1 credit per image. Images: Send exactly one photo: image_url, image_base64 or upload_id (or a multipart file named image). It makes count images (1 to 4). Category, scene and gender are only accepted together with model.

Overview and examples: Photoshoot API.

## Parameters

- Parameter | Description
- prompt  string | What you want, in your own words and any language (up to 500 characters): setting, light, props, mood. Without a model it decides everything, including whether hands or a person appear; with a model it is the art direction. Leave it out and Garmo plans the set.
- count  integer | How many images, 1 to 4. Each is a different angle or pose. Default  1 .
- model  string | Put the product on a model: an id from GET /catalog/models (a Garmo model or custom_<id> for your own), or "auto" to let Garmo pick one. Leave it out for product photos without a model.
- category  string | With a model: what the product is, so the poses fit. Default  "clothing" . One of:  clothing ,  shoes ,  jewelry
- scene  string | With a model: the place. auto plans a setting that suits the product. Default  "auto" . One of:  auto ,  studio ,  street ,  editorial
- gender  string | With model "auto": who wears it. Default  "female" . One of:  female ,  male
- aspect_ratio  string | Shape of the images. Default  "3:4" . One of:  3:4 ,  2:3 ,  1:1 ,  4:5 ,  9:16
- image_url  string | Public https URL of the photo to edit. JPEG, PNG or WebP, up to 12 MB. Private and local addresses are refused.
- image_base64  string | The photo itself, base64-encoded (a data: URI is fine). For large files use upload_id instead.
- upload_id  string | An id from POST /uploads.
- webhook_url  string | https address Garmo POSTs the finished job to (signed, see Webhooks).
- metadata  object | Your own JSON object (up to 1,000 characters), returned with the job and in the webhook.
Header Idempotency-Key (optional): see Retries and idempotency.

## Example

```
curl https://api.garmo.studio/v1/generate \
  -H "Authorization: Bearer $GARMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://shop.example/products/sundress-41.jpg",
    "model": "auto",
    "prompt": "a sunlit stone colonnade, warm late-afternoon light",
    "count": 2
  }'
```

```
const r = await fetch("https://api.garmo.studio/v1/generate", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.GARMO_API_KEY}`,
    "Idempotency-Key": "order-123-generate",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"image_url": "https://shop.example/products/sundress-41.jpg", "model": "auto", "prompt": "a sunlit stone colonnade, warm late-afternoon light", "count": 2}),
});
const job = await r.json();
console.log(job.id, job.status);
```

```
import os, requests

r = requests.post(
    "https://api.garmo.studio/v1/generate",
    headers={"Authorization": f"Bearer {os.environ['GARMO_API_KEY']}", "Idempotency-Key": "order-123-generate"},
    json={
        "image_url": "https://shop.example/products/sundress-41.jpg",
        "model": "auto",
        "prompt": "a sunlit stone colonnade, warm late-afternoon light",
        "count": 2,
    },
)
job = r.json()
print(job["id"], job["status"])
```

```
 true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => json_encode(["image_url" => "https://shop.example/products/sundress-41.jpg", "model" => "auto", "prompt" => "a sunlit stone colonnade, warm late-afternoon light", "count" => 2]),
    CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("GARMO_API_KEY"), "Idempotency-Key: order-123-generate", "Content-Type: application/json"],
]);
$job = json_decode(curl_exec($ch), true);
echo $job["id"], " ", $job["status"];
```

```
require "net/http"
require "json"

uri = URI("https://api.garmo.studio/v1/generate")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer #{ENV.fetch("GARMO_API_KEY")}"
req["Idempotency-Key"] = "order-123-generate"
req["Content-Type"] = "application/json"
req.body =  res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());
        System.out.println(res.statusCode() + " " + res.body());
    }
}
```

### Response: 202 Accepted

```
{
  "id": "job_8Kq2xV7mPz4LtR9wNc3B",
  "object": "job",
  "tool": "generate",
  "status": "processing",
  "livemode": true,
  "outputs": [
    {
      "id": "out_1",
      "status": "processing",
      "label": "Front"
    },
    {
      "id": "out_2",
      "status": "processing",
      "label": "Walking"
    }
  ],
  "credits_charged": 2,
  "credits_refunded": 0,
  "metadata": {
    "sku": "DR-123"
  },
  "created_at": "2026-11-19T14:02:11Z",
  "completed_at": null
}
```

### The finished job

```
{
  "id": "job_8Kq2xV7mPz4LtR9wNc3B",
  "object": "job",
  "tool": "generate",
  "status": "completed",
  "livemode": true,
  "outputs": [
    {
      "id": "out_1",
      "status": "succeeded",
      "label": "Front",
      "url": "https://….r2.cloudflarestorage.com/renders/2026/11/8f3c…0.webp?X-Amz-Signature=…",
      "url_expires_at": "2026-11-20T14:00:00Z"
    },
    {
      "id": "out_2",
      "status": "succeeded",
      "label": "Walking",
      "url": "https://….r2.cloudflarestorage.com/renders/2026/11/8f3c…1.webp?X-Amz-Signature=…",
      "url_expires_at": "2026-11-20T14:00:00Z"
    }
  ],
  "credits_charged": 2,
  "credits_refunded": 0,
  "metadata": {
    "sku": "DR-123"
  },
  "created_at": "2026-11-19T14:02:11Z",
  "completed_at": "2026-11-19T14:02:58Z"
}
```

## Errors

400 invalid_request names the parameter that is missing or wrong. Image problems are invalid_image, image_too_large or image_unreachable. 402 insufficient_credits says how many credits the request needs. All codes: Errors.
