Skip to main content
GET
/
v1
/
generations
List generations
curl --request GET \
  --url https://app.selektable.com/v1/generations \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://app.selektable.com/v1/generations"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://app.selektable.com/v1/generations', 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://app.selektable.com/v1/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$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://app.selektable.com/v1/generations"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.selektable.com/v1/generations")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.selektable.com/v1/generations")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "object": "list",
  "data": [
    {
      "id": "agen_abc123",
      "object": "generation",
      "imageUrl": "<string>",
      "imageVariants": {
        "list": {
          "url": "<string>",
          "width": 123
        },
        "card": {
          "url": "<string>",
          "width": 123
        },
        "detail": {
          "url": "<string>",
          "width": 123
        }
      },
      "products": [
        {
          "productId": "<string>",
          "productTitle": "<string>",
          "imageUrl": "<string>",
          "productUrl": "<string>",
          "dimensions": {}
        }
      ],
      "hint": "<string>",
      "error": {
        "code": "<string>",
        "message": "<string>"
      },
      "metadata": {},
      "createdAt": "2023-11-07T05:31:56Z",
      "completedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "hasMore": true
}
{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>"
}
}
Cursor-paginated, newest first. To page: take the last id in data and pass it as starting_after on the next request. Keep paging while hasMore is true.
{
  "object": "list",
  "data": [ { "id": "agen_...", "object": "generation", "...": "..." } ],
  "hasMore": true
}

Authorizations

Authorization
string
header
required

Your Selektable API key (selektable_...), sent as Authorization: Bearer <key>.

Query Parameters

limit
integer
default:20
Required range: 1 <= x <= 100
starting_after
string

A generation id to page after.

status
enum<string>
Available options:
processing,
complete,
failed

Response

A list of generations

object
enum<string>
Available options:
list
data
object[]
hasMore
boolean