# How can I apply a saved template on an image using API?

**URL:** <https://photoroom.discourse.group/t/how-can-i-apply-a-saved-template-on-an-image-using-api/58>\
**Category:** API General Questions\
**Tags:** api-implementation, image-editing\
**Created:** [May 20, 2025, 4:14pm UTC](https://photoroom.discourse.group/t/how-can-i-apply-a-saved-template-on-an-image-using-api/58 "2025-05-20T16:14:01Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashwin.kambli](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@ashwin.kambli](https://photoroom.discourse.group/u/ashwin.kambli)\
**Post date:** [May 20, 2025, 4:14pm UTC](https://photoroom.discourse.group/t/how-can-i-apply-a-saved-template-on-an-image-using-api/58/1 "2025-05-20T16:14:01Z")

</div>

I have a template which shows a product with marketing phrases at the bottom right corner. I want to apply this template on other product images where I will provide new marketing phrases relevant to that product and I want it applied in a similar fashion at the bottom right corner of the image.  
I want to do this using API. How can I do that?

---

<div class="post-metadata">

**Author:** ![Photoroom](https://sea2.discourse-cdn.com/flex002/user_avatar/photoroom.discourse.group/photoroom/32/6_2.png) [@Photoroom](https://photoroom.discourse.group/u/Photoroom)\
**Post date:** [May 21, 2025, 7:41am UTC](https://photoroom.discourse.group/t/how-can-i-apply-a-saved-template-on-an-image-using-api/58/2 "2025-05-21T07:41:37Z")

</div>

Hi @ashwin.kambli ,

That’s a great question.

Do you have any image examples you’d be able to provide? That would be extremely useful.

Thank you!

---

<div class="post-metadata">

**Author:** ![ashwin.kambli](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@ashwin.kambli](https://photoroom.discourse.group/u/ashwin.kambli)\
**Post date:** [May 21, 2025, 1:06pm UTC](https://photoroom.discourse.group/t/how-can-i-apply-a-saved-template-on-an-image-using-api/58/3 "2025-05-21T13:06:25Z")

</div>

Absolutely!!  
Here is the template.

 ![Yoga Pants Template-Photoroom](https://us1.discourse-cdn.com/flex002/uploads/photoroom/original/1X/828bd8da859d93b36760294a261e6faa856c4b58.jpeg)

I would then provide another similar image and would I want to apply the template to it.  
I’ll provide 3 phrases such as: “Super comfortable!!”, “Stretchy!!” and “Trendy!!”. I want to overlay these 3 phrases on the provided image at the same position as in the template, using the same font, etc.

---

<div class="post-metadata">

**Author:** ![ashwin.kambli](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@ashwin.kambli](https://photoroom.discourse.group/u/ashwin.kambli)\
**Post date:** [May 21, 2025, 11:23pm UTC](https://photoroom.discourse.group/t/how-can-i-apply-a-saved-template-on-an-image-using-api/58/4 "2025-05-21T23:23:00Z")

</div>

I see that I can render using a template using the v1 API. But, I don’t see how we can send custom text to that API which will replace the text in the template.

---

<div class="post-metadata">

**Author:** ![Photoroom](https://sea2.discourse-cdn.com/flex002/user_avatar/photoroom.discourse.group/photoroom/32/6_2.png) [@Photoroom](https://photoroom.discourse.group/u/Photoroom)\
**Post date:** [May 22, 2025, 10:35am UTC](https://photoroom.discourse.group/t/how-can-i-apply-a-saved-template-on-an-image-using-api/58/5 "2025-05-22T10:35:34Z")

</div>

Hi @ashwin.kambli ,

Would you be open to a 15 minute zoom call so that we can discuss your use-case further, and chat through a potential solution for you to get your feedback?

If so, I will send through an email to cordinate 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![ashwin.kambli](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@ashwin.kambli](https://photoroom.discourse.group/u/ashwin.kambli)\
**Post date:** [May 22, 2025, 2:57pm UTC](https://photoroom.discourse.group/t/how-can-i-apply-a-saved-template-on-an-image-using-api/58/6 "2025-05-22T14:57:17Z")

</div>

Sure!! Please send me the zoom invite.

---

<div class="post-metadata">

**Author:** ![Photoroom](https://sea2.discourse-cdn.com/flex002/user_avatar/photoroom.discourse.group/photoroom/32/6_2.png) [@Photoroom](https://photoroom.discourse.group/u/Photoroom)\
**Post date:** [May 23, 2025, 7:26am UTC](https://photoroom.discourse.group/t/how-can-i-apply-a-saved-template-on-an-image-using-api/58/7 "2025-05-23T07:26:17Z")

</div>

I have sent you a DM to inquire on personal details (email and timezone) to get this scheduled 🙂

---

<div class="post-metadata">

**Author:** ![Photoroom](https://sea2.discourse-cdn.com/flex002/user_avatar/photoroom.discourse.group/photoroom/32/6_2.png) [@Photoroom](https://photoroom.discourse.group/u/Photoroom)\
**Post date:** [May 28, 2025, 5:44pm UTC](https://photoroom.discourse.group/t/how-can-i-apply-a-saved-template-on-an-image-using-api/58/8 "2025-05-28T17:44:43Z")

</div>

Hi @ashwin.kambli ,

To follow up:

You can now use the API with templates by applying a predefined design to an existing image. To use templates, you need to include three main parameters in your API call:

1. **apiKey** : Your personal Photoroom API key.

2. **templateId** : The identifier of the template you want to apply. This ID is either obtained from one of the default templates provided or created from your own custom template through the PhotoRoom web app (by creating, turning it into a template, and sharing it).

3. **imageUrl** : The URL of the image that will be processed.

In practice, you integrate the API by taking your existing image URL and adding it (as the last parameter) to the API call which includes the apiKey and templateId. This simple structure enables the API to automatically apply the specific template to your image.

Let me know if this doesn’t work for the flow we went through?

Best,

---

<div class="post-metadata">

**Author:** ![ashwin.kambli](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@ashwin.kambli](https://photoroom.discourse.group/u/ashwin.kambli)\
**Post date:** [May 28, 2025, 6:58pm UTC](https://photoroom.discourse.group/t/how-can-i-apply-a-saved-template-on-an-image-using-api/58/9 "2025-05-28T18:58:29Z")

</div>

Hi Allie,  
This is what is currently available. But, what I want to be able to do is replace items in the template: for example, replace the subject with the subject from the image, replace the text, etc. What I got from the call was that you are still a few weeks away from making that available through APIs.  
Please correct me if I am wrong.  
Thanks,  
Ashwin

---

<div class="post-metadata">

**Author:** ![teamMaid](https://avatars.discourse-cdn.com/v4/letter/t/898d66/32.png) [@teamMaid](https://photoroom.discourse.group/u/teamMaid)\
**Post date:** [July 23, 2025, 6:01pm UTC](https://photoroom.discourse.group/t/how-can-i-apply-a-saved-template-on-an-image-using-api/58/10 "2025-07-23T18:01:33Z")

</div>

Dear,

do you have known issues with templateID? in V2/edit? the API woks fine but returns an empty image when using the template ID. It used to work beatuifly. Now i get an empty image. both in GET and also in POST.

Looking forward to your help  
BR  
Seb

---

<div class="post-metadata">

**Author:** ![Photoroom](https://sea2.discourse-cdn.com/flex002/user_avatar/photoroom.discourse.group/photoroom/32/6_2.png) [@Photoroom](https://photoroom.discourse.group/u/Photoroom)\
**Post date:** [July 28, 2025, 8:05am UTC](https://photoroom.discourse.group/t/how-can-i-apply-a-saved-template-on-an-image-using-api/58/11 "2025-07-28T08:05:08Z")

</div>

Hi @teamMaid ,

Would you be able to share the templateID along with the params you’re using? We will be able to take a look at this closer for you.

Thanks for flagging.

---

<div class="post-metadata">

**Author:** ![teamMaid](https://avatars.discourse-cdn.com/v4/letter/t/898d66/32.png) [@teamMaid](https://photoroom.discourse.group/u/teamMaid)\
**Post date:** [July 28, 2025, 11:48am UTC](https://photoroom.discourse.group/t/how-can-i-apply-a-saved-template-on-an-image-using-api/58/12 "2025-07-28T11:48:13Z")

</div>

Dear, the TemplateID is: 1978ac0d-7a88-496e-8fdc-6d7adce67e0e

the query params i use are:

scaling : fit  
imageUrl : [url}  
background.color : f3f3f3

It used to work and stopped without me changing anything.  
Thanky ou for your help

---

<div class="post-metadata">

**Author:** ![teamMaid](https://avatars.discourse-cdn.com/v4/letter/t/898d66/32.png) [@teamMaid](https://photoroom.discourse.group/u/teamMaid)\
**Post date:** [August 1, 2025, 3:24pm UTC](https://photoroom.discourse.group/t/how-can-i-apply-a-saved-template-on-an-image-using-api/58/13 "2025-08-01T15:24:31Z")

</div>

Dear @Photoroom

is there anything else you need to support?

---

<div class="post-metadata">

**Author:** ![Photoroom](https://sea2.discourse-cdn.com/flex002/user_avatar/photoroom.discourse.group/photoroom/32/6_2.png) [@Photoroom](https://photoroom.discourse.group/u/Photoroom)\
**Post date:** [August 6, 2025, 7:19am UTC](https://photoroom.discourse.group/t/how-can-i-apply-a-saved-template-on-an-image-using-api/58/14 "2025-08-06T07:19:16Z")

</div>

Hi @teamMaid ,

We are in the process of investigating the issue for you. Thanks for providing the details and I will come back to you as soon as possible with any next steps on this

---

<div class="post-metadata">

**Author:** ![Photoroom](https://sea2.discourse-cdn.com/flex002/user_avatar/photoroom.discourse.group/photoroom/32/6_2.png) [@Photoroom](https://photoroom.discourse.group/u/Photoroom)\
**Post date:** [August 6, 2025, 1:34pm UTC](https://photoroom.discourse.group/t/how-can-i-apply-a-saved-template-on-an-image-using-api/58/15 "2025-08-06T13:34:23Z")

</div>

> [@teamMaid](#):
>
> 1978ac0d-7a88-496e-8fdc-6d7adce67e0e

Hi there,

On my end it is showing that you do not have any replaceable layers currently enabled. Do you need guidance on how to do so?

Happy to help if need be.
