# Generate API Key

**Step 1:** Login or Signup to OpenAI Account using the below URL.

<https://platform.openai.com/>&#x20;

**Step 2:** Click on your profile logo from the upper-right corner and select View API keys.

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

**Step 3:** Now click on Create new secret key button.

<figure><img src="/files/40wW5fvUUhaHbm29oghY" alt=""><figcaption></figcaption></figure>

**Step 4:** The API secret key is generated successfully. You can copy and add to the extension configuration.

<figure><img src="/files/9D7KCJoA3KqDZVuBdJi4" alt=""><figcaption></figcaption></figure>


---

# 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.magecomp.com/magento-2-chatgpt-ai-extension/generate-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.
