Claude Platform Docs

TypeScript API 레퍼런스

메시지 생성
client.messages.create(params, options?): Message | Stream<RawMessageStreamEvent>
POST/v1/messages

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

메시지의 토큰 수 계산
client.messages.countTokens(params, options?): MessageTokensCount
POST/v1/messages/count_tokens

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

모델 목록 조회
client.models.list(params?, options?): Page<ModelInfo>
GET/v1/models

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

모델 조회
client.models.retrieve(modelID, params?, options?): ModelInfo
GET/v1/models/{model_id}

특정 모델을 조회합니다.

파일 업로드
client.files.upload(params, options?): FileMetadata
POST/v1/files
파일 목록 조회
client.files.list(params?, options?): PageCursor<FileMetadata>
GET/v1/files
파일 다운로드
client.files.download(fileID, params?, options?): Response
GET/v1/files/{file_id}/content
파일 메타데이터 조회
client.files.retrieveMetadata(fileID, params?, options?): FileMetadata
GET/v1/files/{file_id}
파일 삭제
client.files.delete(fileID, params?, options?): DeletedFile
DELETE/v1/files/{file_id}
스킬 생성
client.skills.create(params, options?): Skill
POST/v1/skills
스킬 목록 조회
client.skills.list(params?, options?): PageCursor<Skill>
GET/v1/skills
스킬 조회
client.skills.retrieve(skillID, params?, options?): Skill
GET/v1/skills/{skill_id}
스킬 삭제
client.skills.delete(skillID, params?, options?): DeletedSkill
DELETE/v1/skills/{skill_id}

사용자 프로필

Register the end customers that your platform serves, so each request can name who it's for. To get started, see the User profiles guide.

사용자 프로필 생성
client.userProfiles.create(params, options?): UserProfile
POST/v1/user_profiles

Register one of your end customers and get the ID to send on the requests you make for them.

사용자 프로필 목록 조회
client.userProfiles.list(params?, options?): PageCursor<UserProfile>
GET/v1/user_profiles

List the user profiles in your organization, newest first by default.

사용자 프로필 조회
client.userProfiles.retrieve(userProfileID, params?, options?): UserProfile
GET/v1/user_profiles/{user_profile_id}

Get a user profile by ID to check the details stored for it.

사용자 프로필 업데이트
client.userProfiles.update(userProfileID, params, options?): UserProfile
POST/v1/user_profiles/{user_profile_id}

Change the details of a user profile, leaving the fields that you don't send as they are.

사용자 프로필 삭제
client.userProfiles.delete(userProfileID, params?, options?): DeletedUserProfile
DELETE/v1/user_profiles/{user_profile_id}

Delete a user profile, for example when the end customer closes their account.

현재 조직 조회
client.organization.retrieve(options?): OrganizationInfo
GET/v1/organizations/me

인증된 API 키와 연결된 조직에 대한 정보를 조회합니다.