Skip to content
SolidRusT.ai

API Keys

API keys authenticate your requests to the SolidRusT AI API. This guide covers generating, using, and managing your API keys via the PAM Console.

  1. Navigate to console.solidrust.ai
  2. Click Sign Up or Get Started
  3. Enter your email address and create a password
  4. Verify your email address via the confirmation link
  5. Log in to your new account
  1. After logging in, go to Dashboard > API Keys
  2. Click Create New Key
  3. Enter a descriptive name for your key (e.g., “Development”, “Production App”)
  4. Select permissions (default: all endpoints)
  5. Click Generate Key

After generation, you’ll see your key in this format:

sk-srt-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Copy the entire key including the sk-srt- prefix.

Include your API key in the Authorization header:

Terminal window
curl https://api.solidrust.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-srt-your-api-key-here" \
-d '{
"model": "vllm-primary",
"messages": [{"role": "user", "content": "Hello!"}]
}'

Store your API key in environment variables - never hardcode it:

Terminal window
# Linux/macOS
export SOLIDRUST_API_KEY="sk-srt-your-api-key-here"
# Windows (PowerShell)
$env:SOLIDRUST_API_KEY = "sk-srt-your-api-key-here"
# Windows (Command Prompt)
set SOLIDRUST_API_KEY=sk-srt-your-api-key-here

Python:

import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("SOLIDRUST_API_KEY"),
base_url="https://api.solidrust.ai/v1"
)

JavaScript/TypeScript:

import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.SOLIDRUST_API_KEY,
baseURL: 'https://api.solidrust.ai/v1',
});
  1. Go to console.solidrust.ai
  2. Navigate to Dashboard > API Keys
  3. View all your keys with:
    • Name
    • Created date
    • Last used date
    • Status (active/revoked)

To create a new key while deprecating an old one:

  1. Create a new API key with a temporary name
  2. Update your application to use the new key
  3. Test that the new key works correctly
  4. Revoke the old key

If a key is compromised or no longer needed:

  1. Go to Dashboard > API Keys
  2. Find the key you want to revoke
  3. Click the Revoke button
  4. Confirm the revocation

Add API keys to your .gitignore:

# Environment files
.env
.env.local
.env.*.local
# API keys
**/secrets.json
**/credentials.json

Use environment variables or secret management tools instead.

EnvironmentKey NamePurpose
Developmentdev-localLocal testing
Stagingstaging-appPre-production testing
Productionprod-app-v1Live application

This allows you to:

  • Track usage by environment
  • Revoke keys without affecting other environments
  • Apply different rate limits per environment

Rotate your API keys regularly:

  1. Schedule rotation - Monthly for production keys
  2. Automate if possible - Use CI/CD to update keys
  3. Monitor usage - Watch for anomalies after rotation

Request only the permissions your application needs:

PermissionUse Case
chat:readChat completions (most common)
embeddings:readEmbedding generation
models:listList available models
{
"error": {
"message": "Invalid API key provided",
"type": "authentication_error",
"code": "invalid_api_key"
}
}

Solutions:

  1. Verify the key is correct (no extra spaces or characters)
  2. Check the key hasn’t been revoked
  3. Ensure the Authorization: Bearer header format is correct
  4. Verify you’re using sk-srt- prefix keys for SolidRusT API
{
"error": {
"message": "API key doesn't have permission for this endpoint",
"type": "permission_error",
"code": "insufficient_permissions"
}
}

Solutions:

  1. Check the key’s permissions in the console
  2. Generate a new key with required permissions
  1. Wait 30 seconds for propagation
  2. Clear any cached credentials
  3. Verify the endpoint URL is correct (https://api.solidrust.ai/v1)
  4. Test with a simple curl command first
PrefixSourceValid For
sk-srt-PAM ConsoleSolidRusT AI API
sk-OpenAINot compatible
key-Other providersNot compatible

Only keys with the sk-srt- prefix work with the SolidRusT AI API.