Referência da API para TypeScript
Criar uma mensagem
client.messages.create(params, options?): Message | Stream<RawMessageStreamEvent>Envie uma lista estruturada de mensagens de entrada com conteúdo de texto e/ou imagem, e o modelo gerará a próxima mensagem na conversa.
Contar tokens em uma mensagem
client.messages.countTokens(params, options?): MessageTokensCountConte o número de tokens em uma mensagem.
Listar modelos
client.models.list(params?, options?): Page<ModelInfo>Liste os modelos disponíveis.
Obter um modelo
client.models.retrieve(modelID, params?, options?): ModelInfoObtenha um modelo específico.
Baixar arquivo
client.files.download(fileID, params?, options?): ResponseObter metadados do arquivo
client.files.retrieveMetadata(fileID, params?, options?): FileMetadataExcluir skill
client.skills.delete(skillID, params?, options?): DeletedSkillPerfis de usuário
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.
Criar perfil de usuário
client.userProfiles.create(params, options?): UserProfileRegister one of your end customers and get the ID to send on the requests you make for them.
Listar perfis de usuário
client.userProfiles.list(params?, options?): PageCursor<UserProfile>List the user profiles in your organization, newest first by default.
Obter perfil de usuário
client.userProfiles.retrieve(userProfileID, params?, options?): UserProfileGet a user profile by ID to check the details stored for it.
Atualizar perfil de usuário
client.userProfiles.update(userProfileID, params, options?): UserProfileChange the details of a user profile, leaving the fields that you don't send as they are.
Excluir perfil de usuário
client.userProfiles.delete(userProfileID, params?, options?): DeletedUserProfileDelete a user profile, for example when the end customer closes their account.
Obter organização atual
client.organization.retrieve(options?): OrganizationInfoRecupere informações sobre a organização associada à chave de API autenticada.