> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reygrid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create and protect API keys

> Create a ReyGrid API credential and use it safely in your application.

API keys authenticate your application to the ReyGrid API. Create a key from **API Keys** in the console. Key management is available to the workspace owner and admins.

**1. Create a key**

Choose **API Keys**, create a key, and give it a name that identifies its application or environment.

**2. Set appropriate limits**

If quota controls are available, set a limit for the intended use. Depending on your plan, you may also be able to set an expiry, restrict agents, or allowlist IP addresses.

**3. Store the secret securely**

Copy the key when created and store it in a server-side secret manager or environment variable. Do not put it in browser code, a mobile app bundle, a public repository, or a support ticket.

**4. Use and monitor it**

Send it as a Bearer token. Review usage and API Logs, and revoke a key that is no longer needed or may have been exposed.

```bash theme={"system"}
curl https://reygrid.com/api/v1/validate \
  -H "Authorization: Bearer $REYGRID_API_KEY"
```

Use distinct keys for development and production when practical. This helps identify traffic and revoke one environment without disrupting another.

Continue with [REST API authentication](https://docs.reygrid.com/rest-api/authentication.md) or the [console-first quickstart](https://docs.reygrid.com/quickstart.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.