anthropic-sdk-python icon indicating copy to clipboard operation
anthropic-sdk-python copied to clipboard

How can I upload a docx file?

Open hdlinh1808 opened this issue 1 year ago • 2 comments

Hi team, I would like to upload a docx file with my prompt, but not found API doc for that,

Thanks Linh

hdlinh1808 avatar Sep 28 '24 11:09 hdlinh1808

@hdlinh1808 We recently launched PDF support in the API so we recommend converting your docx to a PDF and you can then base64 encode it in your prompt: https://docs.anthropic.com/en/docs/build-with-claude/pdf-support

jeffchan avatar Nov 07 '24 19:11 jeffchan

FYI the recommendation to convert from docx to PDF is also mentioned in the documentation here: https://docs.anthropic.com/en/docs/build-with-claude/files#working-with-other-file-formats

(removing "documentation" label, but keeping open for now as feature request)

pjuhos avatar Jul 24 '25 02:07 pjuhos