Search the documentation

Pick a page and open it with Enter.

Uploads

Store attachments and get an address back (multipart).

POST/api/v1/uploads

Store attachments and get an address back. multipart/form-data. The answer holds the path the agent hands to analyze_image — the file itself never travels through the conversation.

Only what the vision model can actually look at is accepted: image/png, image/jpeg, image/webp, image/gif. Anything else is rejected with 422 rather than stored and silently ignored later. Text files do not belong here at all — they go into the prompt directly.

Form fields

filesfile[] · multipartrequired

One or more images, at most UPLOADS_MAX_FILES per request.

Example request

bash
curl -X POST http://localhost:8000/api/v1/uploads \
  -F "files=@console.png"

Response

json
{
  "files": [
    {
      "id": "a904577a208845c98dbce47c1d4655f5",
      "filename": "console.png",
      "media_type": "image/png",
      "bytes": 245113,
      "path": "/srv/smeeware/data/uploads/a904577a208845c98dbce47c1d4655f5.png"
    }
  ]
}

The filename you sent is kept for display only. On disk the file lives under a generated id with an extension derived from the media type — so neither a .. nor a .py finds its way through.

201

Stored.

422

Unsupported type, empty file, too large, or too many files.

500

Uploads are disabled (UPLOADS_ENABLED=false).