Skip to content

Support uploading image files for DM. #221

@PhamHuynhAnh16

Description

@PhamHuynhAnh16

Hello, I noticed that CharacterAI now supports messages with images. Could you update the library to support image uploads as well?

I found that it’s possible to send an image in a DM to a character by adding the key
attachments: [{ type: "TYPE_IMAGE", url: "image_link" }]
to generateBaseMessagePayload. However, it only supports internal CharacterAI image links.

After some experimentation, I discovered this can be resolved by uploading the image to
https://neo.character.ai/image/upload_private_image,
which returns an internal image URL that can then be used in the attachments field.

You can review the changes that add support for this feature in my branch here 🙂
https://github.com/PhamHuynhAnh16/node_characterai

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions