Skip to main content
To protect the privacy and security of your data, the platform automatically deletes image resources after 30 days. Image URLs in parsing results therefore remain valid for 30 days. For long-term storage, download the Markdown and images before the images are deleted.

Method 1: Request a ZIP during parsing

Add zip to the output_formats response-output configuration parameter when you parse the document. The ZIP contains the Markdown and images, making this the shortest workflow. When you request zip, you must set element_formats.image to file:
Read the download URL from data.result.outputs.zip, then download and extract the ZIP within 30 days. View the output_formats parameter reference

Method 2: Use the image persistence Skill

If you already have Markdown with remote image URLs, a Skill-capable agent can download the images and rewrite the links for you. Choose one way to install the Skill before you use it for the first time:
Enter this prompt:
After installation, enter this prompt in the agent:
You can also run the script included with the Skill:
Without -o, the output directory uses the source Markdown filename without its extension. Spaces and invalid filename characters are replaced with _. For example, document.md creates:
The directory name is not fixed. You can also set it explicitly with -o <output-directory>. Open the generated main.md and confirm that its images render before you archive or move the directory.

Method 3: Reuse Python code directly

If you do not use the Skill, copy the complete single-file example below. It supports Markdown images and HTML <img> elements, converts images to JPEG, and creates main.md and images/. Install the dependency:
Save the code as localize_somark_images.py:
Run it:
This example handles one Markdown file. Use Method 2 for batch processing, domain allowlists, concurrent downloads, image size limits, or overwrite protection.