> For the complete documentation index, see [llms.txt](https://aidocs.thunkable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aidocs.thunkable.com/features/api/openai.md).

# OpenAI

### Overview <a href="#overview" id="overview"></a>

An artificial intelligence research and deployment company,[ OpenAI](https://openai.com/) focuses on the creation of safe, artificial, general intelligence. Their latest AI model, called ChatGPT, has the ability to interact with a user in a conversational tone.

When prompted, it composes responses relevant to the topic requested. Thunkable creators can utilize this model in their own apps and tap into the power of AI and natural language generation.

{% hint style="info" %}
OpenAI no longer provides Free Trial credits. An OpenAI paid account is required to make API calls. Please see [OpenAI pricing](https://openai.com/pricing#language-models).
{% endhint %}

#### Create an OpenAI account and generate a secret API key <a href="#create-an-openai-account-and-generate-a-secret-api-key" id="create-an-openai-account-and-generate-a-secret-api-key"></a>

To use the OpenAI ChatGPT model in your Thunkable app, you need to generate a personal Open AI API key. To do this:

1. Navigate to <https://openai.com/api/>
2. Click **Sign Up**.
3. On the Overview page, click your avatar to show the menu and select **View API Keys**.
4. Select **Create new secret key**.
5. Copy the secret key that is provided in the pop-up window. You will need to paste this into your Thunkable project.

{% hint style="warning" %}
You will only be able to see your OpenAI API key once. You will not be able to copy it after the initial modal closes.
{% endhint %}


---

# 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://aidocs.thunkable.com/features/api/openai.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.
