Claude Platform Docs

Go API 레퍼런스

메시지 생성
client.Messages.New(ctx, params) (*Message, error)
POST/v1/messages

텍스트 및/또는 이미지 콘텐츠가 포함된 구조화된 입력 메시지 목록을 전송하면 모델이 대화의 다음 메시지를 생성합니다.

메시지의 토큰 수 계산
client.Messages.CountTokens(ctx, params) (*MessageTokensCount, error)
POST/v1/messages/count_tokens

메시지의 토큰 수를 계산합니다.

모델 목록 조회
client.Models.List(ctx, params) (*Page[ModelInfo], error)
GET/v1/models

사용 가능한 모델을 나열합니다.

모델 조회
client.Models.Get(ctx, modelID, query) (*ModelInfo, error)
GET/v1/models/{model_id}

특정 모델을 조회합니다.

파일 업로드
client.Files.Upload(ctx, params) (*FileMetadata, error)
POST/v1/files
파일 목록 조회
client.Files.List(ctx, params) (*PageCursor[FileMetadata], error)
GET/v1/files
파일 다운로드
client.Files.Download(ctx, fileID, query) (*Response, error)
GET/v1/files/{file_id}/content
파일 메타데이터 조회
client.Files.GetMetadata(ctx, fileID, query) (*FileMetadata, error)
GET/v1/files/{file_id}
파일 삭제
client.Files.Delete(ctx, fileID, body) (*DeletedFile, error)
DELETE/v1/files/{file_id}
스킬 생성
client.Skills.New(ctx, params) (*Skill, error)
POST/v1/skills
스킬 목록 조회
client.Skills.List(ctx, params) (*PageCursor[Skill], error)
GET/v1/skills
스킬 조회
client.Skills.Get(ctx, skillID, query) (*Skill, error)
GET/v1/skills/{skill_id}
스킬 삭제
client.Skills.Delete(ctx, skillID, body) (*DeletedSkill, error)
DELETE/v1/skills/{skill_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 키와 연결된 조직에 대한 정보를 조회합니다.