Images

Upload an image

Upload an image and receive a public CDN URL (JPEG, PNG, GIF, WebP, AVIF, SVG). Works WITHOUT an API key: keyless uploads are temporary (response includes temporary: true and expires_in, ~30 days) — add a Bearer key to make uploads permanent. Send multipart/form-data (a file), or, with a key, application/json { url } to import from a URL (https only).

post/v1/images

Request

  • Base URL: https://api.pixelvault.dev
  • URL: https://api.pixelvault.dev/v1/images
  • Auth: one of:
    • HTTP bearer
    • none

Request body

urlstring uri required

Source image URL to import (https only). Requires an API key.

folderstring

Optional folder name

visibility'public' | 'private'

'private' stores the image behind a signed URL and the response url is signed; default 'public'.

sign_expires_ininteger

Signature lifetime in seconds for a private upload (60–2592000, default 3600).

Response

Image uploaded

Example response

{
  "data": {
    "id": "img_a1b2c3d4e5f6",
    "url": "https://img.pixelvault.dev/proj_xyz789/a1b2c3d4e5f6.jpg",
    "mime_type": "image/jpeg",
    "size": 245782,
    "filename": "photo.jpg"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.