Authentication
SolCognia API uses API keys for authentication, with optional OAuth 2.0 support for user-facing applications.
API Key Authentication
Getting Your API Key
Register at solcognia.xyz
Navigate to Developer Dashboard
Click "Generate API Key"
Copy and securely store your key
Using API Keys
Include your API key in the Authorization header:
curl -H "Authorization: Bearer sk_live_1234567890abcdef" \
https://api.solcognia.xyz/v1/modelsAPI Key Types
Development Keys (sk_dev_...)
Limited to 100 requests per hour
Access to basic AI models only
Suitable for testing and development
Production Keys (sk_live_...)
Higher rate limits based on your plan
Access to all available features
Required for production applications
OAuth 2.0 (Coming Soon)
For applications that need to act on behalf of users:
Authorization Flow
Authorization Request
Token Exchange
Using Access Tokens
Wallet-Based Authentication
For blockchain-specific operations:
Wallet Connection
Signed Requests
Some operations require wallet signatures for security:
Security Best Practices
API Key Management
Never expose API keys in client-side code
Use environment variables for key storage
Rotate keys regularly
Use different keys for different environments
Rate Limiting
Implement exponential backoff for retries
Cache responses when appropriate
Monitor your usage to avoid limits
Upgrade your plan if needed
Error Handling
Permissions and Scopes
API Key Permissions
models:read- Access AI model informationmodels:use- Execute AI model requestsworkflows:read- View workflow informationworkflows:write- Create and modify workflowsworkflows:execute- Run workflow executionstokens:read- View token balance and historytokens:claim- Claim earned tokensuser:read- Access user profile informationuser:write- Modify user profile
OAuth Scopes
read_profile- Read user profile informationmanage_workflows- Create and manage workflowsexecute_workflows- Run workflow executionsview_tokens- View token balance and transactionsclaim_tokens- Claim earned token rewards
Testing Authentication
Verify API Key
Response:
Test OAuth Token
Troubleshooting
Common Issues
401 Unauthorized
Check that your API key is correct
Ensure the key hasn't expired
Verify you're using the correct authentication method
403 Forbidden
Check that your API key has the required permissions
Ensure you haven't exceeded rate limits
Verify your account is in good standing
429 Too Many Requests
Implement exponential backoff
Check your rate limit status
Consider upgrading your plan
Authentication features will be available with the Q4 2025 API launch.
Last updated