> For the complete documentation index, see [llms.txt](https://docs.dynamicmockups.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dynamicmockups.com/tools-api/create-embroidery-effect-api.md).

# Create Embroidery Effect API

## Create Embroidery Effect

> Processes an image to generate an embroidery effect. Requires either an image URL or base64-encoded image data.

```json
{"openapi":"3.1.0","info":{"title":"Dynamic Mockups API","version":"1.0"},"servers":[{"url":"https://app.dynamicmockups.com/api/v1"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key required for authentication."}}},"paths":{"/tools/embroidery":{"post":{"summary":"Create Embroidery Effect","description":"Processes an image to generate an embroidery effect. Requires either an image URL or base64-encoded image data.","operationId":"createEmbroidery","parameters":[{"in":"header","name":"Accept","required":true,"schema":{"type":"string","enum":["application/json"]},"description":"The request must accept JSON responses."},{"in":"header","name":"x-api-key","required":true,"schema":{"type":"string","description":"API key required for authentication."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image_url":{"type":"string","format":"uri","description":"URL of the image to process. Either image_url or image_data_b64 must be provided."},"image_data_b64":{"type":"string","description":"Base64-encoded image data. Either image_url or image_data_b64 must be provided."}}}}}},"responses":{"200":{"description":"Embroidery effect successfully generated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"export_path":{"type":"string","description":"The URL where the generated embroidery image can be accessed."}}},"success":{"type":"boolean","description":"Indicates if the API call was successful."},"message":{"type":"string","description":"A message about the API response."}}}}}},"400":{"description":"Bad request due to invalid input parameters. Either image_url or image_data_b64 must be provided."},"401":{"description":"Unauthorized request, invalid or missing API key."},"403":{"description":"Insufficient credits for this action.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"500":{"description":"Failed to process embroidery request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}}}}}}}
```

### Overview

The Embroidery Tool transforms any image into a realistic embroidery or stitched effect. It's ideal to transform an existing artwork image into embroidery and render it on the selected mockup template.

The embroidery versions of designs are often needed for print-on-demand products.

### Provide artwork from a public URL or Base64

Provide your image via `image_url` using a public URL, or `image_data_b64` using a base64-encoded string. Only one input method is required per request. Supported formats include **PNG**, **JPG**, and **WEBP**.

### Output

The API returns an `export_path` containing a URL to the generated embroidery image. This output URL is temporary and should be downloaded or saved into permanent storage.

You can use the returned embroidery image in your mockup renders or save it to your asset library for later use.

### Credit cost

This endpoint consumes 6 credits per successful request. Credits are only deducted after successful processing.

### Tips for best results

For best results, use high-contrast images with clean edges. Simpler designs with fewer colors produce more realistic embroidery effects.

### Try it out in the API Playground

Visit our [API Playground link](https://playground.dynamicmockups.com/use-cases/embroidery-effect/) to try the Embroidery effect in real time.

{% embed url="<https://playground.dynamicmockups.com/use-cases/embroidery-effect/>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dynamicmockups.com/tools-api/create-embroidery-effect-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
