Ruby API 레퍼런스
메시지의 토큰 수 계산
messages.count_tokens(**kwargs) -> MessageTokensCountPOST/v1/messages/count_tokens
메시지의 토큰 수를 계산합니다.
스트림
messages.stream(**kwargs) -> Anthropic::Helpers::Streaming::MessageStreamFunction
stream_raw처럼 메시지를 스트리밍하고 MessageStream을 반환합니다. MessageStream은 스트리밍된 이벤트를 누적하고 도구 입력과 구조화된 출력을 파싱합니다.
사용자 프로필
플랫폼이 서비스하는 최종 고객을 등록하여 각 요청이 누구를 위한 것인지 지정할 수 있도록 합니다. 시작하려면 사용자 프로필 가이드를 참조하세요.
사용자 프로필 생성
user_profiles.create(**kwargs) -> UserProfilePOST/v1/user_profiles
최종 고객 중 한 명을 등록하고, 해당 고객을 위해 보내는 요청에 포함할 ID를 받습니다.
사용자 프로필 목록 조회
user_profiles.list(**kwargs) -> PageCursor<UserProfile>GET/v1/user_profiles
조직의 사용자 프로필 목록을 조회합니다. 기본적으로 최신순으로 정렬됩니다.
사용자 프로필 조회
user_profiles.retrieve(user_profile_id, **kwargs) -> UserProfileGET/v1/user_profiles/{user_profile_id}
ID로 사용자 프로필을 조회하여 저장된 세부 정보를 확인합니다.
사용자 프로필 업데이트
user_profiles.update(user_profile_id, **kwargs) -> UserProfilePOST/v1/user_profiles/{user_profile_id}
사용자 프로필의 세부 정보를 변경합니다. 보내지 않은 필드는 그대로 유지됩니다.
사용자 프로필 삭제
user_profiles.delete(user_profile_id, **kwargs) -> DeletedUserProfileDELETE/v1/user_profiles/{user_profile_id}
사용자 프로필을 삭제합니다. 예를 들어 최종 고객이 계정을 해지한 경우에 사용합니다.
현재 조직 조회
organization.retrieve() -> OrganizationInfoGET/v1/organizations/me
인증된 API 키와 연결된 조직에 대한 정보를 조회합니다.