Справочник по API TypeScript
Создать сообщение
client.messages.create(params, options?): Message | Stream<RawMessageStreamEvent>Отправьте структурированный список входных сообщений с текстом и/или изображениями, и модель сгенерирует следующее сообщение в разговоре.
Подсчитать токены в сообщении
client.messages.countTokens(params, options?): MessageTokensCountПодсчитайте количество токенов в сообщении.
Список моделей
client.models.list(params?, options?): Page<ModelInfo>Получите список доступных моделей.
Получить модель
client.models.retrieve(modelID, params?, options?): ModelInfoПолучите конкретную модель.
Скачать файл
client.files.download(fileID, params?, options?): ResponseПолучить метаданные файла
client.files.retrieveMetadata(fileID, params?, options?): FileMetadataУдалить навык
client.skills.delete(skillID, params?, options?): DeletedSkillПрофили пользователей
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?): UserProfileRegister 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>List the user profiles in your organization, newest first by default.
Получить профиль пользователя
client.userProfiles.retrieve(userProfileID, params?, options?): UserProfileGet a user profile by ID to check the details stored for it.
Обновить профиль пользователя
client.userProfiles.update(userProfileID, params, options?): UserProfileChange the details of a user profile, leaving the fields that you don't send as they are.
Удалить профиль пользователя
client.userProfiles.delete(userProfileID, params?, options?): DeletedUserProfileDelete a user profile, for example when the end customer closes their account.
Получить текущую организацию
client.organization.retrieve(options?): OrganizationInfoВозвращает информацию об организации, связанной с аутентифицированным ключом API.