# Assistant API (from OpenAI) block configuration

**URL:** <https://community.thunkable.com/t/assistant-api-from-openai-block-configuration/3087722>\
**Category:** Web API's\
**Created:** [July 5, 2024, 4:26pm UTC](https://community.thunkable.com/t/assistant-api-from-openai-block-configuration/3087722 "2024-07-05T16:26:45Z")\
**Posts on this page:** 3\
**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 5, 2024, 4:26pm UTC](https://community.thunkable.com/t/assistant-api-from-openai-block-configuration/3087722/1 "2024-07-05T16:26:46Z")

</div>

Hi,

I have searched and read all relevant posts plus excessively searched elsewhere on the internet. To my knowledge, there is yet to be a published answer to this challenge.

For context: The OpenAI block works great - but it is only for the default OpenAI. The two big updates from OpenAI of the last year are [Custom GPTs](https://openai.com/index/introducing-gpts/) and [Assistant API](https://platform.openai.com/docs/assistants/overview). The former is not relevant as it does not operate outside of OpenAI. The latter is very relevant as it is the only way to offer access to a customised version of ChatGPT to app users - it’s a big deal.

What I’m asking is for the variation needed to have Thunkable connect with an Assistant API.

The first should be to use the Web API block (not OpenAI block).

From there, how should we incorporate the key elements of Assistant API calls?

These are:

1. Secret Key
2. Assistant ID
3. " Calls to the Assistants API require that you pass a beta HTTP header. This is handled automatically if you’re using OpenAI’s official Python or Node.js SDKs."

```auto
OpenAI-Beta: assistants=v2

```

I would, and I’m sure many other OpenAI users, be very grateful for a support thread that offers how to make an Assistant API call with with Thunkable.

Many thanks

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [July 8, 2024, 10:43am UTC](https://community.thunkable.com/t/assistant-api-from-openai-block-configuration/3087722/2 "2024-07-08T10:43:31Z")

</div>

This is a pretty good guide to get you started @carlfdunckeri:

> **[Web APIs Blocks | Thunkable Docs](https://docs.thunkable.com/blocks/advanced-app-features/web-api)**

On the OpenAI side, if you want to connect to their Assistant API, do they provide any Swagger documentation or guides for connecting via something like Postman that you could use to get started configuring this in your Thunkable app?

---

<div class="post-metadata">

**Author:** ![David\_Wolber](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/david_wolber/32/117458_2.png) [@David\_Wolber](https://community.thunkable.com/u/David_Wolber)\
**Post date:** [August 1, 2024, 12:41am UTC](https://community.thunkable.com/t/assistant-api-from-openai-block-configuration/3087722/3 "2024-08-01T00:41:55Z")

</div>

My request: Add an “assistantId” parameter to the OpenAI\_Service.TextCompletion block. The default could be null which would mean the regular “frontier” call to OpenAI. But if the coder specifies an assistantid, the block will prompt that restricted set of info.

OpenAI lets you set up assistants in their UI. I can create one andadd some files to it Prompts sent to it use the document set to answer (mostly). For instance, I’ve got one for my Thunkable book so students can ask the book questions.

It would be a huge addition and reasonably easy to implement for Thunkable team (I apologize in advance for saying that)
