Tarot
Three decks: Rider-Waite-Smith (78 cards), Tarot de Marseille (78) and Lenormand (36). Every card in every tarot response carries a picture, and POST /v1/interpret/tarot turns a spread into a reading: each position in context, a synthesis of the whole spread and one piece of advice.
Pick the card art
Section titled “Pick the card art”GET /v1/tarot/decks lists each deck, its spreads and the art sets you can pass as art on any tarot route (in the body of a POST, as ?art= on a GET). All sets are public domain and served from our CDN.
| Deck | art | Cards |
|---|---|---|
| Rider-Waite-Smith | rws-1909 (default), rws-restored, rws-vector | 78 |
| Tarot de Marseille | arnoult-1748 | 78 |
| Lenormand | dondorf | 35 of 36, no Moon |
Each card gets image with urlSmall (300 px wide, for cards shown up to about 150 px), url (600 px), url2x (1200 px), width, height and art. A draw also returns back, the card back, so a page can show the cards face down first. An art from another deck is a 400 INVALID_ART that names the valid ones. A card a set has no picture for (the Lenormand Moon) is listed in that set’s missing and comes without image, so draw a text card for it.
curl -X POST https://api.astroway.info/v1/tarot/rider-waite/draw/three-card \ -H "X-Api-Key: aw_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{ "seed": 12345, "art": "rws-restored" }'{ "drawn": [ { "position": { "index": 0, "name": "Past", "meaning": "Forces from the past shaping the situation." }, "card": { "slug": "8-of-pentacles", "name": "Eight of Pentacles", "image": { "url": "https://cdn.astroway.info/tarot/rws-restored/8-of-pentacles.webp", "url2x": "https://cdn.astroway.info/tarot/rws-restored/8-of-pentacles@2x.webp", "urlSmall": "https://cdn.astroway.info/tarot/rws-restored/8-of-pentacles-300.webp", "width": 600, "height": 1028, "art": "rws-restored" } }, "reversed": false } ], "back": { "url": "https://cdn.astroway.info/tarot/rws-1909/back.webp", "url2x": "https://cdn.astroway.info/tarot/rws-1909/back@2x.webp", "urlSmall": "https://cdn.astroway.info/tarot/rws-1909/back-300.webp", "width": 600, "height": 1039, "art": "rws-1909" }}A draw from POST /v1/tarot/rider-waite/draw/three-card costs 10 credits.
Card texts without a model
Section titled “Card texts without a model”GET /v1/public/tarot/texts?cards=the-fool,9-of-swords&lang=en needs no key and returns, for each card, a three-paragraph description (the picture, the upright meaning, the reversed meaning) and a text on love, career, finance, health and spirit for both upright and reversed, with the localised name and up to five keywords per side. Leave out cards for all 78. The texts do not change, so fetch the cards a page shows and cache them.
curl 'https://api.astroway.info/v1/public/tarot/texts?cards=the-fool,9-of-swords&lang=en'Read the whole spread
Section titled “Read the whole spread”POST /v1/interpret/tarot takes the deck, the spread, the cards and an optional question, and writes the reading in the language you ask for (21 languages). The cards can be slugs, { "slug", "reversed" } objects, or the drawn array of any draw response as it is.
const headers = { 'Content-Type': 'application/json', 'X-Api-Key': process.env.ASTROWAY_API_KEY };const api = (path, body) => fetch(`https://api.astroway.info/v1${path}`, { method: 'POST', headers, body: JSON.stringify(body) }).then((r) => r.json());
const { data: spread } = await api('/tarot/rider-waite/draw/three-card', { art: 'rws-1909' });const { data: reading } = await api('/interpret/tarot', { spread: 'three-card', question: 'What should I focus on at work?', cards: spread.drawn, language: 'en',});
for (const p of reading.positions) { console.log(p.position, p.card.name, p.reversed ? '(reversed)' : '', p.card.image.url); console.log(' ', p.reading);}console.log('Summary:', reading.synthesis);The answer has positions[] (position, card with its image, reversed, reading), synthesis, advice and disclaimer. Rider-Waite-Smith cards also carry nameLocalized and positionLocalized in the reading language. A reading costs 100 credits (Tier 4) and is available on the Free plan; with your own model key it costs less, see Bring your own model key.