API Key Management
Create and manage API keys for accessing Unreal's AI services.
Manage Your API Keys
Create and manage API keys to securely access Unreal's AI services. API keys provide authenticated access to all available endpoints.
Key Management Lifecycle

Creating a New API Key
Create a named API key with a simple POST request:
curl -X POST https://openai.ideomind.org/v1/keys \
-H "Authorization: Bearer <YOUR_SESSION_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "my-production-app"
}'Response:
{
"name": "my-production-app",
"key": "sk-a1b2c3d4e5f6g7h8i9j0...",
"hash": "abc123def456ghi789...",
"created": 1694268762
}⚠️ Security Notice: The complete API key is displayed ONLY ONCE at creation time. Store it securely as it cannot be retrieved again.
Listing Your API Keys
View all your active API keys:
curl -X GET https://openai.ideomind.org/v1/keys \
-H "Authorization: Bearer <YOUR_SESSION_TOKEN>"Response:
{
"keys": [
{
"name": "my-production-app",
"hash": "abc123def456ghi789...",
"created": 1694268762
},
{
"name": "testing-key",
"hash": "def456ghi789jkl...",
"created": 1694352481
}
]
}Getting Key Details and Usage Stats
Retrieve detailed information about a specific API key:
curl -X GET https://openai.ideomind.org/v1/keys/<KEY_OR_HASH_ID> \
-H "Authorization: Bearer <YOUR_SESSION_TOKEN>"Response:
{
"name": "my-production-app",
"hash": "abc123def456ghi789...",
"created": 1694268762,
"usage": {
"requests": 17,
"tokens": 4250
}
}Revoking an API Key
Revoke an API key when it's no longer needed or compromised:
curl -X DELETE https://openai.ideomind.org/v1/keys/<KEY_OR_HASH_ID> \
-H "Authorization: Bearer <YOUR_SESSION_TOKEN>"Response:
{
"deleted": true
}Best Practices
- Create multiple keys for different environments (development, staging, production)
- Rotate keys regularly to enhance security
- Never hardcode keys in source code or client-side applications
- Restrict key access using environment variables or secure vaults
- Monitor usage patterns to detect unusual activity
Using Your API Key
Use your API key to authenticate requests to any Unreal API endpoint:
curl -X POST https://openai.ideomind.org/v1/chat/completions \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "mixtral-8x22b-instruct",
"messages": [
{ "role": "user", "content": "Hello" }
]
}'