Skip to main content
Version: 1.3.x

AIPlayer API Method

1 AIPlayer.generateToken(json)

Get JWT Verified Token

  • Parameter

    ParamTypeDescription
    jsonObjectparameters of the generateToken function
    json.appIdStringAppId
    json.tokenStringJWT Client Token
  • Return Parameter

    ParamTypeDescription
    returnObjectgenerateToken return
    return.succeedBooleantrue: Success, false: Fail
    return.defaultAIObjectdefault AI({ "ai_name": "..." })
    return.tokenStringJWT Verified Token
    return.tokenExpireNumberJWT Verified Token Expire
  • Example

  const result = await AI_PLAYER.generateToken({ appId: "...", token: "..." });

2. AIPlayer.getAIList()

Get a list of available AI models

  • Return Parameter

    ParamTypeDescription
    returnObjectgetAIList return
    return.succeedBooleanTrue: Success, False: Fail
    return.aiArray<AIModel/>AI Model List
  • Example

  const result = await AI_PLAYER.getAIList();