Thumbnails
Score thumbnail
Score a thumbnail and get a main score, subscores, and an edit-ready suggestion.
POST
/
v2
/
thumbnail
/
score
cURL
curl -X POST "https://api.pikzels.com/v2/thumbnail/score" \
-H "X-Api-Key: pkz_yourapikey" \
-H "Content-Type: application/json" \
--data-raw '{
"image_url": "https://cdn.pikzels.com/example.png"
}'import requests
url = "https://api.pikzels.com/v2/thumbnail/score"
headers = {
"X-Api-Key": "pkz_yourapikey",
"Content-Type": "application/json",
}
payload = {
"image_url": "https://cdn.pikzels.com/example.png"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())const url = "https://api.pikzels.com/v2/thumbnail/score";
const body = {
"image_url": "https://cdn.pikzels.com/example.png"
};
const options = {
method: "POST",
headers: {
"X-Api-Key": "pkz_yourapikey",
"Content-Type": "application/json",
},
body: JSON.stringify(body),
};
const response = await fetch(url, options);
const data = await response.json();
console.log(data);<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pikzels.com/v2/thumbnail/score",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'image_url' => 'https://cdn.pikzels.com/example.png'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pikzels.com/v2/thumbnail/score"
payload := strings.NewReader("{\n \"image_url\": \"https://cdn.pikzels.com/example.png\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pikzels.com/v2/thumbnail/score")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"image_url\": \"https://cdn.pikzels.com/example.png\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pikzels.com/v2/thumbnail/score")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"image_url\": \"https://cdn.pikzels.com/example.png\"\n}"
response = http.request(request)
puts response.read_body{
"main_score": 78,
"request_id": "7b9e2f6d-2b5f-4d79-8d6c-4a9c6e2b7890",
"subscores": {
"clarity": 82,
"curiosity": 85,
"emotion": 76,
"idea": 79,
"virality": 88
},
"suggestion": "Increase headline text size by about 20%, add a dark blur panel behind the text, blur the cluttered background behind the subject"
}{
"request_id": "18b2ad5e-2a9e-4d3f-b9a8-9f2a1e0b1234",
"status": "IN_QUEUE",
"status_url": "https://api.pikzels.com/v2/requests/18b2ad5e-2a9e-4d3f-b9a8-9f2a1e0b1234/status",
"response_url": "https://api.pikzels.com/v2/requests/18b2ad5e-2a9e-4d3f-b9a8-9f2a1e0b1234"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}Body
application/json
Set true to get a request ID at once and fetch the result later. See Async Requests.
Response
Success
Prompt of up to 800 characters that fixes the weakest areas, ready for Edit thumbnail. Null when main_score is 80 or higher or none is available.
⌘I
cURL
curl -X POST "https://api.pikzels.com/v2/thumbnail/score" \
-H "X-Api-Key: pkz_yourapikey" \
-H "Content-Type: application/json" \
--data-raw '{
"image_url": "https://cdn.pikzels.com/example.png"
}'import requests
url = "https://api.pikzels.com/v2/thumbnail/score"
headers = {
"X-Api-Key": "pkz_yourapikey",
"Content-Type": "application/json",
}
payload = {
"image_url": "https://cdn.pikzels.com/example.png"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())const url = "https://api.pikzels.com/v2/thumbnail/score";
const body = {
"image_url": "https://cdn.pikzels.com/example.png"
};
const options = {
method: "POST",
headers: {
"X-Api-Key": "pkz_yourapikey",
"Content-Type": "application/json",
},
body: JSON.stringify(body),
};
const response = await fetch(url, options);
const data = await response.json();
console.log(data);<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pikzels.com/v2/thumbnail/score",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'image_url' => 'https://cdn.pikzels.com/example.png'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pikzels.com/v2/thumbnail/score"
payload := strings.NewReader("{\n \"image_url\": \"https://cdn.pikzels.com/example.png\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pikzels.com/v2/thumbnail/score")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"image_url\": \"https://cdn.pikzels.com/example.png\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pikzels.com/v2/thumbnail/score")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"image_url\": \"https://cdn.pikzels.com/example.png\"\n}"
response = http.request(request)
puts response.read_body{
"main_score": 78,
"request_id": "7b9e2f6d-2b5f-4d79-8d6c-4a9c6e2b7890",
"subscores": {
"clarity": 82,
"curiosity": 85,
"emotion": 76,
"idea": 79,
"virality": 88
},
"suggestion": "Increase headline text size by about 20%, add a dark blur panel behind the text, blur the cluttered background behind the subject"
}{
"request_id": "18b2ad5e-2a9e-4d3f-b9a8-9f2a1e0b1234",
"status": "IN_QUEUE",
"status_url": "https://api.pikzels.com/v2/requests/18b2ad5e-2a9e-4d3f-b9a8-9f2a1e0b1234/status",
"response_url": "https://api.pikzels.com/v2/requests/18b2ad5e-2a9e-4d3f-b9a8-9f2a1e0b1234"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "<string>"
},
"request_id": "<string>"
}