Back to the knowledge base
ArticlesLearn & researchCurioFuse editorial

DeepSeek document parsing

Upload, ask and check the diagram.

A magnifying lens examines a geometric drawing on paper beside a partial translucent copy.
CurioFuse · AI-generated illustration
In this article

Prepare the file

For developers, our proposed exercise uses a PDF with a diagram and instructions. Configure your API client for the HTTPS host api.deepseek.com with your DeepSeek API key in the Authorization: Bearer header. Following the Files guide, send a multipart/form-data POST /files with purpose before file. Choose rich_layout_recognition for text and figures; text_recognition drops figures. Without expiry fields, storage is permanent. Other API keys under the same account share these files.

Allow parsing to finish

The parsing guide says the identifier arrives only after successful parsing, with no interim response. Allow upload plus parsing time in client and proxy timeouts. A disconnect does not cancel processing: successful parsing still stores and bills the file. Later, compare the answer about your diagram with the original PDF. Detection can miss figures, so a returned identifier alone cannot establish that the needed diagram survived. This is a proposed check, not our test result.

Ask and inspect the response

Use the configured client for the chat request: POST /chat/completions with JSON, model deepseek-flash and a user message. Its content array should contain a file part with the returned file_id and a text part asking what the diagram shows. Read the nonstreaming response in choices, then message.content. Inspect finish_reason too: length signals a limit was reached. Our recommendation is to flag that answer as incomplete rather than present it as a finished explanation.

Sources(3)

Original CurioFuse editorial. A guide to explore and evaluate AI, without an implied product test.

Sources & standardsReport a correction