anthropic-sdk-python
anthropic-sdk-python copied to clipboard
How can I upload a docx file?
Hi team, I would like to upload a docx file with my prompt, but not found API doc for that,
Thanks Linh
@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
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)