DevelopersDocsGuides
Media URLs
How to resolve statement diagrams and choice images returned by REST and MCP.
The JSON shape is unchanged. Prefer the absolute Storage URLs in images[] and choices[].image_url. Those hosts are not the Problems.cc website, and a server client can fetch them directly.
| Where it appears | Form | How to fetch it |
|---|---|---|
| images[].url | Absolute Storage URL | GET the URL as returned. This is the portable statement-image path. |
| choices[].image_url | Absolute Storage URL, or null | GET the URL as returned. This is the image-only choice path. |
| statement_md and option_md | Markdown such as  | Resolve a path that starts with / against https://www.problems.cc. Do not prepend /api/v1. |
Example. A statement may contain:
The corresponding website URL is https://www.problems.cc/library/how-many-shapes/hms-003.svg. Browser clients can load that. Non-browser clients should use a Storage URL from images[] or choices[].image_url when one is present, because website paths remain behind Bot Protection.
Python helper for the Markdown case:
from urllib.parse import urljoin
MEDIA_ORIGIN =
def media_url(value: str) -> str: if value.startswith(): return urljoin(MEDIA_ORIGIN, value) return valueAudit crops whose path contains /audit/ are stripped before the response is built. Do not treat a missing image as a diagram you should recover from the website.