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

# 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](https://1896308808-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdFpuRAnTVYgmlCXLLou%2Fuploads%2Fgit-blob-0c968eb7fccf8587ea3f1a4ca5cb4338d398d786%2Fdashboard-click.png?alt=media)

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

![Go to API keys view](https://1896308808-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdFpuRAnTVYgmlCXLLou%2Fuploads%2Fgit-blob-ad5de47f1b5fb813d07830b7d6eb3e42a4fd0057%2Fapikeys-click.png?alt=media)

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](https://1896308808-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdFpuRAnTVYgmlCXLLou%2Fuploads%2Fgit-blob-52b73f6196e756d7384ca609102f6e46b51c60c4%2Fcreatenewkey-dialog.png?alt=media)

**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.
