---
title: "Upload file to CDN"
method: POST
path: "/api/v1/upload"
tags: ["AI"]
---

# Upload file to CDN

`POST /api/v1/upload`

## Request

- Base URL: `https://core.blink.new`
- URL: `https://core.blink.new/api/v1/upload`
- Auth: HTTP bearer

Upload a base64-encoded file to CDN storage and receive a public URL. Accepts raw base64 or a full data URI prefix (`data:<mime>;base64,...`). Maximum payload size is 20 MB.

## Request body

- object
  - `data` string, required: Base64-encoded file content. Accepts raw base64 or full data URI (e.g. `data:image/jpeg;base64,...`).
  - `mime_type` string: MIME type of the file (defaults to `image/jpeg`)
  - `filename` string: Desired filename on the CDN (defaults to `upload-{timestamp}.bin`)

## Response `200`

File uploaded — returns public CDN URL

- object
  - `url` string, uri: Public CDN URL of the uploaded file

## Other responses

- `400`: Missing or invalid `data` field
- `401`: Authentication required or invalid API key
- `413`: File exceeds 20 MB limit
- `500`: Internal server error

---

[API](https://skmtc.dev/blink/apis/blink-apis.md) - [All operations](https://skmtc.dev/blink/apis/blink-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/blink/apis/blink-apis/revisions/4c59c706078e?raw)
