# OpenAI setup

To get an OpenAI API key, first register an account in [their platform](https://openai.com/blog/openai-api). Note that you can only use the OpenAI API if you have active credit grant(s).

After signing up go to <https://platform.openai.com>, and click on *Dashboard* in the top right corner.

![Go to dashboard](/files/J1moFPBhLhEEAWW44T3I)

Then, click *API keys* in the menu to the left.

![Go to API keys view](/files/EaX26PTexe66AKmSmceD)

Open the create dialog by clicking *Create new secret key*. Keep the default selected permission settings ('All'), and give it a name (the name can be whatever you want).

![Create API key](/files/XsLrCzpfufDlkHqZeHj4)

**Make sure you copy the generated key, and store it somewhere safe.** You won't be able to get the key after you've clicked done.


---

# Agent Instructions: 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.midio.com/midio-docs/tutorial/openai-setup.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.
