# Custom GPT integration

**URL:** <https://community.thunkable.com/t/custom-gpt-integration/3085132>\
**Category:** Web API's\
**Tags:** webapi\
**Created:** [July 3, 2024, 9:05pm UTC](https://community.thunkable.com/t/custom-gpt-integration/3085132 "2024-07-03T21:05:30Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![carlfdunckeri](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/carlfdunckeri/32/179584_2.png) [@carlfdunckeri](https://community.thunkable.com/u/carlfdunckeri)\
**Post date:** [July 3, 2024, 9:05pm UTC](https://community.thunkable.com/t/custom-gpt-integration/3085132/1 "2024-07-03T21:05:30Z")

</div>

Hi,

I’m looking for help on calling my **Custom** GPT please.

I have built the blocks for OpenAI but need the response to be from my Custom GPT in OpenAI.

Thank you

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [July 4, 2024, 5:48am UTC](https://community.thunkable.com/t/custom-gpt-integration/3085132/2 "2024-07-04T05:48:47Z")

</div>

Hi and welcome to Thunkable.

Are you using the OpenAI API or the built-in OpenAI blocks in Thunkable? It helps if you share a screenshot of your blocks. The built-in blocks are quite limited so you’ll most likely need to do this with the Web API blocks.

---

<div class="post-metadata">

**Author:** ![carlfdunckeri](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/carlfdunckeri/32/179584_2.png) [@carlfdunckeri](https://community.thunkable.com/u/carlfdunckeri)\
**Post date:** [July 4, 2024, 7:36am UTC](https://community.thunkable.com/t/custom-gpt-integration/3085132/3 "2024-07-04T07:36:40Z")

</div>

Thank you.

I am using the blocks to call OpenAi  
 ![Screenshot 2024-07-04 08.31.29](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/c/fc43800746400ca685bc816cd8f4caf434960083.png)

The blocks are working fine and are returning the chat from OpenAI. That’s not my difficulty though.

The blocks return, I believe, the generic OpenAI chat. But what I need to return is what they call a Custom GPT (trained and fine-tuned version). So the blocks are fine but I’m looking for a solution that will return my Custom GPT within my OpenAI account.

Are you able to help? Any workable solution I can go with.

Thank you

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [July 4, 2024, 10:15am UTC](https://community.thunkable.com/t/custom-gpt-integration/3085132/4 "2024-07-04T10:15:49Z")

</div>

Hello @carlfdunckeri  
You can accomplish this using Web API blocks.  
Here are some community posts:  
[[SOLVED] Open AI API with Chat GPT 40 - Questions about Thunkable / Issues / Bugs - Community](https://community.thunkable.com/t/solved-open-ai-api-with-chat-gpt-40/3062359)  
[Open AI ChatGPT - Free Templates, Designs, and Block Combinations - Community (thunkable.com)](https://community.thunkable.com/t/open-ai-chatgpt/2174483)  
[Open Ai source ChatGPT API undefined response - Questions about Thunkable - Community](https://community.thunkable.com/t/open-ai-source-chatgpt-api-undefined-response/2972058)

---

<div class="post-metadata">

**Author:** ![carlfdunckeri](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/carlfdunckeri/32/179584_2.png) [@carlfdunckeri](https://community.thunkable.com/u/carlfdunckeri)\
**Post date:** [July 4, 2024, 10:38am UTC](https://community.thunkable.com/t/custom-gpt-integration/3085132/5 "2024-07-04T10:38:55Z")

</div>

This doesn’t produce a solution. There may be a misunderstanding as to what a customised GPT is. See here [https://openai.com/index/introducing-gpts/](https://openai.com/index/introducing-gpts/)

The solutions offered above relate to the standard GPT and date before this feature was launched by OpenAI.

What is needed is not only a working call to OpenAi - that element is fine - there needs to be a further elemnet which calls a specific and customised GPT.

---

<div class="post-metadata">

**Author:** ![carlfdunckeri](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/carlfdunckeri/32/179584_2.png) [@carlfdunckeri](https://community.thunkable.com/u/carlfdunckeri)\
**Post date:** [July 4, 2024, 12:50pm UTC](https://community.thunkable.com/t/custom-gpt-integration/3085132/6 "2024-07-04T12:50:17Z")

</div>

For anyone finding this post, integrating a custom GPT into an environment outside of OpenAI cannot currently be done.

Thanks for support.

---

<div class="post-metadata">

**Author:** ![mitchellgraves823om2](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@mitchellgraves823om2](https://community.thunkable.com/u/mitchellgraves823om2)\
**Post date:** [March 30, 2025, 5:21pm UTC](https://community.thunkable.com/t/custom-gpt-integration/3085132/7 "2025-03-30T17:21:36Z")

</div>

I copied your code and it worked but has suddenly stopped returning a response, why?

 ![Chat GPT block now not working](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/5/e51cc41fafbe1c3b199682055114222f3e744cdd.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 30, 2025, 5:36pm UTC](https://community.thunkable.com/t/custom-gpt-integration/3085132/8 "2025-03-30T17:36:12Z")

</div>

Has your OpenAI license expired? Are you over quota for responses? Are you getting an error message?

---

<div class="post-metadata">

**Author:** ![mitchellgraves823om2](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@mitchellgraves823om2](https://community.thunkable.com/u/mitchellgraves823om2)\
**Post date:** [March 30, 2025, 6:23pm UTC](https://community.thunkable.com/t/custom-gpt-integration/3085132/9 "2025-03-30T18:23:05Z")

</div>

No error message and I still have $4.91 credit in OpenAI, I only started the Key on the 15th of this month so it surely is still relevant.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 30, 2025, 7:04pm UTC](https://community.thunkable.com/t/custom-gpt-integration/3085132/10 "2025-03-30T19:04:45Z")

</div>

It’s working for me. The problem is that you’re setting an app variable to the API key but you need to set this block to the API key:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/optimized/3X/0/3/031efc53133f70b4c594b23711854407fa849d50_2_414x29.png)

---

<div class="post-metadata">

**Author:** ![mitchellgraves823om2](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@mitchellgraves823om2](https://community.thunkable.com/u/mitchellgraves823om2)\
**Post date:** [March 30, 2025, 7:20pm UTC](https://community.thunkable.com/t/custom-gpt-integration/3085132/11 "2025-03-30T19:20:09Z")

</div>

? I don’t quite understand how to set up the block? I had copied the one above and originally it worked fine.

---

<div class="post-metadata">

**Author:** ![krish05](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/krish05/32/200523_2.png) [@krish05](https://community.thunkable.com/u/krish05)\
**Post date:** [March 30, 2025, 8:36pm UTC](https://community.thunkable.com/t/custom-gpt-integration/3085132/12 "2025-03-30T20:36:19Z")

</div>

In the code image you sent, it shows no proof of declaring the variable. You would have to set up the API key not through a variable, but through an OpenAI Services block.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 30, 2025, 9:03pm UTC](https://community.thunkable.com/t/custom-gpt-integration/3085132/13 "2025-03-30T21:03:53Z")

</div>

The blocks in your screenshot will **not** work. So if it worked before then you either used the `set ... API Key` block or you configured the OpenAI key in the components menu. But one of those has to happen for this to work.

Your block might be named slightly different but this is where the SET block comes from:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/0/e0e00178e8f5efa9a004c39a806c9c6a23a58464.png)
