Skip to main content
POST
/
files
/
upload-url
Request a signed upload URL
curl --request POST \
  --url https://api.autoprintfarm.com/public/v1/files/upload-url \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filename": "<string>",
  "content_type": "<string>"
}
'
{
  "success": true,
  "data": {
    "file_id": "<string>",
    "filename": "<string>",
    "upload_token": "<string>",
    "content_type": "<string>",
    "expires_in": 123,
    "upload_url": "<string>",
    "storage_key": "<string>"
  }
}

Authorizations

Authorization
string
header
required

API keys are minted in the AutoPrintFarm web app under Settings → API Keys. Send as Authorization: Bearer apf_live_.... Keys are shown exactly once at creation and can be revoked at any time.

Body

application/json
filename
string
required

Print filename including extension (3mf, gcode, stl, obj, amf). Used as the on-printer filename when the file is sent to print, so must be a single safe path segment.

Required string length: 1 - 255
content_type
string

Optional MIME type. Defaults to the type derived from the filename extension.

Response

Token issued

success
enum<boolean>
required
Available options:
true
data
object
required