This section as Markdown: View Download

Files

Manage folders and upload files for use with AI models.

Overview

The Files API lets you organize and upload data that can be referenced in model runs. Common use cases include:

  • Training data: upload datasets for fine-tuning models
  • File inputs: provide images, audio, or documents as model inputs
  • Batch processing: store files for repeated use across multiple runs

Authentication and Public File URLs

All file-management endpoints, including FolderCreate, Upload, List, Edit, Delete, CheckDisk, and Unzip, require normal Wiro project or Bearer authentication.

  • API Key Only projects: send x-api-key.
  • Signature projects: send x-api-key, x-nonce, and x-signature. See Authentication.
  • Dashboard requests: use the signed-in user's Bearer token.

The returned GET /File/:accessKey/:fileName URL intentionally remains public so browsers, AI model workers, and external clients can display the file without account credentials. Possession of the generated access key grants read access only; it does not grant file-management permission.

Code examples: The examples on this page show API Key Only authentication. Signature-authenticated projects must include the nonce and signature headers, as in this example:

NONCE="$(date +%s)"
SIGNATURE="$(printf '%s' "${YOUR_API_SECRET}${NONCE}" \
  | openssl dgst -sha256 -hmac "${YOUR_API_KEY}" \
  | awk '{print $NF}')"

curl -X POST "https://api.wiro.ai/v1/File/FolderCreate" \
  -H "Content-Type: application/json" \
  -H "x-api-key: ${YOUR_API_KEY}" \
  -H "x-nonce: ${NONCE}" \
  -H "x-signature: ${SIGNATURE}" \
  -d '{"name":"training-data"}'

POST /File/FolderCreate

Creates a new folder to organize your uploaded files.

Parameter Type Required Description
name string Yes Folder name
parentid string No Parent folder ID for nested structure (omit for root)

Note: Folder names only allow letters, numbers, hyphens, and underscores (A-Z a-z 0-9 _ -).

Response

{
  "result": true,
  "errors": [],
  "list": [{
    "id": "folder-abc123",
    "name": "training-data",
    "parentid": "root-folder-id",
    "size": "0",
    "contenttype": "",
    "addedtime": "1716276543"
  }]
}

POST /File/Upload

Uploads a file using multipart/form-data. You can optionally assign it to a folder.

Parameter Type Required Description
file file Yes The file to upload (multipart form field)
folderid string No Target folder ID (uploads to user's default folder if omitted)

File size limit: 100 MB per file.

Supported file types: Images (jpg, png, gif, jpeg, webp, heic), video (mp4, webm, mov), audio (mp3, wav, m4a), documents (pdf, csv, docx, xlsx, pptx, txt, md, epub), and ZIP archives (automatically extracted).

Response

{
  "result": true,
  "errors": [],
  "list": [{
    "id": "file-id",
    "name": "dataset.csv",
    "contenttype": "text/csv",
    "size": "1048576",
    "parentid": "folder-id",
    "url": "https://cdn1.wiro.ai/...",
    "addedtime": "1716276727",
    "accesskey": "..."
  }]
}

Using Files in Runs

Once uploaded, reference a file by its URL or ID in your model run parameters. For example, an image upscaler model might accept an inputImageUrl parameter. Pass the URL returned from the upload response.

You don't always need to upload files first. Most models take a public URL in place of an upload, and the parameter's type decides where it goes: a combinefileinput takes it in the field itself (for example inputImage on most image models), a fileinput takes it in its {id}Url field (for example inputImageUrl), and a multifileinput takes a list in the field that puts Url before Multiple (for example inputDocumentUrlMultiple). See Model Parameters for each pattern.

{
  "inputImageUrl": "https://cdn1.wiro.ai/...",
  "scale": 4
}