API Authentication

Create, manage, and secure your API keys

To secure your projects, Rixl uses project-specific API keys for all API requests. This guide explains how to create, manage, and use them.

[//] # (// TODO: Add diagram here showing the API key authentication workflow.)

How API Keys Work

API keys are the primary method for authenticating with the Rixl API. They are scoped to a single project and grant access to its resources.

  • Project-Scoped: Each key is tied to a specific project.
  • Secure by Default: Keys are only displayed once upon creation.
  • Configurable: You can set names and expiration dates for better management.

Security Notice

API keys are shown only once when you create them. Store your keys securely and do not expose them in client-side code or public repositories.

Creating an API Key

You can create an API key either from your dashboard's Quick Actions or from your created project settings.

[//] # (// TODO: Add a screenshot or GIF of the API key creation interface.)

Access the Creation Interface:

  • Option 1: Log in to your dashboard, click on Quick Action, then select Create API Key
  • Option 2: Navigate to your Project Settings in the dashboard and select the API Keys tab

Click the Create API Key button.

Configure the Key:

  • Key Name: Give it a descriptive name (e.g., "Production App" or "Development-Test")
  • Project: Assign the key to a specific project
  • Expiration: Set an expiration date. For production, consider a year. For testing, a shorter duration like 7 or 30 days is safer

Create and Store the Key: Click Create API Key. The key will be displayed on your screen. Copy it immediately and store it in a secure place like a password manager or an environment variable.

Store Your Key Immediately

For security reasons, your API key is only shown to you once upon creation. You will not be able to retrieve it again.

Using Your API Key

To authenticate an API request, include the key in the X-API-Key header.

curl -X GET "https://api.rixl.com/videos" \
  -H "X-API-Key: YOUR_PROJECT_API_KEY"

Common Examples

curl -X GET "https://api.rixl.com/projects" \
-H "X-API-Key: YOUR_PROJECT_API_KEY"
curl -X POST "https://api.rixl.com/videos/upload/init" \
-H "X-API-Key: YOUR_PROJECT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"file_name": "my-video.mp4",
"video_quality": "shorts"
}'
curl -X POST "https://api.rixl.com/images/upload/init" \
-H "X-API-Key: YOUR_PROJECT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"file_name": "my-image.jpg"
}'

Verification

Test your new API key with a simple API call to verify it's working correctly:

curl -X GET "https://api.rixl.com/projects" \
  -H "X-API-Key: YOUR_PROJECT_API_KEY"

You should receive a response with your project information, confirming the key is working correctly.

Next Steps

  • Set up authentication in your application using the new API key
  • Monitor usage to ensure the key is working as expected

Troubleshooting

  • Key is not working immediately: New keys are active immediately, but if you're having issues, verify you copied the complete key without extra spaces
  • Permission denied errors: Ensure the key is associated with the correct project, and you have necessary permissions
  • API call failures: Check that you're using the correct base URL and request format