---
title: "Upload a base64-encoded image and get back a stable URL to embed in a document via <img src>."
method: POST
path: "/v1/documents/images/upload-base64"
tags: ["v1", "mcp"]
---

# Upload a base64-encoded image and get back a stable URL to embed in a document via <img src>.

`POST /v1/documents/images/upload-base64`

## Request

- Base URL: `https://api.superdocs.app`
- URL: `https://api.superdocs.app/v1/documents/images/upload-base64`
- Auth: HTTP bearer

Upload an image (base64-encoded) and get a stable URL to reference
in a document via <img src="...">.

Accepts PNG/JPEG/WebP/GIF/SVG, up to 10 MB decoded. Send raw base64 or a
data: URL in image_base64. This is the agent-friendly counterpart to the
browser multipart upload — use it to save a generated or fetched image so a
document can embed it.

Embed the returned `url` (the stable canonical reference — it never
expires and every document read serves it as a fresh time-limited signed
link). `view_url` is such a signed link for immediately viewing/downloading
the image outside a document; it expires, so never embed it.

## Headers

- `authorization` string, nullable

## Request body

- UploadImageBase64Request
  - `image_base64` string, required: The image bytes, base64-encoded (raw base64 or a data: URL).
  - `filename` string, nullable: Optional original filename (used only to infer content type).
  - `content_type` string, nullable: Optional MIME type, e.g. image/png. Defaults to image/png.

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/superdocs/apis/universal-document-ai-api.md) · [All operations](https://skmtc.dev/superdocs/apis/universal-document-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/superdocs/apis/universal-document-ai-api/revisions/37d03122940b?raw)
