Re Kino
Guides

A whole catalogue, through the API

Two hundred products is two hundred photographs you already own and nobody willing to sit at a form. The API is two calls: send a picture, then ask whether it is done. It is paid out of the same pack as the website, one spin per picture, so there is no second price list to work out.

The shape of a catalogue run

Walk your product images, post each one, and keep the id next to the product. Then walk the ids and ask about each one every few seconds until it reports done, writing the frame addresses, the clip and the page back onto the product as they arrive. Both calls are small and neither needs anything clever.

Do it in the order your shop cares about rather than alphabetically. The products that matter are the ones people actually land on, and if you stop halfway because you have learned enough, you want the first fifty to have been the right fifty.

  • POST /api/v1/spins with the image, store the id.
  • GET /api/v1/spins/{id} every few seconds until status is done.
  • Store frames, video_url and page_url against the product.
  • Start with your best sellers, not with product number one.

Why asking is what moves it

A spin takes minutes of real work, and this is deliberately not hidden behind a connection held open for five minutes. The POST answers immediately with an id, and the GET reports progress. The GET also advances the work by one stage, which is unusual enough to say plainly: on this host the asking is the engine, exactly as the waiting screen on the website is the engine for somebody watching their own spin.

The practical consequence is simple. Poll your ids. A script that fires two hundred POSTs and exits leaves two hundred spins sitting in a queue, and nothing you paid for gets made.

What the answer gives you besides the turn

Each finished spin carries what the analysis read in the picture: a sentence describing it, a single word for the object, and whether it looks like a product, a property, a portrait or a generated image. Those three are the fields nobody wants to write two hundred times, and they are reasonable alt text as they stand.

The frames and the clip are plain addresses on a cache with no cookie, so you can serve them straight to customers or download them and host them yourself. Nothing in the result requires anything of ours to be loaded on your page.

Before you start

  • Buy a pack, then make a key in settings.
  • Order your product images by what sells.
  • Poll every id. Posting alone makes nothing.
  • Store the page address as well as the frames: it is the quickest thing to share internally.