Skip to main content

Universal Security Verification

POST /api/verify

Performs a universal security verification for the current user (via 2FA or Passkey). On success, a verification timestamp is stored in the session, and the verification status and expiry are returned, used for step-up checks before sensitive operations.

Authentication

User console endpoint. Requires a logged-in user identity (session Cookie, or Authorization: Bearer <access_token>). This token is different from the sk- key used for model calls.

Request Body​

ParameterTypeRequiredDescription
methodstringRequiredVerification method: 2fa or passkey
codestringOptionalVerification code; required when method=2fa
Passkey verification

Before using the passkey method, first complete the Passkey Verify Begin and Passkey Verify Finish flows.

Request Example
{
"method": "2fa",
"code": "123456"
}

Response Fields(200)​

Field NameTypeDescription
successbooleanWhether the request succeeded
messagestringMessage; 验证成功 on success
dataobjectVerification result
data.verifiedbooleanWhether verification passed
data.expires_atintegerVerification expiry time (Unix timestamp, seconds)
Response Example
{
"success": true,
"message": "验证成功",
"data": {
"verified": true,
"expires_at": 1735689600
}
}