MixMedia API
RUEN
Sign inCreate for free
Open as Markdown

POST /api/v1/files/upload

Uploads your photo and returns a link you can pass to the model input.

Request

POST https://mixmedia.tech/api/v1/files/upload
Authorization: Bearer <API_KEY>
Content-Type: multipart/form-data

Parameters

Form fieldRequiredDescription
fileyesJPG, PNG or WebP, up to 15 MB

The file is kept for 24 hours. You can skip uploading and pass any public https link instead.

Response

{
  "code": 200,
  "msg": "success",
  "data": {
    "url": "https://mixmedia.tech/files/5ee4b004b268e2d37c86c33552fe4f3e.jpg",
    "fileName": "5ee4b004b268e2d37c86c33552fe4f3e.jpg",
    "expiresInDays": 1
  }
}

Examples

curl -X POST https://mixmedia.tech/api/v1/files/upload \
  -H "Authorization: Bearer $API_KEY" \
  -F "file=@photo.jpg"
import os, requests

r = requests.post(
    "https://mixmedia.tech/api/v1/files/upload",
    headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
    files={"file": open("photo.jpg", "rb")},
)
print(r.json()["data"]["url"])
import fs from "node:fs";

const fd = new FormData();
fd.append("file", new Blob([fs.readFileSync("photo.jpg")], { type: "image/jpeg" }), "photo.jpg");
const r = await fetch("https://mixmedia.tech/api/v1/files/upload", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
  body: fd,
});
console.log((await r.json()).data.url);

Errors

codeerrorWhen
401unauthorizedMissing or invalid key
422validation_errorWrong format or file too large
© 2026 MixMedia