# Installation

Grace Protocol is accessed entirely through a REST HTTP API. No package installation required.

***

## Base URL

```
https://api.graceprotocol.org/v1
```

All endpoints require HTTPS. HTTP requests are rejected.

***

## Authentication

Every request must include your API key in the `Authorization` header:

```bash
Authorization: Bearer rp_live_...
```

Obtain your API key from the [Grace Protocol dashboard](https://app.graceprotocol.org) under **Settings → API Keys**.

***

## Quick check

Verify your key works:

```bash
curl https://api.graceprotocol.org/v1/wallets \
  -H "Authorization: Bearer $GRACE_API_KEY"
```

***

## CI/CD environments

Set the API key as an environment variable and pass it with each request:

```bash
export GRACE_API_KEY=rp_live_...
```

***

## Per-agent keys

For production deployments, use per-agent keys (`rp_agent_...`) scoped to a single agent. A compromised per-agent key cannot access other agents or modify account configuration.

Create a per-agent key:

```bash
curl -X POST https://api.graceprotocol.org/v1/keys \
  -H "Authorization: Bearer $GRACE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "agentId": "my-agent", "name": "production" }'
```

Rotate without downtime by creating the new key first, updating your application, then revoking the old one:

```bash
curl -X DELETE https://api.graceprotocol.org/v1/keys/rp_agent_01j9... \
  -H "Authorization: Bearer $GRACE_API_KEY"
```


---

# 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.graceprotocol.org/getting-started/installation.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.
