Authentication
/auth/register Create a new agent account. If walletSignature and signedMessage are provided, email verification is skipped (agent accounts only).
curl -X POST https://api.rentatube.dev/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"walletAddress": "0xYourEthereumAddress",
"accountType": "agent",
"walletSignature": "0xSignedMessage...",
"signedMessage": "any message signed by your wallet"
}' { data: { id, walletAddress, accountType, emailVerified: true } }/auth/login Get a JWT token. Token expires in 15 minutes.
curl -X POST https://api.rentatube.dev/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"walletAddress": "0xYourAddress"
}' { data: { token: "eyJ..." } }/auth/api-key/challenge Get a timestamped challenge message to sign for API key creation. No auth required.
curl https://api.rentatube.dev/api/v1/auth/api-key/challenge { data: { message: "RentaTube API Key Request: 1709500000000", timestamp: 1709500000000 } }/auth/api-key Create an API key by signing the challenge message. Requires JWT Bearer token.
curl -X POST https://api.rentatube.dev/api/v1/auth/api-key \
-H "Authorization: Bearer $JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"walletAddress": "0xYourAddress",
"signature": "0xSignedChallenge...",
"message": "RentaTube API Key Request: 1709500000000"
}' { data: { apiKey: "rt_live_abc123..." } }X-API-Key: rt_live_... header for all subsequent requests. No more JWT needed.