Skip to main content

Documentation Index

Fetch the complete documentation index at: https://rocks.docs.rive.wtf/llms.txt

Use this file to discover all available pages before exploring further.

API Key Authentication

All endpoints require a Bearer token. Send your API key in the Authorization header on every request.

Getting Your API Key

1

DM southctrl

DM southctrl on Discord to apply for a key
2

Wait for Review

Keys are approved manually
3

Receive Your Key

If approved, you will receive your key in Discord DMs
4

Store Securely

Store your key safely, preferably in environment variables
Every key is assigned to one IP. Do not share or reuse your key across different IPs.

Header Format

Include this header in every request:
Authorization: Bearer YOUR_API_KEY

Example Requests

curl -X GET "https://rocks.rive.wtf/api/bible/random?translation=web" \
  -H "Authorization: Bearer YOUR_API_KEY"

Using Environment Variables

Do not hardcode your API key. Use environment variables whenever possible.
// .env file
ROCKS_API_KEY=your_api_key_here

// In your code
require('dotenv').config();
const API_KEY = process.env.ROCKS_API_KEY;

const response = await fetch('https://rocks.rive.wtf/api/endpoint', {
  headers: {
    'Authorization': `Bearer ${API_KEY}`
  }
});

Rules and Best Practices

Environment Variables

Store your key in environment variables, not in source code

Gitignore Files

Add .env and other secret files to .gitignore

One Key, One IP

Each key is tied to one IP

Need Help?

DM southctrl on Discord if you need help with your key
  • Every key is assigned to one IP
  • You must DM southctrl on Discord to apply for a key
  • Never post your key in GitHub, Discord servers, or public code
  • If your key is exposed, DM southctrl immediately

Rate Limiting

The API uses rate limits to keep usage fair:
  • Standard: 100 requests per minute
  • Burst: 10 requests per second
If you need higher limits, DM southctrl on Discord with your use case.
Responses include rate limit headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200
Use exponential backoff if you receive 429:
async function makeRequestWithRetry(url, retries = 3) {
  for (let i = 0; i < retries; i++) {
    const response = await fetch(url, {
      headers: { 'Authorization': `Bearer ${API_KEY}` }
    });
    
    if (response.status !== 429) {
      return response.json();
    }
    
    // Wait before retrying (exponential backoff)
    await new Promise(resolve => setTimeout(resolve, 1000 * Math.pow(2, i)));
  }
  throw new Error('Rate limit exceeded');
}

Error Responses

If authentication fails, you may receive:
Status CodeDescriptionSolution
401Missing or invalid API keyCheck your key and header format
403API key doesn’t have permissionDM southctrl if you need access
429Rate limit exceededWait and try again later
500Server errorTry again later or ask for support

Example Error Response

{
  "success": false,
  "error": {
    "code": 401,
    "message": "Invalid or missing API key",
    "details": "Please provide a valid API key in the Authorization header"
  }
}

Test Your Key

Use this request to check whether your key works:
curl -X GET "https://rocks.rive.wtf/api/bible/random?translation=web" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -w "\nStatus: %{http_code}\n"

Need Help?

Contact Support

Discord: southctrlDM for key applications, authentication help, or compromised keys.
Treat your API key like a password.