콘텐츠로 이동
AstroWay/api v2.384.6 · ko
모든 시스템 정상 작동 중

타로

마지막 업데이트 Markdown으로 보기 에이전트 설정

세 가지 덱이 있습니다: Rider-Waite-Smith (78장), 마르세유 타로 (78장), 그리고 Lenormand (36장). 각 덱의 모든 카드는 이미지를 가지고 있으며, POST /v1/interpret/tarot은 타로 읽기를 생성합니다: 각 위치의 맥락, 전체 읽기의 요약, 그리고 하나의 조언이 포함됩니다.

GET /v1/tarot/decks는 각 덱, 그 읽기 방식, 그리고 art 매개변수로 전달할 수 있는 스타일 세트 목록을 반환합니다(POST 요청 본문이나 ?art= 쿼리 매개변수에). 모든 스타일 세트는 공유 재산이며, 우리의 CDN에서 제공됩니다.

덱art카드 수
Rider-Waite-Smithrws-1909 (기본), rws-restored, rws-vector78
마르세유 타로arnoult-174878
Lenormanddondorf36장 중 35장 (달 카드는 제외)

각 카드는 image 필드에 urlSmall (300px 너비, 페이지에서 약 150px까지의 카드에 사용), url (600px), url2x (1200px), width, height, 그리고 art를 포함합니다. 읽기는 또한 back 필드를 제공하여 카드가 뒷면이 보이도록 페이지가 먼저 표시할 수 있습니다. 다른 덱의 art를 사용하면 400 INVALID_ART 오류와 함께 유효한 스타일 목록이 반환됩니다. 스타일 세트에서 이미지가 없는 카드(예: Lenormand의 달)는 해당 스타일 세트의 missing 필드에 표시되며, image가 없이 반환되므로 텍스트 카드로 표시해야 합니다.

Terminal window
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" }
}

POST /v1/tarot/rider-waite/draw/three-card 요청은 10 크레딧이 소모됩니다.

사용자 정의 읽기와 Lenormand의 카드 짝

섹션 제목: “사용자 정의 읽기와 Lenormand의 카드 짝”

POST /v1/tarot/rider-waite/draw/custom, /tarot/marseille/draw/custom, 그리고 /tarot/lenormand/draw/custom은 사용자가 직접 지정한 위치(positions: ["나", "너", "우리"])에 1~15장의 카드를 배치합니다. 또는 단순히 카드 수(count)만 지정할 수 있습니다. 타스킹은 표준 읽기와 동일하므로 동일한 seed로 사용자 정의 읽기의 카드 3장이 표준 읽기의 카드와 일치합니다.

POST /v1/tarot/lenormand/combination은 Lenormand 덱의 두 장을 짝으로 읽습니다: 첫 번째 카드는 주제, 두 번째 카드는 그 주제의 설명을 나타내므로 순서가 중요합니다({ "cards": ["heart", "ring"] }는 “사랑과 감정, 계약으로 묶여있다.”와 같은 읽기를 반환합니다). 응답에는 역순 읽기 및 짝의 전체 톤도 포함됩니다. 각 카드에 대한 문구는 기본적인 카드 의미로부터 작성되었으며, 짝의 표는 누구의 것도 복사하지 않았습니다. 각각 10 크레딧이 소모됩니다.

한 장의 카드에 대한 예/아니오 응답도 이미 제공됩니다: POST /v1/tarot/rider-waite/draw/decision과 /tarot/marseille/draw/decision은 verdict (yes, no, maybe)와 이유를 반환합니다.

GET /v1/public/tarot/texts?cards=the-fool,9-of-swords&lang=ko는 API 키 없이 작동하며, 각 카드에 대해 description(3개의 단락: 이미지, 직립 의미, 역전 의미)과 love, career, finance, health, spirit에 대한 텍스트를 upright 및 reversed 각각에 대해 반환합니다. 또한 지역화된 이름(name)과 각 면에 최대 5개의 키워드(keywords)가 포함됩니다. cards 매개변수가 없으면 모든 78장의 카드 텍스트가 반환됩니다. 텍스트는 변경되지 않으므로 페이지에서 표시하는 카드를 미리 로드하고 캐시해 두세요.

Terminal window
curl 'https://api.astroway.info/v1/public/tarot/texts?cards=the-fool,9-of-swords&lang=uk'

POST /v1/interpret/tarot은 덱, 읽기, 카드, 그리고 선택적 질문에 대해 해석을 생성합니다. 언어는 language 매개변수에 따라 지정됩니다(21개 언어 지원). 카드는 슬러그({ "slug", "reversed" }) 객체 또는 어떤 읽기 응답에서 변경하지 않고 사용 가능한 drawn 배열로 전달할 수 있습니다.

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);

응답에는 positions[](위치, image, reversed, reading), synthesis, advice, 그리고 disclaimer가 포함됩니다. Rider-Waite-Smith 덱의 카드는 해석 언어에 따라 nameLocalized과 positionLocalized도 포함합니다. 해석은 100 크레딧이 소모되며(Tier 4), Free 타리프에서 사용할 수 있습니다. 자체 모델 키를 사용하면 더 저렴합니다. 자세한 내용은 자체 모델 키 참조하세요.