Skip to content

API Keys

API keys are essential credentials for accessing RIFX services, used to identify and authenticate users or applications. With API keys, you can securely authenticate and access specific API functionalities. This guide will detail how to obtain, manage, and securely use API keys.

Getting API Keys

Registration and Login

  1. Visit Rifx.online to create an account
  2. Log in to the RIFX Console

Generating Keys

  1. Navigate to the “API Keys” page in the console
  2. Click the “Generate New Key” button
  3. Add a descriptive name for the key (recommend noting its purpose)
  4. Select key permission scope
  5. Confirm generation

Using API Keys

When making API requests, you need to include your API key in the request header. Example:

Terminal window
curl https://api.rifx.online/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $RIFX_API_KEY" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{
"role": "user",
"content": "What is the purpose of existence?"
}
]
}'

Security Best Practices

  1. Rotate keys regularly (recommended every 90 days)
  2. Revoke unused keys promptly
  3. Follow the principle of least privilege
  4. Avoid hardcoding keys in code
  5. Use environment variables to store keys