Claude Platform Docs

Получить текущую организацию

organization.retrieve() -> OrganizationInfo
GET/v1/organizations/me

Возвращает информацию об организации, связанной с аутентифицированным ключом API.

Returns
class OrganizationInfo: type: "organization"; id; name
type: Literal["organization"]

Object type.

For Organizations, this is always "organization".

defaultorganization
id: str

ID of the Organization.

formatuuid
name: str

Name of the Organization.

Получить текущую организацию
import os
from anthropic import Anthropic

client = Anthropic(
    api_key=os.environ.get(
        "ANTHROPIC_API_KEY"
    ),  # This is the default and can be omitted
)
organization_info = client.organization.retrieve()
print(organization_info.id)
Returns Examples
Response 200
{
  "id": "12345678-1234-5678-1234-567812345678",
  "name": "Organization Name",
  "type": "organization"
}