POST /v1/uploads/import
Import a file from a URL
Fetches a file and stores it as a verified upload. Only hosts the server allows are fetched; otherwise use `POST /v1/uploads`.
Permission
A key with chosen permissions needs generation.write. A key made with every permission may always call it. It can spend: send an Idempotency-Key so a retry replays the first answer.
Parameters
Idempotency-Key (header)string · optionalAny string up to 255 characters. Send the same value to retry a request without spending twice; a different body under a used key is refused with 409.
up to 255 characters
Body
urlstring · requiredA file on a host this server is allowed to fetch from (`MEDIA_IMPORT_ALLOWED_HOSTS`).
uri
filenamestring · optionalup to 220 characters
mime_typestring · optionalup to 120 characters
Response: Upload
201 · A file you brought into Kuro.
object"upload"idstringuuid
filenamestringtypestringone of "image", "video", "audio"
mime_typestringbytesintegerstatusstringOnly a `verified` upload can be used in a generation.
one of "pending", "verified", "rejected", "expired"
urlstringA signed link to the file, for about an hour.
uri
thumbnail_urlstring | nulluri
referenceobject | objectPass this where a request takes media.
created_atstringdate-time
Example
The required fields only, each a placeholder. Replace them before sending.
curl -X POST "https://api.meetkuro.com/v1/uploads/import" \
-H "Authorization: Bearer $KURO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"url":"<url>"}'import { Kuro } from "@meetkuro/sdk";
const kuro = new Kuro(); // reads KURO_API_KEY
await kuro.uploads.import({ url: "https://…" });