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

> ## Agent Instructions
> The base URL is https://api.sudomock.com.
> Authenticate every request with the x-api-key header. Keys begin with sm_.
> A render returns the finished image at data.print_files[0].export_path. A request sent with is_async true returns a job_id to poll at GET /api/v1/jobs/{job_id}.
> Prefer the official SDKs over hand-written HTTP calls: npm install sudomock for Node, pip install sudomock for Python.

# A Free Way to Bulk Generate Mockups: Start With the Signup Credits

> Bulk generate mockups without paying up front, with the free credits that come with signup, a working request and the plans in plain text.

A free way to bulk generate mockups is to start with the credits that come with signup: no credit card, and the dashboard itself is free. Upload your template once, then send one request for each design, until the batch is done.

SudoMock is a mockup generator and rendering API with a free library of 6,800+ ready-made mockups across 104 product types. It renders a ready-made mockup, your own PSD template, or your own product photo with your artwork and returns the finished image.

No template of your own? [Start from a ready-made template](https://sudomock.com/docs/guides/start-from-a-ready-made-template.md), then run the same batch.

```js Node.js theme={"theme":{"light":"github-light","dark":"vesper"}}
const response = await fetch("https://api.sudomock.com/api/v1/renders", {
  method: "POST",
  headers: {
    "x-api-key": "$SUDOMOCK_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "mockup_uuid": "MOCKUP_UUID",
    "smart_objects": [
      {
        "uuid": "SMART_OBJECT_UUID",
        "asset": {
          "url": "https://example.com/design-001.png"
        }
      }
    ],
    "export_options": {
      "image_format": "jpg"
    }
  }),
});

const data = await response.json();
console.log(data);
```

```php PHP theme={"theme":{"light":"github-light","dark":"vesper"}}
<?php

$payload = <<<'JSON'
{
  "mockup_uuid": "MOCKUP_UUID",
  "smart_objects": [
    {
      "uuid": "SMART_OBJECT_UUID",
      "asset": {
        "url": "https://example.com/design-001.png"
      }
    }
  ],
  "export_options": {
    "image_format": "jpg"
  }
}
JSON;

$ch = curl_init("https://api.sudomock.com/api/v1/renders");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "x-api-key: $SUDOMOCK_API_KEY",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
```

```python Python theme={"theme":{"light":"github-light","dark":"vesper"}}
import requests

payload = {'mockup_uuid': 'MOCKUP_UUID',
 'smart_objects': [{'uuid': 'SMART_OBJECT_UUID',
                    'asset': {'url': 'https://example.com/design-001.png'}}],
 'export_options': {'image_format': 'jpg'}}

response = requests.post(
    "https://api.sudomock.com/api/v1/renders",
    headers={"x-api-key": "$SUDOMOCK_API_KEY"},
    json=payload,
)

response.raise_for_status()
print(response.json())
```

```ruby Ruby theme={"theme":{"light":"github-light","dark":"vesper"}}
require "net/http"
require "uri"

uri = URI("https://api.sudomock.com/api/v1/renders")
request = Net::HTTP::Post.new(uri)
request["x-api-key"] = "$SUDOMOCK_API_KEY"
request["Content-Type"] = "application/json"

request.body = <<~JSON
  {
    "mockup_uuid": "MOCKUP_UUID",
    "smart_objects": [
      {
        "uuid": "SMART_OBJECT_UUID",
        "asset": {
          "url": "https://example.com/design-001.png"
        }
      }
    ],
    "export_options": {
      "image_format": "jpg"
    }
  }
JSON

response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
  http.request(request)
end

puts response.body
```

```go Go theme={"theme":{"light":"github-light","dark":"vesper"}}
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	payload := []byte(`{
  "mockup_uuid": "MOCKUP_UUID",
  "smart_objects": [
    {
      "uuid": "SMART_OBJECT_UUID",
      "asset": {
        "url": "https://example.com/design-001.png"
      }
    }
  ],
  "export_options": {
    "image_format": "jpg"
  }
}`)

	req, err := http.NewRequest("POST", "https://api.sudomock.com/api/v1/renders", bytes.NewBuffer(payload))
	if err != nil {
		panic(err)
	}
	req.Header.Set("x-api-key", "$SUDOMOCK_API_KEY")
	req.Header.Set("Content-Type", "application/json")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
```

```java Java theme={"theme":{"light":"github-light","dark":"vesper"}}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

String payload = """
{
  "mockup_uuid": "MOCKUP_UUID",
  "smart_objects": [
    {
      "uuid": "SMART_OBJECT_UUID",
      "asset": {
        "url": "https://example.com/design-001.png"
      }
    }
  ],
  "export_options": {
    "image_format": "jpg"
  }
}
""";

HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.sudomock.com/api/v1/renders"))
    .header("x-api-key", "$SUDOMOCK_API_KEY")
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString(payload))
    .build();

HttpResponse<String> response = HttpClient.newHttpClient()
    .send(request, HttpResponse.BodyHandlers.ofString());

System.out.println(response.body());
```

```csharp .NET theme={"theme":{"light":"github-light","dark":"vesper"}}
using System.Net.Http;
using System.Text;

var payload = """
{
  "mockup_uuid": "MOCKUP_UUID",
  "smart_objects": [
    {
      "uuid": "SMART_OBJECT_UUID",
      "asset": {
        "url": "https://example.com/design-001.png"
      }
    }
  ],
  "export_options": {
    "image_format": "jpg"
  }
}
""";

var request = new HttpRequestMessage(HttpMethod.Post, "https://api.sudomock.com/api/v1/renders");
request.Headers.Add("x-api-key", "$SUDOMOCK_API_KEY");
request.Content = new StringContent(payload, Encoding.UTF8, "application/json");

var client = new HttpClient();
var response = await client.SendAsync(request);

Console.WriteLine(await response.Content.ReadAsStringAsync());
```

```bash cURL theme={"theme":{"light":"github-light","dark":"vesper"}}
curl -X POST "https://api.sudomock.com/api/v1/renders" \
  -H "x-api-key: $SUDOMOCK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mockup_uuid": "MOCKUP_UUID",
    "smart_objects": [
      {
        "uuid": "SMART_OBJECT_UUID",
        "asset": {
          "url": "https://example.com/design-001.png"
        }
      }
    ],
    "export_options": {
      "image_format": "jpg"
    }
  }'
```

The finished image is at `data.print_files[0].export_path`. You do not need Photoshop, renders match Photoshop's own output, and the same request runs from n8n or Make if you do not write code.

## Running the whole batch

Loop over your designs and send the requests in parallel. The batch runs while you do something else, and plans render 3, 10 or 25 mockups at the same time. The average SudoMock render finishes in under a second; we measure render time in milliseconds.

## And the batch after that

A Photoshop script is enough for a one-time batch on your own computer. The difference shows up on the next batch: an API keeps rendering for every new design, order and listing, with nobody at the computer, and the template you uploaded stays ready.

## What it costs after the free credits

Plans start at $25/month. Subscriptions from $0.002 per render. Signup includes 500 credits, no credit card required.

## Next steps

* The first render, step by step: [Quickstart](https://sudomock.com/docs/quickstart.md)
* No code: [n8n](https://sudomock.com/docs/integrations/n8n.md) and [Make](https://sudomock.com/docs/integrations/make.md)
* No PSD yet: ready [apparel templates](https://sudomock.com/mockups/apparel)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.