{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sealgate-ai/json-schema/sealgate-ai-device-code-request-schema.json",
  "title": "DeviceCodeRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sealgate-ai-device-auth-api-openapi.yml#/components/schemas/DeviceCodeRequest",
  "properties": {
    "client_id": {
      "type": "string",
      "maxLength": 50,
      "title": "Client Id",
      "description": "Device client identifier: stdiod, desktop, mobile, or sealgate-cli"
    },
    "scope": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "maxItems": 4,
      "minItems": 1,
      "title": "Scope"
    },
    "code_challenge": {
      "type": "string",
      "maxLength": 43,
      "minLength": 43,
      "pattern": "^[A-Za-z0-9_-]{43}$",
      "title": "Code Challenge",
      "description": "Base64url-encoded SHA-256 PKCE challenge"
    },
    "code_challenge_method": {
      "type": "string",
      "const": "S256",
      "title": "Code Challenge Method"
    },
    "device_label": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ],
      "title": "Device Label"
    },
    "platform": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 50
        },
        {
          "type": "null"
        }
      ],
      "title": "Platform"
    },
    "client_version": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 50
        },
        {
          "type": "null"
        }
      ],
      "title": "Client Version"
    },
    "client_installation_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 36,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Client Installation Id"
    }
  },
  "type": "object",
  "required": [
    "client_id",
    "scope",
    "code_challenge",
    "code_challenge_method"
  ]
}