Read-only image dataset

CardVault images for recognition training.

This Pokoin endpoint exposes a cache-friendly, read-only view of CardVault card images stored in Cloudflare R2. Use it to import card artwork and previews into image-recognition training pipelines without receiving bucket write credentials.

Endpoints

JSON lives at explicit manifest endpoints. The root URL is this guide page.

Paginated manifest /manifest.json?limit=1000&cursor=<nextCursor>

Returns object metadata, download URLs, hasMore, and nextCursor.

Compatibility alias /images.json?limit=100

Same manifest response for clients that were pointed at the older image index path.

Best blueprint images /blueprints/best-images.json

One DB-selected non-homepage image per CardTrader blueprint, generated from Oracle for incremental embedding jobs.

Object download /images/<object-key>

Streams the R2 object with image metadata, ETag, byte-range support, and long-lived cache headers.

Card classifier POST /api/classify

Accepts an uploaded card image or JSON base64 payload and proxies it to the configured Hugging Face Space classifier.

Manifest Shape

Each object entry includes fields useful for dataset importers and reproducible training runs.

Top-level fields

  • bucket, access, prefix, and pageSize
  • returned, hasMore, and nextCursor
  • total is intentionally null; iterate pages instead of assuming a total count.

Object fields

  • key, size, uploaded, etag, and contentType
  • url for this training endpoint and sameOriginUrl for the Pokoin CDN path
  • Optional prefix filtering: /manifest.json?prefix=previews/&limit=100

Best blueprint image fields

  • count, generated_at, and strategy describe the Oracle snapshot.
  • Each object includes blueprint_id, object_key, url, source, name, set_name, and collector_number.
  • Use this endpoint for classifier embeddings; it avoids homepage derivatives and lets importers skip already-embedded blueprint IDs.

Import Examples

All examples follow cursors until the manifest says there are no more pages.

curl + Node JSON parsing
cursor=""
while :; do
  url="https://trainingai.pokoin.com/manifest.json?limit=1000"
  if [ -n "$cursor" ]; then
    url="$url&cursor=$cursor"
  fi
  page="$(curl -fsS "$url")"
  printf '%s
' "$page" | node -e "let d='';process.stdin.on('data',c=>d+=c).on('end',()=>JSON.parse(d).objects.forEach(o=>console.log(o.url)))"
  cursor="$(printf '%s
' "$page" | node -e "let d='';process.stdin.on('data',c=>d+=c).on('end',()=>{const j=JSON.parse(d); if (j.nextCursor) console.log(j.nextCursor)})")"
  [ -n "$cursor" ] || break
done
Node fetch importer
const base = "https://trainingai.pokoin.com/manifest.json";
let cursor = "";

do {
  const url = new URL(base);
  url.searchParams.set("limit", "1000");
  if (cursor) url.searchParams.set("cursor", cursor);

  const page = await fetch(url).then((response) => response.json());
  for (const object of page.objects) {
    console.log(object.key, object.url, object.contentType, object.size);
    // Download object.url into your dataset store here.
  }
  cursor = page.hasMore ? page.nextCursor : "";
} while (cursor);
Python requests importer
import requests

base = "https://trainingai.pokoin.com/manifest.json"
cursor = None

while True:
    params = {"limit": 1000}
    if cursor:
        params["cursor"] = cursor
    page = requests.get(base, params=params, timeout=30).json()
    for obj in page["objects"]:
        print(obj["key"], obj["url"], obj.get("contentType"), obj["size"])
        # Download obj["url"] into your dataset store here.
    cursor = page.get("nextCursor") if page.get("hasMore") else None
    if not cursor:
        break
Best blueprint manifest
import requests

manifest = requests.get(
    "https://trainingai.pokoin.com/blueprints/best-images.json",
    timeout=120,
).json()

for item in manifest["objects"]:
    print(item["blueprint_id"], item["url"], item["source"])
Classifier upload
curl -X POST https://trainingai.pokoin.com/api/classify   -F "image=@card.jpg"   -F "top_k=3"

Safety Notes

Designed for sharing data with training collaborators without widening bucket access.

Read-only by design

Only GET, HEAD, and OPTIONS are allowed. Do not share R2 S3 keys or write credentials with import scripts.

Cache-friendly downloads

Image responses include immutable cache headers and ETags, so importers can avoid repeated downloads after the first sync.

Attribution

When publishing model notes or derived datasets, cite Pokoin CardVault as the image source when appropriate.