Documentation Index
Fetch the complete documentation index at: https://docs.shinzo.ai/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
The Shinzo Platform API uses multiple authentication methods depending on the type of operation. This guide covers all authentication types, their use cases, and security best practices.Authentication Methods
1. JWT Tokens (User Authentication)
Purpose: Authenticating users for dashboard and management API access. JWT tokens are issued when users log in via email/password or OAuth. They provide access to user-specific resources and management endpoints.2. Ingest Tokens (Telemetry)
Purpose: Sending telemetry data from your MCP servers via the SDKs. Ingest tokens are designed for use with the Shinzo SDKs and telemetry ingestion endpoints. They have write-only permissions for telemetry data.3. Platform API Keys (Programmatic Access)
Purpose: Programmatic access to agent management, Spotlight analytics, and model proxy endpoints. Platform API keys are designed for server-to-server communication, CI/CD pipelines, and automated workflows. They support authentication via multiple header formats.sk_shinzo_*
Token Formats
| Token Type | Format | Example |
|---|---|---|
| JWT Token | Base64-encoded JWT | eyJhbGciOiJIUzI1NiIs... |
| Ingest Token | UUID | abc123-def456-... |
| Platform API Key | sk_shinzo_* | sk_shinzo_abc123def456... |
Generating Tokens
JWT Tokens
JWT tokens are obtained by logging in:- Email/Password:
POST /auth/login - Google OAuth:
GET /auth/oauth/googlethenPOST /auth/oauth/google/callback - GitHub OAuth:
GET /auth/oauth/githubthenPOST /auth/oauth/github/callback
Ingest Tokens
Generate ingest tokens via API (requires JWT authentication):Platform API Keys
Create platform API keys via API (requires JWT authentication):Endpoint Authentication Requirements
| Endpoint Category | Auth Required | Auth Types Accepted |
|---|---|---|
Health (/health) | ❌ | None |
Auth (/auth/*) | Varies | JWT for protected endpoints |
Telemetry Ingest (/telemetry/ingest_http/*) | ✅ | Ingest Token |
Telemetry Fetch (/telemetry/fetch_*) | ✅ | JWT |
Agents (/agent/*) | ✅ | JWT or Platform API Key |
Spotlight (/spotlight/*) | ✅ | JWT or Platform API Key |
User (/user/*) | ✅ | JWT |
Security Best Practices
Environment Variables
Never hardcode tokens in your source code. Use environment variables:Token Rotation
Regularly rotate tokens to minimize the impact of potential leaks:- Create a new token/key with the same permissions
- Update your applications to use the new token
- Verify the new token is working
- Revoke the old token
Least Privilege
- Use ingest tokens for SDK telemetry only
- Use platform API keys for server-to-server communication
- Create separate tokens for different environments (dev, staging, prod)
Monitoring
Monitor token usage in your dashboard:- Review
last_used_attimestamps - Investigate unused tokens
- Revoke tokens that are no longer needed
Error Responses
Invalid Token
401 Unauthorized
Missing Token
401 Unauthorized
Email Not Verified
403 Forbidden
Feature Not Enabled
403 Forbidden
