Get Studio Image
curl --request GET \
--url https://api.example.com/api/partner/v1/studio/images/{imageId}import requests
url = "https://api.example.com/api/partner/v1/studio/images/{imageId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/partner/v1/studio/images/{imageId}', 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://api.example.com/api/partner/v1/studio/images/{imageId}",
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://api.example.com/api/partner/v1/studio/images/{imageId}"
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://api.example.com/api/partner/v1/studio/images/{imageId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/partner/v1/studio/images/{imageId}")
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{
"ok": true,
"code": 200,
"message": "Image status retrieved",
"data": {
"image_id": "33333333-3333-4333-8333-333333333333",
"status": "succeeded",
"output_url": "https://cdn.vireel.io/images/studio-image-33333333-3333-4333-8333-333333333333.png",
"error": null,
"file_id": "11111111-1111-1111-1111-111111111111"
}
}
Studio AI
Get Studio Image
Poll Studio image generation status by image_id.
GET
/
api
/
partner
/
v1
/
studio
/
images
/
{imageId}
Get Studio Image
curl --request GET \
--url https://api.example.com/api/partner/v1/studio/images/{imageId}import requests
url = "https://api.example.com/api/partner/v1/studio/images/{imageId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/partner/v1/studio/images/{imageId}', 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://api.example.com/api/partner/v1/studio/images/{imageId}",
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://api.example.com/api/partner/v1/studio/images/{imageId}"
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://api.example.com/api/partner/v1/studio/images/{imageId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/partner/v1/studio/images/{imageId}")
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{
"ok": true,
"code": 200,
"message": "Image status retrieved",
"data": {
"image_id": "33333333-3333-4333-8333-333333333333",
"status": "succeeded",
"output_url": "https://cdn.vireel.io/images/studio-image-33333333-3333-4333-8333-333333333333.png",
"error": null,
"file_id": "11111111-1111-1111-1111-111111111111"
}
}
Returns the status of a Studio image job in the authenticated key scope. Poll it after
Generate Studio Image until
output_url is set or
status is failed. Every 5 seconds is a good interval.
CLI: genviral studio-image-status --image-id <id>, or genviral studio-generate-image ... --wait
to start and poll in one command.
Path Parameters
string
required
Image UUID (
image_id) returned by POST /api/partner/v1/studio/images/generate.Status Values
processing- still generating;output_urlisnullsucceeded-output_urlandfile_idare setfailed-errorsays why; credits are refunded
error field is present on every response. It is null unless the job failed, so check
status or output_url, not the presence of error.
Example
curl --request GET \
--url 'https://www.genviral.io/api/partner/v1/studio/images/33333333-3333-4333-8333-333333333333' \
--header 'Authorization: Bearer <token>'
{
"ok": true,
"code": 200,
"message": "Image status retrieved",
"data": {
"image_id": "33333333-3333-4333-8333-333333333333",
"status": "succeeded",
"output_url": "https://cdn.vireel.io/images/studio-image-33333333-3333-4333-8333-333333333333.png",
"error": null,
"file_id": "11111111-1111-1111-1111-111111111111"
}
}
Recovering a lost image_id
If your client lost theimage_id, list recent results with
List Studio Creations (kind=image, limit 1 to 48) and match
on prompt_excerpt.
Error Responses
404 image_not_found422 invalid_path401- authentication failed (missing/invalid/revoked token)
