VirtuousAI
ReferenceAuth

Request Device Code

Start device authorization flow. CLI calls this to get codes, then displays user_code to the user and polls /token until approved.

POST
/api/v1/auth/device/code

Request Body

application/json

clientId?string
Default"vai-cli"

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/auth/device/code" \  -H "Content-Type: application/json" \  -d '{}'
{
  "deviceCode": "string",
  "expiresIn": 0,
  "interval": 0,
  "userCode": "string",
  "verificationUri": "string",
  "verificationUriComplete": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}