# Generate Public Key

### Steps to Generate Public Key

#### Method I:

1. Paste the following text to your AI Agent

> Generate an Ed25519 key pair for me using OpenSSL and show me

***

#### Method II:

1. Click the link below to visit the asymmetric key generator repository. Select the file (in the red box) that corresponds to your operating system, then download and install the latest version of the key generator.

> 👉 Download the generator: <https://github.com/binance/asymmetric-key-generator/releases>

Note: If the key generator fails to run properly, please download the `.CHECKSUM` file (in the green box) to verify the integrity of the generator package. Please ensure both files are downloaded to the same directory

<figure><img src="https://3168316658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcwvUtvEIyqrWZx7sPliY%2Fuploads%2Frv2Wzjqn4RChTa3DMvPQ%2Fimage.png?alt=media&#x26;token=a55adc66-2ba5-4588-b49b-b106c9ad1bc5" alt=""><figcaption></figcaption></figure>

***

2. Open the key generator and simply click "Generate 1 Key Pair". You will receive one Private Key and one Public Key

⚠️ Please Note:

* Do not share your API Key, Ed25519, or RSA Private Keys! Exposing them may result in the loss of your assets
* Click "SAVE PAIR" or "SAVE" to securely store your keys locally

<figure><img src="https://3168316658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcwvUtvEIyqrWZx7sPliY%2Fuploads%2F6Imj4lx2CvB73BEgSPnL%2Fimage.png?alt=media&#x26;token=738c56f4-727f-43d1-92c5-c8826636d84a" alt=""><figcaption></figcaption></figure>

***

3. Click "COPY" to copy the Public Key, then paste it into the public key input box on the GMGN platform to continue creating your GMGN API Key

<figure><img src="https://3168316658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcwvUtvEIyqrWZx7sPliY%2Fuploads%2FTLbS1ZL2oknfonJW0wJi%2Fimage.png?alt=media&#x26;token=9e1fd11f-6f31-43b8-a95e-448268ece890" alt=""><figcaption></figcaption></figure>

***

### Introduction to Asymmetric Key Pairs (Ed25519 Recommended)

When connecting to the API, we use an asymmetric key pair for secure authentication. The core of this security model is "one key pair, two keys": a Public Key and a Private Key

They are generated through a strict mathematical relationship, but the fundamental design principle ensures that the Public Key can be safely shared openly, while the Private Key must be kept absolutely confidential


---

# 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.gmgn.ai/index/generate-public-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.
