# Generate OpenAI API Key

To use this Xcode Source Editor extension, you'll need a valid OpenAI API key, which you can create at this [link](https://platform.openai.com/account/api-keys).

1. Click on + Create new secret key, and a new API key will be generated.
2. Copy your API key and store them securely on your disk.

<figure><img src="https://892853070-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEuaKTe26wmzERu1xq08z%2Fuploads%2F5ZISAKU2jPvfdyLzfeEL%2FBildschirm%C2%ADfoto%202023-02-21%20um%2018.59.18.png?alt=media&#x26;token=f475878b-cd87-4f9b-a3db-9c18e517de05" 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://adri567.gitbook.io/autogpt/before-you-start/generate-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.
