Skip to content
All pages
  1. Overview
  2. Quick start
  3. Authentication
  4. API reference
    1. GET /media
    2. POST /media
    3. GET /media/{id}/preview
    4. GET /integrations/google/connect
    5. GET /integrations/google
    6. DELETE /integrations/google
    7. GET /integrations/google/folders
    8. POST /media/import
    9. GET /media/imports/{id}
    10. POST /renders
    11. GET /renders/{id}
    12. GET /renders/{id}/download
    13. GET /usage
  5. Code examples
  6. Error handling
  7. Rate limits & quotas
  8. Troubleshooting
  9. Changelog

Reference

GET

/api/v1/media/{id}/preview

Requires the media:read scope.

The photo itself, so an operator can see what they are about to render. Returns image bytes, not JSON.

Request

curl -s "https://omniscape.io/api/v1/media/c35c8330-5dd2-4170-b2b0-bae80ed7182f/preview" \
  -H "Authorization: Bearer $OMNISCAPE_API_KEY" -o photo.jpg

Response

HTTP/1.1 200 OK
Content-Type: image/jpeg
Cache-Control: private, no-store
X-Request-Id: 0f1c…

<binary image data>

Notes

  • This is preview_url from the list response. It is on our domain and it needs the same Authorization header — it is a way to browse your own library, not a public image URL you can put in an <img> tag or hand to a browser.
  • It does not expire, because your key is what authorises it rather than a token in the URL.
  • A media id that is not yours returns 404 unknown_media — identical to one that does not exist.

Codes this call can return are on Error handling. If something is behaving unexpectedly, Troubleshooting is organised by symptom.