API Reference / Media

Get an image

PostPiper API: read owned image metadata and get a fresh preview URL. Signed preview links expire after 15 minutes—call again when needed.

GEThttps://api.postpiper.ai/v1/media/{assetId}

Preview URLs expire after 15 minutes. Call this endpoint again when a preview URL has expired.

Path and query parameters

NameTypeDescription
assetIdUUID, requiredID of an owned ready image.

Example request

Terminal
curl -H "Authorization: Bearer $POSTPIPER_API_KEY" "https://api.postpiper.ai/v1/media/<asset-uuid>"

Response

200 OK. Returns the image asset.

JSON
{
  "asset": {
    "id": "<asset-uuid>",
    "post_id": null,
    "mime_type": "image/png",
    "size_bytes": 1234,
    "created_at": "2030-10-12T01:00:00.000Z",
    "preview_url": "https://<signed-preview-url>"
  }
}

Errors

  • 401Missing or invalid API key.
  • 403API key lacks the required scope.
  • 404MEDIA_NOT_FOUND for an unknown or unowned image.