Documentation Index
Fetch the complete documentation index at: https://mintlify.com/renja-g/RiftRelay/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The proxy endpoint is the primary interface for making API requests to Riot Games through RiftRelay. All Riot API requests are routed through this endpoint using the format/{region}/{riot-api-path}.
RiftRelay automatically manages rate limits, spreads requests evenly across the rate limit window, and forwards responses from the Riot API.
Endpoint
Path Parameters
The Riot API platform/region identifier (e.g.,
na1, europe, americas, asia)Must match the pattern [a-z0-9-]+Examples:na1,euw1,kr- Regional endpointseurope,americas,asia- Continental endpoints
The Riot API endpoint path without the region prefixFormat:
/riot/... or /lol/... depending on the APIExamples:riot/account/v1/accounts/by-riot-id/{gameName}/{tagLine}lol/summoner/v4/summoners/by-name/{summonerName}lol/match/v5/matches/{matchId}
Request Headers
Request priority hint to control pacing behaviorValues:
high- Bypass pacing delay while still respecting rate limits- (omitted) - Normal priority with pacing delay
High priority requests skip the pacing queue but still count against rate limits. Use this for time-sensitive requests like live game data.
Authentication
No authentication headers are required in your request. RiftRelay automatically injects theX-Riot-Token header configured via the RIOT_TOKEN environment variable.
When multiple tokens are configured, RiftRelay distributes requests across them automatically.
Response
The response is proxied directly from the Riot API, including:- Status code from upstream
- Response body (JSON)
- Response headers
Success Response
Error Responses
400 Bad Request
Returned when the path format is invalid.- Missing region or path
- Invalid region format (must be lowercase alphanumeric with hyphens)
- Empty upstream path
429 Too Many Requests
Returned when the request queue is full or rate limits are exhausted.Number of seconds to wait before retrying (in seconds)
- Queue capacity exceeded (
QUEUE_CAPACITYreached) - Admission timeout exceeded (request waited longer than
ADMISSION_TIMEOUT) - Rate limits exhausted with no available capacity
502 Bad Gateway
Returned when RiftRelay cannot reach the Riot API.- Network connectivity issues
- Upstream timeout
- Riot API unavailable
Riot API Errors
All other error responses (400, 401, 403, 404, 500, etc.) are forwarded directly from the Riot API with their original status codes and error messages.Examples
Basic Request
Fetch account information by Riot ID:High Priority Request
Bypass pacing delay for time-sensitive requests:Match History
Fetch match details:Summoner Lookup
Get summoner information by name:Implementation Details
Path Processing
RiftRelay parses incoming paths to extract:- Region: First segment after the initial
/ - Upstream Path: Remaining path segments
- Bucket: Combination of region and path pattern for rate limit grouping
{summonerId}) are matched to canonical patterns for rate limit bucketing.
Source: internal/router/path.go:35
Rate Limit Bucketing
Requests are grouped into buckets based on:- Region (e.g.,
na1,europe) - API endpoint pattern (e.g.,
/lol/summoner/v4/summoners/by-name/{summonerName})
internal/router/path.go:63-67
Request Flow
- Path Validation: Verify region and path format (
internal/router/path.go:142-148) - Admission Control: Queue request and wait for rate limit availability (
internal/proxy/admission.go:63-82) - Proxy Rewrite: Rewrite URL to target Riot API (
internal/proxy/proxy.go:85-111) - Rate Limit Update: Observe response headers and update rate limit state (
internal/proxy/proxy.go:127-133) - Response Forward: Return Riot API response to client
Related Endpoints
- Health Check - Check proxy availability
- Metrics - Monitor request statistics
- Swagger UI - Interactive API explorer