Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"group": "Resources",
"pages": [
"resources/supported-chains",
"resources/enterprise",
"resources/developing-with-ai",
"resources/support",
"resources/brand-assets"
Expand Down Expand Up @@ -402,7 +401,11 @@
},
{
"source": "/resources/partnerships",
"destination": "/resources/enterprise"
"destination": "/references/api/api-keys"
},
{
"source": "/resources/enterprise",
"destination": "/references/api/api-keys"
},
{
"source": "/references/sdk/getting-started",
Expand Down
7 changes: 3 additions & 4 deletions features/fast-fill.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ Fast Fill is a feature that allows you to accelerate the destination fill of a c

Before you can start fast filling requests, you need:

1. **An API key** — Required to authenticate your fast fill requests. [Request an API key](/references/api/api-keys#how-to-get-an-api-key).
2. **Enterprise Partnership** — Reach out to the Relay team to become an Enterprise Partner. Learn more about the [Enterprise Partner Program](/resources/enterprise).
3. **A Linked Funding Address** — A wallet address must be linked to your API key. This is the address that will fund your app balance. [Reach out](https://forms.gle/XNeELYavjwoJwPEf7) to the Relay team to link your wallet address.
4. **Sufficient App Balance** — Your app balance must have enough funds to cover fast fills and fee sponsorship. When a fast fill is triggered, a hold is placed against your app balance for the fill amount. This hold is released once the user's deposit lands onchain. While holds are active, they reduce the balance available for new fast fills and claims, but do not block [fee sponsorship](/features/fee-sponsorship) deductions.
1. **An API key** — Required to authenticate your fast fill requests. Create one in the [Relay Dashboard](https://dashboard.relay.link); see [API keys and Rate Limits](/references/api/api-keys) for details.
2. **A Fee Sponsorship Wallet** — A wallet linked to your API key that funds your app balance. Link one from the [App Balance page](https://dashboard.relay.link/balance) in the Relay Dashboard by signing a message to prove ownership — no gas required.
3. **Sufficient App Balance** — Your app balance must have enough funds to cover fast fills and fee sponsorship. When a fast fill is triggered, a hold is placed against your app balance for the fill amount. This hold is released once the user's deposit lands onchain. While holds are active, they reduce the balance available for new fast fills and claims, but do not block [fee sponsorship](/features/fee-sponsorship) deductions.

Once you're set up, you can begin fast filling requests.

Expand Down
5 changes: 2 additions & 3 deletions features/fee-sponsorship.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ Fee sponsorship covers all destination chain fees (including gas topup amounts),

Before you can sponsor transactions, you need:

1. **An API key** — Required to authenticate your sponsorship requests and associate them with your app balance. [Request an API key](/references/api/api-keys#how-to-get-an-api-key).
2. **Enterprise Partnership** — Reach out to the Relay team to become an Enterprise Partner. Learn more about the [Enterprise Partner Program](/resources/enterprise).
3. **A Linked Funding Address** — A wallet address must be linked to your API key. This is the address that will fund your app balance. [Reach out](https://forms.gle/XNeELYavjwoJwPEf7) to the relay team to link your wallet address.
1. **An API key** — Required to authenticate your sponsorship requests and associate them with your app balance. Create one in the [Relay Dashboard](https://dashboard.relay.link); see [API keys and Rate Limits](/references/api/api-keys) for details.
2. **A Fee Sponsorship Wallet** — A wallet linked to your API key that funds your app balance. Link one from the [App Balance page](https://dashboard.relay.link/balance) in the Relay Dashboard by signing a message to prove ownership — no gas required.
3. **Sufficient App Balance** — Your app balance must have enough funds to cover the fees you wish to sponsor.

Once you're set up, you can begin depositing funds and sponsoring transactions.
Expand Down
2 changes: 1 addition & 1 deletion features/gasless-execution.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This is where the `/execute` API comes in. The API allows users to submit raw ca

## How to use it?

This feature is only currently available to Enterprise Partners, learn more about the [Enterprise Partner Program](/resources/enterprise) to get started. Once you're an Enterprise Partner you should have an API key and a linked funding address. You'll then need to fund your app balance, you can learn more about that [here](/features/fee-sponsorship).
To use gasless execution you'll need an API key with a linked funding address and a funded app balance. Create an API key in the [Relay Dashboard](https://dashboard.relay.link), then see [Fee Sponsorship](/features/fee-sponsorship) for details on linking a funding address and funding your app balance.

### Executing a gasless quote

Expand Down
86 changes: 51 additions & 35 deletions references/api/api-keys.mdx
Original file line number Diff line number Diff line change
@@ -1,13 +1,38 @@
---
title: "Rate Limits and API keys"
description: "Authenticate requests and raise your rate limits with a Relay API key"
title: "API keys and Rate Limits"
description: "Create API keys in the Relay Dashboard to authenticate requests and raise your rate limits"
---

Relay enforces rate limits to ensure platform reliability and fair usage across integrators. Default limits apply to all requests. Higher limits are available via API keys.
Relay enforces rate limits to keep the platform reliable for every integrator. Default limits apply to unauthenticated traffic; an API key raises those limits and attributes each request to your account.

## Default Rate Limits (No API key)
You manage keys in the [Relay Dashboard](https://dashboard.relay.link) — create new keys, rotate existing ones, and inspect individual requests.

The following limits apply when no API key is provided:
## Creating an API key

API keys are self-serve. To create one:

1. Sign in to the [Relay Dashboard](https://dashboard.relay.link).
2. Open the **API keys** tab.
3. Click **Create key**, give it a label (e.g. `production`, `staging`), and copy the key.

<Tip>
Use a separate key per environment (production, staging, local). Per-key request history makes it easy to spot a misbehaving deploy without revoking the wrong credential.
</Tip>

## Tracking requests

The [Relay Dashboard](https://dashboard.relay.link) is also where you observe what your integration is doing in production:

- **Requests** — full history of quotes and intents made with each key, with status, route, amounts, and timing.
- **Advanced filtering** — narrow the table by chain, currency, amount, status, time, and more, combining conditions with AND/OR logic to isolate exactly the requests you care about.
- **Custom views** — save any combination of filters, sort order, and columns as a reusable view for your team, each with its own name, icon, and color.
- **Keys** — create, rename, and revoke keys for your account.

When debugging a specific transaction, paste the `requestId` from your application into the dashboard's search to jump straight to the matching record.

## Default Rate Limits (no API key)

The following limits apply to unauthenticated requests:

| Endpoint | Limit |
| ---------------------- | ----------------------- |
Expand All @@ -18,7 +43,7 @@ The following limits apply when no API key is provided:

## API key Rate Limits

When using an API key, limits increase and are applied per key:
Authenticated requests get higher limits, applied per key:

| Endpoint | Limit |
| ---------------------- | ----------------------- |
Expand All @@ -29,28 +54,22 @@ When using an API key, limits increase and are applied per key:

API keys are recommended for server-side production integrations and higher-throughput use cases.

## How to Get an API key

Create an API key in the [Relay Dashboard](https://dashboard.relay.link/api-keys).

## How to Use an API key

### HTTP Requests
### HTTP requests

Pass the API key in the request headers:
Pass the key in the request headers on every call where you want elevated limits:

```
x-api-key: YOUR_API_KEY
```

This header should be included on all requests where higher rate limits are required.

### SDK Usage
### SDK usage

<CodeGroup>

```jsx Global API key
// It is recommended to only set the apiKey parameter when using the SDK server-side.
```typescript Global API key
// Set apiKey only when using the SDK server-side.
import {
createClient,
MAINNET_RELAY_API,
Expand All @@ -59,54 +78,51 @@ import {
createClient({
baseApiUrl: MAINNET_RELAY_API,
apiKey: "YOUR_API_KEY",
...
//other parameters
// ...other parameters
});
```


```jsx SDK Action API key
// In the case that you prefer not to set a global api key
// you can pass the api key into the headers parameter of the getQuote function.
```typescript SDK action API key
// Or pass the key per-call via the headers parameter.
import { getClient } from "@relayprotocol/relay-sdk";

const quoteParams = {...}
const quoteParams = { /* ... */ };

const quote = await getClient()?.actions.getQuote(params, undefined, {
"x-api-key": "YOUR_API_KEY"
const quote = await getClient()?.actions.getQuote(quoteParams, undefined, {
"x-api-key": "YOUR_API_KEY",
});
```

</CodeGroup>

### Proxy API

If using the sdk on the client, create a proxy api which appends the key in the headers and then pass that endpoint into the `baseApiUrl` parameter. This prevents your key from being leaked while allowing you to set up the necessary protection in your proxy api.
If you're calling the SDK from the browser, stand up a proxy that appends the key server-side and point `baseApiUrl` at it. This keeps the key out of client bundles while preserving elevated limits.

```jsx
```typescript
import {
createClient,
MAINNET_RELAY_API,
} from "@relayprotocol/relay-sdk";

createClient({
baseApiUrl: "https://my-proxy.relay.link", //Replace with your proxy endpoint
...
//other parameters
baseApiUrl: "https://my-proxy.relay.link", // Replace with your proxy endpoint
// ...other parameters
});
```

## Keeping Your API key Secure

Your API key is sensitive — treat it like a password. It is tied to your account, controls your rate limits, and all requests made with it are attributed to you.
Treat your API key like a password. It's tied to your account, controls your rate limits, and every request made with it is attributed to you.

<Warning>
If your API key is leaked, unauthorized parties could consume your rate limits or make requests on your behalf. Contact us immediately if you suspect your key has been compromised and we will rotate it for you.
If your key is leaked, anyone holding it can consume your rate limits or make requests on your behalf. Revoke and re-create the key in the [Relay Dashboard](https://dashboard.relay.link) immediately if you suspect it has been compromised.
</Warning>

**Best practices:**

- **Keep it server-side only** — never expose it in client-side or frontend code. Use a [proxy API](#proxy-api) if calling Relay from the browser.
- **Use environment variables** — store your key in environment variables, not hardcoded in source code.
- **Use environment variables** — store the key in environment variables, not hardcoded in source code.
- **Don't commit it to version control** — add it to `.gitignore` or use a secrets manager.
- **Restrict access** — only share the key with team members who need it.
- **Restrict access** — only share the key with team members who need it.
- **Rotate regularly** — create a new key in the [Relay Dashboard](https://dashboard.relay.link) and revoke the old one whenever a team member with access leaves.
4 changes: 2 additions & 2 deletions references/api/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Follow this 5-step flow to integrate Relay into your application:

<Callout icon="key" color="#4615C8">
### API key Provisioning
You can find a self-serve form to request API keys [here](/references/api/api-keys#how-to-get-an-api-key). <br/>
Having an API key will allow you to use the API at a higher rate limit.
Create an API key in the [Relay Dashboard](https://dashboard.relay.link) to raise your rate limits. <br/>
See [API keys and Rate Limits](/references/api/api-keys) for usage and limits.
</Callout>

## Chain Configuration
Expand Down
23 changes: 0 additions & 23 deletions resources/enterprise.mdx

This file was deleted.

32 changes: 0 additions & 32 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,34 +128,6 @@ function enhanceGetChainsPage() {
});
}

function enhanceFeeSponsorshipPage() {
waitForElementId("#page-title", "Fee Sponsorship", () => {
if (!document.getElementById("enterprise-link")) {
const enterpriseLink = document.createElement("a");
enterpriseLink.textContent = "Enterprise";
enterpriseLink.href = "/resources/enterprise";
enterpriseLink.id = "enterprise-link";
const pageTitle = document.getElementById("page-title");
pageTitle.appendChild(enterpriseLink);
pageTitle.classList.add("flex", "items-center");
}
});
}

function enhanceFastFillPage() {
waitForElementId("#page-title", "Fast Fill", () => {
if (!document.getElementById("enterprise-link")) {
const enterpriseLink = document.createElement("a");
enterpriseLink.textContent = "Enterprise";
enterpriseLink.href = "/resources/enterprise";
enterpriseLink.id = "enterprise-link";
const pageTitle = document.getElementById("page-title");
pageTitle.appendChild(enterpriseLink);
pageTitle.classList.add("flex", "items-center");
}
});
}

// ---- MAIN NAVIGATION HANDLER --------------

function onPageChange() {
Expand All @@ -171,10 +143,6 @@ function onPageChange() {
startPageObserver(enhanceGetQuotePage);
} else if (path.includes("/references/api/get-chains")) {
startPageObserver(enhanceGetChainsPage);
} else if (path.includes("/features/fee-sponsorship")) {
startPageObserver(enhanceFeeSponsorshipPage);
} else if (path.includes("/features/fast-fill")) {
startPageObserver(enhanceFastFillPage);
}
}

Expand Down
4 changes: 2 additions & 2 deletions snippets/GetAnApiKey.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<Tip>
To get a higher rate limit, you can [request an API key](/references/api/api-keys#how-to-get-an-api-key).
</Tip>
Create an API key in the [Relay Dashboard](https://dashboard.relay.link) to raise your rate limits.
</Tip>
14 changes: 0 additions & 14 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,6 @@
max-height: 32px;
}

#enterprise-link {
margin-left: 10px;
padding: 2px 8px;
color: #fff;
border-radius: 20px;
font-size: 14px;
background-color: rgb(var(--primary-dark)/1);
display: inline-block;
line-height: normal;
font-weight: 600;
font-style: normal;
letter-spacing: normal;
}

@media (width < 700px) {
[class*="intercom-with-namespace"],
.intercom-lightweight-app-launcher {
Expand Down
4 changes: 0 additions & 4 deletions what-is-relay.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,3 @@ Unlike traditional bridges, Relay delivers the reliability users expect from mod
**For Users**: [Try the Relay App](https://relay.link/) to swap any token across any chain instantly.

**For Teams & Developers**: Check out our [Quickstart Guide](/references/api/quickstart) to add multichain payments to your app.

---

_Contact us about enterprise features including dedicated support, custom SLAs, and priority routing._
Loading