curl --request GET \
--url https://pictum.dev/v1/placeholder.{format}import requests
url = "https://pictum.dev/v1/placeholder.{format}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://pictum.dev/v1/placeholder.{format}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pictum.dev/v1/placeholder.{format}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pictum.dev/v1/placeholder.{format}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pictum.dev/v1/placeholder.{format}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pictum.dev/v1/placeholder.{format}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>"{
"message": "<string>"
}{
"message": "<string>"
}Render a placeholder
Render an SVG, JPEG, PNG, or WebP placeholder. Provide exactly size, or both width and height.
curl --request GET \
--url https://pictum.dev/v1/placeholder.{format}import requests
url = "https://pictum.dev/v1/placeholder.{format}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://pictum.dev/v1/placeholder.{format}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pictum.dev/v1/placeholder.{format}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pictum.dev/v1/placeholder.{format}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pictum.dev/v1/placeholder.{format}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pictum.dev/v1/placeholder.{format}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>"{
"message": "<string>"
}{
"message": "<string>"
}Path Parameters
Output image file extension.
svg, jpg, png, webp Query Parameters
Logical square width and height in pixels. Provide this parameter without width or height.
16 <= x <= 2048Logical image width in pixels. Provide this parameter with height and without size.
16 <= x <= 4096Logical image height in pixels. Provide this parameter with width and without size. Logical width multiplied by height may not exceed 4,194,304 pixels.
16 <= x <= 4096Optional raster pixel-density multiplier. This parameter is only valid for JPEG, PNG, and WebP; omit it for standard density. Rendered dimensions remain subject to output pixel limits.
2, 3 Six- or eight-digit hexadecimal background color, with an optional leading #. Eight-digit colors use #rrggbbaa syntax. SVG, PNG, and WebP preserve alpha; JPEG composites it over white.
^#?[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$Six- or eight-digit hexadecimal text color, with an optional leading #. Eight-digit colors use #rrggbbaa syntax. SVG, PNG, and WebP preserve alpha; JPEG composites it over white.
^#?[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$Centered label up to 64 characters.
64Response
Exact-size placeholder image.
The response is of type string.