Get Batch
curl --request GET \
--url https://api.example.com/tryon/v1/batches/{batchId}import requests
url = "https://api.example.com/tryon/v1/batches/{batchId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/tryon/v1/batches/{batchId}', 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/tryon/v1/batches/{batchId}",
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/tryon/v1/batches/{batchId}"
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/tryon/v1/batches/{batchId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/tryon/v1/batches/{batchId}")
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{
"batchId": "c4b1s2...",
"status": "COMPLETED",
"itemCount": 2,
"completedCount": 2,
"failedCount": 0,
"reservedCredits": 1,
"chargedCredits": 1,
"createdAt": "2026-10-07T09:00:00.000Z",
"expiresAt": "2026-10-07T13:00:00.000Z",
"items": [
{
"customId": "look-1",
"generationId": "g1...",
"status": "COMPLETED",
"resultImageUrl": "https://storage.googleapis.com/..."
},
{
"customId": "look-2",
"generationId": "g2...",
"status": "COMPLETED",
"resultImageUrl": "https://storage.googleapis.com/..."
}
],
"nextCursor": null
}
Batches
Get Batch
Progress of a batch and its results, page by page.
GET
/
tryon
/
v1
/
batches
/
{batchId}
Get Batch
curl --request GET \
--url https://api.example.com/tryon/v1/batches/{batchId}import requests
url = "https://api.example.com/tryon/v1/batches/{batchId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/tryon/v1/batches/{batchId}', 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/tryon/v1/batches/{batchId}",
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/tryon/v1/batches/{batchId}"
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/tryon/v1/batches/{batchId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/tryon/v1/batches/{batchId}")
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{
"batchId": "c4b1s2...",
"status": "COMPLETED",
"itemCount": 2,
"completedCount": 2,
"failedCount": 0,
"reservedCredits": 1,
"chargedCredits": 1,
"createdAt": "2026-10-07T09:00:00.000Z",
"expiresAt": "2026-10-07T13:00:00.000Z",
"items": [
{
"customId": "look-1",
"generationId": "g1...",
"status": "COMPLETED",
"resultImageUrl": "https://storage.googleapis.com/..."
},
{
"customId": "look-2",
"generationId": "g2...",
"status": "COMPLETED",
"resultImageUrl": "https://storage.googleapis.com/..."
}
],
"nextCursor": null
}
Returns the batch counts and one page of its items, in submit order. Completed items carry a temporary
resultImageUrl.
Parameters
string
required
From Create Batch.
string
nextCursor of the previous page.number
default:"100"
Items per page, up to 500.
Status
status | Meaning |
|---|---|
RUNNING | Items are still queued or running. |
COMPLETED | Every item is done. chargedCredits is set. |
CANCELLED | You cancelled it; items that had not started failed with BATCH_CANCELLED. |
EXPIRED | Some items did not run within 4 hours (BATCH_EXPIRED). |
{
"batchId": "c4b1s2...",
"status": "COMPLETED",
"itemCount": 2,
"completedCount": 2,
"failedCount": 0,
"reservedCredits": 1,
"chargedCredits": 1,
"createdAt": "2026-10-07T09:00:00.000Z",
"expiresAt": "2026-10-07T13:00:00.000Z",
"items": [
{
"customId": "look-1",
"generationId": "g1...",
"status": "COMPLETED",
"resultImageUrl": "https://storage.googleapis.com/..."
},
{
"customId": "look-2",
"generationId": "g2...",
"status": "COMPLETED",
"resultImageUrl": "https://storage.googleapis.com/..."
}
],
"nextCursor": null
}
Was this page helpful?

