Gepetto
Back to GepettoBlog
  • INTRODUCTION
    • Overview
    • Getting Started
    • Rate limiting
    • Pricing
    • Cold boots
    • Server Status
  • Endpoints
    • Redesign
    • Furnish
    • Smart Staging 🔮
    • Smart Staging v2 🔮
    • Sunshine ☀️
    • Declutter 🩹
    • Magic Enhancer ✨
    • Upscale
    • Get Styles
    • Get Skies
    • Get Rooms
    • Get Job
  • Webhooks
Powered by GitBook
On this page
  • Endpoint
  • Code Examples

Was this helpful?

  1. Endpoints

Get Job

Endpoint

GET https://europe-west1-gepettoai.cloudfunctions.net/v1/job/{id}

Path Parameters

Name
Type
Description

id*

String

JOB ID received in /redesign /furnish or /upscale when setting the webhook parameter.

Headers

Name
Type
Description

Authorization*

String

Bearer {{API_KEY}}

{
  "status": "success",
  "output": "<Image URL>",
  "mode": "furnish",
  "createdAt": "2023-09-29T13:17:21.774Z"
}

Code Examples


curl --location 'https://europe-west1-gepettoai.cloudfunctions.net/v1/job/{id}' \
--header 'Authorization: Bearer {{API_KEY}}' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer {{API_KEY}}");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: 'GET',
  headers: myHeaders
};

const response = await fetch("https://europe-west1-gepettoai.cloudfunctions.net/v1/job/{id}", requestOptions)
const body = await reponse.json();
console.log(body)
import requests
import json

url = "https://europe-west1-gepettoai.cloudfunctions.net/v1/job/{id}"

payload = {}
headers = {
  'Authorization': 'Bearer {{API_KEY}}',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
<?php
$client = new Client();
$headers = [
  'Authorization' => 'Bearer {{API_KEY}}',
  'Content-Type' => 'application/json'
];

$request = new Request('GET', 'https://europe-west1-gepettoai.cloudfunctions.net/v1/job/{id}', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://europe-west1-gepettoai.cloudfunctions.net/v1/job/{id}"
  method := "GET"

  client := &http.Client {}
  req, err := http.NewRequest(method, url, nil)

  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/job/{id}")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer {{API_KEY}}"
request["Content-Type"] = "application/json"

response = https.request(request)
puts response.read_body

Last updated 1 year ago

Was this helpful?