Claude Platform Docs

Java API reference

Create a Message
Message messages().create(params, requestOptions = RequestOptions.none())
POST/v1/messages

Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.

Count tokens in a Message
MessageTokensCount messages().countTokens(params, requestOptions = RequestOptions.none())
POST/v1/messages/count_tokens

Count the number of tokens in a Message.

List Models
ModelListPage models().list(params = ModelListParams.none(), requestOptions = RequestOptions.none())
GET/v1/models

List available models.

Get a Model
ModelInfo models().retrieve(params = ModelRetrieveParams.none(), requestOptions = RequestOptions.none())
GET/v1/models/{model_id}

Get a specific model.

Upload File
FileMetadata files().upload(params, requestOptions = RequestOptions.none())
POST/v1/files
List Files
FileListPage files().list(params = FileListParams.none(), requestOptions = RequestOptions.none())
GET/v1/files
Download File
HttpResponse files().download(params = FileDownloadParams.none(), requestOptions = RequestOptions.none())
GET/v1/files/{file_id}/content
Get File Metadata
FileMetadata files().retrieveMetadata(params = FileRetrieveMetadataParams.none(), requestOptions = RequestOptions.none())
GET/v1/files/{file_id}
Delete File
DeletedFile files().delete(params = FileDeleteParams.none(), requestOptions = RequestOptions.none())
DELETE/v1/files/{file_id}
Create Skill
Skill skills().create(params, requestOptions = RequestOptions.none())
POST/v1/skills
List Skills
SkillListPage skills().list(params = SkillListParams.none(), requestOptions = RequestOptions.none())
GET/v1/skills
Get Skill
Skill skills().retrieve(params = SkillRetrieveParams.none(), requestOptions = RequestOptions.none())
GET/v1/skills/{skill_id}
Delete Skill
DeletedSkill skills().delete(params = SkillDeleteParams.none(), requestOptions = RequestOptions.none())
DELETE/v1/skills/{skill_id}

User Profiles

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.

Create User Profile
UserProfile userProfiles().create(params = UserProfileCreateParams.none(), requestOptions = RequestOptions.none())
POST/v1/user_profiles

Register one of your end customers and get the ID to send on the requests you make for them.

List User Profiles
UserProfileListPage userProfiles().list(params = UserProfileListParams.none(), requestOptions = RequestOptions.none())
GET/v1/user_profiles

List the user profiles in your organization, newest first by default.

Get User Profile
UserProfile userProfiles().retrieve(params = UserProfileRetrieveParams.none(), requestOptions = RequestOptions.none())
GET/v1/user_profiles/{user_profile_id}

Get a user profile by ID to check the details stored for it.

Update User Profile
UserProfile userProfiles().update(params = UserProfileUpdateParams.none(), requestOptions = RequestOptions.none())
POST/v1/user_profiles/{user_profile_id}

Change the details of a user profile, leaving the fields that you don't send as they are.

Delete User Profile
DeletedUserProfile userProfiles().delete(params = UserProfileDeleteParams.none(), requestOptions = RequestOptions.none())
DELETE/v1/user_profiles/{user_profile_id}

Delete a user profile, for example when the end customer closes their account.

Get Current Organization
OrganizationInfo organization().retrieve(params = OrganizationRetrieveParams.none(), requestOptions = RequestOptions.none())
GET/v1/organizations/me

Retrieve information about the organization associated with the authenticated API key.