Garmo API
The Garmo API runs Garmo Studio from your own code. Generate makes new photos from one product photo and a prompt, on a model or without; seven edits change the photos you have: recolor a garment, change a pose, swap the model, ghost mannequin, change or remove the background, and upscale. Every request is an asynchronous job: the request returns in about two seconds, the images follow in 20 to 90 seconds.
Base URL: https://api.garmo.studio/v1. Requests and answers are JSON; images can also be sent as multipart/form-data. The full machine-readable description is the OpenAPI 3.1 file.
1. Get a key
Sign in to Garmo Studio and open Developers › API. Create a test key (gm_test_…) to build for free, or buy an API pack and create a live key (gm_live_…). A key is shown once; keep it on your server, never in a browser or an app. See Keys and authentication.
2. Send your first edit
This recolors the dress in a photo to terracotta. With a test key it costs nothing and the result is your own photo, so you can wire up the whole flow first.
curl https://api.garmo.studio/v1/edit/color \
-H "Authorization: Bearer $GARMO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://shop.example/products/dress-123.jpg",
"color_hex": "#c8553d",
"color_name": "terracotta",
"garment": "dress"
}'const r = await fetch("https://api.garmo.studio/v1/edit/color", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GARMO_API_KEY}`,
"Idempotency-Key": "order-123-color",
"Content-Type": "application/json",
},
body: JSON.stringify({"image_url": "https://shop.example/products/dress-123.jpg", "color_hex": "#c8553d", "color_name": "terracotta", "garment": "dress"}),
});
const job = await r.json();
console.log(job.id, job.status);import os, requests
r = requests.post(
"https://api.garmo.studio/v1/edit/color",
headers={"Authorization": f"Bearer {os.environ['GARMO_API_KEY']}", "Idempotency-Key": "order-123-color"},
json={
"image_url": "https://shop.example/products/dress-123.jpg",
"color_hex": "#c8553d",
"color_name": "terracotta",
"garment": "dress",
},
)
job = r.json()
print(job["id"], job["status"])<?php
$ch = curl_init("https://api.garmo.studio/v1/edit/color");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode(["image_url" => "https://shop.example/products/dress-123.jpg", "color_hex" => "#c8553d", "color_name" => "terracotta", "garment" => "dress"]),
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("GARMO_API_KEY"), "Idempotency-Key: order-123-color", "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/edit/color")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer #{ENV.fetch("GARMO_API_KEY")}"
req["Idempotency-Key"] = "order-123-color"
req["Content-Type"] = "application/json"
req.body = <<~'JSON'
{
"image_url": "https://shop.example/products/dress-123.jpg",
"color_hex": "#c8553d",
"color_name": "terracotta",
"garment": "dress"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
job = JSON.parse(res.body)
puts job["id"], job["status"]package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"image_url": "https://shop.example/products/dress-123.jpg",
"color_hex": "#c8553d",
"color_name": "terracotta",
"garment": "dress"
}`)
req, _ := http.NewRequest("POST", "https://api.garmo.studio/v1/edit/color", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("GARMO_API_KEY"))
req.Header.Set("Idempotency-Key", "order-123-color")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Garmo {
public static void main(String[] args) throws Exception {
String body = """
{
"image_url": "https://shop.example/products/dress-123.jpg",
"color_hex": "#c8553d",
"color_name": "terracotta",
"garment": "dress"
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create("https://api.garmo.studio/v1/edit/color"))
.header("Authorization", "Bearer " + System.getenv("GARMO_API_KEY"))
.header("Idempotency-Key", "order-123-color")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(res.statusCode() + " " + res.body());
}
}The answer is 202 Accepted with the job:
{
"id": "job_8Kq2xV7mPz4LtR9wNc3B",
"object": "job",
"tool": "color",
"status": "processing",
"livemode": true,
"outputs": [
{
"id": "out_1",
"status": "processing",
"label": "dress · terracotta"
}
],
"credits_charged": 1,
"credits_refunded": 0,
"metadata": {
"sku": "DR-123"
},
"created_at": "2026-11-19T14:02:11Z",
"completed_at": null
}3. Get the result
Either give a webhook_url in the request and receive the finished job (Webhooks), or poll the job every few seconds until status is no longer processing:
curl https://api.garmo.studio/v1/jobs/job_8Kq2xV7mPz4LtR9wNc3B \
-H "Authorization: Bearer $GARMO_API_KEY"const r = await fetch("https://api.garmo.studio/v1/jobs/job_8Kq2xV7mPz4LtR9wNc3B", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.GARMO_API_KEY}`,
},
});
console.log(await r.json());import os, requests
r = requests.get(
"https://api.garmo.studio/v1/jobs/job_8Kq2xV7mPz4LtR9wNc3B",
headers={"Authorization": f"Bearer {os.environ['GARMO_API_KEY']}"},
)
job = r.json()
print(r.json())<?php
$ch = curl_init("https://api.garmo.studio/v1/jobs/job_8Kq2xV7mPz4LtR9wNc3B");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("GARMO_API_KEY")],
]);
$job = json_decode(curl_exec($ch), true);
print_r($job);require "net/http"
require "json"
uri = URI("https://api.garmo.studio/v1/jobs/job_8Kq2xV7mPz4LtR9wNc3B")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer #{ENV.fetch("GARMO_API_KEY")}"
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
job = JSON.parse(res.body)
pp jobpackage main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.garmo.studio/v1/jobs/job_8Kq2xV7mPz4LtR9wNc3B", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("GARMO_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Garmo {
public static void main(String[] args) throws Exception {
HttpRequest req = HttpRequest.newBuilder(URI.create("https://api.garmo.studio/v1/jobs/job_8Kq2xV7mPz4LtR9wNc3B"))
.header("Authorization", "Bearer " + System.getenv("GARMO_API_KEY"))
.GET()
.build();
HttpResponse<String> res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(res.statusCode() + " " + res.body());
}
}{
"id": "job_8Kq2xV7mPz4LtR9wNc3B",
"object": "job",
"tool": "color",
"status": "completed",
"livemode": true,
"outputs": [
{
"id": "out_1",
"status": "succeeded",
"label": "dress · terracotta",
"url": "https://….r2.cloudflarestorage.com/renders/2026/11/8f3c…0.webp?X-Amz-Signature=…",
"url_expires_at": "2026-11-20T14:00:00Z"
}
],
"credits_charged": 1,
"credits_refunded": 0,
"metadata": {
"sku": "DR-123"
},
"created_at": "2026-11-19T14:02:11Z",
"completed_at": "2026-11-19T14:02:58Z"
}Each succeeded output has a signed url valid for about 24 hours; download the file or fetch the job again for a fresh link. Results also appear in your Garmo Studio library (live keys only). See Jobs and results.
Credits
Live jobs spend API credits from packs bought on the API page; Studio credits are not used. One credit is one image (a 4K upscale is two). The credits are taken when the job is created, and every image that fails or is canceled is refunded automatically: the job shows it in credits_refunded. Prices: API pricing.
Sending images
image_url: a public https URL. Garmo downloads it (up to 12 MB, 8 seconds, 2 redirects). Private, local and cloud-metadata addresses are refused.image_base64: the bytes, base64 or adata:URI. Good for small files.upload_id: upload once with POST /uploads, then reuse the id in edits and generates while it is valid.- Multipart: a file field named
image(orimages[]for remove-background and upscale).
JPEG, PNG and WebP, up to 12 MB and 40 megapixels. One request makes at most 12 images.
Retries and idempotency
Send an Idempotency-Key header (any string up to 80 characters, like your order or variant id) on edit requests. For 24 hours the same key with the same body returns the first job instead of making and charging a new one; the same key with a different body is refused with 409 idempotency_conflict.
Limits
Test keys: 5 create requests a minute, 2 images rendering at once. Live keys get higher limits with larger packs. Every answer carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; see Rate limits.




