Authentication
All API requests require authentication using Service Keys
Service Keys
Service Keys are API keys that allow programmatic access to your Studio workspace
Service Keys provide secure authentication for your applications to interact with the Skej Studio API. Each key is scoped to a specific tenant and can have granular permissions.
Important: Keep your Service Keys secure. Never expose them in client-side code or commit them to version control.
Creating a Service Key
- Log in to your Skej Studio dashboard
- Navigate to Settings → API Keys
- Click "Create Service Key"
- Give your key a descriptive name
- Select the appropriate scopes (permissions)
- Set an expiration date (optional but recommended)
- Click "Generate Key" and save it securely
Warning: The full key is only shown once during creation. Store it securely—you won't be able to see it again.
Authentication Header
Include your Service Key in the Authorization header of every request
Header Format:
Authorization: Bearer sk_live_your_service_key_hereExample Request (cURL):
curl -X GET \
'https://api.staging.agnt.ai/tenants/tenant_123/prompts' \
-H 'Authorization: Bearer sk_live_your_service_key_here' \
-H 'Content-Type: application/json'Scopes & Permissions
Control what actions your Service Key can perform
prompts:read
Read access to prompts and their versions
prompts:write
Create, update, and publish prompts
blocks:read
Read access to reusable blocks
blocks:write
Create and update reusable blocks
traces:read
Read access to execution traces and analytics
Authentication Response Codes
200 OKRequest successful, authentication valid
401 UnauthorizedMissing, invalid, or expired Service Key
403 ForbiddenService Key doesn't have required scopes for this operation
Security Best Practices
- Use environment variables to store Service Keys
- Set expiration dates on Service Keys when possible
- Use the minimum required scopes for each key
- Rotate keys regularly and revoke unused keys
- Never commit keys to version control
- Never expose keys in client-side JavaScript