Cinechroma

Developers

Get any saved film’s colour barcode as JSON, SVG or PNG: the colour of every bar, and its key colours. Free, with an API key.

Your API keys

Sign in with GitHub to get a key. Nothing else on Cinechroma needs an account.

We keep your GitHub name, email address and picture, to manage your keys, and nothing else. You can delete your account at any time.

Getting started

Send your key in the x-api-key header.

Each gets a film and its barcode, with your key in the CINECHROMA_API_KEY environment variable (in a browser, in the page, where its visitors can read it):

curl -H "x-api-key: $CINECHROMA_API_KEY" https://cinechroma.app/api/v1/films/tt0111161

Responses are JSON (or an image). Films are identified by their IMDb ID (e.g. tt0111161), or their TMDB ID. Browsers can call the API from any site, but a key in a web page is visible to its visitors: keep keys on your server where you can.

The API gives a film’s colour data, with just enough to identify the film: its IDs, title and year. For its other details (cast, genres, overview, posters), use its tmdbId with TMDB’s own API.

Using the API means agreeing to its terms of use, which ask you to credit Cinechroma. The API is described in OpenAPI 3.1 at https://cinechroma.app/api/v1/openapi.json, for tools such as Postman, Insomnia or Swagger UI, or to generate a client.

API reference: try requests with your key

Endpoints

GET /api/v1/films

The films with barcodes, a page at a time.

q
Search by title (or original title), ignoring accents and case.
sort
recent (newest barcodes first; the default), title, released or colour.
updatedSince
Only films whose barcode was saved after this date or time (ISO 8601, e.g. 2026-11-01): to keep a copy up to date.
page, limit
Which page, from 1, and how many films on it: up to 100 (50 by default). next is the next page’s address, or null.
{
  "films": [
    {
      "imdbId": "tt0111161",
      "tmdbId": 278,
      "title": "The Shawshank Redemption",
      "year": 1994,
      "updatedAt": "2026-10-03T09:12:44.000Z",
      "url": "https://cinechroma.app/film/tt0111161"
    }
  ],
  "count": 120,
  "page": 1,
  "limit": 50,
  "next": "https://cinechroma.app/api/v1/films?page=2"
}

GET /api/v1/films/:imdbId

A film and its barcode. GET /api/v1/films/tmdb/:tmdbId gives the same, by the film’s TMDB ID. Both take the colour options.

{
  "imdbId": "tt0111161",
  "tmdbId": 278,
  "title": "The Shawshank Redemption",
  "year": 1994,
  "updatedAt": "2026-10-03T09:12:44.000Z",
  "url": "https://cinechroma.app/film/tt0111161",
  "barcode": {
    "intervalSeconds": 4,
    "duration": 8520,
    "total": 2130,
    "averaging": "linear-rgb",
    "colours": ["#1b1a1c", "#2a2724", null, "…"],
    "keyColours": {
      "source": "pixels",
      "sets": { "5": ["#7a5a3c", "…"], "10": ["…"] },
      "shares": { "5": [0.31, "…"], "10": ["…"] }
    }
  }
}
barcode.colours
One colour per bar, in film order: the average of intervalSeconds of film, in linear light. null where no frame could be read.
barcode.keyColours
The colours that define the film, rather than averages, in the order they first appear, in sets of 5 up to 256 (a set can have fewer). source is pixels when they were picked while scanning, or bars when picked afterwards from the bars, which is less true to the film. shares gives each colour’s share of the film (0 to 1), in the same order.

Colour options

The same choices as Get code on a film’s page, as query parameters:

bars
The number of samples: average the barcode down to this many bars, if it has more (in linear light, as each bar is). A full barcode can have thousands. Key colours come in every size at once.
order
time (film order; the default), hue (round the colour wheel from red, greys last), saturation (most colourful first), brightness (brightest first) or frequency (the colours covering most of the film first). In any order but time, bars with no colour are left out. It applies to the key colours too, with their shares.
format
hex (the default), rgb, hsl, hwb, lab, lch, oklab, oklch, display-p3 (color(display-p3 …)) or hsb: e.g. oklch(0.4936 0.0608 63.81).
colours
barcode for only the barcode’s colours (leaving out keyColours), or key for only the key colours (leaving out colours). Both by default.

GET /api/v1/films/batch?ids=tt0111161,tt0068646

Up to 100 films and their barcodes at once, counted as one request: { "films": [ … ], "missing": [ … ] }, with the films in the order asked for, and the IDs that have no barcode in missing. Takes the colour options too.

GET /api/v1/films/:imdbId/barcode.svg and barcode.png

The barcode as an image, to save and show on your own site. The SVG stretches to any size; the PNG is a pixel across per bar (up to 4,000, averaged down if there are more) and height pixels tall (100 by default, up to 1,000). Both take bars and order. To show a barcode without a key, embed it from its film page instead.

Saving requests

Barcodes rarely change once saved. Every response has an ETag: keep it with your copy, and send it back in If-None-Match next time. If nothing has changed, the answer is 304 Not Modified, with no body, and isn’t counted against your limit.

To keep a copy of every barcode up to date, list the films with updatedSince set to when you last looked, then fetch the ones that have changed with batch, 100 at a time.

Limits

Each key can make 1,000 requests a day, counted from midnight UTC, and you can have up to 3 keys. If you need more, sign in and ask: we can raise a key’s limit. Every response says where you are, in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (a Unix time), and in the standard RateLimit and RateLimit-Policy headers.

Keys used in ways that harm the service, such as scraping around the limits, may be disabled without notice.

Errors

Errors are JSON too, with a message to show and a code to check: { "error": "…", "code": "film_not_found" }. A 403 that isn’t JSON is from Cloudflare, which turns away some libraries’ own User-Agent (such as Python’s urllib): send one naming your app.

StatuscodeMeaning
400invalid_requestSomething in the request isn’t right: the message says what.
401missing_keyNo key in the x-api-key header.
401invalid_keyThe key isn’t a valid one (or has been deleted).
403key_disabledThe key has been disabled.
403account_bannedThe key’s account is banned from the API.
404film_not_foundNo barcode for that film.
429rate_limitedThe key has made its requests for today. Retry-After says how many seconds until it can make more.
500server_errorSomething went wrong on our side.

Changelog

Changes only add to what responses have: nothing is renamed or taken away within version 1.

1.0.0,
  • First release: films and their barcodes by IMDb or TMDB ID, a page at a time or up to 100 at once, and barcodes as SVG or PNG.
  • Colours averaged down to any number of samples, in film order or by hue, saturation, brightness or frequency, in hex or any CSS colour format, with each key colour’s share of the film.