Authentication
The StagingSpaces API uses two authentication methods depending on the endpoint.
API Key Authentication
Used for: Staging, enhancement, credits, and all programmatic access.
Pass your API key as a Bearer token in the Authorization header:
Getting a key
- Sign up at studio.stagingspaces.app
- Go to Settings → API
- Click Generate API Key
- Save the key — it’s only displayed once
Keep your API key secret. Anyone with your key can use your credits.
If a key is compromised, revoke it immediately from your dashboard.
Key security
- Keys are stored as SHA-256 hashes (we never store the plaintext)
- Each key tracks
last_used_at for audit
- Revoked keys are immediately invalid
- Test keys (
sk_test_) work identically but are labeled for development
Firebase Authentication
Used for: Dashboard operations — key management, claims, usage stats, settings.
These endpoints are designed for browser-based access from the StagingSpaces dashboard.
If you’re building a server-to-server integration, you only need API key auth.
Endpoint Auth Summary
Error responses
401 — Unauthorized
402 — Payment Required