API Authentication
The CloudInfraOS API uses Bearer token authentication. All requests must include a valid API key in the Authorization header.
Generating an API Key
API keys are generated from the Settings page in the dashboard. Each key is tied to your user account and inherits your organization and project permissions.
- Navigate to Settings β API Keys
- Click Generate New Key
- Give the key a descriptive name (e.g., "CI/CD Pipeline")
- Copy the generated key β it will only be shown once
Using Your API Key
Include the key in the Authorization header of every request:
curl -H "Authorization: Bearer sk_os_abc123..." \
https://stackpilot.blueforge.studio/api/projectsKey Security
- Store API keys securely β treat them like passwords
- Never commit keys to version control
- Use environment variables in your CI/CD pipelines
- Rotate keys periodically from the Settings page
- Revoke compromised keys immediately β revocation is effective on the next request
Permission Scopes
API keys inherit the permissions of the user who created them. A key created by an organization owner has full access; a key created by a member is limited to the projects they belong to. Future releases will support fine-grained scoping per API key.
Error Responses
Authentication errors return HTTP 401 with a JSON body:
{
"error": "Unauthorized"
}