---
title: "Upload a file to use as input"
method: POST
path: "/v1/uploads"
tags: ["uploads"]
---

# Upload a file to use as input

`POST /v1/uploads`

## Request

- Base URL: `https://api.corent.tech` (the document declares no server; this is the origin it was published from)
- URL: `https://api.corent.tech/v1/uploads`
- Auth: HTTP bearer

Store a file on Corent and get back a URL every other endpoint accepts.

Use it for reference images, image-to-image sources, inpainting masks, the
start or end frame of a video, or audio input. Free; opens no job. 25 MB cap.
Allowed types: audio/mp4, audio/mpeg, audio/wav, audio/x-wav, image/gif, image/jpeg, image/jpg, image/png, image/webp, video/mp4, video/quicktime. The bytes must
match the declared type (a renamed file is refused).

Multipart, the simplest:

```
curl https://api.corent.tech/v1/uploads \
  -H "Authorization: Bearer co_live_..." \
  -F "file=@product.png" \
  -F "customer_id=user_42"
```

JSON, for callers that cannot send multipart:

```
curl https://api.corent.tech/v1/uploads \
  -H "Authorization: Bearer co_live_..." \
  -H "Content-Type: application/json" \
  -d '{"data_base64": "<base64 of the file>", "content_type": "image/png", "filename": "product.png"}'
```

Either way the answer is:

```
{"url": "https://.../corent-media/uploads/2026-09/<account>/<id>.png",
 "id": "<id>", "content_type": "image/png", "bytes": 48213, "kind": "image"}
```

Then, for example:

```
POST /v1/images/edit
{"image_url": "<url from above>", "mask_url": "<another upload>", "prompt": "a red cap"}
```

## Request body

- object: The JSON shape. `filename` is informational only: the stored name is a fresh uuid plus the extension the content type implies.
  - `data_base64` string, required: The file's bytes, standard base64 (padding optional).
  - `content_type` string, required: Declared type, one of: audio/mp4, audio/mpeg, audio/wav, audio/x-wav, image/gif, image/jpeg, image/jpg, image/png, image/webp, video/mp4, video/quicktime. Must match the bytes.
  - `filename` string, nullable: Optional, for your own records.
  - `customer_id` string, nullable: Optional tag for YOUR end user, so you can attribute spend: 1 to 128 characters from A-Z a-z 0-9 . _ : @ -. Stored on the job, returned on receipts, and filterable with GET /v1/account/usage?customer_id=...

## Response `200`

Successful Response

- UploadResponse
  - `url` string, required: Public https URL on Corent storage. Pass it to any endpoint's URL field.
  - `id` string, required
  - `content_type` string, required
  - `bytes` integer, required
  - `kind` string, required: image | video | audio
  - `customer_id` string, nullable

## Other responses

- `400`: Invalid request (bad parameters or input).
- `401`: Missing or invalid API key.
- `402`: Insufficient prepaid balance.
- `403`: API key lacks the required capability scope.
- `413`: File larger than 25 MB.
- `415`: Content type not accepted, or the bytes do not match the declared type.
- `422`: Prompt not allowed, or request failed validation.
- `429`: Rate limit, concurrency, or daily spend cap reached.
- `502`: Every eligible provider failed; try again.
- `503`: No provider currently available for this request.

---

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