Go API 레퍼런스
메시지의 토큰 수 계산
client.Messages.CountTokens(ctx, params) (*MessageTokensCount, error)POST/v1/messages/count_tokens
메시지의 토큰 수를 계산합니다.
파일 메타데이터 조회
client.Files.GetMetadata(ctx, fileID, query) (*FileMetadata, error)GET/v1/files/{file_id}
사용자 프로필
플랫폼이 서비스하는 최종 고객을 등록하여 각 요청이 누구를 위한 것인지 지정할 수 있도록 합니다. 시작하려면 사용자 프로필 가이드를 참조하세요.
사용자 프로필 생성
client.UserProfiles.New(ctx, params) (*UserProfile, error)POST/v1/user_profiles
최종 고객 중 한 명을 등록하고, 해당 고객을 위해 보내는 요청에 포함할 ID를 받습니다.
사용자 프로필 목록 조회
client.UserProfiles.List(ctx, params) (*PageCursor[UserProfile], error)GET/v1/user_profiles
조직의 사용자 프로필 목록을 조회합니다. 기본적으로 최신순으로 정렬됩니다.
사용자 프로필 조회
client.UserProfiles.Get(ctx, userProfileID, query) (*UserProfile, error)GET/v1/user_profiles/{user_profile_id}
ID로 사용자 프로필을 조회하여 저장된 세부 정보를 확인합니다.
사용자 프로필 업데이트
client.UserProfiles.Update(ctx, userProfileID, params) (*UserProfile, error)POST/v1/user_profiles/{user_profile_id}
사용자 프로필의 세부 정보를 변경합니다. 보내지 않은 필드는 그대로 유지됩니다.
사용자 프로필 삭제
client.UserProfiles.Delete(ctx, userProfileID, body) (*DeletedUserProfile, error)DELETE/v1/user_profiles/{user_profile_id}
사용자 프로필을 삭제합니다. 예를 들어 최종 고객이 계정을 해지한 경우에 사용합니다.
현재 조직 조회
client.Organization.Get(ctx) (*OrganizationInfo, error)GET/v1/organizations/me
인증된 API 키와 연결된 조직에 대한 정보를 조회합니다.