TypeScript-API-Referenz
Eine Nachricht erstellen
client.messages.create(params, options?): Message | Stream<RawMessageStreamEvent>Sende eine strukturierte Liste von Eingabenachrichten mit Text- und/oder Bildinhalten, und das Modell generiert die nächste Nachricht in der Konversation.
Tokens in einer Nachricht zählen
client.messages.countTokens(params, options?): MessageTokensCountZähle die Anzahl der Tokens in einer Nachricht.
Modelle auflisten
client.models.list(params?, options?): Page<ModelInfo>Liste verfügbare Modelle auf.
Ein Modell abrufen
client.models.retrieve(modelID, params?, options?): ModelInfoRufe ein bestimmtes Modell ab.
Datei herunterladen
client.files.download(fileID, params?, options?): ResponseDateimetadaten abrufen
client.files.retrieveMetadata(fileID, params?, options?): FileMetadataSkill löschen
client.skills.delete(skillID, params?, options?): DeletedSkillBenutzerprofile
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.
Benutzerprofil erstellen
client.userProfiles.create(params, options?): UserProfileRegister one of your end customers and get the ID to send on the requests you make for them.
Benutzerprofile auflisten
client.userProfiles.list(params?, options?): PageCursor<UserProfile>List the user profiles in your organization, newest first by default.
Benutzerprofil abrufen
client.userProfiles.retrieve(userProfileID, params?, options?): UserProfileGet a user profile by ID to check the details stored for it.
Benutzerprofil aktualisieren
client.userProfiles.update(userProfileID, params, options?): UserProfileChange the details of a user profile, leaving the fields that you don't send as they are.
Benutzerprofil löschen
client.userProfiles.delete(userProfileID, params?, options?): DeletedUserProfileDelete a user profile, for example when the end customer closes their account.
Aktuelle Organisation abrufen
client.organization.retrieve(options?): OrganizationInfoRuft Informationen über die Organisation ab, die mit dem authentifizierten API-Key verknüpft ist.