Built with Rust

High-Performance Random Image API Powered by Rust

A lightweight, high-performance image service built with Rust. Fetch random images via a simple RESTful API — ideal for website backgrounds, app development, and testing.

Random image
GEThttps://api.tor.hk/v1/random
curl 'https://api.tor.hk/v1/random'
<img src="https://api.tor.hk/v1/random" />
fetch('https://api.tor.hk/v1/random')
  .then(res => res.blob())
  .then(blob => {
    const img = document.createElement('img')
    img.src = URL.createObjectURL(blob)
    document.body.appendChild(img)
  })
use reqwest;

#[tokio::main]
async fn main() -> Result<()> {
    let resp = reqwest::get("https://api.tor.hk/v1/random")
        .await?;
    let bytes = resp.bytes().await?;
    println!("Downloaded " + &bytes.len().to_string() + " bytes");
    Ok(())
}