{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/huggingbay-xyz/json-schema/huggingbay-xyz-oauth-token-request-schema.json",
  "title": "OAuthTokenRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/huggingbay-xyz-oauth-api-openapi.yml#/components/schemas/OAuthTokenRequest",
  "type": "object",
  "required": [
    "grant_type"
  ],
  "additionalProperties": true,
  "properties": {
    "grant_type": {
      "type": "string",
      "description": "Use urn:bay-run:grant-type:demo for zero-secret public demo access; client_credentials is reserved for confidential registered clients."
    },
    "scope": {
      "type": "string",
      "description": "The zero-secret demo scope is exactly mcp:demo. inference:invoke is a separate developer/spend scope, not a demo scope."
    },
    "resource": {
      "type": "string",
      "format": "uri",
      "description": "Allowed public resource: the API origin or canonical /mcp/. The selected resource pre-binds the token and returned next_call for convenience."
    },
    "client_id": {
      "type": "string"
    },
    "client_secret": {
      "type": "string",
      "format": "password",
      "x-sensitive": true
    },
    "code": {
      "type": "string",
      "x-sensitive": true
    },
    "code_verifier": {
      "type": "string",
      "x-sensitive": true
    },
    "redirect_uri": {
      "type": "string",
      "format": "uri"
    }
  }
}