The Shadow API uses JWT Bearer tokens for authentication. Include the token in the Authorization header of every request.
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Email address |
password | string | Yes | Password |
username | string | No | Unique username. Generated when omitted. |
displayName | string | No | Display name |
inviteCode | string | No | Optional membership invite for advanced capabilities |
Response:
Invite codes are no longer required for registration. Redeem one later with POST /api/membership/redeem-invite to unlock Cloud deployment and server creation.
Membership is tier-based; future tiers can add capabilities without changing the auth response shape.
Visitors can still join public communities and start basic homepage plays. Member capabilities are checked only when an action needs long-lived Cloud resources, new server creation, invite creation, or OAuth app creation.
Email code verification signs in an existing user or creates a visitor account.
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Email address |
password | string | Yes | Password |
Response: Same as register.
Returns new access and refresh tokens. Send the existing refresh token in the request body.
Include the token in the Authorization header:
Shadow supports OAuth login via third-party providers. Redirect users to:
Pass redirect=/app/... to continue the original app action after authentication. Cloud-gated website actions may also pass inviteCode=...; the OAuth callback includes it so the app can redeem the invite before continuing.
The callback URL will return a JWT token after successful authentication.
Cloud plays can receive a limited smp_... token for the official model proxy. These tokens are not
general user sessions; they only authorize /api/ai/v1 model proxy calls for the target user and
play/template context. See Official Model Proxy for billing and safety
details.