# Create OpenAI API Key

If you don't have an account, let's create one at <https://platform.openai.com/signup>.&#x20;

### Step 1: Add payment details

If you don't have free credit, you might need to add payment detail and add credit balance to start using OpenAI API. Go to <https://platform.openai.com/account/billing/overview> and click "Add payment details".&#x20;

Otherwise, if you already have credit balance, just skip this step and go to [#step-6-go-to-https-platform.openai.com-api-keys-and-click-create-new-secret-key](#step-6-go-to-https-platform.openai.com-api-keys-and-click-create-new-secret-key "mention").

<figure><img src="/files/xnecIhy2LyDlwvwcTAZf" alt=""><figcaption></figcaption></figure>

### Step 2: Select payment type

Choose your best fit payment type. Let try with "Individual" if you plan to use the API personally.

<figure><img src="/files/coQ4AMuakCZzefnY5MkV" alt=""><figcaption></figcaption></figure>

### Step 3: Enter card information

<figure><img src="/files/4QVQ3J5xuYKuu8DmQqf4" alt=""><figcaption></figcaption></figure>

### Step 4: Add credit balance

<figure><img src="/files/xNTsK2GEFDMpm4Cmkanl" alt=""><figcaption></figcaption></figure>

### Step 5: Enter amount

<figure><img src="/files/en5XRGoY5RlD6SAqv4DH" alt=""><figcaption></figcaption></figure>

### Step 6: Go to <https://platform.openai.com/api-keys> and click "Create new secret key"

<figure><img src="/files/ilCOH5m6INDZdxyEj1jC" alt=""><figcaption></figcaption></figure>

### Step 7: Enter key name and click "Create secret key"

<figure><img src="/files/86dRFFmT5unpge27eajU" alt=""><figcaption></figcaption></figure>

### Step 8: Copy the API key. Keep it secret.

Please notice that you won't be able to view the key again through your OpenAI account for security reasons. If you lose this secret key, you'll need to generate a new one.

<figure><img src="/files/ST4fzFSWTWLYuVEu76pV" alt=""><figcaption></figcaption></figure>

Now go to [Add API key](/how-to.../add-api-key.md) and use copied API key to create new API endpoint.


---

# 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.mindmac.app/how-to.../add-api-key/create-openai-api-key.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.
