Claude Platform Docs

TypeScript-API-Referenz

Eine Nachricht erstellen
client.messages.create(params, options?): Message | Stream<RawMessageStreamEvent>
POST/v1/messages

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?): MessageTokensCount
POST/v1/messages/count_tokens

Zähle die Anzahl der Tokens in einer Nachricht.

Modelle auflisten
client.models.list(params?, options?): Page<ModelInfo>
GET/v1/models

Liste verfügbare Modelle auf.

Ein Modell abrufen
client.models.retrieve(modelID, params?, options?): ModelInfo
GET/v1/models/{model_id}

Rufe ein bestimmtes Modell ab.

Datei hochladen
client.files.upload(params, options?): FileMetadata
POST/v1/files
Dateien auflisten
client.files.list(params?, options?): PageCursor<FileMetadata>
GET/v1/files
Datei herunterladen
client.files.download(fileID, params?, options?): Response
GET/v1/files/{file_id}/content
Dateimetadaten abrufen
client.files.retrieveMetadata(fileID, params?, options?): FileMetadata
GET/v1/files/{file_id}
Datei löschen
client.files.delete(fileID, params?, options?): DeletedFile
DELETE/v1/files/{file_id}
Skill erstellen
client.skills.create(params, options?): Skill
POST/v1/skills
Skills auflisten
client.skills.list(params?, options?): PageCursor<Skill>
GET/v1/skills
Skill abrufen
client.skills.retrieve(skillID, params?, options?): Skill
GET/v1/skills/{skill_id}
Skill löschen
client.skills.delete(skillID, params?, options?): DeletedSkill
DELETE/v1/skills/{skill_id}
Benutzerprofil erstellen
client.userProfiles.create(params, options?): UserProfile
POST/v1/user_profiles
Benutzerprofile auflisten
client.userProfiles.list(params?, options?): PageCursor<UserProfile>
GET/v1/user_profiles
Benutzerprofil abrufen
client.userProfiles.retrieve(userProfileID, params?, options?): UserProfile
GET/v1/user_profiles/{user_profile_id}
Benutzerprofil aktualisieren
client.userProfiles.update(userProfileID, params, options?): UserProfile
POST/v1/user_profiles/{user_profile_id}
Benutzerprofil löschen
client.userProfiles.delete(userProfileID, params?, options?): DeletedUserProfile
DELETE/v1/user_profiles/{user_profile_id}
Aktuelle Organisation abrufen
client.organization.retrieve(options?): OrganizationInfo
GET/v1/organizations/me

Ruft Informationen über die Organisation ab, die mit dem authentifizierten API-Key verknüpft ist.