Skip to content

ClaudeCodeAccountInfo

Base classes

Name Children Inherits
ClaudeCodeBaseModel
clawd_code_sdk.models.base
Base model for all Claude Code Pydantic models.

⋔ Inheritance diagram

graph TD
  1904299757["server_info.ClaudeCodeAccountInfo"]
  2604142835["base.ClaudeCodeBaseModel"]
  3879467795["main.BaseModel"]
  2751680898["builtins.object"]
  2604142835 --> 1904299757
  3879467795 --> 2604142835
  2751680898 --> 3879467795

🛈 DocStrings

Bases: ClaudeCodeBaseModel

Account information from Claude Code.

Source code in src/clawd_code_sdk/models/server_info.py
class ClaudeCodeAccountInfo(ClaudeCodeBaseModel):
    """Account information from Claude Code."""

    email: str | None = None
    """User email address."""

    subscription_type: str | None = None
    """Subscription type (e.g., "Claude API")."""

    token_source: str | None = None
    """Where tokens come from (e.g., "claude.ai")."""

    api_key_source: str | None = None
    """Where API key comes from (e.g., "ANTHROPIC_API_KEY")."""

    organization: str | None = None
    """Organization name."""

    api_provider: ApiProvider | None = None
    """Active API backend.

    Anthropic OAuth login only applies when "firstParty"; for 3P providers
    the other fields are absent and auth is external (AWS creds, gcloud ADC, etc.).
    """

api_key_source class-attribute instance-attribute

api_key_source: str | None = None

Where API key comes from (e.g., "ANTHROPIC_API_KEY").

api_provider class-attribute instance-attribute

api_provider: ApiProvider | None = None

Active API backend.

Anthropic OAuth login only applies when "firstParty"; for 3P providers the other fields are absent and auth is external (AWS creds, gcloud ADC, etc.).

email class-attribute instance-attribute

email: str | None = None

User email address.

organization class-attribute instance-attribute

organization: str | None = None

Organization name.

subscription_type class-attribute instance-attribute

subscription_type: str | None = None

Subscription type (e.g., "Claude API").

token_source class-attribute instance-attribute

token_source: str | None = None

Where tokens come from (e.g., "claude.ai").

:fa-brands-github: Show source on GitHub