---
title: "Download an image as base64"
method: GET
path: "/api/download-image"
tags: ["Images"]
---

# Download an image as base64

`GET /api/download-image`

## Request

- Base URL: `https://api.sponsorunited.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.sponsorunited.com/api/download-image`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/sponsorunited/apis/sponsorunited-api/docs/api/download-image/get.ts> (a function with typed inputs; its response is checked against the schema)

Fetches an image from the provided URL and returns it as a base64-encoded data URI.

## Query parameters

- `url` string, url, required

## Response `200`

Base64-encoded image data URI

- object
  - `image` string: Base64-encoded data URI of the image

## Other responses

- `422`: Validation error or failed to fetch the image

---

[API](https://skmtc.dev/sponsorunited/apis/sponsorunited-api.md) - [All operations](https://skmtc.dev/sponsorunited/apis/sponsorunited-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sponsorunited/apis/sponsorunited-api/revisions/cbf1ca5bff8f?raw)
