MidassAI

DeepSeek Vision: Extract Screenshot Data You Can Check

MidassAI Team · October 12, 2026 · 6 min read

Start Creating
Conceptual illustration of a field panel, an optical loupe, and three data cards on a blue desk.

A screenshot extraction task is finished when someone can trace the returned fields back to the image. Getting a neatly formatted answer is only the first part. The difficult cases are an unreadable digit, a value attached to the wrong row, or a missing unit that the model fills in from context. Build the workflow around those cases before sending a large collection of images.

DeepSeek's Vision guide, checked on October 12, 2026, documents image-and-text input for deepseek-flash. The September 10 change log identifies that name with V4.1 Flash. This is an October practical guide to the documented API, not an announcement of a new October model. The example below is an implementation template; it is not a recorded inference run or an OCR accuracy benchmark.

Prepare a screenshot with a clear boundary

Choose a task with a small, explicit output. For example, extract the visible status, item name, and displayed quantity from one inventory panel. Do not begin with “understand this dashboard,” which leaves the model to decide which parts matter and what conclusions to draw.

Capture enough context to preserve column headings and units. A tight crop of numbers alone may remove the information needed to interpret them. If the original is tall or dense, divide it into named regions and retain a full-image copy for orientation. Give each region a stable identifier such as panel-A or panel-B before making requests.

Inspect the input at normal reading size. If you cannot distinguish a digit in the screenshot, requesting a more confident answer will not restore the missing pixels. Recapture the source at a useful scale where possible. Avoid repeated resizing and compression that make small text harder to read.

Use a PNG for the sample below. The official guide also supports JPEG, GIF, and WebP and identifies formats from file content. Renaming a file does not convert it. Check the file you are actually sending rather than relying on its extension alone.

Define what the model may leave unknown

Specify fields before writing the request. For an inventory panel, a useful record might contain the region identifier, visible item name, displayed quantity, displayed unit, status, and a note about ambiguity. Keep the original wording when it matters; normalize it in a later step.

Make unknown values explicit. An empty cell, text hidden by an overlay, and an unreadable character are different observations. They should not all become zero. If your downstream system requires a number, hold the record for review instead of inventing one to satisfy its schema.

An original example instruction for a screenshot you supply:

Read only the inventory table in panel-A. For each visible row, return the item name, quantity text, unit, and status exactly as shown. Use null for a field you cannot read and explain why in a note. Do not infer hidden rows, complete cut-off names, or calculate totals. Include a short location description so I can find each row in the image.

The location description is a review aid, not a precise bounding box. If your application needs coordinates, define and validate that requirement separately. Do not treat a plausible location phrase as proof that the extracted value is correct.

Start Creating

Send the image in the correct content block

The documented Chat Completions interface puts text and image blocks inside the user message's content array. A local image can be encoded as a data URL. For the following Python template, install the OpenAI-compatible Python client, set DEEPSEEK_API_KEY in your local environment, and place a genuine PNG at screenshot.png. Keep the key out of source files and browser code.

import base64
import os
from pathlib import Path
from openai import OpenAI

image = Path("screenshot.png").read_bytes()
if not image.startswith(b"\x89PNG\r\n\x1a\n"):
    raise ValueError("Use a PNG image for this example")
encoded = base64.b64encode(image).decode("ascii")

client = OpenAI(
    api_key=os.environ["DEEPSEEK_API_KEY"],
    base_url="https://api.deepseek.com",
)
result = client.chat.completions.create(
    model="deepseek-flash",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": (
                "Read the inventory table in panel-A. Return each visible "
                "row's item name, quantity text, unit, status, and location. "
                "Use null for unreadable fields and add a note explaining "
                "the ambiguity. Do not infer hidden rows or calculate totals."
            )},
            {"type": "image_url", "image_url": {
                "url": "data:image/png;base64," + encoded,
                "detail": "original",
            }},
        ],
    }],
)
print(result.choices[0].message.content)

This template prints the returned content for inspection; it does not enforce a machine-readable schema or validate the result. Add those steps before connecting it to an automated import. The API request incurs usage charges according to your account and current provider pricing.

The guide describes public image URLs and Files API references as other input options. Choose the transport for your workload: a local sample is convenient inline, while repeated use of the same image may suit a file reference. Check the current documented size limits before scaling up, since base64 encoding also enlarges the request body.

The example uses the documented original detail setting. That does not guarantee pixel-for-pixel reading: the guide separately describes image preprocessing. Its low setting downsamples to 512 × 512, so a dense screenshot deserves particular care before you trade detail for efficiency.

Verify extraction before calculating anything

Open the input beside the response and check one returned row at a time. Compare the text, row association, and unit. A quantity can be transcribed correctly but attached to the neighboring product; a spelling check alone will not catch that.

Start with a small set that includes ordinary rows, missing values, a truncated name, and an ambiguous character. These are suggested evaluation cases. Keep your own verified answers and note whether each failure came from the input image, the extraction, or the way your application interpreted the response.

Calculate totals only after accepting the individual values. If the image includes both a subtotal and a total, preserve their labels rather than choosing one based on position. Keep units and decimal conventions explicit when converting text to numbers. A comma can have different meanings across source documents.

For repeatable processing, retain the input identifier, region name, prompt version, requested model, and raw response with each reviewed record. This makes a later correction possible without guessing which screenshot produced the value.

Separate transport errors from reading errors

If the request fails, check authentication, input format, message structure, and the current size limits before changing the extraction instruction. In this Chat Completions example, the image belongs in a user message and uses an image_url block. Do not substitute the Responses API's input_image shape into it.

If the request succeeds but a value is wrong, inspect the crop and task definition. Try a clearer region with its headers retained. If a field remains unreadable, keep it unknown and route it for review. Repeatedly asking the same image for a definite answer can produce a different guess without producing better evidence.

For projects migrating older model names, use the separate DeepSeek API migration guide. The extraction workflow here assumes the documented current name and focuses on accepting the data, not merely receiving a successful response. Publish or import the result only after the required fields can be checked against their source.

Related articles

Start Creating