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キーに関連付けられた組織に関する情報を取得します。