# Create OpenRouter API Key

Create an account if you don't have one at [https://openrouter.ai](https://openrouter.ai/).

### Step 1: Add credit balance

If you don't have any credit balance, go to <https://openrouter.ai/account#credits> and click "**Add Credits**", then follow instructions to enter your billing information.

Otherwise, skip this step and go to [#step-2-create-a-api-key](#step-2-create-a-api-key "mention").

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

### Step 2: Create a API key

Visit <https://openrouter.ai/keys> and click "**Create Key**".

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

### Step 3: Enter key name

In this step, you can set credit limit for this specific key to avoid overuse or keep it blank for unlimited use.

<figure><img src="/files/3H5kS495282jRGYtspVz" alt=""><figcaption></figcaption></figure>

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

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

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

Now go to [Add API key](/how-to.../add-api-key.md) and use copied API key to create new 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-openrouter-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.
