Snapbyte
    Snapbyte
    • Snapbyte
    • Pricing
    • Speedtest
    • Snapbyte APIs
      • Basic
        • Signup
        • Authenticate
        • Logout
        • Get API Key
        • Add webhook
        • Get User Stats
      • Files
        • Top Files
        • Get Files
        • Get File Info
        • Get File's Stats
      • Zones
        • Get Zones
        • Create Zone
        • Get Zone's Stats
      • Domain
        • Whitelist Domain
        • Domain Patterns
      • Preload a File
        POST
      • Get Snapbyte Signed Url
        GET
    • Legacy APIs
      • Preload File
        POST
      • Get Download Url
        GET
    • ⚡ Fast Snap
      GET

      ⚡ Fast Snap

      GET
      /snap
      Description:
      The Fast Snap API allows you to instantly use Snapbyte’s caching system in a single call, without needing to preload or register the file in advance.
      Use it for:
      Rapid integration
      Query Parameters:
      file_id: A unique identifier you define
      sign_url: The original file URL hosted on your origin server

      How it Works:
      1.
      Snapbyte checks whether the file associated with file_id is already cached.
      2.
      If cached, it redirects the user to the cached file.
      3.
      If not cached, Snapbyte fetches the file from sign_url, stores it in the cache, and prepares it for future access.
      4.
      In both cases, the API responds with:

      🌐 Domain Whitelisting#

      To ensure secure usage and prevent abuse, Snapbyte requires you to whitelist the origin domains you plan to use with sign_url.

      ✅ How It Works#

      Before using the sign_url parameter in the Fast Snap API or any dynamic fetch request, the domain must be whitelisted in your account.
      Example:
      If you're serving files from https://files.example.com/file.mp4
      You should whitelist: files.example.com

      🔧 How to Whitelist a Domain#

      You can whitelist domains in two ways:
      1.
      Via the Dashboard
      Go to your Snapbyte Dashboard
      Navigate to Domain Whitelist
      Add your domain(s) (e.g., cdn.example.com)
      Save and apply changes
      2.
      Via API

      POST /v1/domain/pattern#

      ⚠️ Error Handling#

      If you attempt to use a domain that hasn’t been whitelisted:
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request GET 'https://api.snapbyte.io/snap?file_id=4d687a14-98e1-4a8a-b97f-43d7cf85b68f&sign_url=https://ash-speed.hetzner.com/100MB.bin'

      Request

      Query Params
      file_id
      string 
      required
      Example:
      4d687a14-98e1-4a8a-b97f-43d7cf85b68f
      sign_url
      string 
      required
      Example:
      https://ash-speed.hetzner.com/100MB.bin

      Responses

      🔵302OK
      This response does not have a body.
      Modified at 2025-07-15 10:38:02
      Previous
      Get Download Url
      Built with