> Documentation index: https://roxyapi.com/llms.txt. Building an integration? Read https://roxyapi.com/AGENTS.md first.

# Tarot card API with images in your brand colours

> Every card the Tarot API returns carries an `imageUrl` into an original 78-card deck drawn for RoxyAPI. Recolour it to your brand, title it in the language of your users, and serve it as JPG, PNG or WebP by changing the URL.

Most tarot APIs hand back the same century-old public-domain deck in one fixed colour scheme, so every app built on them looks alike. Ours is a deck of its own: text-free Art Deco art in a minimal screen-print line, with the card name in a title band below. This page covers the image URL and every option it takes. For readings, spreads and the daily card, start with the [Tarot API guide](/docs/guides/tarot).

## Where the image comes from

Every tarot response that returns a card, from [`POST /tarot/daily`](/api-reference/tarot#tag/tarot/POST/tarot/daily) to the [Celtic Cross](/api-reference/tarot#tag/tarot/POST/tarot/spreads/celtic-cross), includes `imageUrl`:

```bash
curl -s -X POST https://roxyapi.com/api/v2/tarot/daily \
  -H "X-API-Key: $ROXY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"seed": "user-42"}' | jq -r .card.imageUrl
```

```text
https://roxyapi.com/img/tarot/major/star.jpg
```

That URL is the card in the default palette, 600 by 1072 pixels, ready for an `<img>` tag. [Get your API key](/account?tab=keys) to call the endpoint; the image itself is a plain URL any browser loads directly.

## Options on the image URL

Add query parameters to restyle the card. Each one is optional, and the bare URL is the default deck.

| Parameter | What it does |
|---|---|
| extension | `.jpg` (default), `.png` or `.webp`. The format follows the file extension |
| `theme` | A preset palette shared with the widgets: `practitioner` (Rosewater), `eucalyptus`, `kiln`, `moonlit` or `celeste` |
| `primary` | Your brand colour as six digit hex, drawn as the line and the darkest fill. Sent with `sig` |
| `accent` | Your accent colour as six digit hex, drawn as the gold highlights. Sent with `sig` |
| `sig` | The signature issued for your `primary` and `accent` pair |
| `font` | The title typeface, the same pairs the widgets take: `fraunces-jost`, `jost`, `geist` or `system` |
| `lang` | The language of the title band: `en`, `es`, `fr`, `de`, `pt`, `ru`, `tr` or `hi` |
| `deck` | `roxy` (default) or `1909` for the classic 1909 deck |

An unknown parameter returns a `400` naming it, so a typo never serves the wrong card silently.

## Use a preset theme

A theme recolours the paper, the line, the half-tone and the accent together. No signature needed.

```html
<img
  src="https://roxyapi.com/img/tarot/major/star.webp?theme=moonlit"
  alt="The Star tarot card"
  width="300" height="536">
```

Set the theme your site already uses with the widgets or UI components, and the cards match the rest of the page.

## Use your own brand colours

`primary` becomes the line and the deepest tone of every card, `accent` the highlights, and the half-tone is mixed from your primary so the whole card stays in your hue. Send the pair with the `sig` issued for it:

```text
https://roxyapi.com/img/tarot/major/star.png?primary=%233e2c23&accent=%23b5651d&sig=YOUR_SIG
```

- Encode `#` as `%23` in a URL.
- One `sig` covers one colour pair on all 78 cards, every format and every language.
- Sign your pair on the [account dashboard](/account) and copy the ready query string.
- `primary` needs at least 3:1 contrast on the card paper so the line art always reads. A lighter colour returns a `400` that names the colour.
- `accent` alone moves only the highlights; `primary` on top of a `theme` keeps the theme paper.

## Titles in the language of your users

Add `lang` and the title band prints the card name in that language, with the Roman numeral on every Major Arcana card:

```text
https://roxyapi.com/img/tarot/minor/three-of-cups.png?theme=moonlit&lang=es
```

Use the same `lang` you send to the reading endpoints and the image agrees with the text beside it. The art carries no words, so nothing else changes between languages.

## Pick a format

Change the extension: `.jpg` for the smallest photo-style file, `.png` for lossless flat colour, `.webp` for the smallest file a modern browser takes.

```text
https://roxyapi.com/img/tarot/minor/ace-of-cups.webp?theme=kiln
```

The path names the arcana and the card `id` from the response: `/img/tarot/major/{id}` for the 22 Major Arcana, `/img/tarot/minor/{id}` for the 56 Minor Arcana.

## Build the URL from the response

Start from `imageUrl` and set what you need, so the path always matches the card:

```javascript
function cardImage(imageUrl, { format = 'webp', theme, lang } = {}) {
  const url = new URL(imageUrl.replace(/\.jpg$/, `.${format}`));
  if (theme) url.searchParams.set('theme', theme);
  if (lang && lang !== 'en') url.searchParams.set('lang', lang);
  return url.toString();
}

cardImage(data.card.imageUrl, { theme: 'moonlit', lang: 'es' });
// https://roxyapi.com/img/tarot/major/star.webp?theme=moonlit&lang=es
```

Reversed cards use the same image: rotate it 180 degrees when `card.reversed` is `true`. The [UI components](/docs/ui) do that for you.

## The classic 1909 deck

`deck=1909` serves the 1909 Pamela Colman Smith art instead, in its original colours:

```text
https://roxyapi.com/img/tarot/major/star.jpg?deck=1909
```

Theme, colours and font apply to the RoxyAPI deck only; sent with `deck=1909` they return a `400`.

## Your deck, inside your product

The deck is built for white-label apps: your colours, your typeface, the language of your users, and no RoxyAPI mark on the card. Your subscription licenses the API and its output for use in your own applications and products, commercially included, as set out in section 5 of the [Terms of Service](/policy/terms) and on the [License page](/policy/license).

Images are served with a long cache lifetime, so a card a user has seen loads instantly the next time. Cache them in your own app the same way you [cache API responses](/docs/guides/caching).

## FAQ


### Is there a tarot card API with images?
Yes. Every card in a RoxyAPI tarot response carries `imageUrl`, an image of that card from an original 78-card deck, for the daily card, a draw, the yes or no answer and every spread.

### Can I change the colours of the tarot cards?
Yes. Add `theme` for a preset palette, or `primary` and `accent` with the `sig` issued for your pair to draw every card in your brand colours.

### Can the card titles be in another language?
Yes. Add `lang`, for example `lang=es` or `lang=hi`, and the title band prints the card name in that language. The art itself has no words.

### Which image formats are available?
JPG, PNG and WebP. Change the extension of `imageUrl` to pick one; every option works in every format.

### Can I still use the Rider-Waite-Smith images?
Yes. Add `deck=1909` for the classic 1909 deck. The card meanings follow the Rider-Waite-Smith tradition with either deck.

### Can I use the cards in a white-label app?
Yes. Your subscription licenses the API and its output for your own products, commercially included, and the cards carry no RoxyAPI mark.


## What to build next

- [Tarot API guide](/docs/guides/tarot): the daily card, spreads and the yes or no oracle.
- [Build a tarot reading app](/docs/tutorials/tarot-app): daily card plus three-card spread in one page.
- [UI components](/docs/ui): `RoxyTarotCard` and `RoxyTarotSpread` render the cards, flip reversals and take the same themes.
- [Tarot API reference](/api-reference/tarot): every endpoint with a live console.
