Sunshine ☀️
Sunshine allows you to refresh the sky of your outdoors when your pictures when taken during gloomy day. 🌧️
💵 Credit Cost
You have two options:
Enhanced sunshine : 2 credits
Ultra realistic sky with surroundings modification
Works for outdoor and indoor photos
Regular sunshine: 1 credit
Basic sky modification and do not affect the surroundings
Only works for outdoor photos
For best results, we highly suggest the Enhanced option. It will deliver the best quality and the best accuracy. See examples
Endpoint
POST https://europe-west1-gepettoai.cloudfunctions.net/v1/sunshine
Headers
Authorization*
String
Bearer {{API_KEY}}
Request Body
url*
String
Image URL of the outdoor to be sunshined.
Ex: https://img.freepik.com/premium-photo/abandoned-dilapidated-house-gloomy-sky_419341-152622.jpg
skyId*
String
The sky ID that can be fetched on the Get Skies endpoint.
sunny, sunrise, sunset, sunset_rose
webhook
String
(optional) Webhook POST URL to send the result on completion. If not provided, the request will wait for the result.
enhanced
(True / False)
(recommended)
Default to false.
Will use to enhanced mode to deliver an ultra realistic sky modification with advanced effects on the environment. (works for both indoors and outdoors photos) Cost: 2 credits
{
"base64": "<base64 encoded image>",
"status": "success"
}{
"status": "pending",
"id": "xxxxxxxxxxxxxx", // You can use that id with Get Job
"skyId": "your_style"
"mode": "sunshine"
}Code Examples
curl --location 'https://europe-west1-gepettoai.cloudfunctions.net/v1/sunshine' \
--header 'Authorization: Bearer {{API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://img.freepik.com/premium-photo/abandoned-dilapidated-house-gloomy-sky_419341-152622.jpg",
"skyId": "sunny",
"enhanced": true
}'var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer {{API_KEY}}");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: JSON.stringify({
"url": "https://img.freepik.com/premium-photo/abandoned-dilapidated-house-gloomy-sky_419341-152622.jpg",
"skyId": "sunny",
"enhanced": true
})
};
const response = await fetch("https://europe-west1-gepettoai.cloudfunctions.net/v1/sunshine", requestOptions)
const body = await reponse.json();
console.log(body)import requests
import json
url = "https://europe-west1-gepettoai.cloudfunctions.net/v1/sunshine"
payload = json.dumps({
"url": "https://img.freepik.com/premium-photo/abandoned-dilapidated-house-gloomy-sky_419341-152622.jpg",
"skyId": "demeures",
"enhanced": True
})
headers = {
'Authorization': 'Bearer {{API_KEY}}',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)<?php
$client = new Client();
$headers = [
'Authorization' => 'Bearer {{API_KEY}}',
'Content-Type' => 'application/json'
];
$body = '{
"url": "https://img.freepik.com/premium-photo/abandoned-dilapidated-house-gloomy-sky_419341-152622.jpg",
"skyId": "sunny",
"enhanced": True
}';
$request = new Request('POST', 'https://europe-west1-gepettoai.cloudfunctions.net/v1/sunshine', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://europe-west1-gepettoai.cloudfunctions.net/v1/sunshine"
method := "POST"
payload := strings.NewReader(`{
"url": "https://img.freepik.com/premium-photo/abandoned-dilapidated-house-gloomy-sky_419341-152622.jpg",
"styleId": "sunny",
"enhanced": true
}`)
client := &http.Client {}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer {{API_KEY}}")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}require "uri"
require "json"
require "net/http"
url = URI("https://europe-west1-gepettoai.cloudfunctions.net/v1/sunshine")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer {{API_KEY}}"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"url": "https://img.freepik.com/premium-photo/abandoned-dilapidated-house-gloomy-sky_419341-152622.jpg",
"skyId": "sunny",
"enhanced": true
})
response = https.request(request)
puts response.read_body
Results
Enhanced mode "true"






Enhance mode "false"






Last updated
Was this helpful?