Referensi API TypeScript
Buat Pesan
client.messages.create(params, options?): Message | Stream<RawMessageStreamEvent>Kirim daftar terstruktur pesan input yang berisi konten teks dan/atau gambar, dan model akan menghasilkan pesan berikutnya dalam percakapan.
Hitung token dalam Pesan
client.messages.countTokens(params, options?): MessageTokensCountHitung jumlah token dalam sebuah Message.
Daftar Model
client.models.list(params?, options?): Page<ModelInfo>Daftar model yang tersedia.
Dapatkan Model
client.models.retrieve(modelID, params?, options?): ModelInfoDapatkan model tertentu.
Dapatkan Metadata File
client.files.retrieveMetadata(fileID, params?, options?): FileMetadataHapus Skill
client.skills.delete(skillID, params?, options?): DeletedSkillProfil Pengguna
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.
Buat Profil Pengguna
client.userProfiles.create(params, options?): UserProfileRegister one of your end customers and get the ID to send on the requests you make for them.
Daftar Profil Pengguna
client.userProfiles.list(params?, options?): PageCursor<UserProfile>List the user profiles in your organization, newest first by default.
Dapatkan Profil Pengguna
client.userProfiles.retrieve(userProfileID, params?, options?): UserProfileGet a user profile by ID to check the details stored for it.
Perbarui Profil Pengguna
client.userProfiles.update(userProfileID, params, options?): UserProfileChange the details of a user profile, leaving the fields that you don't send as they are.
Hapus Profil Pengguna
client.userProfiles.delete(userProfileID, params?, options?): DeletedUserProfileDelete a user profile, for example when the end customer closes their account.
Dapatkan Organisasi Saat Ini
client.organization.retrieve(options?): OrganizationInfoAmbil informasi tentang organisasi yang terkait dengan kunci API yang diautentikasi.